@@ -256,7 +256,7 @@ void ArduinoIoTCloudClass::update(int const reconnectionMaxRetries, int const re
256256 if (onSyncCompleteCallback != NULL ) {
257257 (*onSyncCompleteCallback)();
258258 }
259- execCloudConnectionEventCallback (_on_sync_event_callback, 0 /* callback_arg */ );
259+ execCloudEventCallback (_on_sync_event_callback, 0 /* callback_arg */ );
260260 _syncStatus = ArduinoIoTSynchronizationStatus::SYNC_STATUS_SYNCHRONIZED;
261261 }
262262 break ;
@@ -393,7 +393,7 @@ void ArduinoIoTCloudClass::connectionCheck() {
393393 debugMessageNoTimestamp (DebugLevel::Verbose, " ." );
394394 if (!_mqttClient->connected ()) {
395395 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 * */ );
397397 }
398398 }
399399 break ;
@@ -406,7 +406,7 @@ void ArduinoIoTCloudClass::connectionCheck() {
406406 debugMessage (DebugLevel::Info, " ArduinoCloud.reconnect(): %d" , ret_code_reconnect);
407407 if (ret_code_reconnect == CONNECT_SUCCESS) {
408408 setIoTConnectionState (ArduinoIoTConnectionStatus::CONNECTED);
409- execCloudConnectionEventCallback (_on_connect_event_callback, 0 /* callback_arg */ );
409+ execCloudEventCallback (_on_connect_event_callback, 0 /* callback_arg */ );
410410 CloudSerial.begin (9600 );
411411 CloudSerial.println (" Hello from Cloud Serial!" );
412412 }
@@ -417,7 +417,7 @@ void ArduinoIoTCloudClass::connectionCheck() {
417417 debugMessage (DebugLevel::Verbose, " ArduinoCloud.connect(): %d" , ret_code_connect);
418418 if (ret_code_connect == CONNECT_SUCCESS) {
419419 setIoTConnectionState (ArduinoIoTConnectionStatus::CONNECTED);
420- execCloudConnectionEventCallback (_on_connect_event_callback, 0 /* callback_arg */ );
420+ execCloudEventCallback (_on_connect_event_callback, 0 /* callback_arg */ );
421421 CloudSerial.begin (9600 );
422422 CloudSerial.println (" Hello from Cloud Serial!" );
423423 } else if (ret_code_connect == CONNECT_FAILURE_SUBSCRIBE) {
@@ -446,15 +446,15 @@ void ArduinoIoTCloudClass::printDebugInfo() {
446446 debugMessage (DebugLevel::Info, " MQTT Broker: %s:%d" , _brokerAddress.c_str (), _brokerPort);
447447}
448448
449- void ArduinoIoTCloudClass::addCallback (ArduinoIoTCloudConnectionEvent const event, OnCloudConnectionEventCallback callback) {
449+ void ArduinoIoTCloudClass::addCallback (ArduinoIoTCloudEvent const event, OnCloudEventCallback callback) {
450450 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 ;
454454 }
455455}
456456
457- void ArduinoIoTCloudClass::execCloudConnectionEventCallback (OnCloudConnectionEventCallback & callback, void * callback_arg) {
457+ void ArduinoIoTCloudClass::execCloudEventCallback (OnCloudEventCallback & callback, void * callback_arg) {
458458 if (callback) {
459459 (*callback)(callback_arg);
460460 }
0 commit comments