|
a/libupnpp/control/renderingcontrol.hxx |
|
b/libupnpp/control/renderingcontrol.hxx |
|
... |
|
... |
40 |
|
40 |
|
41 |
/** Construct by copying data from device and service objects.
|
41 |
/** Construct by copying data from device and service objects.
|
42 |
*
|
42 |
*
|
43 |
*/
|
43 |
*/
|
44 |
RenderingControl(const UPnPDeviceDesc& device,
|
44 |
RenderingControl(const UPnPDeviceDesc& device,
|
45 |
const UPnPServiceDesc& service)
|
45 |
const UPnPServiceDesc& service);
|
46 |
: Service(device, service)
|
|
|
47 |
{
|
|
|
48 |
registerCallback();
|
|
|
49 |
}
|
|
|
50 |
|
46 |
|
51 |
RenderingControl() {}
|
47 |
RenderingControl() {}
|
52 |
|
48 |
|
53 |
/** Test service type from discovery message */
|
49 |
/** Test service type from discovery message */
|
54 |
static bool isRDCService(const std::string& st);
|
50 |
static bool isRDCService(const std::string& st);
|
|
... |
|
... |
61 |
|
57 |
|
62 |
protected:
|
58 |
protected:
|
63 |
/* My service type string */
|
59 |
/* My service type string */
|
64 |
static const std::string SType;
|
60 |
static const std::string SType;
|
65 |
|
61 |
|
|
|
62 |
/* Volume settings params */
|
|
|
63 |
int m_volmin;
|
|
|
64 |
int m_volmax;
|
|
|
65 |
int m_volstep;
|
|
|
66 |
|
66 |
private:
|
67 |
private:
|
67 |
void evtCallback(const std::unordered_map<std::string, std::string>&);
|
68 |
void evtCallback(const std::unordered_map<std::string, std::string>&);
|
68 |
void registerCallback();
|
69 |
void registerCallback();
|
|
|
70 |
/** Set volume parameters from service state variable table values */
|
|
|
71 |
void setVolParams(int min, int max, int step) {
|
|
|
72 |
m_volmin = min >= 0 ? min : 0;
|
|
|
73 |
m_volmax = max > 0 ? max : 100;
|
|
|
74 |
m_volstep = step > 0 ? step : 1;
|
|
|
75 |
}
|
|
|
76 |
int devVolTo0100(int);
|
69 |
};
|
77 |
};
|
70 |
|
78 |
|
71 |
} // namespace UPnPClient
|
79 |
} // namespace UPnPClient
|
72 |
|
80 |
|
73 |
#endif /* _RENDERINGCONTROL_HXX_INCLUDED_ */
|
81 |
#endif /* _RENDERINGCONTROL_HXX_INCLUDED_ */
|