#include <resources.h>

Public Member Functions | |
| cUPnPResource * | getResource (unsigned int ResourceID) |
| int | saveResource (cUPnPResource *Resource) |
| cUPnPResource * | newResource (cUPnPClassObject *Object, int ResourceType, cString ResourceFile, cString ContentType, cString ProtocolInfo) |
Friends | |
| class | cUPnPResources |
This is another mediator which communicates with the database. It manages the resources in the database
| cUPnPResource * cUPnPResourceMediator::getResource | ( | unsigned int | ResourceID | ) |
Get a resource by ID
This returns a resource by its resource ID
| ResourceID | the resource ID of the demanded 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.
| 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 |
| int cUPnPResourceMediator::saveResource | ( | cUPnPResource * | Resource | ) |
Saves the resource
This updates the information in the database with those in the resource object
| Resource | the resource which shall be saved |
0, if saving was successful<0, if an error occured
1.5.8