|
a/upmpd/ohtime.hxx |
|
b/upmpd/ohtime.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 _OHTIME_H_X_INCLUDED_
|
17 |
#ifndef _OHTIME_H_X_INCLUDED_
|
18 |
#define _OHTIME_H_X_INCLUDED_
|
18 |
#define _OHTIME_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
|
|
|
25 |
#include "libupnpp/soaphelp.hxx" // for SoapArgs, SoapData
|
|
|
26 |
|
|
|
27 |
class UpMpd;
|
23 |
|
28 |
|
24 |
using namespace UPnPP;
|
29 |
using namespace UPnPP;
|
25 |
|
30 |
|
26 |
class UpMpd;
|
|
|
27 |
|
|
|
28 |
class OHTime : public UpnpService {
|
31 |
class OHTime : public UPnPProvider::UpnpService {
|
29 |
public:
|
32 |
public:
|
30 |
OHTime(UpMpd *dev);
|
33 |
OHTime(UpMpd *dev);
|
31 |
|
34 |
|
32 |
virtual bool getEventData(bool all, std::vector<std::string>& names,
|
35 |
virtual bool getEventData(bool all, std::vector<std::string>& names,
|
33 |
std::vector<std::string>& values);
|
36 |
std::vector<std::string>& values);
|
34 |
private:
|
37 |
private:
|
35 |
int ohtime(const SoapArgs& sc, SoapData& data);
|
38 |
int ohtime(const SoapArgs& sc, SoapData& data);
|
36 |
|
39 |
|
37 |
void getdata(string& trackcount, string &duration, string& seconds);
|
40 |
void getdata(std::string& trackcount, std::string &duration, std::string& seconds);
|
38 |
bool makestate(unordered_map<string, string> &st);
|
41 |
bool makestate(std::unordered_map<std::string, std::string> &st);
|
39 |
// State variable storage
|
42 |
// State variable storage
|
40 |
unordered_map<string, string> m_state;
|
43 |
std::unordered_map<std::string, std::string> m_state;
|
41 |
UpMpd *m_dev;
|
44 |
UpMpd *m_dev;
|
42 |
};
|
45 |
};
|
43 |
|
46 |
|
44 |
#endif /* _OHTIME_H_X_INCLUDED_ */
|
47 |
#endif /* _OHTIME_H_X_INCLUDED_ */
|