@@ -52,15 +52,15 @@ class ScopedThreadLock
52
52
~ScopedThreadLock () { DeviceLayer::ThreadStackMgr ().UnlockThreadStack (); }
53
53
};
54
54
55
- CHIP_ERROR GenericThreadBorderRouterDelegate ::Init ()
55
+ CHIP_ERROR GenericOpenThreadBorderRouterDelegate ::Init ()
56
56
{
57
57
mCallback = nullptr ;
58
58
ReturnErrorOnFailure (DeviceLayer::PlatformMgrImpl ().AddEventHandler (OnPlatformEventHandler, reinterpret_cast <intptr_t >(this )));
59
59
ReturnErrorOnFailure (RevertActiveDataset ());
60
60
return CHIP_NO_ERROR;
61
61
}
62
62
63
- CHIP_ERROR GenericThreadBorderRouterDelegate ::GetBorderAgentId (MutableByteSpan & borderAgentIdSpan)
63
+ CHIP_ERROR GenericOpenThreadBorderRouterDelegate ::GetBorderAgentId (MutableByteSpan & borderAgentIdSpan)
64
64
{
65
65
otInstance * otInst = DeviceLayer::ThreadStackMgrImpl ().OTInstance ();
66
66
VerifyOrReturnError (otInst, CHIP_ERROR_INCORRECT_STATE);
@@ -80,13 +80,13 @@ CHIP_ERROR GenericThreadBorderRouterDelegate::GetBorderAgentId(MutableByteSpan &
80
80
return CHIP_ERROR_INTERNAL;
81
81
}
82
82
83
- CHIP_ERROR GenericThreadBorderRouterDelegate ::GetThreadVersion (uint16_t & threadVersion)
83
+ CHIP_ERROR GenericOpenThreadBorderRouterDelegate ::GetThreadVersion (uint16_t & threadVersion)
84
84
{
85
85
threadVersion = otThreadGetVersion ();
86
86
return CHIP_NO_ERROR;
87
87
}
88
88
89
- CHIP_ERROR GenericThreadBorderRouterDelegate ::GetInterfaceEnabled (bool & interfaceEnabled)
89
+ CHIP_ERROR GenericOpenThreadBorderRouterDelegate ::GetInterfaceEnabled (bool & interfaceEnabled)
90
90
{
91
91
otInstance * otInst = DeviceLayer::ThreadStackMgrImpl ().OTInstance ();
92
92
VerifyOrReturnError (otInst, CHIP_ERROR_INCORRECT_STATE);
@@ -95,7 +95,7 @@ CHIP_ERROR GenericThreadBorderRouterDelegate::GetInterfaceEnabled(bool & interfa
95
95
return CHIP_NO_ERROR;
96
96
}
97
97
98
- CHIP_ERROR GenericThreadBorderRouterDelegate ::GetDataset (Thread::OperationalDataset & dataset, DatasetType type)
98
+ CHIP_ERROR GenericOpenThreadBorderRouterDelegate ::GetDataset (Thread::OperationalDataset & dataset, DatasetType type)
99
99
{
100
100
otInstance * otInst = DeviceLayer::ThreadStackMgrImpl ().OTInstance ();
101
101
VerifyOrReturnError (otInst, CHIP_ERROR_INCORRECT_STATE);
@@ -118,7 +118,7 @@ CHIP_ERROR GenericThreadBorderRouterDelegate::GetDataset(Thread::OperationalData
118
118
return CHIP_ERROR_NOT_FOUND;
119
119
}
120
120
121
- CHIP_ERROR GenericThreadBorderRouterDelegate ::SetActiveDataset (const Thread::OperationalDataset & activeDataset,
121
+ CHIP_ERROR GenericOpenThreadBorderRouterDelegate ::SetActiveDataset (const Thread::OperationalDataset & activeDataset,
122
122
uint32_t randomNumber, ActivateDatasetCallback * callback)
123
123
{
124
124
CHIP_ERROR err = BackupActiveDataset ();
@@ -134,9 +134,9 @@ CHIP_ERROR GenericThreadBorderRouterDelegate::SetActiveDataset(const Thread::Ope
134
134
return err;
135
135
}
136
136
137
- void GenericThreadBorderRouterDelegate ::OnPlatformEventHandler (const DeviceLayer::ChipDeviceEvent * event, intptr_t arg)
137
+ void GenericOpenThreadBorderRouterDelegate ::OnPlatformEventHandler (const DeviceLayer::ChipDeviceEvent * event, intptr_t arg)
138
138
{
139
- GenericThreadBorderRouterDelegate * delegate = reinterpret_cast <GenericThreadBorderRouterDelegate *>(arg);
139
+ GenericOpenThreadBorderRouterDelegate * delegate = reinterpret_cast <GenericOpenThreadBorderRouterDelegate *>(arg);
140
140
if (delegate && delegate->mCallback )
141
141
{
142
142
if (event->Type == DeviceLayer::DeviceEventType::kThreadConnectivityChange &&
@@ -150,7 +150,7 @@ void GenericThreadBorderRouterDelegate::OnPlatformEventHandler(const DeviceLayer
150
150
}
151
151
}
152
152
153
- CHIP_ERROR GenericThreadBorderRouterDelegate ::BackupActiveDataset ()
153
+ CHIP_ERROR GenericOpenThreadBorderRouterDelegate ::BackupActiveDataset ()
154
154
{
155
155
// If active dataset is already backed up, return with no error
156
156
CHIP_ERROR err = DeviceLayer::PersistedStorage::KeyValueStoreMgr ().Get (kFailsafeThreadDatasetTlvsKey , nullptr , 0 );
@@ -163,14 +163,14 @@ CHIP_ERROR GenericThreadBorderRouterDelegate::BackupActiveDataset()
163
163
return DeviceLayer::PersistedStorage::KeyValueStoreMgr ().Put (kFailsafeThreadDatasetTlvsKey , dataset.data (), dataset.size ());
164
164
}
165
165
166
- CHIP_ERROR GenericThreadBorderRouterDelegate ::CommitActiveDataset ()
166
+ CHIP_ERROR GenericOpenThreadBorderRouterDelegate ::CommitActiveDataset ()
167
167
{
168
168
// Delete Failsafe Key when committing.
169
169
DeviceLayer::PersistedStorage::KeyValueStoreMgr ().Delete (kFailsafeThreadDatasetTlvsKey );
170
170
return CHIP_NO_ERROR;
171
171
}
172
172
173
- CHIP_ERROR GenericThreadBorderRouterDelegate ::RevertActiveDataset ()
173
+ CHIP_ERROR GenericOpenThreadBorderRouterDelegate ::RevertActiveDataset ()
174
174
{
175
175
// The FailSafe Timer is triggered and the previous command request should be handled, so reset the callback.
176
176
mCallback = nullptr ;
@@ -195,7 +195,7 @@ CHIP_ERROR GenericThreadBorderRouterDelegate::RevertActiveDataset()
195
195
return CHIP_NO_ERROR;
196
196
}
197
197
198
- CHIP_ERROR GenericThreadBorderRouterDelegate ::SetPendingDataset (const Thread::OperationalDataset & pendingDataset)
198
+ CHIP_ERROR GenericOpenThreadBorderRouterDelegate ::SetPendingDataset (const Thread::OperationalDataset & pendingDataset)
199
199
{
200
200
otInstance * otInst = DeviceLayer::ThreadStackMgrImpl ().OTInstance ();
201
201
VerifyOrReturnError (otInst, CHIP_ERROR_INCORRECT_STATE);
0 commit comments