Rygel.MediaContainer – librygel-server – Vala Binding Reference

Rygel.MediaContainer – librygel-server Reference Manual

# MediaContainer

## Object Hierarchy:

## Description:

public abstract class MediaContainer : MediaObject

This is a container (folder) for media items and child containers.

It provides a basic serialization implementation (to DIDLLiteWriter).

A derived class should provide a working implementation of get_children and should emit the container_updated signal.

All known sub-classes:

- SimpleContainer

Required by:

- SearchableContainer

- TrackableContainer

- 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 this container for a media object with the given ID.
- public void updated (MediaObject object = , ObjectEventType event_type = MODIFIED, `bool` sub_tree_update = false)
  This method should be called each time this container is updated.

### Signals:

- public signal void container_updated (MediaContainer container, MediaObject object, ObjectEventType event_type, `bool` sub_tree_update)
  The container_updated signal is emitted if a child container under the tree of this container has been updated. object is set to the MediaObject being the source of container update. Note that it may be even set to container itself.
- public signal void sub_tree_updates_finished (MediaObject sub_tree_root)
  sub_tree_updates_finished signal is emitted when all of sub-tree operations are finished.

### Fields:

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

### Inherited Members:

All known members inherited from class Rygel.MediaObject

- id
- ref_id
- upnp_class
- modified
- object_update_id

- parent_ref
- title
- get_writable
- get_writables

- compare_string_props
- compare_int_props
- uris
- parent

All known members inherited from class GLib.Object

- @new
- newv
- new_valist
- get_type
- get_class
- @ref
- unref
- ref_sink
- weak_ref
- weak_unref
- add_weak_pointer
- remove_weak_pointer

- @get
- @set
- get_property
- set_property
- get_data
- set_data
- set_data_full
- steal_data
- get_qdata
- set_qdata
- set_qdata_full
- steal_qdata

- freeze_notify
- thaw_notify
- dispose
- constructed
- notify_property
- connect
- disconnect
- add_toggle_ref
- remove_toggle_ref
- bind_property
- notify
- ref_count