aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/db/UpnpDatabasePlugin.cxx24
-rw-r--r--src/db/upnp/ContentDirectoryService.cxx10
-rw-r--r--src/db/upnp/ContentDirectoryService.hxx10
3 files changed, 22 insertions, 22 deletions
diff --git a/src/db/UpnpDatabasePlugin.cxx b/src/db/UpnpDatabasePlugin.cxx
index 849c3730f..70b39a4d3 100644
--- a/src/db/UpnpDatabasePlugin.cxx
+++ b/src/db/UpnpDatabasePlugin.cxx
@@ -103,7 +103,7 @@ protected:
bool Configure(const config_param &param, Error &error);
private:
- bool VisitServer(ContentDirectoryService &server,
+ bool VisitServer(const ContentDirectoryService &server,
const std::list<std::string> &vpath,
const DatabaseSelection &selection,
VisitDirectory visit_directory,
@@ -115,19 +115,19 @@ private:
* Run an UPnP search according to MPD parameters, and
* visit_song the results.
*/
- bool SearchSongs(ContentDirectoryService &server,
+ bool SearchSongs(const ContentDirectoryService &server,
const char *objid,
const DatabaseSelection &selection,
VisitSong visit_song,
Error &error) const;
- bool SearchSongs(ContentDirectoryService &server,
+ bool SearchSongs(const ContentDirectoryService &server,
const char *objid,
const DatabaseSelection &selection,
UPnPDirContent& dirbuf,
Error &error) const;
- bool Namei(ContentDirectoryService &server,
+ bool Namei(const ContentDirectoryService &server,
const std::list<std::string> &vpath,
UPnPDirObject &dirent,
Error &error) const;
@@ -135,7 +135,7 @@ private:
/**
* Take server and objid, return metadata.
*/
- bool ReadNode(ContentDirectoryService &server,
+ bool ReadNode(const ContentDirectoryService &server,
const char *objid, UPnPDirObject& dirent,
Error &error) const;
@@ -144,7 +144,7 @@ private:
* except easier cause our inodes have a parent id. Not used
* any more actually (see comments in SearchSongs).
*/
- bool BuildPath(ContentDirectoryService &server,
+ bool BuildPath(const ContentDirectoryService &server,
const UPnPDirObject& dirent, std::string &idpath,
Error &error) const;
};
@@ -266,7 +266,7 @@ dquote(std::string &out, const char *in)
// Run an UPnP search, according to MPD parameters. Return results as
// UPnP items
bool
-UpnpDatabase::SearchSongs(ContentDirectoryService &server,
+UpnpDatabase::SearchSongs(const ContentDirectoryService &server,
const char *objid,
const DatabaseSelection &selection,
UPnPDirContent &dirbuf,
@@ -381,7 +381,7 @@ songPath(const std::string &servername,
}
bool
-UpnpDatabase::SearchSongs(ContentDirectoryService &server,
+UpnpDatabase::SearchSongs(const ContentDirectoryService &server,
const char *objid,
const DatabaseSelection &selection,
VisitSong visit_song,
@@ -426,7 +426,7 @@ UpnpDatabase::SearchSongs(ContentDirectoryService &server,
}
bool
-UpnpDatabase::ReadNode(ContentDirectoryService &server,
+UpnpDatabase::ReadNode(const ContentDirectoryService &server,
const char *objid, UPnPDirObject &dirent,
Error &error) const
{
@@ -445,7 +445,7 @@ UpnpDatabase::ReadNode(ContentDirectoryService &server,
}
bool
-UpnpDatabase::BuildPath(ContentDirectoryService &server,
+UpnpDatabase::BuildPath(const ContentDirectoryService &server,
const UPnPDirObject& idirent,
std::string &path,
Error &error) const
@@ -472,7 +472,7 @@ UpnpDatabase::BuildPath(ContentDirectoryService &server,
// Take server and internal title pathname and return objid and metadata.
bool
-UpnpDatabase::Namei(ContentDirectoryService &server,
+UpnpDatabase::Namei(const ContentDirectoryService &server,
const std::list<std::string> &vpath,
UPnPDirObject &odirent,
Error &error) const
@@ -521,7 +521,7 @@ UpnpDatabase::Namei(ContentDirectoryService &server,
// vpath is a parsed and writeable version of selection.uri. There is
// really just one path parameter.
bool
-UpnpDatabase::VisitServer(ContentDirectoryService &server,
+UpnpDatabase::VisitServer(const ContentDirectoryService &server,
const std::list<std::string> &vpath,
const DatabaseSelection &selection,
VisitDirectory visit_directory,
diff --git a/src/db/upnp/ContentDirectoryService.cxx b/src/db/upnp/ContentDirectoryService.cxx
index 2f9565d95..1c4e43e12 100644
--- a/src/db/upnp/ContentDirectoryService.cxx
+++ b/src/db/upnp/ContentDirectoryService.cxx
@@ -63,7 +63,7 @@ ContentDirectoryService::readDirSlice(UpnpClient_Handle hdl,
const char *objectId, unsigned offset,
unsigned count, UPnPDirContent &dirbuf,
unsigned &didreadp, unsigned &totalp,
- Error &error)
+ Error &error) const
{
// Create request
char ofbuf[100], cntbuf[100];
@@ -112,7 +112,7 @@ bool
ContentDirectoryService::readDir(UpnpClient_Handle handle,
const char *objectId,
UPnPDirContent &dirbuf,
- Error &error)
+ Error &error) const
{
unsigned offset = 0, total = -1, count;
@@ -132,7 +132,7 @@ ContentDirectoryService::search(UpnpClient_Handle hdl,
const char *objectId,
const char *ss,
UPnPDirContent &dirbuf,
- Error &error)
+ Error &error) const
{
unsigned offset = 0, total = -1, count;
@@ -189,7 +189,7 @@ ContentDirectoryService::search(UpnpClient_Handle hdl,
bool
ContentDirectoryService::getSearchCapabilities(UpnpClient_Handle hdl,
std::list<std::string> &result,
- Error &error)
+ Error &error) const
{
assert(result.empty());
@@ -234,7 +234,7 @@ bool
ContentDirectoryService::getMetadata(UpnpClient_Handle hdl,
const char *objectId,
UPnPDirContent &dirbuf,
- Error &error)
+ Error &error) const
{
// Create request
IXML_Document *request =
diff --git a/src/db/upnp/ContentDirectoryService.hxx b/src/db/upnp/ContentDirectoryService.hxx
index 035849681..18bdcde22 100644
--- a/src/db/upnp/ContentDirectoryService.hxx
+++ b/src/db/upnp/ContentDirectoryService.hxx
@@ -75,13 +75,13 @@ public:
*/
bool readDir(UpnpClient_Handle handle,
const char *objectId, UPnPDirContent &dirbuf,
- Error &error);
+ Error &error) const;
bool readDirSlice(UpnpClient_Handle handle,
const char *objectId, unsigned offset,
unsigned count, UPnPDirContent& dirbuf,
unsigned &didread, unsigned &total,
- Error &error);
+ Error &error) const;
/** Search the content directory service.
*
@@ -96,7 +96,7 @@ public:
bool search(UpnpClient_Handle handle,
const char *objectId, const char *searchstring,
UPnPDirContent &dirbuf,
- Error &error);
+ Error &error) const;
/** Read metadata for a given node.
*
@@ -106,7 +106,7 @@ public:
*/
bool getMetadata(UpnpClient_Handle handle,
const char *objectId, UPnPDirContent &dirbuf,
- Error &error);
+ Error &error) const;
/** Retrieve search capabilities
*
@@ -115,7 +115,7 @@ public:
*/
bool getSearchCapabilities(UpnpClient_Handle handle,
std::list<std::string> &result,
- Error &error);
+ Error &error) const;
/** Retrieve the "friendly name" for this server, useful for display. */
const char *getFriendlyName() const {