SinricPro Library
|
Public Types | |
using | SetBandsCallback = std::function< bool(const String &, const String &, int &)> |
Callback definition for onSetBands function. More... | |
using | AdjustBandsCallback = std::function< bool(const String &, const String &, int &)> |
Callback definition for onAdjustBands function. More... | |
using | ResetBandsCallback = std::function< bool(const String &, const String &, int &)> |
Callback definition for onResetBands function. More... | |
Public Member Functions | |
void | onSetBands (SetBandsCallback cb) |
Set callback function for setBands request. More... | |
void | onAdjustBands (AdjustBandsCallback cb) |
Set callback function for adjustBands request. More... | |
void | onResetBands (ResetBandsCallback cb) |
Set callback function for resetBands request. More... | |
bool | sendBandsEvent (String bands, int level, String cause="PHYSICAL_INTERACTION") |
Send setBands event to SinricPro Server indicating bands level has changed. More... | |
using AdjustBandsCallback = std::function<bool(const String &, const String &, int &)> |
Callback definition for onAdjustBands function.
Gets called when device receive a adjustBands
request
[in] | deviceId | String which contains the ID of device |
[in] | bands | String with requested bands to change BASS , MIDRANGE , TREBBLE |
[in] | levelDelta | Integer with relative level value device should change bands about |
[out] | bands | String with changed bands BASS , MIDRANGE , TREBBLE |
[out] | levelDelta | Integer value with level bands changed to |
true | request handled properly |
false | request was not handled properly because of some error |
using ResetBandsCallback = std::function<bool(const String &, const String &, int &)> |
Callback definition for onResetBands function.
Gets called when device receive a onResetBands
request
[in] | deviceId | String which contains the ID of device |
[in] | bands | String with requested bands to reset BASS , MIDRANGE , TREBBLE |
[out] | bands | String with changed bands BASS , MIDRANGE , TREBBLE |
[out] | level | Integer value with level bands changed to |
true | request handled properly |
false | request was not handled properly because of some error |
using SetBandsCallback = std::function<bool(const String &, const String &, int &)> |
Callback definition for onSetBands function.
Gets called when device receive a setBands
request
[in] | deviceId | String which contains the ID of device |
[in] | bands | String with requested bands to change BASS , MIDRANGE , TREBBLE |
[in] | level | Integer value with level bands should set to |
[out] | bands | String with changed bands BASS , MIDRANGE , TREBBLE |
[out] | level | Integer value with level bands changed to |
true | request handled properly |
false | request was not handled properly because of some error |
void onAdjustBands | ( | AdjustBandsCallback | cb | ) |
Set callback function for adjustBands
request.
cb | Function pointer to a AdjustBandsCallback function |
void onResetBands | ( | ResetBandsCallback | cb | ) |
Set callback function for resetBands
request.
cb | Function pointer to a ResetBandsCallback function |
void onSetBands | ( | SetBandsCallback | cb | ) |
Set callback function for setBands
request.
cb | Function pointer to a SetBandsCallback function |
bool sendBandsEvent | ( | String | bands, |
int | level, | ||
String | cause = "PHYSICAL_INTERACTION" |
||
) |
Send setBands
event to SinricPro Server indicating bands level has changed.
bands | String which bands has changed BASS , MIDRANGE , TREBBLE |
level | Integer with changed bands level |
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 |