From 4c948aeb31c1f2433a6886454f265c99ee2f6967 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 5 Jul 2022 12:34:41 +0200 Subject: [PATCH] Remove kSessionEstablished (#20300) --- .../all-clusters-app/ameba/main/DeviceCallbacks.cpp | 11 ----------- .../ameba/main/include/DeviceCallbacks.h | 1 - .../cc13x2x7_26x2x7/main/AppTask.cpp | 8 -------- .../ameba/main/DeviceCallbacks.cpp | 11 ----------- .../ameba/main/include/DeviceCallbacks.h | 1 - .../cc13x2x7_26x2x7/main/AppTask.cpp | 8 -------- examples/chef/esp32/main/main.cpp | 7 ------- examples/lighting-app/ameba/main/DeviceCallbacks.cpp | 11 ----------- .../ameba/main/include/DeviceCallbacks.h | 1 - .../bouffalolab/bl602/include/DeviceCallbacks.h | 1 - .../bouffalolab/bl602/src/DeviceCallbacks.cpp | 12 ------------ .../ota-requestor-app/ameba/main/DeviceCallbacks.cpp | 11 ----------- .../ameba/main/include/DeviceCallbacks.h | 1 - .../platform/esp32/common/CommonDeviceCallbacks.cpp | 12 ------------ .../platform/esp32/common/CommonDeviceCallbacks.h | 1 - .../cc13x2x7_26x2x7/main/DeviceCallbacks.cpp | 12 ------------ .../cc13x2x7_26x2x7/main/include/DeviceCallbacks.h | 1 - examples/tv-app/android/java/DeviceCallbacks.cpp | 10 ---------- examples/tv-app/android/java/DeviceCallbacks.h | 1 - src/include/platform/CHIPDeviceEvent.h | 7 ------- 20 files changed, 128 deletions(-) diff --git a/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp b/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp index 2db5f21cee2c85..259ff3d726f529 100644 --- a/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp @@ -71,9 +71,6 @@ void DeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, intptr_ OnInternetConnectivityChange(event); break; - case DeviceEventType::kSessionEstablished: - OnSessionEstablished(event); - break; case DeviceEventType::kInterfaceIpAddressChanged: if ((event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV4_Assigned) || (event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV6_Assigned)) @@ -140,14 +137,6 @@ void DeviceCallbacks::OnInternetConnectivityChange(const ChipDeviceEvent * event } } -void DeviceCallbacks::OnSessionEstablished(const ChipDeviceEvent * event) -{ - if (event->SessionEstablished.IsCommissioner) - { - ChipLogProgress(DeviceLayer, "Commissioner detected!"); - } -} - void DeviceCallbacks::OnOnOffPostAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t * value) { VerifyOrExit(attributeId == ZCL_ON_OFF_ATTRIBUTE_ID, diff --git a/examples/all-clusters-app/ameba/main/include/DeviceCallbacks.h b/examples/all-clusters-app/ameba/main/include/DeviceCallbacks.h index 003b6e700db0eb..18ebb25ed75f36 100644 --- a/examples/all-clusters-app/ameba/main/include/DeviceCallbacks.h +++ b/examples/all-clusters-app/ameba/main/include/DeviceCallbacks.h @@ -39,7 +39,6 @@ class DeviceCallbacks : public chip::DeviceManager::CHIPDeviceManagerCallbacks private: void OnInternetConnectivityChange(const chip::DeviceLayer::ChipDeviceEvent * event); - void OnSessionEstablished(const chip::DeviceLayer::ChipDeviceEvent * event); void OnOnOffPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); void OnIdentifyPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); }; diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp index abb73838493316..b00e11a766a6da 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -120,14 +120,6 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg) { switch (event->Type) { - case DeviceEventType::kSessionEstablished: { - if (event->SessionEstablished.IsCommissioner) - { - PLAT_LOG("Commissioning session established"); - } - } - break; - case DeviceEventType::kCHIPoBLEConnectionEstablished: PLAT_LOG("CHIPoBLE connection established"); break; diff --git a/examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp b/examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp index 8f18f730999cde..502057c88ae215 100644 --- a/examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp @@ -60,9 +60,6 @@ void DeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, intptr_ OnInternetConnectivityChange(event); break; - case DeviceEventType::kSessionEstablished: - OnSessionEstablished(event); - break; case DeviceEventType::kInterfaceIpAddressChanged: if ((event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV4_Assigned) || (event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV6_Assigned)) @@ -117,14 +114,6 @@ void DeviceCallbacks::OnInternetConnectivityChange(const ChipDeviceEvent * event } } -void DeviceCallbacks::OnSessionEstablished(const ChipDeviceEvent * event) -{ - if (event->SessionEstablished.IsCommissioner) - { - ChipLogProgress(DeviceLayer, "Commissioner detected!"); - } -} - void DeviceCallbacks::OnOnOffPostAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t * value) { VerifyOrExit(attributeId == ZCL_ON_OFF_ATTRIBUTE_ID, diff --git a/examples/all-clusters-minimal-app/ameba/main/include/DeviceCallbacks.h b/examples/all-clusters-minimal-app/ameba/main/include/DeviceCallbacks.h index 003b6e700db0eb..18ebb25ed75f36 100644 --- a/examples/all-clusters-minimal-app/ameba/main/include/DeviceCallbacks.h +++ b/examples/all-clusters-minimal-app/ameba/main/include/DeviceCallbacks.h @@ -39,7 +39,6 @@ class DeviceCallbacks : public chip::DeviceManager::CHIPDeviceManagerCallbacks private: void OnInternetConnectivityChange(const chip::DeviceLayer::ChipDeviceEvent * event); - void OnSessionEstablished(const chip::DeviceLayer::ChipDeviceEvent * event); void OnOnOffPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); void OnIdentifyPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); }; diff --git a/examples/all-clusters-minimal-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/all-clusters-minimal-app/cc13x2x7_26x2x7/main/AppTask.cpp index abb73838493316..b00e11a766a6da 100644 --- a/examples/all-clusters-minimal-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/all-clusters-minimal-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -120,14 +120,6 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg) { switch (event->Type) { - case DeviceEventType::kSessionEstablished: { - if (event->SessionEstablished.IsCommissioner) - { - PLAT_LOG("Commissioning session established"); - } - } - break; - case DeviceEventType::kCHIPoBLEConnectionEstablished: PLAT_LOG("CHIPoBLE connection established"); break; diff --git a/examples/chef/esp32/main/main.cpp b/examples/chef/esp32/main/main.cpp index f09a8a7ed3ca37..a3e8737289f4ef 100644 --- a/examples/chef/esp32/main/main.cpp +++ b/examples/chef/esp32/main/main.cpp @@ -98,13 +98,6 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg) break; - case DeviceEventType::kSessionEstablished: - if (event->SessionEstablished.IsCommissioner) - { - ChipLogProgress(Shell, "Commissioner detected!"); - } - break; - case DeviceEventType::kCHIPoBLEConnectionEstablished: ChipLogProgress(Shell, "CHIPoBLE connection established"); break; diff --git a/examples/lighting-app/ameba/main/DeviceCallbacks.cpp b/examples/lighting-app/ameba/main/DeviceCallbacks.cpp index 754a79651b7063..5cf63d6ba41faa 100644 --- a/examples/lighting-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/lighting-app/ameba/main/DeviceCallbacks.cpp @@ -69,9 +69,6 @@ void DeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, intptr_ OnInternetConnectivityChange(event); break; - case DeviceEventType::kSessionEstablished: - OnSessionEstablished(event); - break; case DeviceEventType::kInterfaceIpAddressChanged: if ((event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV4_Assigned) || (event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV6_Assigned)) @@ -121,14 +118,6 @@ void DeviceCallbacks::OnInternetConnectivityChange(const ChipDeviceEvent * event } } -void DeviceCallbacks::OnSessionEstablished(const ChipDeviceEvent * event) -{ - if (event->SessionEstablished.IsCommissioner) - { - printf("Commissioner detected!"); - } -} - void DeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, ClusterId clusterId, AttributeId attributeId, uint8_t type, uint16_t size, uint8_t * value) { diff --git a/examples/lighting-app/ameba/main/include/DeviceCallbacks.h b/examples/lighting-app/ameba/main/include/DeviceCallbacks.h index 43c3a8a6906ab3..c85697f0d6b8be 100755 --- a/examples/lighting-app/ameba/main/include/DeviceCallbacks.h +++ b/examples/lighting-app/ameba/main/include/DeviceCallbacks.h @@ -39,6 +39,5 @@ class DeviceCallbacks : public chip::DeviceManager::CHIPDeviceManagerCallbacks private: void OnInternetConnectivityChange(const chip::DeviceLayer::ChipDeviceEvent * event); - void OnSessionEstablished(const chip::DeviceLayer::ChipDeviceEvent * event); void OnIdentifyPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); }; diff --git a/examples/lighting-app/bouffalolab/bl602/include/DeviceCallbacks.h b/examples/lighting-app/bouffalolab/bl602/include/DeviceCallbacks.h index b3ee3e941a750d..bd865332b18602 100644 --- a/examples/lighting-app/bouffalolab/bl602/include/DeviceCallbacks.h +++ b/examples/lighting-app/bouffalolab/bl602/include/DeviceCallbacks.h @@ -39,7 +39,6 @@ class DeviceCallbacks : public chip::DeviceManager::CHIPDeviceManagerCallbacks private: void OnInternetConnectivityChange(const chip::DeviceLayer::ChipDeviceEvent * event); - void OnSessionEstablished(const chip::DeviceLayer::ChipDeviceEvent * event); void OnOnOffPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); void OnLevelControlAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); void OnColorControlAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); diff --git a/examples/lighting-app/bouffalolab/bl602/src/DeviceCallbacks.cpp b/examples/lighting-app/bouffalolab/bl602/src/DeviceCallbacks.cpp index b97ba7ee908df0..0bdd2d706ab1ae 100644 --- a/examples/lighting-app/bouffalolab/bl602/src/DeviceCallbacks.cpp +++ b/examples/lighting-app/bouffalolab/bl602/src/DeviceCallbacks.cpp @@ -57,10 +57,6 @@ void DeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, intptr_ OnInternetConnectivityChange(event); break; - case DeviceEventType::kSessionEstablished: - OnSessionEstablished(event); - break; - case DeviceEventType::kCHIPoBLEConnectionEstablished: log_info("CHIPoBLE connection established\r\n"); break; @@ -152,14 +148,6 @@ void DeviceCallbacks::OnInternetConnectivityChange(const ChipDeviceEvent * event } } -void DeviceCallbacks::OnSessionEstablished(const ChipDeviceEvent * event) -{ - if (event->SessionEstablished.IsCommissioner) - { - log_info("Commissioner detected!\r\n"); - } -} - void DeviceCallbacks::OnOnOffPostAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t * value) { VerifyOrExit(attributeId == ZCL_ON_OFF_ATTRIBUTE_ID, log_info("Unhandled Attribute ID: '0x%04x\r\n", attributeId)); diff --git a/examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp b/examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp index 2db5f21cee2c85..259ff3d726f529 100644 --- a/examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp @@ -71,9 +71,6 @@ void DeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, intptr_ OnInternetConnectivityChange(event); break; - case DeviceEventType::kSessionEstablished: - OnSessionEstablished(event); - break; case DeviceEventType::kInterfaceIpAddressChanged: if ((event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV4_Assigned) || (event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV6_Assigned)) @@ -140,14 +137,6 @@ void DeviceCallbacks::OnInternetConnectivityChange(const ChipDeviceEvent * event } } -void DeviceCallbacks::OnSessionEstablished(const ChipDeviceEvent * event) -{ - if (event->SessionEstablished.IsCommissioner) - { - ChipLogProgress(DeviceLayer, "Commissioner detected!"); - } -} - void DeviceCallbacks::OnOnOffPostAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t * value) { VerifyOrExit(attributeId == ZCL_ON_OFF_ATTRIBUTE_ID, diff --git a/examples/ota-requestor-app/ameba/main/include/DeviceCallbacks.h b/examples/ota-requestor-app/ameba/main/include/DeviceCallbacks.h index 003b6e700db0eb..18ebb25ed75f36 100644 --- a/examples/ota-requestor-app/ameba/main/include/DeviceCallbacks.h +++ b/examples/ota-requestor-app/ameba/main/include/DeviceCallbacks.h @@ -39,7 +39,6 @@ class DeviceCallbacks : public chip::DeviceManager::CHIPDeviceManagerCallbacks private: void OnInternetConnectivityChange(const chip::DeviceLayer::ChipDeviceEvent * event); - void OnSessionEstablished(const chip::DeviceLayer::ChipDeviceEvent * event); void OnOnOffPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); void OnIdentifyPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); }; diff --git a/examples/platform/esp32/common/CommonDeviceCallbacks.cpp b/examples/platform/esp32/common/CommonDeviceCallbacks.cpp index ddc25a14c90d07..e975dce62914f2 100644 --- a/examples/platform/esp32/common/CommonDeviceCallbacks.cpp +++ b/examples/platform/esp32/common/CommonDeviceCallbacks.cpp @@ -54,10 +54,6 @@ void CommonDeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, i OnInternetConnectivityChange(event); break; - case DeviceEventType::kSessionEstablished: - OnSessionEstablished(event); - break; - case DeviceEventType::kCHIPoBLEConnectionEstablished: ESP_LOGI(TAG, "CHIPoBLE connection established"); break; @@ -164,11 +160,3 @@ void CommonDeviceCallbacks::OnInternetConnectivityChange(const ChipDeviceEvent * ESP_LOGE(TAG, "Lost IPv6 connectivity..."); } } - -void CommonDeviceCallbacks::OnSessionEstablished(const ChipDeviceEvent * event) -{ - if (event->SessionEstablished.IsCommissioner) - { - ESP_LOGI(TAG, "Commissioner detected!"); - } -} diff --git a/examples/platform/esp32/common/CommonDeviceCallbacks.h b/examples/platform/esp32/common/CommonDeviceCallbacks.h index 841f86bd764db4..a87014cbf00858 100644 --- a/examples/platform/esp32/common/CommonDeviceCallbacks.h +++ b/examples/platform/esp32/common/CommonDeviceCallbacks.h @@ -28,7 +28,6 @@ class CommonDeviceCallbacks : public chip::DeviceManager::CHIPDeviceManagerCallb private: void OnInternetConnectivityChange(const chip::DeviceLayer::ChipDeviceEvent * event); - void OnSessionEstablished(const chip::DeviceLayer::ChipDeviceEvent * event); }; class DeviceCallbacksDelegate diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/DeviceCallbacks.cpp b/examples/pump-app/cc13x2x7_26x2x7/main/DeviceCallbacks.cpp index f29ce063f5c8e4..5fc2be33ce6910 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/main/DeviceCallbacks.cpp +++ b/examples/pump-app/cc13x2x7_26x2x7/main/DeviceCallbacks.cpp @@ -56,10 +56,6 @@ void DeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, intptr_ event->ServiceProvisioningChange.ServiceConfigUpdated); break; - case DeviceEventType::kSessionEstablished: - OnSessionEstablished(event); - break; - case DeviceEventType::kCHIPoBLEConnectionEstablished: PLAT_LOG("CHIPoBLE connection established"); break; @@ -193,14 +189,6 @@ void DeviceCallbacks::OnThreadConnectivityChange(const ChipDeviceEvent * event) } } -void DeviceCallbacks::OnSessionEstablished(const ChipDeviceEvent * event) -{ - if (event->SessionEstablished.IsCommissioner) - { - PLAT_LOG("Commissioner detected!"); - } -} - void DeviceCallbacks::OnOnOffPostAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t * value) { VerifyOrExit(attributeId == OnOff::Attributes::OnOff::Id, PLAT_LOG("Unhandled Attribute ID: '0x%04x", attributeId)); diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/include/DeviceCallbacks.h b/examples/pump-app/cc13x2x7_26x2x7/main/include/DeviceCallbacks.h index c200460d0b46c6..7e2633b54bb9db 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/main/include/DeviceCallbacks.h +++ b/examples/pump-app/cc13x2x7_26x2x7/main/include/DeviceCallbacks.h @@ -43,7 +43,6 @@ class DeviceCallbacks : public chip::DeviceManager::CHIPDeviceManagerCallbacks private: void OnInternetConnectivityChange(const chip::DeviceLayer::ChipDeviceEvent * event); void OnThreadConnectivityChange(const chip::DeviceLayer::ChipDeviceEvent * event); - void OnSessionEstablished(const chip::DeviceLayer::ChipDeviceEvent * event); void OnIdentifyPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); void OnOnOffPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); void OnLevelControlAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); diff --git a/examples/tv-app/android/java/DeviceCallbacks.cpp b/examples/tv-app/android/java/DeviceCallbacks.cpp index 3388d216c60d67..07673ffae1acfa 100644 --- a/examples/tv-app/android/java/DeviceCallbacks.cpp +++ b/examples/tv-app/android/java/DeviceCallbacks.cpp @@ -80,19 +80,9 @@ void DeviceCallbacks::OnPlatformEvent(const ChipDeviceEvent * event) case DeviceEventType::kCommissioningComplete: OnCommissioningComplete(event); break; - case DeviceEventType::kSessionEstablished: - OnSessionEstablished(event); - break; } } -void DeviceCallbacks::OnSessionEstablished(const ChipDeviceEvent * event) -{ - if (event->SessionEstablished.IsCommissioner) - { - ChipLogProgress(AppServer, "Commissioner detected!"); - } -} void DeviceCallbacks::OnCommissioningComplete(const ChipDeviceEvent * event) { JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); diff --git a/examples/tv-app/android/java/DeviceCallbacks.h b/examples/tv-app/android/java/DeviceCallbacks.h index 15c336a10a9156..1f0df0cd5e886a 100644 --- a/examples/tv-app/android/java/DeviceCallbacks.h +++ b/examples/tv-app/android/java/DeviceCallbacks.h @@ -30,6 +30,5 @@ class DeviceCallbacks private: jobject mProvider = nullptr; jmethodID mCommissioningCompleteMethod = nullptr; - void OnSessionEstablished(const chip::DeviceLayer::ChipDeviceEvent * event); void OnCommissioningComplete(const chip::DeviceLayer::ChipDeviceEvent * event); }; diff --git a/src/include/platform/CHIPDeviceEvent.h b/src/include/platform/CHIPDeviceEvent.h index 1e4c4d73ff881a..34a4bc00c3bf96 100644 --- a/src/include/platform/CHIPDeviceEvent.h +++ b/src/include/platform/CHIPDeviceEvent.h @@ -161,13 +161,6 @@ enum PublicEventTypes */ kSEDIntervalChange, - /** - * Security Session Established - * - * Signals that an external entity has established a new security session with the device. - */ - kSessionEstablished, - /** * CHIPoBLE Connection Established *