diff --git a/examples/all-clusters-app/all-clusters-common/include/bridged-actions-stub.h b/examples/all-clusters-app/all-clusters-common/include/bridged-actions-stub.h index 2c38869f26802f..1366f404b98672 100644 --- a/examples/all-clusters-app/all-clusters-common/include/bridged-actions-stub.h +++ b/examples/all-clusters-app/all-clusters-common/include/bridged-actions-stub.h @@ -25,12 +25,6 @@ #include #include -using namespace chip; -using namespace chip::app; -using namespace chip::app::Clusters; -using namespace chip::app::Clusters::Actions; -using namespace chip::app::Clusters::Actions::Attributes; - namespace chip { namespace app { namespace Clusters { @@ -91,18 +85,18 @@ class ActionsDelegateImpl : public Delegate CHIP_ERROR ReadEndpointListAtIndex(uint16_t index, EndpointListStructType & epList) override; CHIP_ERROR FindActionIdInActionList(uint16_t actionId) override; - Status HandleInstantAction(uint16_t actionId, Optional invokeId) override; - Status HandleInstantActionWithTransition(uint16_t actionId, uint16_t transitionTime, Optional invokeId) override; - Status HandleStartAction(uint16_t actionId, Optional invokeId) override; - Status HandleStartActionWithDuration(uint16_t actionId, uint32_t duration, Optional invokeId) override; - Status HandleStopAction(uint16_t actionId, Optional invokeId) override; - Status HandlePauseAction(uint16_t actionId, Optional invokeId) override; - Status HandlePauseActionWithDuration(uint16_t actionId, uint32_t duration, Optional invokeId) override; - Status HandleResumeAction(uint16_t actionId, Optional invokeId) override; - Status HandleEnableAction(uint16_t actionId, Optional invokeId) override; - Status HandleEnableActionWithDuration(uint16_t actionId, uint32_t duration, Optional invokeId) override; - Status HandleDisableAction(uint16_t actionId, Optional invokeId) override; - Status HandleDisableActionWithDuration(uint16_t actionId, uint32_t duration, Optional invokeId) override; + Protocols::InteractionModel::Status HandleInstantAction(uint16_t actionId, Optional invokeId) override; + Protocols::InteractionModel::Status HandleInstantActionWithTransition(uint16_t actionId, uint16_t transitionTime, Optional invokeId) override; + Protocols::InteractionModel::Status HandleStartAction(uint16_t actionId, Optional invokeId) override; + Protocols::InteractionModel::Status HandleStartActionWithDuration(uint16_t actionId, uint32_t duration, Optional invokeId) override; + Protocols::InteractionModel::Status HandleStopAction(uint16_t actionId, Optional invokeId) override; + Protocols::InteractionModel::Status HandlePauseAction(uint16_t actionId, Optional invokeId) override; + Protocols::InteractionModel::Status HandlePauseActionWithDuration(uint16_t actionId, uint32_t duration, Optional invokeId) override; + Protocols::InteractionModel::Status HandleResumeAction(uint16_t actionId, Optional invokeId) override; + Protocols::InteractionModel::Status HandleEnableAction(uint16_t actionId, Optional invokeId) override; + Protocols::InteractionModel::Status HandleEnableActionWithDuration(uint16_t actionId, uint32_t duration, Optional invokeId) override; + Protocols::InteractionModel::Status HandleDisableAction(uint16_t actionId, Optional invokeId) override; + Protocols::InteractionModel::Status HandleDisableActionWithDuration(uint16_t actionId, uint32_t duration, Optional invokeId) override; }; } // namespace Actions } // namespace Clusters diff --git a/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp index ab2670f3aa2c8f..bd9a588f6047e4 100644 --- a/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp @@ -22,6 +22,7 @@ using namespace chip::app; using namespace chip::app::Clusters; using namespace chip::app::Clusters::Actions; using namespace chip::app::Clusters::Actions::Attributes; +using namespace chip::Protocols::InteractionModel; CHIP_ERROR ActionsDelegateImpl::ReadActionAtIndex(uint16_t index, ActionListStructType & action) { diff --git a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt index 06916c32c6670d..0d44717b4e6949 100644 --- a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt @@ -50,6 +50,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/level-control" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/actions-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/account-login-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/application-launcher-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/audio-output-server" diff --git a/examples/bridge-app/asr/src/bridged-actions-stub.cpp b/examples/bridge-app/asr/src/bridged-actions-stub.cpp index 73b7e8dd9877a0..d6289a733f2259 100755 --- a/examples/bridge-app/asr/src/bridged-actions-stub.cpp +++ b/examples/bridge-app/asr/src/bridged-actions-stub.cpp @@ -95,7 +95,7 @@ CHIP_ERROR ActionsAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attr } } // anonymous namespace -void MatterActionsPluginServerInitCallback(void) -{ - AttributeAccessInterfaceRegistry::Instance().Register(&gAttrAccess); -} +//void MatterActionsPluginServerInitCallback(void) +//{ +// AttributeAccessInterfaceRegistry::Instance().Register(&gAttrAccess); +//} diff --git a/examples/bridge-app/linux/bridged-actions-stub.cpp b/examples/bridge-app/linux/bridged-actions-stub.cpp index 580f4f2239bd1a..cca8d38d809c94 100644 --- a/examples/bridge-app/linux/bridged-actions-stub.cpp +++ b/examples/bridge-app/linux/bridged-actions-stub.cpp @@ -131,7 +131,7 @@ CHIP_ERROR ActionsAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attr } } // anonymous namespace -void MatterActionsPluginServerInitCallback() -{ - AttributeAccessInterfaceRegistry::Instance().Register(&gAttrAccess); -} +//void MatterActionsPluginServerInitCallback() +//{ +// AttributeAccessInterfaceRegistry::Instance().Register(&gAttrAccess); +//} diff --git a/examples/bridge-app/telink/src/DeviceCallbacks.cpp b/examples/bridge-app/telink/src/DeviceCallbacks.cpp index 9e3273e7107472..65218c68295bba 100644 --- a/examples/bridge-app/telink/src/DeviceCallbacks.cpp +++ b/examples/bridge-app/telink/src/DeviceCallbacks.cpp @@ -99,7 +99,7 @@ CHIP_ERROR ActionsAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attr } } // anonymous namespace -void MatterActionsPluginServerInitCallback(void) -{ - AttributeAccessInterfaceRegistry::Instance().Register(&gAttrAccess); -} +//void MatterActionsPluginServerInitCallback(void) +//{ +// AttributeAccessInterfaceRegistry::Instance().Register(&gAttrAccess); +//} diff --git a/src/app/clusters/actions-server/actions-server.cpp b/src/app/clusters/actions-server/actions-server.cpp index 3e25d19c3a099d..023cbcf9c1a0cd 100644 --- a/src/app/clusters/actions-server/actions-server.cpp +++ b/src/app/clusters/actions-server/actions-server.cpp @@ -30,6 +30,7 @@ using namespace chip::app; using namespace chip::app::Clusters; using namespace chip::app::Clusters::Actions; using namespace chip::app::Clusters::Actions::Attributes; +using namespace chip::Protocols::InteractionModel; Instance Instance::instance; Instance * Instance::GetInstance() diff --git a/src/app/clusters/actions-server/actions-server.h b/src/app/clusters/actions-server/actions-server.h index 657bd872f69d61..e4d65a803e8a8e 100644 --- a/src/app/clusters/actions-server/actions-server.h +++ b/src/app/clusters/actions-server/actions-server.h @@ -22,11 +22,6 @@ #include #include -using namespace chip; -using namespace chip::app; -using namespace chip::app::Clusters; -using namespace chip::Protocols::InteractionModel; - namespace chip { namespace app { namespace Clusters { @@ -126,7 +121,7 @@ class Delegate * @param actionId The id of an action on which an action shall takes place. * @return Returns a Success if an action took place successfully otherwise, suitable error. */ - virtual Status HandleInstantAction(uint16_t actionId, Optional invokeId); + virtual Protocols::InteractionModel::Status HandleInstantAction(uint16_t actionId, Optional invokeId); /** * When an InstantActionWithTransition command is recieved, an action (state change) on the involved endpoints shall trigger, @@ -137,7 +132,7 @@ class Delegate * @param transitionTime The time for transition from the current state to the new state. * @return Returns a Success if an action took place successfully otherwise, suitable error. */ - virtual Status HandleInstantActionWithTransition(uint16_t actionId, uint16_t transitionTime, Optional invokeId); + virtual Protocols::InteractionModel::Status HandleInstantActionWithTransition(uint16_t actionId, uint16_t transitionTime, Optional invokeId); /** * When a StartAction command is recieved, the commencement of an action on the involved endpoints shall trigger. Afterwards, @@ -146,7 +141,7 @@ class Delegate * @param actionId The id of an action on which an action shall takes place. * @return Returns a Success if an action took place successfully otherwise, suitable error. */ - virtual Status HandleStartAction(uint16_t actionId, Optional invokeId); + virtual Protocols::InteractionModel::Status HandleStartAction(uint16_t actionId, Optional invokeId); /** * When a StartActionWithDuration command is recieved, the commencement of an action on the involved endpoints shall trigger, @@ -157,7 +152,7 @@ class Delegate * @param duration The time for which an action shall be in start state. * @return Returns a Success if an action took place successfully otherwise, suitable error. */ - virtual Status HandleStartActionWithDuration(uint16_t actionId, uint32_t duration, Optional invokeId); + virtual Protocols::InteractionModel::Status HandleStartActionWithDuration(uint16_t actionId, uint32_t duration, Optional invokeId); /** * When a StopAction command is recieved, the ongoing action on the involved endpoints shall stop. Afterwards, the action’s @@ -166,7 +161,7 @@ class Delegate * @param actionId The id of an action on which an action shall takes place. * @return Returns a Success if an action took place successfully otherwise, suitable error. */ - virtual Status HandleStopAction(uint16_t actionId, Optional invokeId); + virtual Protocols::InteractionModel::Status HandleStopAction(uint16_t actionId, Optional invokeId); /** * When a PauseAction command is recieved, the ongoing action on the involved endpoints shall pause and SHALL change the @@ -175,7 +170,7 @@ class Delegate * @param actionId The id of an action on which an action shall takes place. * @return Returns a Success if an action took place successfully otherwise, suitable error. */ - virtual Status HandlePauseAction(uint16_t actionId, Optional invokeId); + virtual Protocols::InteractionModel::Status HandlePauseAction(uint16_t actionId, Optional invokeId); /** * When a PauseActionWithDuration command is recieved, pauses an ongoing action, and SHALL change the action’s state to Paused. @@ -186,7 +181,7 @@ class Delegate * @param duration The time for which an action shall be in pause state. * @return Returns a Success if an action took place successfully otherwise, suitable error. */ - virtual Status HandlePauseActionWithDuration(uint16_t actionId, uint32_t duration, Optional invokeId); + virtual Protocols::InteractionModel::Status HandlePauseActionWithDuration(uint16_t actionId, uint32_t duration, Optional invokeId); /** * When a ResumeAction command is recieved, the previously paused action shall resume and SHALL change the action’s state to @@ -195,7 +190,7 @@ class Delegate * @param actionId The id of an action on which an action shall takes place. * @return Returns a Success if an action took place successfully otherwise, suitable error. */ - virtual Status HandleResumeAction(uint16_t actionId, Optional invokeId); + virtual Protocols::InteractionModel::Status HandleResumeAction(uint16_t actionId, Optional invokeId); /** * When an EnableAction command is recieved, it enables a certain action or automation. Afterwards, the action’s state SHALL be @@ -204,7 +199,7 @@ class Delegate * @param actionId The id of an action on which an action shall takes place. * @return Returns a Success if an action took place successfully otherwise, suitable error. */ - virtual Status HandleEnableAction(uint16_t actionId, Optional invokeId); + virtual Protocols::InteractionModel::Status HandleEnableAction(uint16_t actionId, Optional invokeId); /** * When an EnableActionWithDuration command is recieved, it enables a certain action or automation, and SHALL change the @@ -215,7 +210,7 @@ class Delegate * @param duration The time for which an action shall be in active state. * @return Returns a Success if an action took place successfully otherwise, suitable error. */ - virtual Status HandleEnableActionWithDuration(uint16_t actionId, uint32_t duration, Optional invokeId); + virtual Protocols::InteractionModel::Status HandleEnableActionWithDuration(uint16_t actionId, uint32_t duration, Optional invokeId); /** * When a DisableAction command is recieved, it disables a certain action or automation, and SHALL change the action’s state to @@ -224,7 +219,7 @@ class Delegate * @param actionId The id of an action on which an action shall takes place. * @return Returns a Success if an action took place successfully otherwise, suitable error. */ - virtual Status HandleDisableAction(uint16_t actionId, Optional invokeId); + virtual Protocols::InteractionModel::Status HandleDisableAction(uint16_t actionId, Optional invokeId); /** * When a DisableActionWithDuration command is recieved, it disables a certain action or automation, and SHALL change the @@ -235,7 +230,7 @@ class Delegate * @param duration The time for which an action shall be in disable state. * @return Returns a Success if an action took place successfully otherwise, suitable error. */ - virtual Status HandleDisableActionWithDuration(uint16_t actionId, uint32_t duration, Optional invokeId); + virtual Protocols::InteractionModel::Status HandleDisableActionWithDuration(uint16_t actionId, uint32_t duration, Optional invokeId); }; } // namespace Actions