@@ -99,8 +99,8 @@ Server Server::sServer;
99
99
static uint8_t sInfoEventBuffer [CHIP_DEVICE_CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE];
100
100
static uint8_t sDebugEventBuffer [CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE];
101
101
static uint8_t sCritEventBuffer [CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE];
102
- static ::chip:: PersistedCounter<chip:: EventNumber> sGlobalEventIdCounter ;
103
- static ::chip:: app::CircularEventBuffer sLoggingBuffer [CHIP_NUM_EVENT_LOGGING_BUFFERS];
102
+ static PersistedCounter<EventNumber> sGlobalEventIdCounter ;
103
+ static app::CircularEventBuffer sLoggingBuffer [CHIP_NUM_EVENT_LOGGING_BUFFERS];
104
104
#endif // CHIP_CONFIG_ENABLE_SERVER_IM_EVENT
105
105
106
106
CHIP_ERROR Server::Init (const ServerInitParams & initParams)
@@ -137,8 +137,8 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
137
137
138
138
VerifyOrExit (initParams.dataModelProvider != nullptr , err = CHIP_ERROR_INVALID_ARGUMENT);
139
139
140
- // TODO(16969): Remove chip:: Platform::MemoryInit() call from Server class, it belongs to outer code
141
- chip:: Platform::MemoryInit ();
140
+ // TODO(16969): Remove Platform::MemoryInit() call from Server class, it belongs to outer code
141
+ Platform::MemoryInit ();
142
142
143
143
// Initialize PersistentStorageDelegate-based storage
144
144
mDeviceStorage = initParams.persistentStorageDelegate ;
@@ -158,11 +158,11 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
158
158
}
159
159
160
160
#if defined(CHIP_SUPPORT_ENABLE_STORAGE_API_AUDIT)
161
- VerifyOrDie (chip:: audit::ExecutePersistentStorageApiAudit (*mDeviceStorage ));
161
+ VerifyOrDie (audit::ExecutePersistentStorageApiAudit (*mDeviceStorage ));
162
162
#endif
163
163
164
164
#if defined(CHIP_SUPPORT_ENABLE_STORAGE_LOAD_TEST_AUDIT)
165
- VerifyOrDie (chip:: audit::ExecutePersistentStorageLoadTestAudit (*mDeviceStorage ));
165
+ VerifyOrDie (audit::ExecutePersistentStorageLoadTestAudit (*mDeviceStorage ));
166
166
#endif
167
167
168
168
// Set up attribute persistence before we try to bring up the data model
@@ -179,7 +179,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
179
179
// 2) For now, provider initialization happens before InitDataModelHandler(), which depends
180
180
// on atttribute persistence being already set up before it runs. Longer-term, the logic from
181
181
// InitDataModelHandler should just move into the codegen provider.
182
- chip:: app::InteractionModelEngine::GetInstance ()->SetDataModelProvider (initParams.dataModelProvider );
182
+ app::InteractionModelEngine::GetInstance ()->SetDataModelProvider (initParams.dataModelProvider );
183
183
184
184
{
185
185
FabricTable::InitParams fabricTableInitParams;
@@ -281,7 +281,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
281
281
app::DnssdServer::Instance ().SetFabricTable (&mFabrics );
282
282
app::DnssdServer::Instance ().SetCommissioningModeProvider (&mCommissioningWindowManager );
283
283
284
- chip:: Dnssd::Resolver::Instance ().Init (DeviceLayer::UDPEndPointManager ());
284
+ Dnssd::Resolver::Instance ().Init (DeviceLayer::UDPEndPointManager ());
285
285
286
286
#if CHIP_CONFIG_ENABLE_SERVER_IM_EVENT
287
287
// Initialize event logging subsystem
@@ -290,15 +290,15 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
290
290
SuccessOrExit (err);
291
291
292
292
{
293
- ::chip:: app::LogStorageResources logStorageResources[] = {
294
- { &sDebugEventBuffer [0 ], sizeof (sDebugEventBuffer ), ::chip:: app::PriorityLevel::Debug },
295
- { &sInfoEventBuffer [0 ], sizeof (sInfoEventBuffer ), ::chip:: app::PriorityLevel::Info },
296
- { &sCritEventBuffer [0 ], sizeof (sCritEventBuffer ), ::chip:: app::PriorityLevel::Critical }
293
+ app::LogStorageResources logStorageResources[] = {
294
+ { &sDebugEventBuffer [0 ], sizeof (sDebugEventBuffer ), app::PriorityLevel::Debug },
295
+ { &sInfoEventBuffer [0 ], sizeof (sInfoEventBuffer ), app::PriorityLevel::Info },
296
+ { &sCritEventBuffer [0 ], sizeof (sCritEventBuffer ), app::PriorityLevel::Critical }
297
297
};
298
298
299
- chip:: app::EventManagement::GetInstance ().Init (&mExchangeMgr , CHIP_NUM_EVENT_LOGGING_BUFFERS, &sLoggingBuffer [0 ],
300
- &logStorageResources[0 ], &sGlobalEventIdCounter ,
301
- std::chrono::duration_cast<System::Clock::Milliseconds64>(mInitTimestamp ));
299
+ app::EventManagement::GetInstance ().Init (&mExchangeMgr , CHIP_NUM_EVENT_LOGGING_BUFFERS, &sLoggingBuffer [0 ],
300
+ &logStorageResources[0 ], &sGlobalEventIdCounter ,
301
+ std::chrono::duration_cast<System::Clock::Milliseconds64>(mInitTimestamp ));
302
302
}
303
303
#endif // CHIP_CONFIG_ENABLE_SERVER_IM_EVENT
304
304
@@ -333,7 +333,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
333
333
#if CONFIG_NETWORK_LAYER_BLE
334
334
// The device is already commissioned, proactively disable BLE advertisement.
335
335
ChipLogProgress (AppServer, " Fabric already commissioned. Disabling BLE advertisement" );
336
- chip:: DeviceLayer::ConnectivityMgr ().SetBLEAdvertisingEnabled (false );
336
+ DeviceLayer::ConnectivityMgr ().SetBLEAdvertisingEnabled (false );
337
337
#endif
338
338
}
339
339
else
@@ -374,8 +374,8 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
374
374
&mCertificateValidityPolicy , mGroupsProvider );
375
375
SuccessOrExit (err);
376
376
377
- err = chip:: app::InteractionModelEngine::GetInstance ()->Init (&mExchangeMgr , &GetFabricTable (), mReportScheduler ,
378
- & mCASESessionManager , mSubscriptionResumptionStorage );
377
+ err = app::InteractionModelEngine::GetInstance ()->Init (&mExchangeMgr , &GetFabricTable (), mReportScheduler , & mCASESessionManager ,
378
+ mSubscriptionResumptionStorage );
379
379
SuccessOrExit (err);
380
380
381
381
#if CHIP_CONFIG_ENABLE_ICD_SERVER
@@ -396,7 +396,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
396
396
.SetFabricTable (&GetFabricTable ())
397
397
.SetSymmetricKeyStore (mSessionKeystore )
398
398
.SetExchangeManager (&mExchangeMgr )
399
- .SetSubscriptionsInfoProvider (chip:: app::InteractionModelEngine::GetInstance ())
399
+ .SetSubscriptionsInfoProvider (app::InteractionModelEngine::GetInstance ())
400
400
.SetICDCheckInBackOffStrategy (initParams.icdCheckInBackOffStrategy );
401
401
402
402
#endif // CHIP_CONFIG_ENABLE_ICD_CIP
@@ -455,7 +455,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
455
455
}
456
456
457
457
#if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT // support UDC port for commissioner declaration msgs
458
- mUdcTransportMgr = chip:: Platform::New<UdcTransportMgr>();
458
+ mUdcTransportMgr = Platform::New<UdcTransportMgr>();
459
459
ReturnErrorOnFailure (mUdcTransportMgr ->Init (Transport::UdpListenParameters (DeviceLayer::UDPEndPointManager ())
460
460
.SetAddressType (Inet::IPAddressType::kIPv6 )
461
461
.SetListenPort (static_cast <uint16_t >(mCdcListenPort ))
@@ -467,7 +467,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams)
467
467
#endif // INET_CONFIG_ENABLE_IPV4
468
468
));
469
469
470
- gUDCClient = chip:: Platform::New<Protocols::UserDirectedCommissioning::UserDirectedCommissioningClient>();
470
+ gUDCClient = Platform::New<Protocols::UserDirectedCommissioning::UserDirectedCommissioningClient>();
471
471
mUdcTransportMgr ->SetSessionManager (gUDCClient );
472
472
#endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY
473
473
@@ -623,23 +623,23 @@ void Server::Shutdown()
623
623
app::DnssdServer::Instance ().SetICDManager (nullptr );
624
624
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
625
625
app::DnssdServer::Instance ().SetCommissioningModeProvider (nullptr );
626
- chip:: Dnssd::ServiceAdvertiser::Instance ().Shutdown ();
626
+ Dnssd::ServiceAdvertiser::Instance ().Shutdown ();
627
627
628
628
#if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT
629
629
if (mUdcTransportMgr != nullptr )
630
630
{
631
- chip:: Platform::Delete (mUdcTransportMgr );
631
+ Platform::Delete (mUdcTransportMgr );
632
632
mUdcTransportMgr = nullptr ;
633
633
}
634
634
if (gUDCClient != nullptr )
635
635
{
636
- chip:: Platform::Delete (gUDCClient );
636
+ Platform::Delete (gUDCClient );
637
637
gUDCClient = nullptr ;
638
638
}
639
639
#endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY
640
640
641
- chip:: Dnssd::Resolver::Instance ().Shutdown ();
642
- chip:: app::InteractionModelEngine::GetInstance ()->Shutdown ();
641
+ Dnssd::Resolver::Instance ().Shutdown ();
642
+ app::InteractionModelEngine::GetInstance ()->Shutdown ();
643
643
#if CHIP_CONFIG_ENABLE_ICD_SERVER
644
644
app::InteractionModelEngine::GetInstance ()->SetICDManager (nullptr );
645
645
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
@@ -674,7 +674,7 @@ void Server::Shutdown()
674
674
// NOTE: UDC client is located in Server.cpp because it really only makes sense
675
675
// to send UDC from a Matter device. The UDC message payload needs to include the device's
676
676
// randomly generated service name.
677
- CHIP_ERROR Server::SendUserDirectedCommissioningRequest (chip:: Transport::PeerAddress commissioner,
677
+ CHIP_ERROR Server::SendUserDirectedCommissioningRequest (Transport::PeerAddress commissioner,
678
678
Protocols::UserDirectedCommissioning::IdentificationDeclaration & id)
679
679
{
680
680
ChipLogDetail (AppServer, " Server::SendUserDirectedCommissioningRequest()" );
@@ -685,7 +685,7 @@ CHIP_ERROR Server::SendUserDirectedCommissioningRequest(chip::Transport::PeerAdd
685
685
if (strlen (id.GetInstanceName ()) == 0 )
686
686
{
687
687
ChipLogDetail (AppServer, " Server::SendUserDirectedCommissioningRequest() Instance Name not known" );
688
- char nameBuffer[chip:: Dnssd::Commission::kInstanceNameMaxLength + 1 ];
688
+ char nameBuffer[Dnssd::Commission::kInstanceNameMaxLength + 1 ];
689
689
err = app::DnssdServer::Instance ().GetCommissionableInstanceName (nameBuffer, sizeof (nameBuffer));
690
690
if (err != CHIP_NO_ERROR)
691
691
{
@@ -727,9 +727,9 @@ CHIP_ERROR Server::SendUserDirectedCommissioningRequest(chip::Transport::PeerAdd
727
727
728
728
if (strlen (id.GetDeviceName ()) == 0 )
729
729
{
730
- char deviceName[chip:: Dnssd::kKeyDeviceNameMaxLength + 1 ] = {};
731
- if (!chip:: DeviceLayer::ConfigurationMgr ().IsCommissionableDeviceNameEnabled () ||
732
- chip:: DeviceLayer::ConfigurationMgr ().GetCommissionableDeviceName (deviceName, sizeof (deviceName)) != CHIP_NO_ERROR)
730
+ char deviceName[Dnssd::kKeyDeviceNameMaxLength + 1 ] = {};
731
+ if (!DeviceLayer::ConfigurationMgr ().IsCommissionableDeviceNameEnabled () ||
732
+ DeviceLayer::ConfigurationMgr ().GetCommissionableDeviceName (deviceName, sizeof (deviceName)) != CHIP_NO_ERROR)
733
733
{
734
734
ChipLogDetail (AppServer, " Server::SendUserDirectedCommissioningRequest() Device Name not known" );
735
735
}
@@ -743,13 +743,13 @@ CHIP_ERROR Server::SendUserDirectedCommissioningRequest(chip::Transport::PeerAdd
743
743
if (id.GetRotatingIdLength () == 0 )
744
744
{
745
745
AdditionalDataPayloadGeneratorParams additionalDataPayloadParams;
746
- uint8_t rotatingDeviceIdUniqueId[chip:: DeviceLayer::ConfigurationManager::kRotatingDeviceIDUniqueIDLength ];
746
+ uint8_t rotatingDeviceIdUniqueId[DeviceLayer::ConfigurationManager::kRotatingDeviceIDUniqueIDLength ];
747
747
MutableByteSpan rotatingDeviceIdUniqueIdSpan (rotatingDeviceIdUniqueId);
748
748
749
749
ReturnErrorOnFailure (
750
- chip:: DeviceLayer::GetDeviceInstanceInfoProvider ()->GetRotatingDeviceIdUniqueId (rotatingDeviceIdUniqueIdSpan));
750
+ DeviceLayer::GetDeviceInstanceInfoProvider ()->GetRotatingDeviceIdUniqueId (rotatingDeviceIdUniqueIdSpan));
751
751
ReturnErrorOnFailure (
752
- chip:: DeviceLayer::ConfigurationMgr ().GetLifetimeCounter (additionalDataPayloadParams.rotatingDeviceIdLifetimeCounter ));
752
+ DeviceLayer::ConfigurationMgr ().GetLifetimeCounter (additionalDataPayloadParams.rotatingDeviceIdLifetimeCounter ));
753
753
additionalDataPayloadParams.rotatingDeviceIdUniqueId = rotatingDeviceIdUniqueIdSpan;
754
754
755
755
uint8_t rotatingDeviceIdInternalBuffer[RotatingDeviceId::kMaxLength ];
@@ -784,7 +784,7 @@ CHIP_ERROR Server::SendUserDirectedCommissioningRequest(chip::Transport::PeerAdd
784
784
#if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS
785
785
void Server::ResumeSubscriptions ()
786
786
{
787
- CHIP_ERROR err = chip:: app::InteractionModelEngine::GetInstance ()->ResumeSubscriptions ();
787
+ CHIP_ERROR err = app::InteractionModelEngine::GetInstance ()->ResumeSubscriptions ();
788
788
if (err != CHIP_NO_ERROR)
789
789
{
790
790
ChipLogError (AppServer, " Error when trying to resume subscriptions : %" CHIP_ERROR_FORMAT, err.Format ());
0 commit comments