#include <contentdirectory.h>
Public Member Functions | |
cContentDirectory (UpnpDevice_Handle DeviceHandle, cMediaDatabase *MediaDatabase) | |
virtual int | subscribe (Upnp_Subscription_Request *Request) |
virtual int | execute (Upnp_Action_Request *Request) |
virtual void | setError (Upnp_Action_Request *Request, int Error) |
This is the content directory service which handles all incoming requests for contents managed by the media server.
cContentDirectory::cContentDirectory | ( | UpnpDevice_Handle | DeviceHandle, | |
cMediaDatabase * | MediaDatabase | |||
) |
Constructor of a Content Directory
This creates an instance of a Content Directory Service and provides interfaces for executing actions and subscribing on events.
DeviceHandle | The UPnP device handle of the root device | |
MediaDatabase | the media database where requests are processed |
int cContentDirectory::execute | ( | Upnp_Action_Request * | Request | ) | [virtual] |
Executes an action
This executes an action initialized by a control point. The result is stored in the first parameter.
UPNP_E_SUCCESS
, if subscription was okayRequest | Input and output parameters of an action |
Implements cUpnpService.
void cContentDirectory::setError | ( | Upnp_Action_Request * | Request, | |
int | Error | |||
) | [virtual] |
Sets an error on an action request
This function puts a error message into the action request structure according to its error code
Request | the action request, to set the error for | |
Error | the error code of which the message should be obtained |
Reimplemented from cUpnpService.
int cContentDirectory::subscribe | ( | Upnp_Subscription_Request * | Request | ) | [virtual] |
Subscribes to an event
This is a callback function to register a new subscriber for an event.
UPNP_E_SUCCESS
, if subscription was okayRequest | Information about the subscription |
Implements cUpnpService.