@@ -49,7 +49,11 @@ static uint16_t const DEFAULT_BROKER_PORT_SECURE_AUTH = 8883;
49
49
static char const DEFAULT_BROKER_ADDRESS_USER_PASS_AUTH[] = " mqtts-up.iot.arduino.cc" ;
50
50
static uint16_t const DEFAULT_BROKER_PORT_USER_PASS_AUTH = 8884 ;
51
51
52
- typedef bool (*otaConfirmationStatus)(void );
52
+ /* *****************************************************************************
53
+ * TYPEDEF
54
+ ******************************************************************************/
55
+
56
+ typedef bool (*onOTARequestCallbackFunc)(void );
53
57
54
58
/* *****************************************************************************
55
59
* CLASS DECLARATION
@@ -87,7 +91,7 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
87
91
* It should return true when the OTA can be applied or false otherwise.
88
92
* See example ArduinoIoTCloud-DeferredOTA.ino
89
93
*/
90
- void onOTARequestCb (otaConfirmationStatus cb) {
94
+ void onOTARequestCb (onOTARequestCallbackFunc cb) {
91
95
_get_ota_confirmation = cb;
92
96
_ask_user_before_executing_ota = true ;
93
97
}
@@ -143,6 +147,7 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
143
147
String _ota_url;
144
148
bool _ota_req;
145
149
bool _ask_user_before_executing_ota;
150
+ onOTARequestCallbackFunc _get_ota_confirmation;
146
151
#endif /* OTA_ENABLED */
147
152
148
153
inline String getTopic_shadowout () { return ( getThingId ().length () == 0 ) ? String (" " ) : String (" /a/t/" + getThingId () + " /shadow/o" ); }
@@ -167,7 +172,6 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
167
172
void onOTARequest ();
168
173
#endif
169
174
170
- otaConfirmationStatus _get_ota_confirmation = {nullptr };
171
175
};
172
176
173
177
/* *****************************************************************************
0 commit comments