cUpnpService Class Reference

#include <upnpservice.h>

Inheritance diagram for cUpnpService:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual int subscribe (Upnp_Subscription_Request *Request)=0
virtual int execute (Upnp_Action_Request *Request)=0

Protected Member Functions

virtual void setError (Upnp_Action_Request *Request, int Error)
int parseIntegerValue (IN IXML_Document *Document, IN const char *Item, OUT int *Value)
int parseStringValue (IN IXML_Document *Document, IN const char *Item, OUT char **Value)

Protected Attributes

UpnpDevice_Handle mDeviceHandle
 the UPnP device handle of the root device


Detailed Description

UPnP Service interface

This is a service interface implemented by a UPnP service like CDS oder CMS

It comes with some tool functions which are commonly useful for processing an event or action.


Member Function Documentation

virtual int cUpnpService::execute ( Upnp_Action_Request *  Request  )  [pure virtual]

Executes an action

This executes an action initialized by a control point. The result is stored in the first parameter.

Returns:
An integer representing one of the following:
  • UPNP_E_SUCCESS, if subscription was okay
  • or any other non null value in case of an error
Parameters:
Request Input and output parameters of an action
Parameters:
Request Input and output parameters of an action

Implemented in cConnectionManager, and cContentDirectory.

int cUpnpService::parseIntegerValue ( IN IXML_Document *  Document,
IN const char *  Item,
OUT int *  Value 
) [protected]

Parses an integer value

This tool function parses an integer value from a given IXML document. It is searching for the very first occurance of the demanded item.

Returns:
Returns
  • 0, if parsing was successful
  • <0, if an error occured
Parameters:
Document the document, which is parsed
Item the demanded item
Value the value of the item
Parameters:
Document the document, which is parsed
Item the demanded item
Value the value of the item

int cUpnpService::parseStringValue ( IN IXML_Document *  Document,
IN const char *  Item,
OUT char **  Value 
) [protected]

Parses a string value

This tool function parses a string value from a given IXML document. It is searching for the very first occurance of the demanded item.

Returns:
Returns
  • 0, if parsing was successful
  • <0, if an error occured
Parameters:
Document the document, which is parsed
Item the demanded item
Value the value of the item
Parameters:
Document the document, which is parsed
Item the demanded item
Value the value of the item

void cUpnpService::setError ( Upnp_Action_Request *  Request,
int  Error 
) [protected, virtual]

Sets an error on an action request

This function puts a error message into the action request structure according to its error code

Parameters:
Request the action request, to set the error for
Error the error code of which the message should be obtained
Parameters:
Request the action request, to set the error for
Error the error code of which the message should be obtained

Reimplemented in cConnectionManager, and cContentDirectory.

virtual int cUpnpService::subscribe ( Upnp_Subscription_Request *  Request  )  [pure virtual]

Subscribes to an event

This is a callback function to register a new subscriber for an event.

Returns:
An integer representing one of the following:
  • UPNP_E_SUCCESS, if subscription was okay
  • or any other non null value in case of an error
Parameters:
Request Information about the subscription
Parameters:
Request Information about the subscription

Implemented in cConnectionManager, and cContentDirectory.


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