cUPnPItemMediator Class Reference

#include <object.h>

Inheritance diagram for cUPnPItemMediator:

Inheritance graph
[legend]
Collaboration diagram for cUPnPItemMediator:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 cUPnPItemMediator (cMediaDatabase *MediaDatabase)
virtual cUPnPClassItemcreateObject (const char *Title, bool Restricted)
virtual cUPnPClassItemgetObject (cUPnPObjectID ID)

Protected Member Functions

virtual int objectToDatabase (cUPnPClassObject *Object)
virtual int databaseToObject (cUPnPClassObject *Object, cUPnPObjectID ID)


Detailed Description

Item Mediator

This is the interface between the objects and the database. It is possible to create new objects, stores objects in the database as well as removing them from it.


Constructor & Destructor Documentation

cUPnPItemMediator::cUPnPItemMediator ( cMediaDatabase MediaDatabase  ) 

Constructor of item mediator

This creates a new item mediator with which it is possible to create new instances of Item objects.

Parameters:
MediaDatabase the media database


Member Function Documentation

cUPnPClassItem * cUPnPItemMediator::createObject ( const char *  Title,
bool  Restricted 
) [virtual]

Creates an object

This creates a new UPnP object with the specific title and the restriction.

Returns:
the newly created object
Parameters:
Title the title of that object
Restricted the restriction of the object

Reimplemented from cUPnPObjectMediator.

Reimplemented in cUPnPVideoItemMediator, cUPnPVideoBroadcastMediator, and cUPnPMovieMediator.

int cUPnPItemMediator::databaseToObject ( cUPnPClassObject Object,
cUPnPObjectID  ID 
) [protected, virtual]

Loads an object from database

This loads an object from the database

Returns:
returns
  • <0, in case of an error
  • 0, otherwise
Parameters:
Object the object to be loaded
ID the object ID of that object

Reimplemented from cUPnPObjectMediator.

Reimplemented in cUPnPVideoItemMediator, cUPnPVideoBroadcastMediator, and cUPnPMovieMediator.

cUPnPClassItem * cUPnPItemMediator::getObject ( cUPnPObjectID  ID  )  [virtual]

Get an object

Retrieves a UPnP object from the database and stores its information in the object. The object is obtained via its object ID.

Returns:
the object, found in the database
Parameters:
ID the object ID

Reimplemented from cUPnPObjectMediator.

Reimplemented in cUPnPVideoItemMediator, cUPnPVideoBroadcastMediator, and cUPnPMovieMediator.

int cUPnPItemMediator::objectToDatabase ( cUPnPClassObject Object  )  [protected, virtual]

Store the object in the database

This stores the information of an object in the database

Returns:
returns
  • <0, in case of an error
  • 0, otherwise
Parameters:
Object the object to be saved

Reimplemented from cUPnPObjectMediator.

Reimplemented in cUPnPVideoItemMediator, cUPnPVideoBroadcastMediator, and cUPnPMovieMediator.


The documentation for this class was generated from the following files:

Generated on Sun Nov 8 15:44:09 2009 for UPnP/DLNA plugin for VDR by  doxygen 1.5.8