SinricPro Library
|
SinricPro namespace. More...
Typedefs | |
using | ConnectedCallbackHandler = std::function< void(void)> |
Callback definition for onConnected function. More... | |
using | DisconnectedCallbackHandler = std::function< void(void)> |
Callback definition for onDisconnected function. More... | |
using | OTAUpdateCallbackHandler = std::function< bool(const String &url, int major, int minor, int patch, bool enforce)> |
Function signature for OTA update callback. More... | |
using | SetSettingCallbackHandler = std::function< bool(const String &id, const String &value)> |
Function signature for setting a module setting. More... | |
using | ReportHealthCallbackHandler = std::function< bool(String &healthReport)> |
Defines a function type for reporting device health status. More... | |
using | BrightnessCallback = std::function< bool(const String &, int &)> |
Callback definition for onBrightness function. More... | |
using | AdjustBrightnessCallback = std::function< bool(const String &, int &)> |
Callback definition for onAdjustBrightness function. More... | |
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... | |
using | ColorCallback = std::function< bool(const String &, byte &, byte &, byte &)> |
Callback definition for onColor function. More... | |
using | ColorTemperatureCallback = std::function< bool(const String &, int &)> |
Callback definition for onColorTemperature function. More... | |
using | IncreaseColorTemperatureCallback = std::function< bool(const String &, int &)> |
Callback definition for onIncreaseColorTemperature function. More... | |
using | DecreaseColorTemperatureCallback = std::function< bool(const String &, int &)> |
Callback definition for onDecreaseColorTemperature function. More... | |
using | DoorCallback = std::function< bool(const String &, bool &)> |
Callback definition for onDoorState function. More... | |
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... | |
using | SelectInputCallback = std::function< bool(const String &, String &)> |
Callback definition for onSelectInput function. More... | |
using | KeystrokeCallback = std::function< bool(const String &, String &)> |
Callback definition for onKeystroke function. More... | |
using | LockStateCallback = std::function< bool(const String &, bool &)> |
Callback definition for onLockState function. More... | |
using | MediaControlCallback = std::function< bool(const String &, String &)> |
Callback definition for onMediaControl function. More... | |
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... | |
using | MuteCallback = std::function< bool(const String &, bool &)> |
Callback definition for onMute function. More... | |
using | SetPercentageCallback = std::function< bool(const String &, int &)> |
Callback definition for onSetPercentage function. More... | |
using | AdjustPercentageCallback = std::function< bool(const String &, int &)> |
Callback definition for onAdjustPercentage function. More... | |
using | SetPowerLevelCallback = std::function< bool(const String &, int &)> |
Definition for setPowerLevel callback. More... | |
using | AdjustPowerLevelCallback = std::function< bool(const String &, int &)> |
Definition for onAdjustPowerLevel callback. More... | |
using | PowerStateCallback = std::function< bool(const String &, bool &)> |
Callback definition for onPowerState function. More... | |
using | GenericRangeValueCallback_int = bool(*)(const String &, const String &, int &) |
Callback definition for onRangeValue function. More... | |
using | GenericSetRangeValueCallback_int = GenericRangeValueCallback_int |
Callback definition for onRangeValue function on a specific instance. More... | |
using | AdjustRangeValueCallback = bool(*)(const String &, int &) |
Callback definition for onAdjustRangeValue function. More... | |
using | GenericAdjustRangeValueCallback_int = GenericRangeValueCallback_int |
Callback definition for onAdjustRangeValue function on a specific instance for custom devices. More... | |
using | ThermostatModeCallback = std::function< bool(const String &, String &)> |
Callback definition for onThermostatMode function. More... | |
using | SetTargetTemperatureCallback = std::function< bool(const String &, float &)> |
Callback definition for onTargetTemperature function. More... | |
using | AdjustTargetTemperatureCallback = std::function< bool(const String &, float &)> |
Callback definition for onAdjustTargetTemperature function. More... | |
using | GenericToggleStateCallback = std::function< bool(const String &, const String &, bool &)> |
Callback definition for onToggleState function. More... | |
using | SetVolumeCallback = std::function< bool(const String &, int &)> |
Callback definition for onSetVolume function. More... | |
using | AdjustVolumeCallback = std::function< bool(const String &, int &, bool)> |
Callback definition for onAdjustVolume function. More... | |
SinricPro namespace.
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 AdjustBrightnessCallback = std::function<bool(const String &, int &)> |
Callback definition for onAdjustBrightness function.
Gets called when device receive a adjustBrightness
request
[in] | deviceId | String which contains the ID of device |
[in] | brightness | Relative integer value the device should change the brightness about |
[out] | brightness | Absolute integer value with new brightness the device is set to |
true | request handled properly |
false | request was not handled properly because of some error |
using AdjustPercentageCallback = std::function<bool(const String &, int &)> |
Callback definition for onAdjustPercentage function.
Gets called when device receive a adjustPercentage
request
[in] | deviceId | String which contains the ID of device |
[in] | percentageDelta | Integer with relative percentage the device should change about (-100..100) |
[out] | percentageDelta | Integer with absolute percentage device has been set to |
true | request handled properly |
false | request was not handled properly because of some error |
using AdjustPowerLevelCallback = std::function<bool(const String &, int &)> |
Definition for onAdjustPowerLevel callback.
Gets called when device receive a adjustPowerLevel
reuqest
[in] | deviceId | String which contains the ID of device |
[in] | powerLevel | integer -100..100 delta value which power level have to be changed |
[out] | powerLevel | integer 0..100 report the absolute powerlevel that the device have been set to |
true | request handled properly |
false | request can`t be handled properly because of some error |
using AdjustRangeValueCallback = bool (*)(const String &, int &) |
Callback definition for onAdjustRangeValue function.
Gets called when device receive a adjustRangeValue
reuqest
[in] | deviceId | String which contains the ID of device |
[in] | rangeValue | delta value for range value have to change |
[out] | rangeValue | returning the absolute range value |
true | request handled properly |
false | request was not handled properly because of some error |
using AdjustTargetTemperatureCallback = std::function<bool(const String &, float &)> |
Callback definition for onAdjustTargetTemperature function.
Gets called when device receive a adjustTargetTemperature
reuqest
[in] | deviceId | String which contains the ID of device |
[in] | temperature | Float relative temperature device should change about |
[out] | temperature | Float absolute temperature device is set to |
true | request handled properly |
false | request was not handled properly because of some error |
using AdjustVolumeCallback = std::function<bool(const String &, int &, bool)> |
Callback definition for onAdjustVolume function.
Gets called when device receive a adjustVolume
request
[in] | deviceId | String which contains the ID of device |
[in] | volumeDelta | Integer with relative volume the device should change about (-100..100) |
[out] | volumeDelta | Integer with absolute volume device has been set to |
[in] | volumeDefault | Bool false if the user specified the amount by which to change the volume; otherwise true |
true | request handled properly |
false | request was not handled properly because of some error |
using BrightnessCallback = std::function<bool(const String &, int &)> |
Callback definition for onBrightness function.
Gets called when device receive a setBrightness
request
[in] | deviceId | String which contains the ID of device |
[in] | brightness | Absolute integer value the device should set its brightness to |
[out] | brightness | Absolute integer value with new brightness the device is set to |
true | request handled properly |
false | request was not handled properly because of some error |
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 ColorCallback = std::function<bool(const String &, byte &, byte &, byte &)> |
Callback definition for onColor function.
Gets called when device receive a setColor
request
[in] | deviceId | String which contains the ID of device |
[in] | r | Byte value for red |
[in] | g | Byte value for green |
[in] | b | Byte value for blue |
[out] | r | Byte value for red |
[out] | g | Byte value for green |
[out] | b | Byte value for blue |
true | request handled properly |
false | request was not handled properly because of some error |
using ColorTemperatureCallback = std::function<bool(const String &, int &)> |
Callback definition for onColorTemperature function.
Gets called when device receive a setColorTemperature
request
[in] | deviceId | String which contains the ID of device |
[in] | colorTemperature | Integer value with color temperature the device should set to 2200 = warm white 2700 = soft white 4000 = white 5500 = daylight white 7000 = cool white |
[out] | colorTemperature | Integer value with color temperature the device is set to 2200 = warm white 2700 = soft white 4000 = white 5500 = daylight white 7000 = cool white |
true | request handled properly |
false | request was not handled properly because of some error |
using ConnectedCallbackHandler = std::function<void(void)> |
Callback definition for onConnected function.
Gets called when device is connected to SinricPro server
void |
using DecreaseColorTemperatureCallback = std::function<bool(const String &, int &)> |
Callback definition for onDecreaseColorTemperature function.
Gets called when device receive a decreaseColorTemperature
request
[in] | deviceId | String which contains the ID of device |
[in] | colorTemperature | Integer value -1 = Device should decrease color temperature |
[out] | colorTemperature | Integer value return the new color temperarature 2200 = warm white 2700 = soft white 4000 = white 5500 = daylight white 7000 = cool white |
true | request handled properly |
false | request was not handled properly because of some error |
using DisconnectedCallbackHandler = std::function<void(void)> |
Callback definition for onDisconnected function.
Gets called when device is disconnected from SinricPro server
void |
using DoorCallback = std::function<bool(const String &, bool &)> |
Callback definition for onDoorState function.
Gets called when device receive a open
or close
request
[in] | deviceId | String which contains the ID of device |
[in] | doorState | false = open, device is requested to open the garage door true = close, device is requested to close the garage door |
[out] | doorState | bool with actual state false = open, true = closed |
true | request handled properly |
false | request was not handled properly because of some error |
Callback definition for onAdjustRangeValue function on a specific instance for custom devices.
Gets called when device receive a adjustRangeValue
reuqest
[in] | deviceId | String which contains the ID of device |
[in] | instance | String instance name |
[in] | rangeValue | delta value for range value have to change |
[out] | rangeValue | returning the absolute range value |
true | request handled properly |
false | request was not handled properly because of some error |
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 GenericRangeValueCallback_int = bool (*)(const String &, const String &, int &) |
Callback definition for onRangeValue function.
Gets called when device receive a setRangeValue
reuqest
[in] | deviceId | String which contains the ID of device |
[in] | rangeValue | for range value device has to be set |
[out] | rangeValue | returning the current range value |
true | request handled properly |
false | request was not handled properly because of some error |
Callback definition for onRangeValue function on a specific instance.
Gets called when device receive a setRangeValue
reuqest
[in] | deviceId | String which contains the ID of device |
[in] | instance | String instance name |
[in] | rangeValue | for range value device has to be set |
[out] | rangeValue | returning the current range value |
true | request handled properly |
false | request was not handled properly because of some error |
using GenericToggleStateCallback = std::function<bool(const String &, const String&, bool &)> |
Callback definition for onToggleState function.
Gets called when device receive a setPowerState
reuqest
[in] | deviceId | String which contains the ID of device |
[in] | instance | String which instance is requested |
[in] | state | true = device is requested to turn on false = device is requested to turn off |
[out] | state | true = device has been turned on false = device has been turned off |
true | request handled properly |
false | request was not handled properly because of some error |
using IncreaseColorTemperatureCallback = std::function<bool(const String &, int &)> |
Callback definition for onIncreaseColorTemperature function.
Gets called when device receive a increaseColorTemperature
request
[in] | deviceId | String which contains the ID of device |
[in] | colorTemperature | Integer value 1 = Device should increase color temperature |
[out] | colorTemperature | Integer value return the new color temperarature 2200 = warm white 2700 = soft white 4000 = white 5500 = daylight white 7000 = cool white |
true | request handled properly |
false | request was not handled properly because of some error |
using KeystrokeCallback = std::function<bool(const String &, String &)> |
Callback definition for onKeystroke function.
Gets called when device receive a setBands
request
[in] | deviceId | String which contains the ID of device |
[in] | keystroke | String keystroke INFO , MORE , SELECT , UP , DOWN , LEFT , RIGHT , PAGE_UP , PAGE_DOWN , PAGE_LEFT , PAGE_RIGHT |
[out] | keystroke | String keystroke INFO , MORE , SELECT , UP , DOWN , LEFT , RIGHT , PAGE_UP , PAGE_DOWN , PAGE_LEFT , PAGE_RIGHT |
true | request handled properly |
false | request was not handled properly because of some error |
using LockStateCallback = std::function<bool(const String &, bool &)> |
Callback definition for onLockState function.
Gets called when device receive a setLockState
request
[in] | deviceId | String which contains the ID of device |
[in] | state | true = device is requested to lock false = device is requested to unlock |
[out] | state | true = device has been locked false = device has been unlocked |
true | request handled properly |
false | request was not handled properly because of some error |
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 |
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 |
using MuteCallback = std::function<bool(const String &, bool &)> |
Callback definition for onMute function.
Gets called when device receive a setMute
request
[in] | deviceId | String which contains the ID of device |
[in] | mute | true mute device false unmute device |
[out] | mute | true device is muted false device is unmuted |
true | request handled properly |
false | request was not handled properly because of some error |
typedef std::function< bool(const String &url, int major, int minor, int patch, bool forceUpdate)> OTAUpdateCallbackHandler |
Function signature for OTA update callback.
This typedef defines a function pointer type for OTA (Over-The-Air) update callbacks. The callback function should accept a URL string and a Version struct as parameters.
url | The URL from which the OTA update can be downloaded. |
major | The major version number |
minor | The minor version number |
patch | The patch version number |
forceUpdate | Skip the version check and apply the update. |
using PowerStateCallback = std::function<bool(const String &, bool &)> |
Callback definition for onPowerState function.
Gets called when device receive a setPowerState
reuqest
[in] | deviceId | String which contains the ID of device |
[in] | state | true = device is requested to turn on false = device is requested to turn off |
[out] | state | true = device has been turned on false = device has been turned off |
true | request handled properly |
false | request was not handled properly because of some error |
typedef std::function< bool(String &healthReport)> ReportHealthCallbackHandler |
Defines a function type for reporting device health status.
This typedef creates an alias for a std::function that takes a reference to a String and returns a boolean value. It's designed to be used as a callback for health reporting
healthReport | A reference to a String that will contain the health status information. The callback function should populate this string with relevant health data. |
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 SelectInputCallback = std::function<bool(const String &, String &)> |
Callback definition for onSelectInput function.
Gets called when device receive a selectInput
request
[in] | deviceId | String which contains the ID of device |
[in] | input | String with input name device is requested to switch to AUX 1 ..AUX 7 , BLURAY , CABLE , CD , COAX 1 ,COAX 2 , COMPOSITE 1 , DVD , GAME , HD RADIO , HDMI 1 .. HDMI 10 , HDMI ARC , INPUT 1 ..INPUT 10 , IPOD , LINE 1 ..LINE 7 , MEDIA PLAYER , OPTICAL 1 , OPTICAL 2 , PHONO , PLAYSTATION , PLAYSTATION 3 , PLAYSTATION 4 , SATELLITE , SMARTCAST , TUNER , TV , USB DAC , VIDEO 1 ..VIDEO 3 , XBOX |
[out] | input | String with input name device has switchted to AUX 1 ..AUX 7 , BLURAY , CABLE , CD , COAX 1 ,COAX 2 , COMPOSITE 1 , DVD , GAME , HD RADIO , HDMI 1 .. HDMI 10 , HDMI ARC , INPUT 1 ..INPUT 10 , IPOD , LINE 1 ..LINE 7 , MEDIA PLAYER , OPTICAL 1 , OPTICAL 2 , PHONO , PLAYSTATION , PLAYSTATION 3 , PLAYSTATION 4 , SATELLITE , SMARTCAST , TUNER , TV , USB DAC , VIDEO 1 ..VIDEO 3 , XBOX |
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 |
using SetPercentageCallback = std::function<bool(const String &, int &)> |
Callback definition for onSetPercentage function.
Gets called when device receive a setPercentage
request
[in] | deviceId | String which contains the ID of device |
[in] | percentage | Integer with percentage device should set to |
[out] | percentage | Integer with percentage device has been set to |
true | request handled properly |
false | request was not handled properly because of some error |
using SetPowerLevelCallback = std::function<bool(const String &, int &)> |
Definition for setPowerLevel callback.
Gets called when device receive a setPowerLevel
reuqest
[in] | deviceId | String which contains the ID of device |
[in] | powerLevel | integer 0..100 new powerlevel the device should be set to |
[out] | powerLevel | integer 0..100 report the powerlevel that the device have been set to |
true | request handled properly |
false | request was not handled properly because of some error |
typedef std::function< bool(const String &id, const String &value)> SetSettingCallbackHandler |
Function signature for setting a module setting.
This callback is used to set a value for a specific setting identified by its ID.
id | The unique identifier of the setting to be set. |
value | The new value to be assigned to the setting. |
using SetTargetTemperatureCallback = std::function<bool(const String &, float &)> |
Callback definition for onTargetTemperature function.
Gets called when device receive a targetTemperature
request
[in] | deviceId | String which contains the ID of device |
[in] | temperature | Float device is requested to set the target temperature to |
[out] | temperature | Float target temperature temperature device is set to |
true | request handled properly |
false | request was not handled properly because of some error |
using SetVolumeCallback = std::function<bool(const String &, int &)> |
Callback definition for onSetVolume function.
Gets called when device receive a setVolume
request
[in] | deviceId | String which contains the ID of device |
[in] | volume | Integer with volume device should set to |
[out] | volume | Integer with volume device has been set 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 |
using ThermostatModeCallback = std::function<bool(const String &, String &)> |
Callback definition for onThermostatMode function.
Gets called when device receive a setThermostatMode
request
[in] | deviceId | String which contains the ID of device |
[in] | mode | String with mode device should set to |
[out] | mode | String device mode is set to |
true | request handled properly |
false | request was not handled properly because of some error |