@@ -256,7 +256,7 @@ void ArduinoIoTCloudClass::update(int const reconnectionMaxRetries, int const re
256
256
if (onSyncCompleteCallback != NULL ) {
257
257
(*onSyncCompleteCallback)();
258
258
}
259
- execCloudConnectionEventCallback (_on_sync_event_callback, 0 /* callback_arg */ );
259
+ execCloudEventCallback (_on_sync_event_callback, 0 /* callback_arg */ );
260
260
_syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_SYNCHRONIZED;
261
261
}
262
262
break ;
@@ -393,7 +393,7 @@ void ArduinoIoTCloudClass::connectionCheck() {
393
393
debugMessageNoTimestamp (DebugLevel::Verbose, " ." );
394
394
if (!_mqttClient->connected ()) {
395
395
setIoTConnectionState (ArduinoIoTConnectionStatus::DISCONNECTED);
396
- execCloudConnectionEventCallback (_on_disconnect_event_callback, 0 /* callback_arg - e.g. could be error code casted to void * */ );
396
+ execCloudEventCallback (_on_disconnect_event_callback, 0 /* callback_arg - e.g. could be error code casted to void * */ );
397
397
}
398
398
}
399
399
break ;
@@ -406,7 +406,7 @@ void ArduinoIoTCloudClass::connectionCheck() {
406
406
debugMessage (DebugLevel::Info, " ArduinoCloud.reconnect(): %d" , ret_code_reconnect);
407
407
if (ret_code_reconnect == CONNECT_SUCCESS) {
408
408
setIoTConnectionState (ArduinoIoTConnectionStatus::CONNECTED);
409
- execCloudConnectionEventCallback (_on_connect_event_callback, 0 /* callback_arg */ );
409
+ execCloudEventCallback (_on_connect_event_callback, 0 /* callback_arg */ );
410
410
CloudSerial.begin (9600 );
411
411
CloudSerial.println (" Hello from Cloud Serial!" );
412
412
}
@@ -417,7 +417,7 @@ void ArduinoIoTCloudClass::connectionCheck() {
417
417
debugMessage (DebugLevel::Verbose, " ArduinoCloud.connect(): %d" , ret_code_connect);
418
418
if (ret_code_connect == CONNECT_SUCCESS) {
419
419
setIoTConnectionState (ArduinoIoTConnectionStatus::CONNECTED);
420
- execCloudConnectionEventCallback (_on_connect_event_callback, 0 /* callback_arg */ );
420
+ execCloudEventCallback (_on_connect_event_callback, 0 /* callback_arg */ );
421
421
CloudSerial.begin (9600 );
422
422
CloudSerial.println (" Hello from Cloud Serial!" );
423
423
} else if (ret_code_connect == CONNECT_FAILURE_SUBSCRIBE) {
@@ -446,15 +446,15 @@ void ArduinoIoTCloudClass::printDebugInfo() {
446
446
debugMessage (DebugLevel::Info, " MQTT Broker: %s:%d" , _brokerAddress.c_str (), _brokerPort);
447
447
}
448
448
449
- void ArduinoIoTCloudClass::addCallback (ArduinoIoTCloudConnectionEvent const event, OnCloudConnectionEventCallback callback) {
449
+ void ArduinoIoTCloudClass::addCallback (ArduinoIoTCloudEvent const event, OnCloudEventCallback callback) {
450
450
switch (event) {
451
- case ArduinoIoTCloudConnectionEvent ::SYNC: _on_sync_event_callback = callback; break ;
452
- case ArduinoIoTCloudConnectionEvent ::CONNECT: _on_connect_event_callback = callback; break ;
453
- case ArduinoIoTCloudConnectionEvent ::DISCONNECT: _on_disconnect_event_callback = callback; break ;
451
+ case ArduinoIoTCloudEvent ::SYNC: _on_sync_event_callback = callback; break ;
452
+ case ArduinoIoTCloudEvent ::CONNECT: _on_connect_event_callback = callback; break ;
453
+ case ArduinoIoTCloudEvent ::DISCONNECT: _on_disconnect_event_callback = callback; break ;
454
454
}
455
455
}
456
456
457
- void ArduinoIoTCloudClass::execCloudConnectionEventCallback (OnCloudConnectionEventCallback & callback, void * callback_arg) {
457
+ void ArduinoIoTCloudClass::execCloudEventCallback (OnCloudEventCallback & callback, void * callback_arg) {
458
458
if (callback) {
459
459
(*callback)(callback_arg);
460
460
}
0 commit comments