RygelSimpleContainer

RygelSimpleContainer — A simple implementation of RygelMediaContainer that keeps all RygelMediaObjects in memory. You should add children via rygel_simple_container_add_child_item().

Synopsis

#define             RYGEL_TYPE_SIMPLE_CONTAINER
void                rygel_simple_container_add_child_item
                                                        (RygelSimpleContainer *self,
                                                         RygelMediaItem *child);
RygelMediaObjects * rygel_simple_container_get_all_children
                                                        (RygelSimpleContainer *self);
void                rygel_simple_container_add_child_container
                                                        (RygelSimpleContainer *self,
                                                         RygelMediaContainer *child);
void                rygel_simple_container_remove_child (RygelSimpleContainer *self,
                                                         RygelMediaObject *child);
void                rygel_simple_container_clear        (RygelSimpleContainer *self);
gboolean            rygel_simple_container_is_child_id_unique
                                                        (RygelSimpleContainer *self,
                                                         const gchar *child_id);
RygelSimpleContainer * rygel_simple_container_new       (const gchar *id,
                                                         RygelMediaContainer *parent,
                                                         const gchar *title);
RygelSimpleContainer * rygel_simple_container_new_root  (const gchar *title);
struct              RygelSimpleContainer;

Object Hierarchy

  GObject
   +----RygelMediaObject
         +----RygelMediaContainer
               +----RygelSimpleContainer

Implemented Interfaces

RygelSimpleContainer implements RygelSearchableContainer.

Properties

  "search-classes"           GeeArrayList*         : Read / Write

Description

Details

RYGEL_TYPE_SIMPLE_CONTAINER

#define RYGEL_TYPE_SIMPLE_CONTAINER (rygel_simple_container_get_type ())

The type for RygelSimpleContainer.


rygel_simple_container_add_child_item ()

void                rygel_simple_container_add_child_item
                                                        (RygelSimpleContainer *self,
                                                         RygelMediaItem *child);

Adds an item to the container.

self :

the RygelSimpleContainer instance

child :

The child item to add to the container. [in]

rygel_simple_container_get_all_children ()

RygelMediaObjects * rygel_simple_container_get_all_children
                                                        (RygelSimpleContainer *self);

Get all children, including the empty children.

This is useful when all children are empty, so get_children() would return no objects, but when you need to add items to the empty items.

This is useful only when implementing derived classes.

self :

the RygelSimpleContainer instance

rygel_simple_container_add_child_container ()

void                rygel_simple_container_add_child_container
                                                        (RygelSimpleContainer *self,
                                                         RygelMediaContainer *child);

Adds a child container to this container.

The child container will only be added to the hierarchy if, or when, it contains some children.

self :

the RygelSimpleContainer instance

rygel_simple_container_remove_child ()

void                rygel_simple_container_remove_child (RygelSimpleContainer *self,
                                                         RygelMediaObject *child);

Removes the item from the container.

self :

the RygelSimpleContainer instance

rygel_simple_container_clear ()

void                rygel_simple_container_clear        (RygelSimpleContainer *self);

Removes all child items and child containers from the container.

self :

the RygelSimpleContainer instance

rygel_simple_container_is_child_id_unique ()

gboolean            rygel_simple_container_is_child_id_unique
                                                        (RygelSimpleContainer *self,
                                                         const gchar *child_id);

Check that the ID is unique within this container.

This is useful only when implementing derived classes.

self :

the RygelSimpleContainer instance

child_id :

The ID to check for uniqueness. [in]

Returns :

true if the child ID is unique within this container.

rygel_simple_container_new ()

RygelSimpleContainer * rygel_simple_container_new       (const gchar *id,
                                                         RygelMediaContainer *parent,
                                                         const gchar *title);

Creates a child RygelSimpleContainer.

id :

The ID of the item. This should be unique in the server. [in]

parent :

The parent of the container. [in][allow-none]

title :

The title of the container. [in]

rygel_simple_container_new_root ()

RygelSimpleContainer * rygel_simple_container_new_root  (const gchar *title);

Creates a RygelSimpleContainer as a root container.

title :

The title of the container. [in]

struct RygelSimpleContainer

struct RygelSimpleContainer;

A simple implementation of RygelMediaContainer that keeps all RygelMediaObjects in memory. You should add children via rygel_simple_container_add_child_item().

Property Details

The "search-classes" property

  "search-classes"           GeeArrayList*         : Read / Write

search-classes.