[coap] change CoAP option data type to uint16_t in C/C++ API (#4621)

This commit is contained in:
Tobías Lifschitz
2020-03-03 10:12:07 -08:00
committed by GitHub
parent e29e14b4fd
commit a802bfb0f3
4 changed files with 8 additions and 11 deletions
+2 -4
View File
@@ -691,8 +691,7 @@ otError otCoapOptionIteratorInit(otCoapOptionIterator *aIterator, const otMessag
* @returns A pointer to the first matching option. If no matching option is present NULL pointer is returned. * @returns A pointer to the first matching option. If no matching option is present NULL pointer is returned.
* *
*/ */
const otCoapOption *otCoapOptionIteratorGetFirstOptionMatching(otCoapOptionIterator *aIterator, const otCoapOption *otCoapOptionIteratorGetFirstOptionMatching(otCoapOptionIterator *aIterator, uint16_t aOption);
otCoapOptionType aOption);
/** /**
* This function returns a pointer to the first option. * This function returns a pointer to the first option.
@@ -713,8 +712,7 @@ const otCoapOption *otCoapOptionIteratorGetFirstOption(otCoapOptionIterator *aIt
* @returns A pointer to the next matching option. If no further matching option is present NULL pointer is returned. * @returns A pointer to the next matching option. If no further matching option is present NULL pointer is returned.
* *
*/ */
const otCoapOption *otCoapOptionIteratorGetNextOptionMatching(otCoapOptionIterator *aIterator, const otCoapOption *otCoapOptionIteratorGetNextOptionMatching(otCoapOptionIterator *aIterator, uint16_t aOption);
otCoapOptionType aOption);
/** /**
* This function returns a pointer to the next option. * This function returns a pointer to the next option.
+2 -3
View File
@@ -180,8 +180,7 @@ otError otCoapOptionIteratorInit(otCoapOptionIterator *aIterator, const otMessag
return static_cast<Coap::OptionIterator *>(aIterator)->Init(static_cast<const Coap::Message *>(aMessage)); return static_cast<Coap::OptionIterator *>(aIterator)->Init(static_cast<const Coap::Message *>(aMessage));
} }
const otCoapOption *otCoapOptionIteratorGetFirstOptionMatching(otCoapOptionIterator *aIterator, const otCoapOption *otCoapOptionIteratorGetFirstOptionMatching(otCoapOptionIterator *aIterator, uint16_t aOption)
otCoapOptionType aOption)
{ {
return static_cast<Coap::OptionIterator *>(aIterator)->GetFirstOptionMatching(aOption); return static_cast<Coap::OptionIterator *>(aIterator)->GetFirstOptionMatching(aOption);
} }
@@ -191,7 +190,7 @@ const otCoapOption *otCoapOptionIteratorGetFirstOption(otCoapOptionIterator *aIt
return static_cast<Coap::OptionIterator *>(aIterator)->GetFirstOption(); return static_cast<Coap::OptionIterator *>(aIterator)->GetFirstOption();
} }
const otCoapOption *otCoapOptionIteratorGetNextOptionMatching(otCoapOptionIterator *aIterator, otCoapOptionType aOption) const otCoapOption *otCoapOptionIteratorGetNextOptionMatching(otCoapOptionIterator *aIterator, uint16_t aOption)
{ {
return static_cast<Coap::OptionIterator *>(aIterator)->GetNextOptionMatching(aOption); return static_cast<Coap::OptionIterator *>(aIterator)->GetNextOptionMatching(aOption);
} }
+2 -2
View File
@@ -432,7 +432,7 @@ exit:
return err; return err;
} }
const otCoapOption *OptionIterator::GetFirstOptionMatching(otCoapOptionType aOption) const otCoapOption *OptionIterator::GetFirstOptionMatching(uint16_t aOption)
{ {
const otCoapOption *rval = NULL; const otCoapOption *rval = NULL;
@@ -466,7 +466,7 @@ const otCoapOption *OptionIterator::GetFirstOption(void)
return option; return option;
} }
const otCoapOption *OptionIterator::GetNextOptionMatching(otCoapOptionType aOption) const otCoapOption *OptionIterator::GetNextOptionMatching(uint16_t aOption)
{ {
const otCoapOption *rval = NULL; const otCoapOption *rval = NULL;
+2 -2
View File
@@ -650,7 +650,7 @@ public:
* @returns A pointer to the first matching option. If no option matching @p aOption is seen, NULL pointer is * @returns A pointer to the first matching option. If no option matching @p aOption is seen, NULL pointer is
* returned. * returned.
*/ */
const otCoapOption *GetFirstOptionMatching(otCoapOptionType aOption); const otCoapOption *GetFirstOptionMatching(uint16_t aOption);
/** /**
* This method returns a pointer to the first option. * This method returns a pointer to the first option.
@@ -670,7 +670,7 @@ public:
* @returns A pointer to the next matching option (relative to current iterator position). If no option matching @p * @returns A pointer to the next matching option (relative to current iterator position). If no option matching @p
* aOption is seen, NULL pointer is returned. * aOption is seen, NULL pointer is returned.
*/ */
const otCoapOption *GetNextOptionMatching(otCoapOptionType aOption); const otCoapOption *GetNextOptionMatching(uint16_t aOption);
/** /**
* This method returns a pointer to the next option. * This method returns a pointer to the next option.