Skip to content

Commit

Permalink
Applied using SceneTable = chip::scenes::SceneTable<chip::scenes::Ext…
Browse files Browse the repository at this point in the history
…ensionFieldSetsImpl>; in all scenes-server.cpp (#27079)
  • Loading branch information
lpbeliveau-silabs authored and pull[bot] committed Sep 7, 2023
1 parent 8775a3a commit 2170533
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions src/app/clusters/scenes-server/scenes-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ CHIP_ERROR ScenesServer::Init()
VerifyOrReturnError(registerAttributeAccessOverride(this), CHIP_ERROR_INCORRECT_STATE);
mGroupProvider = Credentials::GetGroupDataProvider();

scenes::SceneTable<scenes::ExtensionFieldSetsImpl> * sceneTable = scenes::GetSceneTableImpl();
SceneTable * sceneTable = scenes::GetSceneTableImpl();
ReturnErrorOnFailure(sceneTable->Init(&chip::Server::GetInstance().GetPersistentStorage()));

for (auto endpoint : EnabledEndpointsWithServerCluster(Id))
Expand Down Expand Up @@ -143,7 +143,7 @@ void ScenesServer::Shutdown()
{
chip::app::InteractionModelEngine::GetInstance()->UnregisterCommandHandler(this);

scenes::SceneTable<scenes::ExtensionFieldSetsImpl> * sceneTable = scenes::GetSceneTableImpl();
SceneTable * sceneTable = scenes::GetSceneTableImpl();
sceneTable->Finish();
mGroupProvider = nullptr;
mIsInitialized = false;
Expand All @@ -159,8 +159,7 @@ void AddSceneParse(CommandHandlerInterface::HandlerContext & ctx, const CommandD
AddResponseOnError(ctx, response, Attributes::SceneTableSize::Get(ctx.mRequestPath.mEndpointId, &endpointTableSize)));

// Get Scene Table Instance
scenes::SceneTable<scenes::ExtensionFieldSetsImpl> * sceneTable =
scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize);
SceneTable * sceneTable = scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize);

// Response data
response.groupID = req.groupID;
Expand Down Expand Up @@ -270,8 +269,7 @@ void ViewSceneParse(HandlerContext & ctx, const CommandData & req, GroupDataProv
AddResponseOnError(ctx, response, Attributes::SceneTableSize::Get(ctx.mRequestPath.mEndpointId, &endpointTableSize)));

// Get Scene Table Instance
scenes::SceneTable<scenes::ExtensionFieldSetsImpl> * sceneTable =
scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize);
SceneTable * sceneTable = scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize);

// Response data
response.groupID = req.groupID;
Expand Down Expand Up @@ -347,7 +345,7 @@ CHIP_ERROR StoreSceneParse(const FabricIndex & fabricIdx, const EndpointId & end
StatusIB(ToInteractionModelStatus(Attributes::SceneTableSize::Get(endpointID, &endpointTableSize))).ToChipError());

// Get Scene Table Instance
scenes::SceneTable<scenes::ExtensionFieldSetsImpl> * sceneTable = scenes::GetSceneTableImpl(endpointID, endpointTableSize);
SceneTable * sceneTable = scenes::GetSceneTableImpl(endpointID, endpointTableSize);

// Verify Endpoint in group
VerifyOrReturnError(nullptr != groupProvider, CHIP_ERROR_INTERNAL);
Expand Down Expand Up @@ -400,7 +398,7 @@ CHIP_ERROR RecallSceneParse(const FabricIndex & fabricIdx, const EndpointId & en
StatusIB(ToInteractionModelStatus(Attributes::SceneTableSize::Get(endpointID, &endpointTableSize))).ToChipError());

// Get Scene Table Instance
scenes::SceneTable<scenes::ExtensionFieldSetsImpl> * sceneTable = scenes::GetSceneTableImpl(endpointID, endpointTableSize);
SceneTable * sceneTable = scenes::GetSceneTableImpl(endpointID, endpointTableSize);

// Verify Endpoint in group
VerifyOrReturnError(nullptr != groupProvider, CHIP_ERROR_INTERNAL);
Expand Down Expand Up @@ -491,7 +489,7 @@ CHIP_ERROR ScenesServer::Read(const ConcreteReadAttributePath & aPath, Attribute
StatusIB(ToInteractionModelStatus(Attributes::SceneTableSize::Get(aPath.mEndpointId, &endpointTableSize))).ToChipError());

// Get Scene Table Instance
scenes::SceneTable<scenes::ExtensionFieldSetsImpl> * sceneTable;
SceneTable * sceneTable;

switch (aPath.mAttributeId)
{
Expand All @@ -511,7 +509,7 @@ CHIP_ERROR ScenesServer::Read(const ConcreteReadAttributePath & aPath, Attribute
void ScenesServer::GroupWillBeRemoved(FabricIndex aFabricIx, EndpointId aEndpointId, GroupId aGroupId)
{
// Get Scene Table Instance
scenes::SceneTable<scenes::ExtensionFieldSetsImpl> * sceneTable = scenes::GetSceneTableImpl(aEndpointId);
SceneTable * sceneTable = scenes::GetSceneTableImpl(aEndpointId);
VerifyOrReturn(nullptr != sceneTable);

MakeSceneInvalid(aEndpointId);
Expand Down Expand Up @@ -568,8 +566,7 @@ void ScenesServer::HandleRemoveScene(HandlerContext & ctx, const Commands::Remov
AddResponseOnError(ctx, response, Attributes::SceneTableSize::Get(ctx.mRequestPath.mEndpointId, &endpointTableSize)));

// Get Scene Table Instance
scenes::SceneTable<scenes::ExtensionFieldSetsImpl> * sceneTable =
scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize);
SceneTable * sceneTable = scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize);

// Response data
response.groupID = req.groupID;
Expand Down Expand Up @@ -616,8 +613,7 @@ void ScenesServer::HandleRemoveAllScenes(HandlerContext & ctx, const Commands::R
AddResponseOnError(ctx, response, Attributes::SceneTableSize::Get(ctx.mRequestPath.mEndpointId, &endpointTableSize)));

// Get Scene Table Instance
scenes::SceneTable<scenes::ExtensionFieldSetsImpl> * sceneTable =
scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize);
SceneTable * sceneTable = scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize);

// Response data
response.groupID = req.groupID;
Expand Down Expand Up @@ -706,8 +702,7 @@ void ScenesServer::HandleGetSceneMembership(HandlerContext & ctx, const Commands
AddResponseOnError(ctx, response, Attributes::SceneTableSize::Get(ctx.mRequestPath.mEndpointId, &endpointTableSize)));

// Get Scene Table Instance
scenes::SceneTable<scenes::ExtensionFieldSetsImpl> * sceneTable =
scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize);
SceneTable * sceneTable = scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize);

// Response data
response.groupID = req.groupID;
Expand Down Expand Up @@ -762,8 +757,7 @@ void ScenesServer::HandleCopyScene(HandlerContext & ctx, const Commands::CopySce
AddResponseOnError(ctx, response, Attributes::SceneTableSize::Get(ctx.mRequestPath.mEndpointId, &endpointTableSize)));

// Get Scene Table Instance
scenes::SceneTable<scenes::ExtensionFieldSetsImpl> * sceneTable =
scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize);
SceneTable * sceneTable = scenes::GetSceneTableImpl(ctx.mRequestPath.mEndpointId, endpointTableSize);

// Response data
response.groupIdentifierFrom = req.groupIdentifierFrom;
Expand Down

0 comments on commit 2170533

Please sign in to comment.