SinricPro Library
|
Device to control a smart lock. More...
Public Types | |
using | LockStateCallback = std::function< bool(const String &, bool &)> |
Callback definition for onLockState function. More... | |
Public Member Functions | |
void | onLockState (LockStateCallback cb) |
Set callback function for setLockState request. More... | |
bool | sendLockStateEvent (bool state, String cause="PHYSICAL_INTERACTION") |
Send lockState event to SinricPro Server indicating actual lock state. More... | |
Device to control a smart lock.
Supporting
|
inherited |
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 |
|
inherited |
Set callback function for setLockState
request.
cb | Function pointer to a LockStateCallback function |
|
inherited |
Send lockState
event to SinricPro Server indicating actual lock state.
state | true = device is locked false = device is unlocked |
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 |