SinricPro Library
Loading...
Searching...
No Matches
VolumeController< T >

VolumeController. More...

#include <VolumeController.h>

Inheritance diagram for VolumeController< T >:

Public Member Functions

void onSetVolume (SetVolumeCallback cb)
 Set callback function for setVolume request.
 
void onAdjustVolume (AdjustVolumeCallback cb)
 Set callback function for adjustVolume request.
 
bool sendVolumeEvent (int volume, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION)
 Send setVolume event to SinricPro Server indicating actual volume has changed.
 

Detailed Description

template<typename T>
class SINRICPRO_3_0_0::VolumeController< T >

VolumeController.

Member Function Documentation

◆ onAdjustVolume()

template<typename T >
void onAdjustVolume ( AdjustVolumeCallback  cb)

Set callback function for adjustVolume request.

Parameters
cbFunction pointer to a AdjustVolumeCallback function
Returns
void
See also
AdjustVolumeCallback

◆ onSetVolume()

template<typename T >
void onSetVolume ( SetVolumeCallback  cb)

Set callback function for setVolume request.

Parameters
cbFunction pointer to a SetVolumeCallback function
Returns
void
See also
SetVolumeCallback

◆ sendVolumeEvent()

template<typename T >
bool sendVolumeEvent ( int  volume,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)

Send setVolume event to SinricPro Server indicating actual volume has changed.

Parameters
volumeInteger reporting the volume that the device have been set to
cause(optional) Reason why event is sent (default = "PHYSICAL_INTERACTION")
Returns
the success of sending the event
Return values
trueevent has been sent successfully
falseevent has not been sent, maybe you sent to much events in a short distance of time