Skip to content

Commit

Permalink
Added comment to warn about fabric table access
Browse files Browse the repository at this point in the history
  • Loading branch information
lpbeliveau-silabs authored and woody-apple committed Nov 15, 2023
1 parent 19d18a8 commit e3d5155
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 20 deletions.
8 changes: 8 additions & 0 deletions src/app/clusters/scenes-server/SceneTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,14 @@ class SceneTable
virtual CHIP_ERROR SceneApplyEFS(const SceneTableEntry & scene) = 0;

// Fabrics

/**
* @brief Removes all scenes associated with a fabric index and the stored FabricSceneData that maps them
* @param fabric_index Fabric index to remove
* @return CHIP_ERROR, CHIP_NO_ERROR if successful or if the Fabric was not found, specific CHIP_ERROR otherwise
* @note This function is meant to be used after a fabric is removed from the device, the implementation MUST ensure that it
* won't interact with the actual fabric table as it will be removed beforehand.
*/
virtual CHIP_ERROR RemoveFabric(FabricIndex fabric_index) = 0;
virtual CHIP_ERROR RemoveEndpoint() = 0;

Expand Down
1 change: 1 addition & 0 deletions src/app/clusters/scenes-server/scenes-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class ScenesClusterFabricDelegate : public chip::FabricTable::Delegate
{
SceneTable * sceneTable = scenes::GetSceneTableImpl();
VerifyOrReturn(nullptr != sceneTable);
// The implementation of SceneTable::RemoveFabric() must not call back into the FabricTable
sceneTable->RemoveFabric(fabricIndex);
}
};
Expand Down
120 changes: 100 additions & 20 deletions zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e3d5155

Please sign in to comment.