[coap] add base class CoapSecureBase and ApplicationCoapSecure (#10945)

This commit refactors COAPS classes, renaming the `CoapSecure` class
as `CoapSecureBase`, which is the base class of `Tmf::SecureAgent`
and a newly added `ApplicationCoapSecure` class. This change
simplifies the code and class hierarchy and ensures that the
Application COAP secure related functions are only provided by
`ApplicationCoapSecure` and when the corresponding config feature
`OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE` is enabled.
This commit is contained in:
Abtin Keshavarzian
2024-11-20 10:20:47 -08:00
committed by GitHub
parent 76a0334090
commit a7e058f56c
5 changed files with 148 additions and 135 deletions
+1 -1
View File
@@ -273,7 +273,7 @@ Message::Priority Agent::DscpToPriority(uint8_t aDscp)
#if OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE
SecureAgent::SecureAgent(Instance &aInstance)
: Coap::CoapSecure(aInstance, kNoLinkSecurity)
: Coap::CoapSecureBase(aInstance, kNoLinkSecurity)
{
SetResourceHandler(&HandleResource);
}