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

## Functions

#define | RYGEL_TYPE_MEDIA_OBJECT
GeeList * | rygel_media_object_get_uris ()
gchar * | rygel_media_object_get_primary_uri ()
void | rygel_media_object_add_uri ()
void | rygel_media_object_get_writable ()
GFile * | rygel_media_object_get_writable_finish ()
void | rygel_media_object_get_writables ()
GeeArrayList * | rygel_media_object_get_writables_finish ()
GUPnPDIDLLiteObject * | rygel_media_object_serialize ()
gint | rygel_media_object_compare_string_props ()
gint | rygel_media_object_compare_int_props ()
const gchar * | rygel_media_object_get_id ()
void | rygel_media_object_set_id ()
const gchar * | rygel_media_object_get_ref_id ()
void | rygel_media_object_set_ref_id ()
const gchar * | rygel_media_object_get_upnp_class ()
void | rygel_media_object_set_upnp_class ()
const gchar * | rygel_media_object_get_date ()
void | rygel_media_object_set_date ()
const gchar * | rygel_media_object_get_creator ()
void | rygel_media_object_set_creator ()
guint64 | rygel_media_object_get_modified ()
void | rygel_media_object_set_modified ()
guint | rygel_media_object_get_object_update_id ()
void | rygel_media_object_set_object_update_id ()
const gchar * | rygel_media_object_get_artist ()
void | rygel_media_object_set_artist ()
const gchar * | rygel_media_object_get_genre ()
void | rygel_media_object_set_genre ()
RygelMediaContainer * | rygel_media_object_get_parent ()
void | rygel_media_object_set_parent ()
RygelMediaContainer * | rygel_media_object_get_parent_ref ()
void | rygel_media_object_set_parent_ref ()
const gchar * | rygel_media_object_get_title ()
void | rygel_media_object_set_title ()
GUPnPOCMFlags | rygel_media_object_get_ocm_flags ()

## Properties

gchar * | artist | Read / Write
gchar * | creator | Read / Write
gchar * | date | Read / Write
gchar * | genre | Read / Write
gchar * | id | Read / Write / Construct
guint64 | modified | Read / Write
guint | object-update-id | Read / Write
GUPnPOCMFlags | ocm-flags | Read
RygelMediaContainer * | parent | Read / Write / Construct
RygelMediaContainer * | parent-ref | Read / Write
gchar * | ref-id | Read / Write
gboolean | restricted | Read
gchar * | title | Read / Write / Construct
gchar * | upnp-class | Read / Write / Construct

## Types and Values

struct | RygelMediaObject
struct | RygelMediaObjectClass

## Object Hierarchy

        GObject
        ╰── RygelMediaObject
            ├── RygelMediaItem
            ╰── RygelMediaContainer

## Known Derived Interfaces

RygelMediaObject is required by RygelUpdatableObject.

## 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.

## Functions

### RYGEL_TYPE_MEDIA_OBJECT

    #define RYGEL_TYPE_MEDIA_OBJECT (rygel_media_object_get_type ())

The type for RygelMediaObject.

### rygel_media_object_get_uris ()

    GeeList *
    rygel_media_object_get_uris (RygelMediaObject *self);

#### Parameters

self | the RygelMediaObject instance |

### rygel_media_object_get_primary_uri ()

    gchar *
    rygel_media_object_get_primary_uri (RygelMediaObject *self);

#### Parameters

self | the RygelMediaObject instance |

### rygel_media_object_add_uri ()

    void
    rygel_media_object_add_uri (RygelMediaObject *self,
                                const gchar *uri);

#### Parameters

self | the RygelMediaObject instance |
uri |  |

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

#### Parameters

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()`

#### Parameters

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()`

#### Parameters

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()`

#### Parameters

self | the RygelMediaObject instance |
_res_ | a GAsyncResult |
error | location to store the error occuring, or `NULL` to ignore |

### rygel_media_object_serialize ()

    GUPnPDIDLLiteObject *
    rygel_media_object_serialize (RygelMediaObject *self,
                                  RygelSerializer *serializer,
                                  RygelHTTPServer *http_server,
                                  GError **error);

#### Parameters

self | the RygelMediaObject instance |
serializer |  |
http_server |  |
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);

#### Parameters

self | the RygelMediaObject instance |
prop1 |  |
prop2 |  |

### rygel_media_object_compare_int_props ()

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

#### Parameters

self | the RygelMediaObject instance |
prop1 |  |
prop2 |  |

### rygel_media_object_get_id ()

    const gchar *
    rygel_media_object_get_id (RygelMediaObject *self);

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

#### Parameters

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` .

#### Parameters

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.

#### Parameters

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` .

#### Parameters

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.

#### Parameters

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` .

#### Parameters

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

### rygel_media_object_get_date ()

    const gchar *
    rygel_media_object_get_date (RygelMediaObject *self);

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

#### Parameters

self | the RygelMediaObject instance to query |

#### Returns

the value of the "date" property

### rygel_media_object_set_date ()

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

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

#### Parameters

self | the RygelMediaObject instance to modify |
value | the new value of the "date" property |

### rygel_media_object_get_creator ()

    const gchar *
    rygel_media_object_get_creator (RygelMediaObject *self);

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

#### Parameters

self | the RygelMediaObject instance to query |

#### Returns

the value of the "creator" property

### rygel_media_object_set_creator ()

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

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

#### Parameters

self | the RygelMediaObject instance to modify |
value | the new value of the "creator" property |

### rygel_media_object_get_modified ()

    guint64
    rygel_media_object_get_modified (RygelMediaObject *self);

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

#### Parameters

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` .

#### Parameters

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.

#### Parameters

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` .

#### Parameters

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

### rygel_media_object_get_artist ()

    const gchar *
    rygel_media_object_get_artist (RygelMediaObject *self);

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

#### Parameters

self | the RygelMediaObject instance to query |

#### Returns

the value of the "artist" property

### rygel_media_object_set_artist ()

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

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

#### Parameters

self | the RygelMediaObject instance to modify |
value | the new value of the "artist" property |

### rygel_media_object_get_genre ()

    const gchar *
    rygel_media_object_get_genre (RygelMediaObject *self);

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

#### Parameters

self | the RygelMediaObject instance to query |

#### Returns

the value of the "genre" property

### rygel_media_object_set_genre ()

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

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

#### Parameters

self | the RygelMediaObject instance to modify |
value | the new value of the "genre" property |

### rygel_media_object_get_parent ()

    RygelMediaContainer *
    rygel_media_object_get_parent (RygelMediaObject *self);

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

#### Parameters

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` .

#### Parameters

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.

#### Parameters

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` .

#### Parameters

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.

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.

  - @`PRETTY_HOSTNAME`@ will be substituted by the human readable name of the machine

  - (PRETTY_HOSTNAME field of /etc/machine-info)

#### Parameters

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` .

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.

  - @`PRETTY_HOSTNAME`@ will be substituted by the human readable name of the machine

  - (PRETTY_HOSTNAME field of /etc/machine-info)

#### Parameters

self | the RygelMediaObject instance to modify |
value | the new value of the "title" property |

### rygel_media_object_get_ocm_flags ()

    GUPnPOCMFlags
    rygel_media_object_get_ocm_flags (RygelMediaObject *self);

Get and return the current value of the "ocm-flags" property.

#### Parameters

self | the RygelMediaObject instance to query |

#### Returns

the value of the "ocm-flags" property

## Types and Values

### 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;
    	void (*add_uri) (RygelMediaObject* self, const gchar* uri);
    	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.

#### Members

GObjectClass `parent_class`; | the parent class structure |
`add_uri` () | virtual method called by `rygel_media_object_add_uri()` |
`serialize` () | virtual method called by `rygel_media_object_serialize()` |
`apply_didl_lite` () |  |
`compare_by_property` () |  |
`add_resource` () |  |
`get_ocm_flags` () | getter method for the abstract property "ocm-flags" |

## Property Details

### The `“artist”` property

      “artist”                   gchar *

artist.

Flags: Read / Write

Default value: NULL

### The `“creator”` property

      “creator”                  gchar *

creator.

Flags: Read / Write

Default value: NULL

### The `“date”` property

      “date”                     gchar *

date.

Flags: Read / Write

Default value: NULL

### The `“genre”` property

      “genre”                    gchar *

genre.

Flags: Read / Write

Default value: NULL

### The `“id”` property

      “id”                       gchar *

id.

Flags: Read / Write / Construct

Default value: NULL

### The `“modified”` property

      “modified”                 guint64

modified.

Flags: Read / Write

Default value: 0

### The `“object-update-id”` property

      “object-update-id”         guint

object-update-id.

Flags: Read / Write

Default value: 0

### The `“ocm-flags”` property

      “ocm-flags”                GUPnPOCMFlags

ocm-flags.

Flags: Read

### The `“parent”` property

      “parent”                   RygelMediaContainer *

parent.

Flags: Read / Write / Construct

### The `“parent-ref”` property

      “parent-ref”               RygelMediaContainer *

parent-ref.

Flags: Read / Write

### The `“ref-id”` property

      “ref-id”                   gchar *

ref-id.

Flags: Read / Write

Default value: NULL

### The `“restricted”` property

      “restricted”               gboolean

restricted.

Flags: Read

Default value: FALSE

### The `“title”` property

      “title”                    gchar *

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.

  - @`PRETTY_HOSTNAME`@ will be substituted by the human readable name of the machine

  - (PRETTY_HOSTNAME field of /etc/machine-info)

Flags: Read / Write / Construct

Default value: NULL

### The `“upnp-class”` property

      “upnp-class”               gchar *

upnp-class.

Flags: Read / Write / Construct

Default value: NULL