|
a/src/httpfs.cxx |
|
b/src/httpfs.cxx |
|
... |
|
... |
84 |
" <SCPDURL>/upmpd/OHInfo.xml</SCPDURL>"
|
84 |
" <SCPDURL>/upmpd/OHInfo.xml</SCPDURL>"
|
85 |
" <controlURL>/ctl/OHInfo</controlURL>"
|
85 |
" <controlURL>/ctl/OHInfo</controlURL>"
|
86 |
" <eventSubURL>/evt/OHInfo</eventSubURL>"
|
86 |
" <eventSubURL>/evt/OHInfo</eventSubURL>"
|
87 |
"</service>"
|
87 |
"</service>"
|
88 |
"<service>"
|
88 |
"<service>"
|
|
|
89 |
" <serviceType>urn:av-openhome-org:service:Time:1</serviceType>"
|
|
|
90 |
" <serviceId>urn:av-openhome-org:serviceId:Time</serviceId>"
|
|
|
91 |
" <SCPDURL>/upmpd/OHTime.xml</SCPDURL>"
|
|
|
92 |
" <controlURL>/ctl/OHTime</controlURL>"
|
|
|
93 |
" <eventSubURL>/evt/OHTime</eventSubURL>"
|
|
|
94 |
"</service>"
|
|
|
95 |
"<service>"
|
|
|
96 |
" <serviceType>urn:av-openhome-org:service:Volume:1</serviceType>"
|
|
|
97 |
" <serviceId>urn:av-openhome-org:serviceId:Volume</serviceId>"
|
|
|
98 |
" <SCPDURL>/upmpd/OHVolume.xml</SCPDURL>"
|
|
|
99 |
" <controlURL>/ctl/OHVolume</controlURL>"
|
|
|
100 |
" <eventSubURL>/evt/OHVolume</eventSubURL>"
|
|
|
101 |
"</service>"
|
|
|
102 |
"<service>"
|
|
|
103 |
" <serviceType>urn:av-openhome-org:service:Playlist:1</serviceType>"
|
|
|
104 |
" <serviceId>urn:av-openhome-org:serviceId:Playlist</serviceId>"
|
|
|
105 |
" <SCPDURL>/upmpd/OHPlaylist.xml</SCPDURL>"
|
|
|
106 |
" <controlURL>/ctl/OHPlaylist</controlURL>"
|
|
|
107 |
" <eventSubURL>/evt/OHPlaylist</eventSubURL>"
|
|
|
108 |
"</service>"
|
|
|
109 |
"<service>"
|
|
|
110 |
" <serviceType>urn:av-openhome-org:service:Radio:1</serviceType>"
|
|
|
111 |
" <serviceId>urn:av-openhome-org:serviceId:Radio</serviceId>"
|
|
|
112 |
" <SCPDURL>/upmpd/OHRadio.xml</SCPDURL>"
|
|
|
113 |
" <controlURL>/ctl/OHRadio</controlURL>"
|
|
|
114 |
" <eventSubURL>/evt/OHRadio</eventSubURL>"
|
|
|
115 |
"</service>"
|
|
|
116 |
);
|
|
|
117 |
|
|
|
118 |
// We only advertise the Openhome Receiver service if the sc2mpd
|
|
|
119 |
// songcast-to-mpd gateway command is available
|
|
|
120 |
static string ohDescReceive(
|
|
|
121 |
"<service>"
|
|
|
122 |
" <serviceType>urn:av-openhome-org:service:Receiver:1</serviceType>"
|
|
|
123 |
" <serviceId>urn:av-openhome-org:serviceId:Receiver</serviceId>"
|
|
|
124 |
" <SCPDURL>/upmpd/OHReceiver.xml</SCPDURL>"
|
|
|
125 |
" <controlURL>/ctl/OHReceiver</controlURL>"
|
|
|
126 |
" <eventSubURL>/evt/OHReceiver</eventSubURL>"
|
|
|
127 |
"</service>"
|
|
|
128 |
);
|
|
|
129 |
// We want to be able to hide the credentials service because it
|
|
|
130 |
// breaks Lumin for some reason.
|
|
|
131 |
static string ohDescCreds(
|
|
|
132 |
"<service>"
|
89 |
" <serviceType>urn:av-openhome-org:service:Credentials:1</serviceType>"
|
133 |
" <serviceType>urn:av-openhome-org:service:Credentials:1</serviceType>"
|
90 |
" <serviceId>urn:av-openhome-org:serviceId:Credentials</serviceId>"
|
134 |
" <serviceId>urn:av-openhome-org:serviceId:Credentials</serviceId>"
|
91 |
" <SCPDURL>/upmpd/OHCredentials.xml</SCPDURL>"
|
135 |
" <SCPDURL>/upmpd/OHCredentials.xml</SCPDURL>"
|
92 |
" <controlURL>/ctl/OHCredentials</controlURL>"
|
136 |
" <controlURL>/ctl/OHCredentials</controlURL>"
|
93 |
" <eventSubURL>/evt/OHCredentials</eventSubURL>"
|
137 |
" <eventSubURL>/evt/OHCredentials</eventSubURL>"
|
94 |
"</service>"
|
138 |
"</service>"
|
95 |
"<service>"
|
|
|
96 |
" <serviceType>urn:av-openhome-org:service:Time:1</serviceType>"
|
|
|
97 |
" <serviceId>urn:av-openhome-org:serviceId:Time</serviceId>"
|
|
|
98 |
" <SCPDURL>/upmpd/OHTime.xml</SCPDURL>"
|
|
|
99 |
" <controlURL>/ctl/OHTime</controlURL>"
|
|
|
100 |
" <eventSubURL>/evt/OHTime</eventSubURL>"
|
|
|
101 |
"</service>"
|
|
|
102 |
"<service>"
|
|
|
103 |
" <serviceType>urn:av-openhome-org:service:Volume:1</serviceType>"
|
|
|
104 |
" <serviceId>urn:av-openhome-org:serviceId:Volume</serviceId>"
|
|
|
105 |
" <SCPDURL>/upmpd/OHVolume.xml</SCPDURL>"
|
|
|
106 |
" <controlURL>/ctl/OHVolume</controlURL>"
|
|
|
107 |
" <eventSubURL>/evt/OHVolume</eventSubURL>"
|
|
|
108 |
"</service>"
|
|
|
109 |
"<service>"
|
|
|
110 |
" <serviceType>urn:av-openhome-org:service:Playlist:1</serviceType>"
|
|
|
111 |
" <serviceId>urn:av-openhome-org:serviceId:Playlist</serviceId>"
|
|
|
112 |
" <SCPDURL>/upmpd/OHPlaylist.xml</SCPDURL>"
|
|
|
113 |
" <controlURL>/ctl/OHPlaylist</controlURL>"
|
|
|
114 |
" <eventSubURL>/evt/OHPlaylist</eventSubURL>"
|
|
|
115 |
"</service>"
|
|
|
116 |
"<service>"
|
|
|
117 |
" <serviceType>urn:av-openhome-org:service:Radio:1</serviceType>"
|
|
|
118 |
" <serviceId>urn:av-openhome-org:serviceId:Radio</serviceId>"
|
|
|
119 |
" <SCPDURL>/upmpd/OHRadio.xml</SCPDURL>"
|
|
|
120 |
" <controlURL>/ctl/OHRadio</controlURL>"
|
|
|
121 |
" <eventSubURL>/evt/OHRadio</eventSubURL>"
|
|
|
122 |
"</service>"
|
|
|
123 |
);
|
139 |
);
|
124 |
|
|
|
125 |
// We only advertise the Openhome Receiver service if the sc2mpd
|
|
|
126 |
// songcast-to-mpd gateway command is available
|
|
|
127 |
static string ohDescReceive(
|
|
|
128 |
"<service>"
|
|
|
129 |
" <serviceType>urn:av-openhome-org:service:Receiver:1</serviceType>"
|
|
|
130 |
" <serviceId>urn:av-openhome-org:serviceId:Receiver</serviceId>"
|
|
|
131 |
" <SCPDURL>/upmpd/OHReceiver.xml</SCPDURL>"
|
|
|
132 |
" <controlURL>/ctl/OHReceiver</controlURL>"
|
|
|
133 |
" <eventSubURL>/evt/OHReceiver</eventSubURL>"
|
|
|
134 |
"</service>"
|
|
|
135 |
);
|
|
|
136 |
|
|
|
137 |
static const string iconDesc(
|
140 |
static const string iconDesc(
|
138 |
"<iconList>"
|
141 |
"<iconList>"
|
139 |
" <icon>"
|
142 |
" <icon>"
|
140 |
" <mimetype>image/png</mimetype>"
|
143 |
" <mimetype>image/png</mimetype>"
|
141 |
" <width>64</width>"
|
144 |
" <width>64</width>"
|
|
... |
|
... |
297 |
|
300 |
|
298 |
if (enableOH) {
|
301 |
if (enableOH) {
|
299 |
if (enableReceiver) {
|
302 |
if (enableReceiver) {
|
300 |
ohDesc += ohDescReceive;
|
303 |
ohDesc += ohDescReceive;
|
301 |
}
|
304 |
}
|
|
|
305 |
bool lumincompat = configBool(g_config, "lumincompat");
|
|
|
306 |
if (!lumincompat) {
|
|
|
307 |
ohDesc += ohDescCreds;
|
|
|
308 |
}
|
302 |
data = regsub1("@OPENHOME@", data, ohDesc);
|
309 |
data = regsub1("@OPENHOME@", data, ohDesc);
|
|
|
310 |
// See comment about ohproduct version in upmpd.cxx
|
|
|
311 |
if (lumincompat) {
|
|
|
312 |
data = regsub1("Product:2", data, "Product:1");
|
|
|
313 |
}
|
303 |
} else {
|
314 |
} else {
|
304 |
data = regsub1("@OPENHOME@", data, "");
|
315 |
data = regsub1("@OPENHOME@", data, "");
|
305 |
}
|
316 |
}
|
306 |
|
317 |
|
307 |
if (!icondata.empty())
|
318 |
if (!icondata.empty())
|