Rygel.MediaObject – librygel-server Reference Manual

# MediaObject

## Object Hierarchy:

## Description:

public abstract class MediaObject : `Object`

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.

All known sub-classes:

- AudioItem
- ImageItem
- MediaContainer

- MediaItem
- MusicItem
- PhotoItem

- PlaylistItem
- SimpleContainer
- VideoItem

Required by:

- UpdatableObject

Namespace: Rygel
Package: librygel-server

## Content:

### Properties:

- public `string` id { construct set; get; }
- public `string` ref_id { set; get; }
- public `string` upnp_class { construct set; get; }
- public `string` date { set; get; }
- public `string` creator { set; get; }
- public `uint64` modified { set; get; }
- public `uint` object_update_id { set; get; }
- public `string` artist { set; get; }
- public `string` genre { set; get; }
- public weak MediaContainer parent { construct set; get; }
- public MediaContainer parent_ref { set; get; }
- public `string` title { construct set; get; }
  The human-readable title of this container or item. These variables will be substituted:
- public virtual `OCMFlags` ocm_flags { get; }

### Creation methods:

- public MediaObject ()

### Methods:

- public `List`<`string`> get_uris ()
- public `string`? get_primary_uri ()
- public virtual void add_uri (`string` uri)
- public override void constructed ()
- public async `File`? get_writable (`Cancellable`? cancellable) throws `Error`
  Fetches a File object for any writable URI available for this object.
- public async `ArrayList`<`File`> get_writables (`Cancellable`? cancellable) throws `Error`
  Fetches File objects for all writable URIs available for this object.
- public abstract `DIDLLiteObject`? serialize (Serializer serializer, HTTPServer http_server) throws `Error`
- protected `int` compare_string_props (`string` prop1, `string` prop2)
- protected `int` compare_int_props (`int` prop1, `int` prop2)

### Fields:

- public weak MediaContainer parent_ptr

### Inherited Members:

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