include: Move header files into libcoap namespace

I.E. '#include "mem.h"' becomes '#include "coap2/mem.h"'

This prevents header name clashes.

Replacement for #487
This commit is contained in:
Jon Shallow committed 2021-03-08 16:45:02 +00:00
1 parent 4efb04d4d4
commit 0c031d7904
68 files changed
+149 -146

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@
#include <stdint.h>
#include <string.h>
#include <sys/types.h>
#include "libcoap.h"
#include "coap2/libcoap.h"
#if defined(WITH_LWIP)
+1 -1
View File
@@ -15,7 +15,7 @@
#ifndef COAP_ASYNC_H_
#define COAP_ASYNC_H_
#include "net.h"
#include "coap2/net.h"
#ifndef WITHOUT_ASYNC
+3 -3
View File
@@ -10,9 +10,9 @@
#ifndef COAP_BLOCK_H_
#define COAP_BLOCK_H_
#include "encode.h"
#include "option.h"
#include "pdu.h"
#include "coap2/encode.h"
#include "coap2/option.h"
#include "coap2/pdu.h"
/**
* @defgroup block Block Transfer
+22 -22
View File
@@ -33,29 +33,29 @@
extern "C" {
#endif
#include "libcoap.h"
#include "coap2/libcoap.h"
#include "coap_forward_decls.h"
#include "address.h"
#include "async.h"
#include "bits.h"
#include "block.h"
#include "coap_cache.h"
#include "coap_dtls.h"
#include "coap_event.h"
#include "coap_io.h"
#include "coap_time.h"
#include "coap_debug.h"
#include "encode.h"
#include "mem.h"
#include "net.h"
#include "option.h"
#include "pdu.h"
#include "coap_prng.h"
#include "resource.h"
#include "str.h"
#include "subscribe.h"
#include "uri.h"
#include "coap2/coap_forward_decls.h"
#include "coap2/address.h"
#include "coap2/async.h"
#include "coap2/bits.h"
#include "coap2/block.h"
#include "coap2/coap_cache.h"
#include "coap2/coap_dtls.h"
#include "coap2/coap_event.h"
#include "coap2/coap_io.h"
#include "coap2/coap_time.h"
#include "coap2/coap_debug.h"
#include "coap2/encode.h"
#include "coap2/mem.h"
#include "coap2/net.h"
#include "coap2/option.h"
#include "coap2/pdu.h"
#include "coap2/coap_prng.h"
#include "coap2/resource.h"
#include "coap2/str.h"
#include "coap2/subscribe.h"
#include "coap2/uri.h"
#ifdef __cplusplus
}
+1 -1
View File
@@ -17,7 +17,7 @@
#ifndef COAP_BLOCK_INTERNAL_H_
#define COAP_BLOCK_INTERNAL_H_
#include <resource.h>
#include "coap2/resource.h"
/**
* @defgroup block_internal Block (Internal)
-151
View File
@@ -1,151 +0,0 @@
/* coap_config.h. Generated from coap_config.h.in by cmake. */
#ifndef COAP_CONFIG_H_
#define COAP_CONFIG_H_
/* Define to 1 if you have <ws2tcpip.h> header file. */
#cmakedefine HAVE_WS2TCPIP_H "@HAVE_WS2TCPIP_H@"
/* Define if the system has small stack size */
#cmakedefine COAP_CONSTRAINED_STACK "@COAP_CONSTRAINED_STACK@"
/* Define to 1 if you have <winsock2.h> header file. */
#cmakedefine HAVE_WINSOCK2_H "@HAVE_WINSOCK2_H@"
/* Define if the system has epoll support */
#cmakedefine COAP_EPOLL_SUPPORT "@COAP_EPOLL_SUPPORT@"
/* Define to 1 if you have the <arpa/inet.h> header file. */
#cmakedefine HAVE_ARPA_INET_H "@HAVE_ARPA_INET_H@"
/* Define to 1 if you have the <assert.h> header file. */
#cmakedefine HAVE_ASSERT_H "@HAVE_ASSERT_H@"
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H "@HAVE_DLFCN_H@"
/* Define to 1 if you have the `getaddrinfo' function. */
#cmakedefine HAVE_GETADDRINFO "@HAVE_GETADDRINFO@"
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H "@HAVE_INTTYPES_H@"
/* Define if the system has openssl */
#cmakedefine HAVE_OPENSSL "@HAVE_OPENSSL@"
/* Define if the system has libgnutls28 */
#cmakedefine HAVE_LIBGNUTLS "@HAVE_LIBGNUTLS@"
/* Define if the system has libtinydtls */
#cmakedefine HAVE_LIBTINYDTLS "@HAVE_LIBTINYDTLS@"
/* Define if the system has libmbedtls */
#cmakedefine HAVE_MBEDTLS "@HAVE_MBEDTLS@"
/* Define to 1 to build without TCP support. */
#cmakedefine01 COAP_DISABLE_TCP
/* Define to 1 if you have the <limits.h> header file. */
#cmakedefine HAVE_LIMITS_H "@HAVE_LIMITS_H@"
/* Define to 1 if you have the `malloc' function. */
#cmakedefine HAVE_MALLOC "@HAVE_MALLOC@"
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H "@HAVE_MEMORY_H@"
/* Define to 1 if you have the `memset' function. */
#cmakedefine HAVE_MEMSET "@HAVE_MEMSET@"
/* Define to 1 if you have the <netdb.h> header file. */
#cmakedefine HAVE_NETDB_H "@HAVE_NETDB_H@"
/* Define to 1 if you have the <netinet/in.h> header file. */
#cmakedefine HAVE_NETINET_IN_H "@HAVE_NETINET_IN_H@"
/* Define to 1 if you have the <pthread.h> header file. */
#cmakedefine HAVE_PTHREAD_H "@HAVE_PTHREAD_H@"
/* Define to 1 if you have the `pthread_mutex_lock' function. */
#cmakedefine HAVE_PTHREAD_MUTEX_LOCK "@HAVE_PTHREAD_MUTEX_LOCK@"
/* Define to 1 if you have the `select' function. */
#cmakedefine HAVE_SELECT "@HAVE_SELECT@"
/* Define to 1 if you have the `socket' function. */
#cmakedefine HAVE_SOCKET "@HAVE_SOCKET@"
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H "@HAVE_STDINT_H@"
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H "@HAVE_STDLIB_H@"
/* Define to 1 if you have the `strcasecmp' function. */
#cmakedefine HAVE_STRCASECMP "@HAVE_STRCASECMP@"
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H "@HAVE_STRINGS_H@"
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H "@HAVE_STRING_H@"
/* Define to 1 if you have the `strnlen' function. */
#cmakedefine HAVE_STRNLEN "@HAVE_STRNLEN@"
/* Define to 1 if you have the `strrchr' function. */
#cmakedefine HAVE_STRRCHR "@HAVE_STRRCHR@"
/* Define to 1 if the system has the type `struct cmsghdr'. */
#cmakedefine HAVE_STRUCT_CMSGHDR "@HAVE_STRUCT_CMSGHDR@"
/* Define to 1 if you have the <syslog.h> header file. */
#cmakedefine HAVE_SYSLOG_H "@HAVE_SYSLOG_H@"
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#cmakedefine HAVE_SYS_IOCTL_H "@HAVE_SYS_IOCTL_H@"
/* Define to 1 if you have the <sys/socket.h> header file. */
#cmakedefine HAVE_SYS_SOCKET_H "@HAVE_SYS_SOCKET_H@"
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H "@HAVE_SYS_STAT_H@"
/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine HAVE_SYS_TIME_H "@HAVE_SYS_TIME_H@"
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H "@HAVE_SYS_TYPES_H@"
/* Define to 1 if you have the <sys/unistd.h> header file. */
#cmakedefine HAVE_SYS_UNISTD_H "@HAVE_SYS_UNISTD_H@"
/* Define to 1 if you have the <time.h> header file. */
#cmakedefine HAVE_TIME_H "@HAVE_TIME_H@"
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H "@HAVE_UNISTD_H@"
/* Define to the address where bug reports for this package should be sent. */
#cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
/* Define to the full name of this package. */
#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@"
/* Define to the full name and version of this package. */
#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
/* Define to the one symbol short name of this package. */
#cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@"
/* Define to the home page for this package. */
#cmakedefine PACKAGE_URL "@PACKAGE_URL@"
/* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@"
#if defined(_MSC_VER) && (_MSC_VER < 1900) && !defined(snprintf)
#define snprintf _snprintf
#endif
#endif /* COAP_CONFIG_H_ */
+1 -1
View File
@@ -153,7 +153,7 @@ void coap_log_impl(coap_log_t level, const char *format, ...);
} while(0)
#endif
#include "pdu.h"
#include "coap2/pdu.h"
/**
* Defines the output mode for the coap_show_pdu() function.
+2 -2
View File
@@ -11,8 +11,8 @@
#ifndef COAP_DTLS_H_
#define COAP_DTLS_H_
#include "coap_time.h"
#include "str.h"
#include "coap2/coap_time.h"
#include "coap2/str.h"
/**
* @defgroup dtls DTLS Support
+1 -1
View File
@@ -10,7 +10,7 @@
#ifndef COAP_EVENT_H_
#define COAP_EVENT_H_
#include "libcoap.h"
#include "coap2/libcoap.h"
/**
* @defgroup events Event API
+3 -3
View File
@@ -15,9 +15,9 @@
#ifndef COAP_HASHKEY_H_
#define COAP_HASHKEY_H_
#include "libcoap.h"
#include "uthash.h"
#include "str.h"
#include "coap2/libcoap.h"
#include "coap2/uthash.h"
#include "coap2/str.h"
typedef unsigned char coap_key_t[4];
+12 -12
View File
@@ -33,25 +33,25 @@
# include <assert.h>
#endif
#include "coap.h"
#include "coap2/coap.h"
/*
* Include all the header files that are for internal use only.
*/
/* Not defined in coap.h - internal usage .h files */
#include "utlist.h"
#include "uthash.h"
#include "coap_hashkey.h"
#include "coap_mutex.h"
#include "coap2/utlist.h"
#include "coap2/uthash.h"
#include "coap2/coap_hashkey.h"
#include "coap2/coap_mutex.h"
/* Specifically defined internal .h files */
#include "coap_asn1_internal.h"
#include "coap_block_internal.h"
#include "coap_cache_internal.h"
#include "coap_session_internal.h"
#include "coap_resource_internal.h"
#include "coap_subscribe_internal.h"
#include "coap_tcp_internal.h"
#include "coap2/coap_asn1_internal.h"
#include "coap2/coap_block_internal.h"
#include "coap2/coap_cache_internal.h"
#include "coap2/coap_session_internal.h"
#include "coap2/coap_resource_internal.h"
#include "coap2/coap_subscribe_internal.h"
#include "coap2/coap_tcp_internal.h"
#endif /* COAP_INTERNAL_H_ */
+1 -1
View File
@@ -12,7 +12,7 @@
#include <sys/types.h>
#include "address.h"
#include "coap2/address.h"
#ifdef RIOT_VERSION
#include "net/gnrc.h"
+6 -6
View File
@@ -15,12 +15,12 @@
#define COAP_SESSION_H_
#include "coap_forward_decls.h"
#include "coap_io.h"
#include "coap_time.h"
#include "pdu.h"
#include "uthash.h"
#include "coap_dtls.h"
#include "coap2/coap_forward_decls.h"
#include "coap2/coap_io.h"
#include "coap2/coap_time.h"
#include "coap2/pdu.h"
#include "coap2/uthash.h"
#include "coap2/coap_dtls.h"
/**
* Abstraction of a fixed point number that can be used where necessary instead
+1 -1
View File
@@ -15,7 +15,7 @@
#ifndef COAP_TCP_INTERNAL_H_
#define COAP_TCP_INTERNAL_H_
#include "coap_io.h"
#include "coap2/coap_io.h"
/**
* @defgroup tcp TCP Support (Internal)
+4 -4
View File
@@ -9,10 +9,10 @@
* include this or include something more generic which includes this), and
* MEMP_USE_CUSTOM_POOLS has to be set in lwipopts.h. */
#include "coap_internal.h"
#include <net.h>
#include <resource.h>
#include <subscribe.h>
#include "coap2/coap_internal.h"
#include <coap2/net.h>
#include <coap2/resource.h>
#include <coap2/subscribe.h>
#ifndef MEMP_NUM_COAPCONTEXT
#define MEMP_NUM_COAPCONTEXT 1
+7 -7
View File
@@ -20,13 +20,13 @@
#define COAP_RESOURCE_CHECK_TIME 2
#endif /* COAP_RESOURCE_CHECK_TIME */
#include "uthash.h"
#include "async.h"
#include "block.h"
#include "str.h"
#include "pdu.h"
#include "net.h"
#include "subscribe.h"
#include "coap2/uthash.h"
#include "coap2/async.h"
#include "coap2/block.h"
#include "coap2/str.h"
#include "coap2/pdu.h"
#include "coap2/net.h"
#include "coap2/subscribe.h"
/**
* @defgroup coap_resource Resource Configuraton