|
a/src/mediaserver/mediaserver.cxx |
|
b/src/mediaserver/mediaserver.cxx |
|
... |
|
... |
21 |
#include "conman.hxx"
|
21 |
#include "conman.hxx"
|
22 |
#include "contentdirectory.hxx"
|
22 |
#include "contentdirectory.hxx"
|
23 |
|
23 |
|
24 |
using namespace std;
|
24 |
using namespace std;
|
25 |
|
25 |
|
26 |
bool MediaServer::readLibFile(const std::string& name,
|
26 |
bool MediaServer::readLibFile(const string& name, string& contents)
|
27 |
std::string& contents)
|
|
|
28 |
{
|
27 |
{
|
29 |
if (name.empty()) {
|
28 |
if (name.empty()) {
|
30 |
if (!::readLibFile("MS-description.xml", contents)) {
|
29 |
if (!::readLibFile("MS-description.xml", contents)) {
|
31 |
return false;
|
30 |
return false;
|
32 |
}
|
31 |
}
|
|
... |
|
... |
36 |
} else {
|
35 |
} else {
|
37 |
return ::readLibFile(name, contents);
|
36 |
return ::readLibFile(name, contents);
|
38 |
}
|
37 |
}
|
39 |
}
|
38 |
}
|
40 |
|
39 |
|
41 |
MediaServer::MediaServer(
|
40 |
MediaServer::MediaServer(UpnpDevice *root, const string& deviceid,
|
42 |
const string& deviceid, const string& friendlyname, bool enabled)
|
41 |
const string& friendlyname, bool enabled)
|
43 |
: UpnpDevice(deviceid), m_UDN(deviceid), m_fname(friendlyname)
|
42 |
: UpnpDevice(root, deviceid), m_UDN(deviceid), m_fname(friendlyname)
|
44 |
{
|
43 |
{
|
45 |
m_cd = new ContentDirectory(this, enabled);
|
44 |
m_cd = new ContentDirectory(this, enabled);
|
46 |
m_cm = new UpMpdConMan(this);
|
45 |
m_cm = new UpMpdConMan(this);
|
47 |
}
|
46 |
}
|
48 |
|
47 |
|