diff options
author | Max Kellermann <max@duempel.org> | 2014-01-16 09:06:01 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-16 09:30:24 +0100 |
commit | a35c7bc81aec11e9720462d8258a0d3c41e2fac7 (patch) | |
tree | f9601aa14c2c12fcfa183d8da248c04f8f55a915 /src/db/upnp/ContentDirectoryService.hxx | |
parent | 02769929b31479bffa3e42c101a9bb192c07976f (diff) | |
download | mpd-a35c7bc81aec11e9720462d8258a0d3c41e2fac7.tar.gz mpd-a35c7bc81aec11e9720462d8258a0d3c41e2fac7.tar.xz mpd-a35c7bc81aec11e9720462d8258a0d3c41e2fac7.zip |
db/upnp: move the LibUPnP instance to class UpnpDatabase
Delete the object when closing the database.
Diffstat (limited to 'src/db/upnp/ContentDirectoryService.hxx')
-rw-r--r-- | src/db/upnp/ContentDirectoryService.hxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/db/upnp/ContentDirectoryService.hxx b/src/db/upnp/ContentDirectoryService.hxx index 8fc28c382..63a13583f 100644 --- a/src/db/upnp/ContentDirectoryService.hxx +++ b/src/db/upnp/ContentDirectoryService.hxx @@ -20,6 +20,8 @@ #ifndef _UPNPDIR_HXX_INCLUDED_ #define _UPNPDIR_HXX_INCLUDED_ +#include <upnp/upnp.h> + #include <string> #include <set> @@ -71,10 +73,12 @@ public: * @param objectId the UPnP object Id for the container. Root has Id "0" * @param[out] dirbuf stores the entries we read. */ - bool readDir(const char *objectId, UPnPDirContent &dirbuf, + bool readDir(UpnpClient_Handle handle, + const char *objectId, UPnPDirContent &dirbuf, Error &error); - bool readDirSlice(const char *objectId, int offset, + bool readDirSlice(UpnpClient_Handle handle, + const char *objectId, int offset, int count, UPnPDirContent& dirbuf, int *didread, int *total, Error &error); @@ -89,7 +93,8 @@ public: * section 2.5.5. Maybe we'll provide an easier way some day... * @param[out] dirbuf stores the entries we read. */ - bool search(const char *objectId, const char *searchstring, + bool search(UpnpClient_Handle handle, + const char *objectId, const char *searchstring, UPnPDirContent &dirbuf, Error &error); @@ -99,7 +104,8 @@ public: * @param[out] dirbuf stores the entries we read. At most one entry will be * returned. */ - bool getMetadata(const char *objectId, UPnPDirContent &dirbuf, + bool getMetadata(UpnpClient_Handle handle, + const char *objectId, UPnPDirContent &dirbuf, Error &error); /** Retrieve search capabilities @@ -107,7 +113,8 @@ public: * @param[out] result an empty vector: no search, or a single '*' element: * any tag can be used in a search, or a list of usable tag names. */ - bool getSearchCapabilities(std::set<std::string> &result, + bool getSearchCapabilities(UpnpClient_Handle handle, + std::set<std::string> &result, Error &error); /** Retrieve the "friendly name" for this server, useful for display. */ |