@@ -49,7 +49,11 @@ static uint16_t const DEFAULT_BROKER_PORT_SECURE_AUTH = 8883;
4949static char const DEFAULT_BROKER_ADDRESS_USER_PASS_AUTH[] = " mqtts-up.iot.arduino.cc" ;
5050static uint16_t const DEFAULT_BROKER_PORT_USER_PASS_AUTH = 8884 ;
5151
52- typedef bool (*otaConfirmationStatus)(void );
52+ /* *****************************************************************************
53+ * TYPEDEF
54+ ******************************************************************************/
55+
56+ typedef bool (*onOTARequestCallbackFunc)(void );
5357
5458/* *****************************************************************************
5559 * CLASS DECLARATION
@@ -87,7 +91,7 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
8791 * It should return true when the OTA can be applied or false otherwise.
8892 * See example ArduinoIoTCloud-DeferredOTA.ino
8993 */
90- void onOTARequestCb (otaConfirmationStatus cb) {
94+ void onOTARequestCb (onOTARequestCallbackFunc cb) {
9195 _get_ota_confirmation = cb;
9296 _ask_user_before_executing_ota = true ;
9397 }
@@ -143,6 +147,7 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
143147 String _ota_url;
144148 bool _ota_req;
145149 bool _ask_user_before_executing_ota;
150+ onOTARequestCallbackFunc _get_ota_confirmation;
146151#endif /* OTA_ENABLED */
147152
148153 inline String getTopic_shadowout () { return ( getThingId ().length () == 0 ) ? String (" " ) : String (" /a/t/" + getThingId () + " /shadow/o" ); }
@@ -167,7 +172,6 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass
167172 void onOTARequest ();
168173#endif
169174
170- otaConfirmationStatus _get_ota_confirmation = {nullptr };
171175};
172176
173177/* *****************************************************************************
0 commit comments