Skip to content

Commit

Permalink
Add attributePath parameter to Door Lock Server's unhandledAttributeC… (
Browse files Browse the repository at this point in the history
#20338)

* Add attributePath parameter to Door Lock Server's unhandledAttributeChanged API

* Restyled by clang-format

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
jrhees-cae and restyled-commits authored Jul 6, 2022
1 parent 66a6b60 commit 796f370
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/app/clusters/door-lock-server/door-lock-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3576,7 +3576,7 @@ MatterDoorLockClusterServerPreAttributeChangedCallback(const chip::app::Concrete
break;

default:
res = emberAfPluginDoorLockOnUnhandledAttributeChange(attributePath.mEndpointId, attributeType, size, value);
res = emberAfPluginDoorLockOnUnhandledAttributeChange(attributePath.mEndpointId, attributePath, attributeType, size, value);
break;
}

Expand Down Expand Up @@ -3666,8 +3666,8 @@ emberAfPluginDoorLockOnUserCodeTemporaryDisableTimeChange(chip::EndpointId Endpo
}

chip::Protocols::InteractionModel::Status __attribute__((weak))
emberAfPluginDoorLockOnUnhandledAttributeChange(chip::EndpointId EndpointId, EmberAfAttributeType attrType, uint16_t attrSize,
uint8_t * attrValue)
emberAfPluginDoorLockOnUnhandledAttributeChange(chip::EndpointId EndpointId, const chip::app::ConcreteAttributePath & attributePath,
EmberAfAttributeType attrType, uint16_t attrSize, uint8_t * attrValue)
{
return chip::Protocols::InteractionModel::Status::Success;
}
Expand Down
7 changes: 4 additions & 3 deletions src/app/clusters/door-lock-server/door-lock-server.h
Original file line number Diff line number Diff line change
Expand Up @@ -738,16 +738,17 @@ chip::Protocols::InteractionModel::Status emberAfPluginDoorLockOnUserCodeTempora
* @brief Cluster attribute pre-change callback
*
* @param EndpointId endpoint for which attribute is changing
* @param attributePath concrete attribute path that is changing
* @param attrType attribute that is going to be changed
* @param attrSize attribute value storage size
* @param attrValue attribute value to set
*
* @retval InteractionModel::Status::Success if attribute change is possible
* @retval any other InteractionModel::Status value to forbid attribute change
*/
chip::Protocols::InteractionModel::Status emberAfPluginDoorLockOnUnhandledAttributeChange(chip::EndpointId EndpointId,
EmberAfAttributeType attrType,
uint16_t attrSize, uint8_t * attrValue);
chip::Protocols::InteractionModel::Status
emberAfPluginDoorLockOnUnhandledAttributeChange(chip::EndpointId EndpointId, const chip::app::ConcreteAttributePath & attributePath,
EmberAfAttributeType attrType, uint16_t attrSize, uint8_t * attrValue);

// =============================================================================
// Plugin callbacks that are called by cluster server and should be implemented
Expand Down

0 comments on commit 796f370

Please sign in to comment.