|
a/upmpd/ohplaylist.hxx |
|
b/upmpd/ohplaylist.hxx |
|
... |
|
... |
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
16 |
*/
|
16 |
*/
|
17 |
#ifndef _OHPLAYLIST_H_X_INCLUDED_
|
17 |
#ifndef _OHPLAYLIST_H_X_INCLUDED_
|
18 |
#define _OHPLAYLIST_H_X_INCLUDED_
|
18 |
#define _OHPLAYLIST_H_X_INCLUDED_
|
19 |
|
19 |
|
20 |
#include <string>
|
20 |
#include <string> // for string
|
|
|
21 |
#include <unordered_map> // for unordered_map
|
|
|
22 |
#include <vector> // for vector
|
21 |
|
23 |
|
22 |
#include "libupnpp/device/device.hxx"
|
24 |
#include "libupnpp/device/device.hxx" // for UpnpService
|
23 |
|
25 |
#include "libupnpp/soaphelp.hxx" // for SoapArgs, SoapData
|
24 |
using namespace UPnPP;
|
|
|
25 |
|
26 |
|
26 |
class UpMpd;
|
27 |
class UpMpd;
|
27 |
class UpMpdRenderCtl;
|
28 |
class UpMpdRenderCtl;
|
28 |
|
29 |
|
|
|
30 |
using namespace UPnPP;
|
|
|
31 |
|
29 |
class OHPlaylist : public UpnpService {
|
32 |
class OHPlaylist : public UPnPProvider::UpnpService {
|
30 |
public:
|
33 |
public:
|
31 |
OHPlaylist(UpMpd *dev, UpMpdRenderCtl *ctl);
|
34 |
OHPlaylist(UpMpd *dev, UpMpdRenderCtl *ctl);
|
32 |
|
35 |
|
33 |
virtual bool getEventData(bool all, std::vector<std::string>& names,
|
36 |
virtual bool getEventData(bool all, std::vector<std::string>& names,
|
34 |
std::vector<std::string>& values);
|
37 |
std::vector<std::string>& values);
|
|
... |
|
... |
59 |
int idArray(const SoapArgs& sc, SoapData& data);
|
62 |
int idArray(const SoapArgs& sc, SoapData& data);
|
60 |
int idArrayChanged(const SoapArgs& sc, SoapData& data);
|
63 |
int idArrayChanged(const SoapArgs& sc, SoapData& data);
|
61 |
int protocolInfo(const SoapArgs& sc, SoapData& data);
|
64 |
int protocolInfo(const SoapArgs& sc, SoapData& data);
|
62 |
|
65 |
|
63 |
bool makeIdArray(std::string&);
|
66 |
bool makeIdArray(std::string&);
|
64 |
bool makestate(unordered_map<string, string> &st);
|
67 |
bool makestate(std::unordered_map<std::string, std::string> &st);
|
65 |
void maybeWakeUp(bool ok);
|
68 |
void maybeWakeUp(bool ok);
|
66 |
// State variable storage
|
69 |
// State variable storage
|
67 |
unordered_map<string, string> m_state;
|
70 |
std::unordered_map<std::string, std::string> m_state;
|
68 |
UpMpd *m_dev;
|
71 |
UpMpd *m_dev;
|
69 |
|
72 |
|
70 |
// Storage for song metadata, indexed by URL. This used to be
|
73 |
// Storage for song metadata, indexed by URL. This used to be
|
71 |
// indexed by song id, but this does not survive MPD restarts.
|
74 |
// indexed by song id, but this does not survive MPD restarts.
|
72 |
// The data is the DIDL XML string.
|
75 |
// The data is the DIDL XML string.
|
|
... |
|
... |
74 |
bool m_cachedirty;
|
77 |
bool m_cachedirty;
|
75 |
|
78 |
|
76 |
// Avoid re-reading the whole MPD queue every time by using the
|
79 |
// Avoid re-reading the whole MPD queue every time by using the
|
77 |
// queue version.
|
80 |
// queue version.
|
78 |
int m_mpdqvers;
|
81 |
int m_mpdqvers;
|
79 |
string m_idArrayCached;
|
82 |
std::string m_idArrayCached;
|
80 |
};
|
83 |
};
|
81 |
|
84 |
|
82 |
#endif /* _OHPLAYLIST_H_X_INCLUDED_ */
|
85 |
#endif /* _OHPLAYLIST_H_X_INCLUDED_ */
|