RygelMediaObject

RygelMediaObject — Represents a media object (container or item).

Synopsis

#define             RYGEL_TYPE_MEDIA_OBJECT
void                rygel_media_object_get_writable     (RygelMediaObject *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
GFile *             rygel_media_object_get_writable_finish
                                                        (RygelMediaObject *self,
                                                         GAsyncResult *_res_,
                                                         GError **error);
void                rygel_media_object_get_writables    (RygelMediaObject *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
GeeArrayList *      rygel_media_object_get_writables_finish
                                                        (RygelMediaObject *self,
                                                         GAsyncResult *_res_,
                                                         GError **error);
gint                rygel_media_object_compare_string_props
                                                        (RygelMediaObject *self,
                                                         const gchar *prop1,
                                                         const gchar *prop2);
gint                rygel_media_object_compare_int_props
                                                        (RygelMediaObject *self,
                                                         gint prop1,
                                                         gint prop2);
RygelMediaContainer * rygel_media_object_get_parent_ref (RygelMediaObject *self);
void                rygel_media_object_set_parent_ref   (RygelMediaObject *self,
                                                         RygelMediaContainer *value);
const gchar *       rygel_media_object_get_title        (RygelMediaObject *self);
void                rygel_media_object_set_title        (RygelMediaObject *self,
                                                         const gchar *value);
struct              RygelMediaObject;
struct              RygelMediaObjectClass;

Object Hierarchy

  GObject
   +----RygelMediaObject
         +----RygelMediaItem
         +----RygelMediaContainer

Properties

  "ocm-flags"                GUPnPOCMFlags         : Read
  "parent-ref"               RygelMediaContainer*  : Read / Write
  "restricted"               gboolean              : Read
  "title"                    gchar*                : Read / Write

Description

The derived RygelMediaContainer class represents a container, and the derived RygelMediaItem classes (RygelAudioItem, RygelImageItem and RygelVideoItem) represent media items.

These objects correspond to items and containers in the UPnP ContentDirectory's DIDL-Lite XML.

Details

RYGEL_TYPE_MEDIA_OBJECT

#define RYGEL_TYPE_MEDIA_OBJECT (rygel_media_object_get_type ())

The type for RygelMediaObject.


rygel_media_object_get_writable ()

void                rygel_media_object_get_writable     (RygelMediaObject *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);

Fetches a File object for any writable URI available for this object.

See also: rygel_media_object_get_writable_finish()

self :

the RygelMediaObject instance

cancellable :

A GLib.Cancellable. [in][allow-none]

_callback_ :

callback to call when the request is satisfied. [scope async]

_user_data_ :

the data to pass to _callback_ function. [closure]

rygel_media_object_get_writable_finish ()

GFile *             rygel_media_object_get_writable_finish
                                                        (RygelMediaObject *self,
                                                         GAsyncResult *_res_,
                                                         GError **error);

Fetches a File object for any writable URI available for this object.

See also: rygel_media_object_get_writable()

self :

the RygelMediaObject instance

_res_ :

a GAsyncResult

error :

location to store the error occuring, or NULL to ignore

rygel_media_object_get_writables ()

void                rygel_media_object_get_writables    (RygelMediaObject *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);

Fetches File objects for all writable URIs available for this object.

See also: rygel_media_object_get_writables_finish()

self :

the RygelMediaObject instance

cancellable :

A GLib.Cancellable. [in][allow-none]

_callback_ :

callback to call when the request is satisfied. [scope async]

_user_data_ :

the data to pass to _callback_ function. [closure]

rygel_media_object_get_writables_finish ()

GeeArrayList *      rygel_media_object_get_writables_finish
                                                        (RygelMediaObject *self,
                                                         GAsyncResult *_res_,
                                                         GError **error);

Fetches File objects for all writable URIs available for this object.

See also: rygel_media_object_get_writables()

self :

the RygelMediaObject instance

_res_ :

a GAsyncResult

error :

location to store the error occuring, or NULL to ignore

rygel_media_object_compare_string_props ()

gint                rygel_media_object_compare_string_props
                                                        (RygelMediaObject *self,
                                                         const gchar *prop1,
                                                         const gchar *prop2);

self :

the RygelMediaObject instance

rygel_media_object_compare_int_props ()

gint                rygel_media_object_compare_int_props
                                                        (RygelMediaObject *self,
                                                         gint prop1,
                                                         gint prop2);

self :

the RygelMediaObject instance

rygel_media_object_get_parent_ref ()

RygelMediaContainer * rygel_media_object_get_parent_ref (RygelMediaObject *self);

Get and return the current value of the "parent-ref" property.

self :

the RygelMediaObject instance to query

Returns :

the value of the "parent-ref" property

rygel_media_object_set_parent_ref ()

void                rygel_media_object_set_parent_ref   (RygelMediaObject *self,
                                                         RygelMediaContainer *value);

Set the value of the "parent-ref" property to value.

self :

the RygelMediaObject instance to modify

value :

the new value of the "parent-ref" property

rygel_media_object_get_title ()

const gchar *       rygel_media_object_get_title        (RygelMediaObject *self);

Get and return the current value of the "title" property.

self :

the RygelMediaObject instance to query

Returns :

the value of the "title" property

rygel_media_object_set_title ()

void                rygel_media_object_set_title        (RygelMediaObject *self,
                                                         const gchar *value);

Set the value of the "title" property to value.

self :

the RygelMediaObject instance to modify

value :

the new value of the "title" property

struct RygelMediaObject

struct RygelMediaObject;

Represents a media object (container or item).

The derived RygelMediaContainer class represents a container, and the derived RygelMediaItem classes (RygelAudioItem, RygelImageItem and RygelVideoItem) represent media items.

These objects correspond to items and containers in the UPnP ContentDirectory's DIDL-Lite XML.


struct RygelMediaObjectClass

struct RygelMediaObjectClass {
	GObjectClass parent_class;
	GUPnPDIDLLiteObject* (*serialize) (RygelMediaObject* self, GUPnPDIDLLiteWriter* writer, RygelHTTPServer* http_server, GError** error);
	gint (*compare_by_property) (RygelMediaObject* self, RygelMediaObject* media_object, const gchar* property);
	GUPnPOCMFlags (*get_ocm_flags) (RygelMediaObject* self);
};

The class structure for RYGEL_TYPE_MEDIA_OBJECT. All the fields in this structure are private and should never be accessed directly.

GObjectClass parent_class;

the parent class structure

serialize ()

compare_by_property ()

get_ocm_flags ()

Property Details

The "ocm-flags" property

  "ocm-flags"                GUPnPOCMFlags         : Read

ocm-flags.


The "parent-ref" property

  "parent-ref"               RygelMediaContainer*  : Read / Write

parent-ref.


The "restricted" property

  "restricted"               gboolean              : Read

restricted.

Default value: FALSE


The "title" property

  "title"                    gchar*                : Read / Write

title.

Default value: NULL