Do not wrap APIs in Thread namespace. (#1183)

This commit is contained in:
Jonathan Hui
2017-01-20 18:14:15 -08:00
committed by GitHub
parent fdf6abbb57
commit f95c4c1955
3 changed files with 4 additions and 15 deletions
+1 -5
View File
@@ -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
+2 -4
View File
@@ -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
+1 -6
View File
@@ -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