Skip to content

Commit

Permalink
Move FabricTable class out of transport layer
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-apple authored and pull[bot] committed Oct 3, 2022
1 parent ccdb7d5 commit 1489796
Show file tree
Hide file tree
Showing 15 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/common/pigweed/rpc_services/Device.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
#include <platform/CHIPDeviceConfig.h>

#include "app/server/Server.h"
#include "credentials/FabricTable.h"
#include "device_service/device_service.rpc.pb.h"
#include "platform/ConfigurationManager.h"
#include "platform/PlatformManager.h"
#include "transport/FabricTable.h"

namespace chip {
namespace rpc {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <app-common/zap-generated/cluster-objects.h>
#include <app/CommandHandler.h>
#include <app/util/af-enums.h>
#include <transport/FabricTable.h>
#include <credentials/FabricTable.h>

// An example implementation for how an application might handle receiving an AnnounceOTAProvider command. In this case, the
// AnnounceOTAProvider command will be used as a trigger to send a QueryImage command and begin the OTA process. This class also
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <credentials/CHIPCert.h>
#include <credentials/DeviceAttestationConstructor.h>
#include <credentials/DeviceAttestationCredsProvider.h>
#include <credentials/FabricTable.h>
#include <credentials/examples/DeviceAttestationCredsExample.h>
#include <lib/core/CHIPSafeCasts.h>
#include <lib/core/PeerId.h>
Expand All @@ -44,7 +45,6 @@
#include <lib/support/logging/CHIPLogging.h>
#include <platform/CHIPDeviceLayer.h>
#include <string.h>
#include <transport/FabricTable.h>

using namespace chip;
using namespace ::chip::DeviceLayer;
Expand Down
2 changes: 1 addition & 1 deletion src/app/server/Dnssd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#if CHIP_ENABLE_ROTATING_DEVICE_ID
#include <setup_payload/AdditionalDataPayloadGenerator.h>
#endif
#include <credentials/FabricTable.h>
#include <system/TimeSource.h>
#include <transport/FabricTable.h>

#include <app/server/Server.h>

Expand Down
2 changes: 1 addition & 1 deletion src/app/server/Server.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <app/OperationalDeviceProxy.h>
#include <app/server/AppDelegate.h>
#include <app/server/CommissioningWindowManager.h>
#include <credentials/FabricTable.h>
#include <inet/InetConfig.h>
#include <messaging/ExchangeMgr.h>
#include <platform/KeyValueStoreManager.h>
Expand All @@ -28,7 +29,6 @@
#include <protocols/secure_channel/PASESession.h>
#include <protocols/secure_channel/RendezvousParameters.h>
#include <protocols/user_directed_commissioning/UserDirectedCommissioning.h>
#include <transport/FabricTable.h>
#include <transport/SessionManager.h>
#include <transport/TransportMgr.h>
#include <transport/TransportMgrBase.h>
Expand Down
2 changes: 1 addition & 1 deletion src/controller/CHIPDeviceController.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <controller/OperationalCredentialsDelegate.h>
#include <controller/SetUpCodePairer.h>
#include <credentials/DeviceAttestationVerifier.h>
#include <credentials/FabricTable.h>
#include <lib/core/CHIPConfig.h>
#include <lib/core/CHIPCore.h>
#include <lib/core/CHIPPersistentStorageDelegate.h>
Expand All @@ -51,7 +52,6 @@
#include <protocols/secure_channel/MessageCounterManager.h>
#include <protocols/secure_channel/RendezvousParameters.h>
#include <protocols/user_directed_commissioning/UserDirectedCommissioning.h>
#include <transport/FabricTable.h>
#include <transport/SessionManager.h>
#include <transport/TransportMgr.h>
#include <transport/raw/UDP.h>
Expand Down
2 changes: 1 addition & 1 deletion src/controller/CHIPDeviceControllerSystemState.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
#pragma once

#include <app/DeviceControllerInteractionModelDelegate.h>
#include <credentials/FabricTable.h>
#include <protocols/secure_channel/MessageCounterManager.h>
#include <transport/FabricTable.h>
#include <transport/TransportMgr.h>
#include <transport/raw/UDP.h>
#if CONFIG_DEVICE_LAYER
Expand Down
2 changes: 2 additions & 0 deletions src/credentials/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ static_library("credentials") {
"DeviceAttestationVendorReserved.h",
"DeviceAttestationVerifier.cpp",
"DeviceAttestationVerifier.h",
"FabricTable.cpp",
"FabricTable.h",
"GenerateChipX509Cert.cpp",
"GroupDataProvider.h",
"examples/DeviceAttestationCredsExample.cpp",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@
* @brief Defines a table of fabrics that have provisioned the device.
*/

#include "FabricTable.h"

#include <lib/core/CHIPEncoding.h>
#include <lib/support/CHIPMem.h>
#include <lib/support/CHIPMemString.h>
#include <lib/support/SafeInt.h>
#include <transport/FabricTable.h>
#if CHIP_CRYPTO_HSM
#include <crypto/hsm/CHIPCryptoPALHsm.h>
#endif
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions src/credentials/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ chip_test_suite("tests") {
"TestChipCert.cpp",
"TestDeviceAttestationConstruction.cpp",
"TestDeviceAttestationCredentials.cpp",
"TestFabricTable.cpp",
"TestGroupDataProvider.cpp",
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <lib/core/CHIPCore.h>

#include <transport/FabricTable.h>
#include <credentials/FabricTable.h>

#include <lib/support/CodeUtils.h>
#include <lib/support/UnitTestRegistration.h>
Expand Down
2 changes: 1 addition & 1 deletion src/protocols/secure_channel/CASESession.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#if CHIP_CRYPTO_HSM
#include <crypto/hsm/CHIPCryptoPALHsm.h>
#endif
#include <credentials/FabricTable.h>
#include <lib/core/CHIPTLV.h>
#include <lib/support/Base64.h>
#include <messaging/ExchangeContext.h>
Expand All @@ -39,7 +40,6 @@
#include <protocols/secure_channel/SessionEstablishmentExchangeDispatch.h>
#include <system/SystemPacketBuffer.h>
#include <transport/CryptoContext.h>
#include <transport/FabricTable.h>
#include <transport/PairingSession.h>
#include <transport/raw/MessageHeader.h>
#include <transport/raw/PeerAddress.h>
Expand Down
2 changes: 0 additions & 2 deletions src/transport/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ static_library("transport") {
sources = [
"CryptoContext.cpp",
"CryptoContext.h",
"FabricTable.cpp",
"FabricTable.h",
"MessageCounter.cpp",
"MessageCounter.h",
"MessageCounterManagerInterface.h",
Expand Down
1 change: 0 additions & 1 deletion src/transport/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ chip_test_suite("tests") {
output_name = "libTransportLayerTests"

test_sources = [
"TestFabricTable.cpp",
"TestPeerConnections.cpp",
"TestSecureSession.cpp",
"TestSessionHandle.cpp",
Expand Down

0 comments on commit 1489796

Please sign in to comment.