[border-agent] move TXT data management to TxtData class (#12120)

Moves the management of MeshCoP service TXT data from the
`BorderAgent::Manager` class into the `TxtData` class.

This change improves separation of concerns by isolating all TXT
data-related logic, including vendor TXT data, change callbacks, and
notifier event handling, within the `TxtData` class. The
`BorderAgent::Manager` is simplified and its responsibilities are
more focused.

A new public method, `Refresh()`, is introduced on `TxtData` to
provide a clear API for other modules to signal that the MeshCoP
service TXT data needs to be re-evaluated and updated.
This commit is contained in:
Abtin Keshavarzian
2025-11-07 14:21:10 -08:00
committed by GitHub
parent 324f27dd44
commit 74ba475914
11 changed files with 171 additions and 130 deletions
+7 -2
View File
@@ -106,14 +106,19 @@ void TestTasklet(void)
sInstance = static_cast<Instance *>(testInitInstance());
VerifyOrQuit(sInstance != nullptr);
sInstance->Get<Tasklet::Scheduler>().ProcessQueuedTasklets();
{
Tasklet::Scheduler &scheduler = sInstance->Get<Tasklet::Scheduler>();
Tasklet task1(*sInstance, HandleTask1);
Tasklet task2(*sInstance, HandleTask2);
Tasklet task3(*sInstance, HandleTask3);
Log("Process all initially posted tasks after `Instance` initialization");
while (scheduler.AreTaskletsPending())
{
scheduler.ProcessQueuedTasklets();
}
VerifyOrQuit(!task1.IsPosted());
VerifyOrQuit(!task2.IsPosted());
VerifyOrQuit(!task3.IsPosted());