Lines Matching refs:aService

778 Error Client::AddService(Service &aService)  in AddService()  argument
782 VerifyOrExit(mServices.FindMatching(aService) == nullptr, error = kErrorAlready); in AddService()
784 SuccessOrExit(error = aService.Init()); in AddService()
785 mServices.Push(aService); in AddService()
787 aService.SetState(kToAdd); in AddService()
794 Error Client::RemoveService(Service &aService) in RemoveService() argument
799 VerifyOrExit(mServices.Contains(aService), error = kErrorNotFound); in RemoveService()
801 UpdateServiceStateToRemove(aService); in RemoveService()
808 void Client::UpdateServiceStateToRemove(Service &aService) in UpdateServiceStateToRemove() argument
810 if (aService.GetState() != kRemoving) in UpdateServiceStateToRemove()
812 aService.SetState(kToRemove); in UpdateServiceStateToRemove()
816 Error Client::ClearService(Service &aService) in ClearService() argument
820 SuccessOrExit(error = mServices.Remove(aService)); in ClearService()
821 aService.SetNext(nullptr); in ClearService()
822 aService.SetState(kRemoved); in ClearService()
1327 bool Client::CanAppendService(const Service &aService) in CanAppendService() argument
1336 uint32_t lease = DetermineLeaseInterval(aService.GetLease(), mDefaultLease); in CanAppendService()
1337 … uint32_t keyLease = Max(DetermineLeaseInterval(aService.GetKeyLease(), mDefaultKeyLease), lease); in CanAppendService()
1339 switch (aService.GetState()) in CanAppendService()
1368 Error Client::AppendServiceInstruction(Service &aService, MsgInfo &aInfo) in AppendServiceInstruction() argument
1371 …bool removing = ((aService.GetState() == kToRemove) || (aService.GetState() == kRem… in AppendServiceInstruction()
1378 aService.MarkAsAppendedInMessage(); in AppendServiceInstruction()
1387 SuccessOrExit(error = Dns::Name::AppendMultipleLabels(aService.GetName(), *aInfo.mMessage)); in AppendServiceInstruction()
1400 SuccessOrExit(error = Dns::Name::AppendLabel(aService.GetInstanceName(), *aInfo.mMessage)); in AppendServiceInstruction()
1406 if (aService.HasSubType() && !removing) in AppendServiceInstruction()
1411 … for (uint16_t index = 0; (subTypeLabel = aService.GetSubTypeLabelAt(index)) != nullptr; ++index) in AppendServiceInstruction()
1454 srv.SetPriority(aService.GetPriority()); in AppendServiceInstruction()
1455 srv.SetWeight(aService.GetWeight()); in AppendServiceInstruction()
1456 srv.SetPort(aService.GetPort()); in AppendServiceInstruction()
1470 …error = Dns::TxtEntry::AppendEntries(aService.GetTxtEntries(), aService.GetNumTxtEntries(), *aInfo… in AppendServiceInstruction()
2151 bool Client::ShouldRenewEarly(const Service &aService) const in ShouldRenewEarly()
2166 … earlyRenewInterval = Time::SecToMsec(DetermineLeaseInterval(aService.GetLease(), mDefaultLease)); in ShouldRenewEarly()
2169 shouldRenew = (aService.GetLeaseRenewTime() <= TimerMilli::GetNow() + earlyRenewInterval); in ShouldRenewEarly()
2171 OT_UNUSED_VARIABLE(aService); in ShouldRenewEarly()