1 #ifndef _KEYPADCONTROLLER_H_
2 #define _KEYPADCONTROLLER_H_
4 #include "SinricProRequest.h"
33 bool handleKeypadController(SinricProRequest &request);
52 T &device =
static_cast<T &
>(*this);
55 if (request.action !=
"SendKeystroke")
return false;
57 if (keystrokeCallback) {
58 String keystroke = request.request_value[
"keystroke"] |
"";
59 success = keystrokeCallback(device.deviceId, keystroke);
60 request.response_value[
"keystroke"] = keystroke;
KeypadController.
Definition: KeypadController.h:11
std::function< bool(const String &, String &)> KeystrokeCallback
Callback definition for onKeystroke function.
Definition: KeypadController.h:28
void onKeystroke(KeystrokeCallback cb)
Set callback function for SendKeystroke request.
Definition: KeypadController.h:47