SinricPro Library
|
Public Types | |
using | ModeCallback = std::function< bool(const String &, String &)> |
Callback definition for onSetMode function. More... | |
using | GenericModeCallback = std::function< bool(const String &, const String &, String &)> |
Callback definition for onSetMode function for a specific instance. More... | |
Public Member Functions | |
void | onSetMode (ModeCallback cb) |
Set callback function for setMode request. More... | |
void | onSetMode (const String &instance, GenericModeCallback cb) |
Set callback function for setMode request on a specific instance. More... | |
bool | sendModeEvent (String mode, String cause="PHYSICAL_INTERACTION") |
Send setMode event to SinricPro Server indicating the mode has changed. More... | |
bool | sendModeEvent (String instance, String mode, String cause="PHYSICAL_INTERACTION") |
Send setMode event to SinricPro Server indicating the mode on a specific instance has changed. More... | |
using GenericModeCallback = std::function<bool(const String &, const String &, String &)> |
Callback definition for onSetMode function for a specific instance.
Gets called when device receive a setBands
request
[in] | deviceId | String which contains the ID of device |
[in] | instance | String name of the instance |
[in] | mode | String device mode should set to |
[out] | mode | String devices mode is set to |
true | request handled properly |
false | request was not handled properly because of some error |
using ModeCallback = std::function<bool(const String &, String &)> |
Callback definition for onSetMode function.
Gets called when device receive a setBands
request
[in] | deviceId | String which contains the ID of device |
[in] | mode | String device mode should set to MOVIE , MUSIC , NIGHT , SPORT , TV |
[out] | mode | String devices mode is set to MOVIE , MUSIC , NIGHT , SPORT , TV |
true | request handled properly |
false | request was not handled properly because of some error |
void onSetMode | ( | const String & | instance, |
GenericModeCallback | cb | ||
) |
Set callback function for setMode
request on a specific instance.
instance | String with instance name |
cb | Function pointer to a ModeCallback function |
void onSetMode | ( | ModeCallback | cb | ) |
Set callback function for setMode
request.
cb | Function pointer to a ModeCallback function |
bool sendModeEvent | ( | String | instance, |
String | mode, | ||
String | cause = "PHYSICAL_INTERACTION" |
||
) |
Send setMode
event to SinricPro Server indicating the mode on a specific instance has changed.
instance | String instance name |
mode | String with actual mode device is set to MOVIE , MUSIC , NIGHT , SPORT , TV |
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 |
bool sendModeEvent | ( | String | mode, |
String | cause = "PHYSICAL_INTERACTION" |
||
) |
Send setMode
event to SinricPro Server indicating the mode has changed.
mode | String with actual mode device is set to MOVIE , MUSIC , NIGHT , SPORT , TV |
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 |