Rygel.MediaContainer – librygel-server – Vala Binding Reference

Rygel.MediaContainer – librygel-server Reference Manual

# MediaContainer

## Object Hierarchy:

## Description:

public abstract class MediaContainer : MediaObject

Represents a container (folder) for media items and containers. Provides basic serialization (to DIDLLiteWriter) implementation. Deriving classes are supposed to provide working implementations of get_children.

All known sub-classes:

- SimpleContainer

Required by:

- SearchableContainer

- WritableContainer

Namespace: Rygel
Package: librygel-server

## Content:

### Constants:

- public const unowned `string` UPNP_CLASS
- public const unowned `string` STORAGE_FOLDER
- public const unowned `string` MUSIC_ALBUM
- public const unowned `string` MUSIC_ARTIST
- public const unowned `string` MUSIC_GENRE
- public const unowned `string` ALBUM_SORT_CRITERIA

### Properties:

- public `string` sort_criteria { set; get; }

### Creation methods:

- public MediaContainer (`string` id, MediaContainer? parent, `string` title, `int` child_count)
- public MediaContainer.root (`string` title, `int` child_count)

### Methods:

- public abstract async MediaObjects? get_children (`uint` offset, `uint` max_count, `string` sort_criteria, `Cancellable`? cancellable) throws `Error`
  Fetches the list of media objects directly under this container.
- public abstract async MediaObject? find_object (`string` id, `Cancellable`? cancellable) throws `Error`
  Recursively searches for media object with the given id in this container.
- public void updated ()
  Method to be be called each time this container is updated (metadata changes for this container, items under it gets removed/added or their metadata changes etc).

### Signals:

- public signal void container_updated (MediaContainer container)
  container_updated signal that is emitted if a child container under the tree of this container gets updated.

### Fields:

- public `int` child_count
- public `uint32` update_id
- public `int64` storage_used