## 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);
    const gchar *       rygel_media_object_get_id           (RygelMediaObject *self);
    void                rygel_media_object_set_id           (RygelMediaObject *self,
                                                             const gchar *value);
    const gchar *       rygel_media_object_get_ref_id       (RygelMediaObject *self);
    void                rygel_media_object_set_ref_id       (RygelMediaObject *self,
                                                             const gchar *value);
    const gchar *       rygel_media_object_get_upnp_class   (RygelMediaObject *self);
    void                rygel_media_object_set_upnp_class   (RygelMediaObject *self,
                                                             const gchar *value);
    guint64             rygel_media_object_get_modified     (RygelMediaObject *self);
    void                rygel_media_object_set_modified     (RygelMediaObject *self,
                                                             guint64 value);
    guint               rygel_media_object_get_object_update_id
                                                            (RygelMediaObject *self);
    void                rygel_media_object_set_object_update_id
                                                            (RygelMediaObject *self,
                                                             guint value);
    RygelMediaContainer * rygel_media_object_get_parent     (RygelMediaObject *self);
    void                rygel_media_object_set_parent       (RygelMediaObject *self,
                                                             RygelMediaContainer *value);
    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

## Known Derived Interfaces

RygelMediaObject is required by RygelUpdatableObject.

## Properties

      "id"                       gchar*                : Read / Write / Construct
      "modified"                 guint64               : Read / Write
      "object-update-id"         guint                 : Read / Write
      "ocm-flags"                GUPnPOCMFlags         : Read
      "parent"                   RygelMediaContainer*  : Read / Write / Construct
      "parent-ref"               RygelMediaContainer*  : Read / Write
      "ref-id"                   gchar*                : Read / Write
      "restricted"               gboolean              : Read
      "title"                    gchar*                : Read / Write / Construct
      "upnp-class"               gchar*                : Read / Write / Construct

## 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_id ()

    const gchar *       rygel_media_object_get_id           (RygelMediaObject *self);

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

`self` : | the RygelMediaObject instance to query
Returns : | the value of the "id" property

### rygel_media_object_set_id ()

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

Set the value of the "id" property to `value`.

`self` : | the RygelMediaObject instance to modify
`value` : | the new value of the "id" property

### rygel_media_object_get_ref_id ()

    const gchar *       rygel_media_object_get_ref_id       (RygelMediaObject *self);

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

`self` : | the RygelMediaObject instance to query
Returns : | the value of the "ref-id" property

### rygel_media_object_set_ref_id ()

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

Set the value of the "ref-id" property to `value`.

`self` : | the RygelMediaObject instance to modify
`value` : | the new value of the "ref-id" property

### rygel_media_object_get_upnp_class ()

    const gchar *       rygel_media_object_get_upnp_class   (RygelMediaObject *self);

Get and return the current value of the "upnp-class" property.

`self` : | the RygelMediaObject instance to query
Returns : | the value of the "upnp-class" property

### rygel_media_object_set_upnp_class ()

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

Set the value of the "upnp-class" property to `value`.

`self` : | the RygelMediaObject instance to modify
`value` : | the new value of the "upnp-class" property

### rygel_media_object_get_modified ()

    guint64             rygel_media_object_get_modified     (RygelMediaObject *self);

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

`self` : | the RygelMediaObject instance to query
Returns : | the value of the "modified" property

### rygel_media_object_set_modified ()

    void                rygel_media_object_set_modified     (RygelMediaObject *self,
                                                             guint64 value);

Set the value of the "modified" property to `value`.

`self` : | the RygelMediaObject instance to modify
`value` : | the new value of the "modified" property

### rygel_media_object_get_object_update_id ()

    guint               rygel_media_object_get_object_update_id
                                                            (RygelMediaObject *self);

Get and return the current value of the "object-update-id" property.

`self` : | the RygelMediaObject instance to query
Returns : | the value of the "object-update-id" property

### rygel_media_object_set_object_update_id ()

    void                rygel_media_object_set_object_update_id
                                                            (RygelMediaObject *self,
                                                             guint value);

Set the value of the "object-update-id" property to `value`.

`self` : | the RygelMediaObject instance to modify
`value` : | the new value of the "object-update-id" property

### rygel_media_object_get_parent ()

    RygelMediaContainer * rygel_media_object_get_parent     (RygelMediaObject *self);

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

`self` : | the RygelMediaObject instance to query
Returns : | the value of the "parent" property

### rygel_media_object_set_parent ()

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

Set the value of the "parent" property to `value`.

`self` : | the RygelMediaObject instance to modify
`value` : | the new value of the "parent" property

### 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, RygelSerializer* serializer, RygelHTTPServer* http_server, GError** error);
    	void (*apply_didl_lite) (RygelMediaObject* self, GUPnPDIDLLiteObject* didl_object);
    	gint (*compare_by_property) (RygelMediaObject* self, RygelMediaObject* media_object, const gchar* property);
    	GUPnPDIDLLiteResource* (*add_resource) (RygelMediaObject* self, GUPnPDIDLLiteObject* object, const gchar* uri, const gchar* protocol, const gchar* import_uri, GError** error);
    	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` () |
`apply_didl_lite` () |
`compare_by_property` () |
`add_resource` () |
`get_ocm_flags` () |

## Property Details

### The `"id"` property

      "id"                       gchar*                : Read / Write / Construct

id.

Default value: NULL

### The `"modified"` property

      "modified"                 guint64               : Read / Write

modified.

Default value: 0

### The `"object-update-id"` property

      "object-update-id"         guint                 : Read / Write

object-update-id.

Default value: 0

### The `"ocm-flags"` property

      "ocm-flags"                GUPnPOCMFlags         : Read

ocm-flags.

### The `"parent"` property

      "parent"                   RygelMediaContainer*  : Read / Write / Construct

parent.

### The `"parent-ref"` property

      "parent-ref"               RygelMediaContainer*  : Read / Write

parent-ref.

### The `"ref-id"` property

      "ref-id"                   gchar*                : Read / Write

ref-id.

Default value: NULL

### The `"restricted"` property

      "restricted"               gboolean              : Read

restricted.

Default value: FALSE

### The `"title"` property

      "title"                    gchar*                : Read / Write / Construct

The human-readable title of this container or item. These variables will be substituted:

- - @`REALNAME`@ will be substituted by the user's real name.

  - @`USERNAME`@ will be substituted by the users's login ID.

  - @`HOSTNAME`@ will be substituted by the name of the machine.

  - @`ADDRESS`@ will be substituted by the IP address of network interface used for the UpNP communication.

Default value: NULL

### The `"upnp-class"` property

      "upnp-class"               gchar*                : Read / Write / Construct

upnp-class.

Default value: NULL