Skip to content

Commit

Permalink
Remove kSessionEstablished (#20300)
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple authored and pull[bot] committed Jan 29, 2024
1 parent 0d8b43c commit 893244c
Show file tree
Hide file tree
Showing 20 changed files with 0 additions and 128 deletions.
11 changes: 0 additions & 11 deletions examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
8 changes: 0 additions & 8 deletions examples/all-clusters-app/cc13x2x7_26x2x7/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
11 changes: 0 additions & 11 deletions examples/all-clusters-minimal-app/ameba/main/DeviceCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 0 additions & 7 deletions examples/chef/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
11 changes: 0 additions & 11 deletions examples/lighting-app/ameba/main/DeviceCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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)
{
Expand Down
1 change: 0 additions & 1 deletion examples/lighting-app/ameba/main/include/DeviceCallbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 0 additions & 12 deletions examples/lighting-app/bouffalolab/bl602/src/DeviceCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down
11 changes: 0 additions & 11 deletions examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
12 changes: 0 additions & 12 deletions examples/platform/esp32/common/CommonDeviceCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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!");
}
}
1 change: 0 additions & 1 deletion examples/platform/esp32/common/CommonDeviceCallbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 0 additions & 12 deletions examples/pump-app/cc13x2x7_26x2x7/main/DeviceCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 0 additions & 10 deletions examples/tv-app/android/java/DeviceCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion examples/tv-app/android/java/DeviceCallbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
7 changes: 0 additions & 7 deletions src/include/platform/CHIPDeviceEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down

0 comments on commit 893244c

Please sign in to comment.