SinricPro Library
|
Public Types | |
using | ChangeChannelCallback = std::function< bool(const String &, String &)> |
Callback definition for onChangeChannel function. More... | |
using | ChangeChannelNumberCallback = std::function< bool(const String &, int, String &)> |
Callback definition for onChangeChannelNumber function. More... | |
using | SkipChannelsCallback = std::function< bool(const String &, int, String &)> |
Callback definition for onSkipChannels function. More... | |
Public Member Functions | |
void | onChangeChannel (ChangeChannelCallback cb) |
Set callback function for changeChannel request. More... | |
void | onChangeChannelNumber (ChangeChannelNumberCallback cb) |
Set callback function for changeChannel request. More... | |
void | onSkipChannels (SkipChannelsCallback cb) |
Set callback function for skipChannels request. More... | |
bool | sendChangeChannelEvent (String channelName, String cause="PHYSICAL_INTERACTION") |
Send changeChannel event to SinricPro Server to report selected channel. More... | |
using ChangeChannelCallback = std::function<bool(const String &, String &)> |
Callback definition for onChangeChannel function.
Gets called when device receive a changeChannel
request by using channel name
[in] | deviceId | String which contains the ID of device |
[in] | channel | String with channel name device is requested to switch to |
[out] | channel | String with channel name device has switchted to |
true | request handled properly |
false | request was not handled properly because of some error |
using ChangeChannelNumberCallback = std::function<bool(const String &, int, String &)> |
Callback definition for onChangeChannelNumber function.
Gets called when device receive a changeChannel
request by using channel number
[in] | deviceId | String which contains the ID of device |
[in] | channelNumber | Integer with channel number device is requested to switch to |
[out] | channelName | String with channel name device has switchted to |
true | request handled properly |
false | request was not handled properly because of some error |
using SkipChannelsCallback = std::function<bool(const String &, int, String &)> |
Callback definition for onSkipChannels function.
Gets called when device receive a changeChannel
request by using channel number
[in] | deviceId | String which contains the ID of device |
[in] | channelCount | Integer with channels device is requested to skip -n ..+n |
[out] | channelName | String with channel name device has switchted to |
true | request handled properly |
false | request was not handled properly because of some error |
void onChangeChannel | ( | ChangeChannelCallback | cb | ) |
Set callback function for changeChannel
request.
cb | Function pointer to a ChangeChannelCallback function |
void onChangeChannelNumber | ( | ChangeChannelNumberCallback | cb | ) |
Set callback function for changeChannel
request.
cb | Function pointer to a ChangeChannelNumberCallback function |
void onSkipChannels | ( | SkipChannelsCallback | cb | ) |
Set callback function for skipChannels
request.
cb | Function pointer to a SkipChannelsCallback function |
bool sendChangeChannelEvent | ( | String | channelName, |
String | cause = "PHYSICAL_INTERACTION" |
||
) |
Send changeChannel
event to SinricPro Server to report selected channel.
channelName | String with actual channel |
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 |