SinricPro Library
|
Public Types | |
using | MediaControlCallback = std::function< bool(const String &, String &)> |
Callback definition for onMediaControl function. More... | |
Public Member Functions | |
void | onMediaControl (MediaControlCallback cb) |
Set callback function for mediaControl request. More... | |
bool | sendMediaControlEvent (String mediaControl, String cause="PHYSICAL_INTERACTION") |
Send mediaControl event to SinricPro Server indicating devices media control state. More... | |
using MediaControlCallback = std::function<bool(const String &, String &)> |
Callback definition for onMediaControl function.
Gets called when device receive a mediaControl
request
[in] | deviceId | String which contains the ID of device |
[in] | control | String with requested control FastForward , Next , Pause , Play , Previous , Rewind , StartOver , Stop |
[out] | control | String with control FastForward , Next , Pause , Play , Previous , Rewind , StartOver , Stop |
true | request handled properly |
false | request was not handled properly because of some error |
void onMediaControl | ( | MediaControlCallback | cb | ) |
Set callback function for mediaControl
request.
cb | Function pointer to a MediaControlCallback function |
bool sendMediaControlEvent | ( | String | mediaControl, |
String | cause = "PHYSICAL_INTERACTION" |
||
) |
Send mediaControl
event to SinricPro Server indicating devices media control state.
mediaControl | String with actual media control FastForward , Next , Pause , Play , Previous , Rewind , StartOver , Stop |
cause | (optional) String reason why event is sent (default = "PHYSICAL_INTERACTION" ) |
true | event has been sent successfully |
false | event has not been sent, maybe you sent to much events in a short distance of time |