#include <object.h>
Public Member Functions | |
cUPnPMovieMediator (cMediaDatabase *MediaDatabase) | |
virtual cUPnPClassMovie * | createObject (const char *Title, bool Restricted) |
virtual cUPnPClassMovie * | getObject (cUPnPObjectID ID) |
Protected Member Functions | |
virtual int | objectToDatabase (cUPnPClassObject *Object) |
virtual int | databaseToObject (cUPnPClassObject *Object, cUPnPObjectID ID) |
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.
cUPnPMovieMediator::cUPnPMovieMediator | ( | cMediaDatabase * | MediaDatabase | ) |
Constructor of movie mediator
This creates a new movie mediator with which it is possible to create new instances of Movie objects.
MediaDatabase | the media database |
cUPnPClassMovie * cUPnPMovieMediator::createObject | ( | const char * | Title, | |
bool | Restricted | |||
) | [virtual] |
Creates an object
This creates a new UPnP object with the specific title and the restriction.
Title | the title of that object | |
Restricted | the restriction of the object |
Reimplemented from cUPnPVideoItemMediator.
int cUPnPMovieMediator::databaseToObject | ( | cUPnPClassObject * | Object, | |
cUPnPObjectID | ID | |||
) | [protected, virtual] |
Loads an object from database
This loads an object from the database
<0
, in case of an error0
, otherwise Object | the object to be loaded | |
ID | the object ID of that object |
Reimplemented from cUPnPVideoItemMediator.
cUPnPClassMovie * cUPnPMovieMediator::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.
ID | the object ID |
Reimplemented from cUPnPVideoItemMediator.
int cUPnPMovieMediator::objectToDatabase | ( | cUPnPClassObject * | Object | ) | [protected, virtual] |
Store the object in the database
This stores the information of an object in the database
<0
, in case of an error0
, otherwise Object | the object to be saved |
Reimplemented from cUPnPVideoItemMediator.