![]() |
![]() |
![]() |
librygel-server Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Known Derived Interfaces | Properties | Signals |
RygelMediaContainerRygelMediaContainer — This is a container (folder) for media items and child containers. |
#define RYGEL_TYPE_MEDIA_CONTAINER void rygel_media_container_get_children (RygelMediaContainer *self
,guint offset
,guint max_count
,const gchar *sort_criteria
,GCancellable *cancellable
,GAsyncReadyCallback _callback_
,gpointer _user_data_
); RygelMediaObjects * rygel_media_container_get_children_finish (RygelMediaContainer *self
,GAsyncResult *_res_
,GError **error
); void rygel_media_container_find_object (RygelMediaContainer *self
,const gchar *id
,GCancellable *cancellable
,GAsyncReadyCallback _callback_
,gpointer _user_data_
); RygelMediaObject * rygel_media_container_find_object_finish (RygelMediaContainer *self
,GAsyncResult *_res_
,GError **error
); void rygel_media_container_updated (RygelMediaContainer *self
,RygelMediaObject *object
,RygelObjectEventType event_type
,gboolean sub_tree_update
); #define RYGEL_MEDIA_CONTAINER_UPNP_CLASS #define RYGEL_MEDIA_CONTAINER_STORAGE_FOLDER #define RYGEL_MEDIA_CONTAINER_MUSIC_ALBUM #define RYGEL_MEDIA_CONTAINER_MUSIC_ARTIST #define RYGEL_MEDIA_CONTAINER_MUSIC_GENRE #define RYGEL_MEDIA_CONTAINER_ALBUM_SORT_CRITERIA const gchar * rygel_media_container_get_sort_criteria (RygelMediaContainer *self
); void rygel_media_container_set_sort_criteria (RygelMediaContainer *self
,const gchar *value
); struct RygelMediaContainer; struct RygelMediaContainerClass; enum RygelObjectEventType;
GObject +----RygelMediaObject +----RygelMediaContainer +----RygelSimpleContainer
GEnum +----RygelObjectEventType
RygelMediaContainer is required by RygelSearchableContainer, RygelTrackableContainer and RygelWritableContainer.
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.
#define RYGEL_TYPE_MEDIA_CONTAINER (rygel_media_container_get_type ())
The type for RygelMediaContainer.
void rygel_media_container_get_children (RygelMediaContainer *self
,guint offset
,guint max_count
,const gchar *sort_criteria
,GCancellable *cancellable
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Fetches the list of media objects directly under this container.
See also: rygel_media_container_get_children_finish()
|
the RygelMediaContainer instance |
|
zero-based index of the first item to return. [in] |
|
maximum number of objects to return. [in] |
|
sorting order of objects to return. [in] |
|
optional cancellable for this operation. [in][allow-none] |
|
callback to call when the request is satisfied. [scope async] |
|
the data to pass to _callback_ function. [closure]
|
RygelMediaObjects * rygel_media_container_get_children_finish (RygelMediaContainer *self
,GAsyncResult *_res_
,GError **error
);
Fetches the list of media objects directly under this container.
See also: rygel_media_container_get_children()
|
the RygelMediaContainer instance |
|
a GAsyncResult |
|
location to store the error occuring, or NULL to ignore |
Returns : |
A list of media objects. |
void rygel_media_container_find_object (RygelMediaContainer *self
,const gchar *id
,GCancellable *cancellable
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Recursively searches this container for a media object with the given ID.
See also: rygel_media_container_find_object_finish()
|
the RygelMediaContainer instance |
|
ID of the media object to search for. [in] |
|
optional cancellable for this operation. [in][allow-none] |
|
callback to call when the request is satisfied. [scope async] |
|
the data to pass to _callback_ function. [closure]
|
RygelMediaObject * rygel_media_container_find_object_finish (RygelMediaContainer *self
,GAsyncResult *_res_
,GError **error
);
Recursively searches this container for a media object with the given ID.
See also: rygel_media_container_find_object()
|
the RygelMediaContainer instance |
|
a GAsyncResult |
|
location to store the error occuring, or NULL to ignore |
Returns : |
the found media object. |
void rygel_media_container_updated (RygelMediaContainer *self
,RygelMediaObject *object
,RygelObjectEventType event_type
,gboolean sub_tree_update
);
This method should be called each time this container is updated.
For instance, this should be called if there are metadata changes for this container, if items under it are removed or added, if there are metadata changes to items under it, etc.
|
the RygelMediaContainer instance |
#define RYGEL_MEDIA_CONTAINER_STORAGE_FOLDER RYGEL_MEDIA_CONTAINER_UPNP_CLASS ".storageFolder"
#define RYGEL_MEDIA_CONTAINER_MUSIC_ALBUM RYGEL_MEDIA_CONTAINER_UPNP_CLASS ".album.musicAlbum"
#define RYGEL_MEDIA_CONTAINER_MUSIC_ARTIST RYGEL_MEDIA_CONTAINER_UPNP_CLASS ".person.musicArtist"
#define RYGEL_MEDIA_CONTAINER_MUSIC_GENRE RYGEL_MEDIA_CONTAINER_UPNP_CLASS ".genre.musicGenre"
#define RYGEL_MEDIA_CONTAINER_ALBUM_SORT_CRITERIA "+upnp:class," "+rygel:originalVolumeNumber," "+upnp:originalTrackNumber," "+dc:title"
const gchar * rygel_media_container_get_sort_criteria
(RygelMediaContainer *self
);
Get and return the current value of the "sort-criteria" property.
|
the RygelMediaContainer instance to query |
Returns : |
the value of the "sort-criteria" property |
void rygel_media_container_set_sort_criteria (RygelMediaContainer *self
,const gchar *value
);
Set the value of the "sort-criteria" property to value
.
|
the RygelMediaContainer instance to modify |
|
the new value of the "sort-criteria" property |
struct RygelMediaContainer;
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.
struct RygelMediaContainerClass { RygelMediaObjectClass parent_class; void (*get_children) (RygelMediaContainer* self, guint offset, guint max_count, const gchar* sort_criteria, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_); RygelMediaObjects* (*get_children_finish) (RygelMediaContainer* self, GAsyncResult* _res_, GError** error); void (*find_object) (RygelMediaContainer* self, const gchar* id, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_); RygelMediaObject* (*find_object_finish) (RygelMediaContainer* self, GAsyncResult* _res_, GError** error); };
The class structure for RYGEL_TYPE_MEDIA_CONTAINER
. All the fields in this structure are private and should never be accessed directly.
"sort-criteria"
property"sort-criteria" gchar* : Read / Write
sort-criteria.
Default value: NULL
"container-updated"
signalvoid user_function (RygelMediaContainer *media_container,
RygelMediaContainer *container,
RygelMediaObject *object,
RygelObjectEventType event_type,
gboolean sub_tree_update,
gpointer user_data) : Run Last
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.
|
the RygelMediaContainer instance that received the signal |
|
The child container that has been updated. |
|
the object that got changed. |
|
describes what actually happened to object. |
|
whether the modification is part of sub-tree update. |
|
user data set when the signal handler was connected. |
"sub-tree-updates-finished"
signalvoid user_function (RygelMediaContainer *media_container,
RygelMediaObject *sub_tree_root,
gpointer user_data) : Run Last
sub_tree_updates_finished signal is emitted when all of sub-tree operations are finished.
|
the RygelMediaContainer instance that received the signal |
|
- root of a sub-tree where all operations were performed. |
|
user data set when the signal handler was connected. |