mirror of
https://github.com/espressif/openthread.git
synced 2026-10-03 06:17:41 +00:00
Do not wrap APIs in Thread namespace. (#1183)
This commit is contained in:
@@ -38,8 +38,7 @@
|
|||||||
#include <crypto/hmac_sha256.hpp>
|
#include <crypto/hmac_sha256.hpp>
|
||||||
#include <crypto/aes_ccm.hpp>
|
#include <crypto/aes_ccm.hpp>
|
||||||
|
|
||||||
namespace Thread {
|
using namespace Thread::Crypto;
|
||||||
namespace Crypto {
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -93,6 +92,3 @@ exit:
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace Crypto
|
|
||||||
} // namespace Thread
|
|
||||||
|
|||||||
@@ -67,6 +67,8 @@
|
|||||||
#include <coap/coap_client.hpp>
|
#include <coap/coap_client.hpp>
|
||||||
#include <coap/coap_server.hpp>
|
#include <coap/coap_server.hpp>
|
||||||
|
|
||||||
|
using namespace Thread;
|
||||||
|
|
||||||
#ifndef OPENTHREAD_MULTIPLE_INSTANCE
|
#ifndef OPENTHREAD_MULTIPLE_INSTANCE
|
||||||
static otDEFINE_ALIGNED_VAR(sInstanceRaw, sizeof(otInstance), uint64_t);
|
static otDEFINE_ALIGNED_VAR(sInstanceRaw, sizeof(otInstance), uint64_t);
|
||||||
otInstance *sInstance = NULL;
|
otInstance *sInstance = NULL;
|
||||||
@@ -86,8 +88,6 @@ otInstance::otInstance(void) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Thread {
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -1890,5 +1890,3 @@ ThreadError otCoapSendResponse(otInstance *aInstance, otMessage aMessage, const
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace Thread
|
|
||||||
|
|||||||
@@ -38,9 +38,7 @@
|
|||||||
#include <openthread-diag.h>
|
#include <openthread-diag.h>
|
||||||
#include <diag_process.hpp>
|
#include <diag_process.hpp>
|
||||||
|
|
||||||
namespace Thread {
|
using namespace Thread::Diagnostics;
|
||||||
|
|
||||||
namespace Diagnostics {
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -89,6 +87,3 @@ bool isDiagEnabled()
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace Diagnostics
|
|
||||||
} // namespace Thread
|
|
||||||
|
|||||||
Reference in New Issue
Block a user