cUPnPResourceMediator Class Reference

#include <resources.h>

Collaboration diagram for cUPnPResourceMediator:

Collaboration graph
[legend]

List of all members.

Public Member Functions

cUPnPResourcegetResource (unsigned int ResourceID)
int saveResource (cUPnPResource *Resource)
cUPnPResourcenewResource (cUPnPClassObject *Object, int ResourceType, cString ResourceFile, cString ContentType, cString ProtocolInfo)

Friends

class cUPnPResources


Detailed Description

The resource mediator

This is another mediator which communicates with the database. It manages the resources in the database


Member Function Documentation

cUPnPResource * cUPnPResourceMediator::getResource ( unsigned int  ResourceID  ) 

Get a resource by ID

This returns a resource by its resource ID

Parameters:
ResourceID the resource ID of the demanded resource
Returns:
the requested resource

cUPnPResource * cUPnPResourceMediator::newResource ( cUPnPClassObject Object,
int  ResourceType,
cString  ResourceFile,
cString  ContentType,
cString  ProtocolInfo 
)

Create new resource

This creates a new resource and stores the skeleton in the database. The newly created resource will only contain all required information.

Parameters:
Object the Object which will hold the resource
ResourceType the type of the resource
ResourceFile the file or URL, where the resource can be located
ContentType the mime type of the content
ProtocolInfo the protocol information of the resource
Returns:
the newly created resource

int cUPnPResourceMediator::saveResource ( cUPnPResource Resource  ) 

Saves the resource

This updates the information in the database with those in the resource object

Parameters:
Resource the resource which shall be saved
Returns:
returns
  • 0, if saving was successful
  • <0, if an error occured


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