From 95efc52a7d48baa2563e7c2f03c5daadba374901 Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Wed, 8 Feb 2023 16:25:23 +0000 Subject: [PATCH] file prefix: Update more file names to have coap_ prefix --- CMakeLists.txt | 10 +++++----- Makefile.am | 10 +++++----- examples/lwip/Makefile | 4 ++-- examples/lwip/config/lwippools.h | 2 +- include/coap3/coap.h.in | 4 ++-- include/coap3/coap.h.windows | 4 ++-- include/coap3/coap.h.windows.in | 4 ++-- include/coap3/coap_async.h | 2 +- include/coap3/coap_async_internal.h | 2 +- include/coap3/{mem.h => coap_mem.h} | 4 ++-- include/coap3/{net.h => coap_net.h} | 4 ++-- include/coap3/resource.h | 2 +- src/{encode.c => coap_encode.c} | 4 ++-- src/{mem.c => coap_mem.c} | 4 ++-- src/{str.c => coap_str.c} | 5 ++--- win32/libcoap.vcxproj | 10 +++++----- win32/libcoap.vcxproj.filters | 22 +++++++++++----------- 17 files changed, 48 insertions(+), 49 deletions(-) rename include/coap3/{mem.h => coap_mem.h} (98%) rename include/coap3/{net.h => coap_net.h} (99%) rename src/{encode.c => coap_encode.c} (94%) rename src/{mem.c => coap_mem.c} (99%) rename src/{str.c => coap_str.c} (97%) diff --git a/CMakeLists.txt b/CMakeLists.txt index e2c498a2..6b781aca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -473,24 +473,24 @@ target_sources( ${CMAKE_CURRENT_LIST_DIR}/src/coap_async.c ${CMAKE_CURRENT_LIST_DIR}/src/coap_cache.c ${CMAKE_CURRENT_LIST_DIR}/src/coap_debug.c + ${CMAKE_CURRENT_LIST_DIR}/src/coap_encode.c ${CMAKE_CURRENT_LIST_DIR}/src/coap_event.c ${CMAKE_CURRENT_LIST_DIR}/src/coap_hashkey.c ${CMAKE_CURRENT_LIST_DIR}/src/coap_io.c + ${CMAKE_CURRENT_LIST_DIR}/src/coap_mem.c ${CMAKE_CURRENT_LIST_DIR}/src/coap_notls.c ${CMAKE_CURRENT_LIST_DIR}/src/coap_option.c ${CMAKE_CURRENT_LIST_DIR}/src/coap_oscore.c ${CMAKE_CURRENT_LIST_DIR}/src/coap_prng.c ${CMAKE_CURRENT_LIST_DIR}/src/coap_session.c + ${CMAKE_CURRENT_LIST_DIR}/src/coap_str.c ${CMAKE_CURRENT_LIST_DIR}/src/coap_subscribe.c ${CMAKE_CURRENT_LIST_DIR}/src/coap_tcp.c ${CMAKE_CURRENT_LIST_DIR}/src/coap_time.c ${CMAKE_CURRENT_LIST_DIR}/src/block.c - ${CMAKE_CURRENT_LIST_DIR}/src/encode.c - ${CMAKE_CURRENT_LIST_DIR}/src/mem.c ${CMAKE_CURRENT_LIST_DIR}/src/net.c ${CMAKE_CURRENT_LIST_DIR}/src/pdu.c ${CMAKE_CURRENT_LIST_DIR}/src/resource.c - ${CMAKE_CURRENT_LIST_DIR}/src/str.c ${CMAKE_CURRENT_LIST_DIR}/src/uri.c # no need to parse those files if we do not need them $<$:${CMAKE_CURRENT_LIST_DIR}/src/coap_openssl.c> @@ -515,8 +515,8 @@ target_sources( ${CMAKE_CURRENT_LIST_DIR}/include/coap${LIBCOAP_API_VERSION}/coap_encode.h ${CMAKE_CURRENT_LIST_DIR}/include/coap${LIBCOAP_API_VERSION}/coap_event.h ${CMAKE_CURRENT_LIST_DIR}/include/coap${LIBCOAP_API_VERSION}/coap_io.h - ${CMAKE_CURRENT_LIST_DIR}/include/coap${LIBCOAP_API_VERSION}/mem.h - ${CMAKE_CURRENT_LIST_DIR}/include/coap${LIBCOAP_API_VERSION}/net.h + ${CMAKE_CURRENT_LIST_DIR}/include/coap${LIBCOAP_API_VERSION}/coap_mem.h + ${CMAKE_CURRENT_LIST_DIR}/include/coap${LIBCOAP_API_VERSION}/coap_net.h ${CMAKE_CURRENT_LIST_DIR}/include/coap${LIBCOAP_API_VERSION}/coap_option.h ${CMAKE_CURRENT_LIST_DIR}/include/coap${LIBCOAP_API_VERSION}/pdu.h ${CMAKE_CURRENT_LIST_DIR}/include/coap${LIBCOAP_API_VERSION}/coap_prng.h diff --git a/Makefile.am b/Makefile.am index b0914deb..9bad0104 100644 --- a/Makefile.am +++ b/Makefile.am @@ -154,27 +154,27 @@ libcoap_@LIBCOAP_NAME_SUFFIX@_la_SOURCES = \ src/coap_async.c \ src/coap_cache.c \ src/coap_debug.c \ + src/coap_encode.c \ src/coap_event.c \ src/coap_hashkey.c \ src/coap_gnutls.c \ src/coap_io.c \ src/coap_mbedtls.c \ + src/coap_mem.c \ src/coap_notls.c \ src/coap_openssl.c \ src/coap_option.c \ src/coap_oscore.c \ src/coap_prng.c \ src/coap_session.c \ + src/coap_str.c \ src/coap_subscribe.c \ src/coap_tcp.c \ src/coap_time.c \ src/coap_tinydtls.c \ - src/encode.c \ - src/mem.c \ src/net.c \ src/pdu.c \ src/resource.c \ - src/str.c \ src/uri.c if HAVE_OSCORE @@ -206,8 +206,8 @@ libcoap_include_HEADERS = \ $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/coap_event.h \ $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/coap_forward_decls.h \ $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/coap_io.h \ - $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/mem.h \ - $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/net.h \ + $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/coap_mem.h \ + $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/coap_net.h \ $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/coap_option.h \ $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/coap_oscore.h \ $(top_srcdir)/include/coap$(LIBCOAP_API_VERSION)/pdu.h \ diff --git a/examples/lwip/Makefile b/examples/lwip/Makefile index 70ba84a4..cce6cc76 100644 --- a/examples/lwip/Makefile +++ b/examples/lwip/Makefile @@ -138,7 +138,7 @@ COAP_SRC = coap_address.c \ block.c \ coap_cache.c \ coap_debug.c \ - encode.c \ + coap_encode.c \ coap_hashkey.c \ coap_io.c \ coap_io_lwip.c \ @@ -151,7 +151,7 @@ COAP_SRC = coap_address.c \ coap_session.c \ coap_subscribe.c \ coap_tinydtls.c \ - str.c \ + coap_str.c \ coap_tcp.c \ uri.c diff --git a/examples/lwip/config/lwippools.h b/examples/lwip/config/lwippools.h index 54e348d1..9bb8874f 100644 --- a/examples/lwip/config/lwippools.h +++ b/examples/lwip/config/lwippools.h @@ -12,7 +12,7 @@ * MEMP_USE_CUSTOM_POOLS has to be set in lwipopts.h. */ #include "coap3/coap_internal.h" -#include "coap3/net.h" +#include "coap3/coap_net.h" #include "coap3/resource.h" #include "coap3/coap_subscribe.h" #ifdef HAVE_LIBTINYDTLS diff --git a/include/coap3/coap.h.in b/include/coap3/coap.h.in index dd18d5c2..b4b72957 100644 --- a/include/coap3/coap.h.in +++ b/include/coap3/coap.h.in @@ -52,8 +52,8 @@ extern "C" { #include "coap@LIBCOAP_API_VERSION@/coap_encode.h" #include "coap@LIBCOAP_API_VERSION@/coap_event.h" #include "coap@LIBCOAP_API_VERSION@/coap_io.h" -#include "coap@LIBCOAP_API_VERSION@/mem.h" -#include "coap@LIBCOAP_API_VERSION@/net.h" +#include "coap@LIBCOAP_API_VERSION@/coap_mem.h" +#include "coap@LIBCOAP_API_VERSION@/coap_net.h" #include "coap@LIBCOAP_API_VERSION@/coap_option.h" #include "coap@LIBCOAP_API_VERSION@/coap_oscore.h" #include "coap@LIBCOAP_API_VERSION@/pdu.h" diff --git a/include/coap3/coap.h.windows b/include/coap3/coap.h.windows index 58eff8c2..545b7537 100644 --- a/include/coap3/coap.h.windows +++ b/include/coap3/coap.h.windows @@ -47,8 +47,8 @@ extern "C" { #include "coap3/coap_encode.h" #include "coap3/coap_event.h" #include "coap3/coap_io.h" -#include "coap3/mem.h" -#include "coap3/net.h" +#include "coap3/coap_mem.h" +#include "coap3/coap_net.h" #include "coap3/coap_option.h" #include "coap3/coap_oscore.h" #include "coap3/pdu.h" diff --git a/include/coap3/coap.h.windows.in b/include/coap3/coap.h.windows.in index 61bb4e11..115be2f4 100644 --- a/include/coap3/coap.h.windows.in +++ b/include/coap3/coap.h.windows.in @@ -47,8 +47,8 @@ extern "C" { #include "coap@LIBCOAP_API_VERSION@/coap_encode.h" #include "coap@LIBCOAP_API_VERSION@/coap_event.h" #include "coap@LIBCOAP_API_VERSION@/coap_io.h" -#include "coap@LIBCOAP_API_VERSION@/mem.h" -#include "coap@LIBCOAP_API_VERSION@/net.h" +#include "coap@LIBCOAP_API_VERSION@/coap_mem.h" +#include "coap@LIBCOAP_API_VERSION@/coap_net.h" #include "coap@LIBCOAP_API_VERSION@/coap_option.h" #include "coap@LIBCOAP_API_VERSION@/coap_oscore.h" #include "coap@LIBCOAP_API_VERSION@/pdu.h" diff --git a/include/coap3/coap_async.h b/include/coap3/coap_async.h index d88b46dd..f3af6c01 100644 --- a/include/coap3/coap_async.h +++ b/include/coap3/coap_async.h @@ -17,7 +17,7 @@ #ifndef COAP_ASYNC_H_ #define COAP_ASYNC_H_ -#include "net.h" +#include "coap_net.h" /** * @ingroup application_api diff --git a/include/coap3/coap_async_internal.h b/include/coap3/coap_async_internal.h index 23740c75..e92fe1f4 100644 --- a/include/coap3/coap_async_internal.h +++ b/include/coap3/coap_async_internal.h @@ -18,7 +18,7 @@ #define COAP_ASYNC_INTERNAL_H_ #include "coap_internal.h" -#include "net.h" +#include "coap_net.h" /* Note that if COAP_SERVER_SUPPORT is not set, then WITHOUT_ASYNC undefined */ #ifndef WITHOUT_ASYNC diff --git a/include/coap3/mem.h b/include/coap3/coap_mem.h similarity index 98% rename from include/coap3/mem.h rename to include/coap3/coap_mem.h index ff2bc7be..908abd02 100644 --- a/include/coap3/mem.h +++ b/include/coap3/coap_mem.h @@ -1,5 +1,5 @@ /* - * mem.h -- CoAP memory handling + * coap_mem.h -- CoAP memory handling * * Copyright (C) 2010-2011,2014-2015 Olaf Bergmann * @@ -10,7 +10,7 @@ */ /** - * @file mem.h + * @file coap_mem.h * @brief CoAP memory handling */ diff --git a/include/coap3/net.h b/include/coap3/coap_net.h similarity index 99% rename from include/coap3/net.h rename to include/coap3/coap_net.h index 66d0c670..be6de1a1 100644 --- a/include/coap3/net.h +++ b/include/coap3/coap_net.h @@ -1,5 +1,5 @@ /* - * net.h -- CoAP context interface + * coap_net.h -- CoAP context interface * * Copyright (C) 2010-2023 Olaf Bergmann * @@ -10,7 +10,7 @@ */ /** - * @file net.h + * @file coap_net.h * @brief CoAP context interface */ diff --git a/include/coap3/resource.h b/include/coap3/resource.h index e0f66233..5081a1e7 100644 --- a/include/coap3/resource.h +++ b/include/coap3/resource.h @@ -26,7 +26,7 @@ #include "block.h" #include "coap_str.h" #include "pdu.h" -#include "net.h" +#include "coap_net.h" #include "coap_subscribe.h" /** diff --git a/src/encode.c b/src/coap_encode.c similarity index 94% rename from src/encode.c rename to src/coap_encode.c index cff9f674..f32931db 100644 --- a/src/encode.c +++ b/src/coap_encode.c @@ -1,4 +1,4 @@ -/* encode.c -- encoding and decoding of CoAP data types +/* coap_encode.c -- encoding and decoding of CoAP data types * * Copyright (C) 2010,2011 Olaf Bergmann * @@ -9,7 +9,7 @@ */ /** - * @file encode.c + * @file coap_encode.c * @brief Encoding and decoding Coap data types functions */ diff --git a/src/mem.c b/src/coap_mem.c similarity index 99% rename from src/mem.c rename to src/coap_mem.c index 46b9d6dd..9d5a2295 100644 --- a/src/mem.c +++ b/src/coap_mem.c @@ -1,4 +1,4 @@ -/* mem.c -- CoAP memory handling +/* coap_mem.c -- CoAP memory handling * * Copyright (C) 2014--2015,2019--2023 Olaf Bergmann * @@ -9,7 +9,7 @@ */ /** - * @file mem.c + * @file coap_mem.c * @brief Memory handling functions */ diff --git a/src/str.c b/src/coap_str.c similarity index 97% rename from src/str.c rename to src/coap_str.c index 15fa3f75..de29a511 100644 --- a/src/str.c +++ b/src/coap_str.c @@ -1,4 +1,4 @@ -/* str.c -- strings to be used in the CoAP library +/* coap_str.c -- strings to be used in the CoAP library * * Copyright (C) 2010,2011,2022-2023 Olaf Bergmann * @@ -9,7 +9,7 @@ */ /** - * @file str.c + * @file coap_str.c * @brief String handling functions */ @@ -111,4 +111,3 @@ coap_bin_const_t *coap_new_bin_const(const uint8_t *data, size_t size) { void coap_delete_bin_const(coap_bin_const_t *s) { coap_free_type(COAP_STRING, s); } - diff --git a/win32/libcoap.vcxproj b/win32/libcoap.vcxproj index 69252cca..828fff0f 100644 --- a/win32/libcoap.vcxproj +++ b/win32/libcoap.vcxproj @@ -44,27 +44,27 @@ + + + - - - @@ -91,8 +91,8 @@ - - + + diff --git a/win32/libcoap.vcxproj.filters b/win32/libcoap.vcxproj.filters index ae55b127..63ba7d29 100644 --- a/win32/libcoap.vcxproj.filters +++ b/win32/libcoap.vcxproj.filters @@ -30,6 +30,9 @@ Source Files + + Source Files + Source Files @@ -45,6 +48,9 @@ Source Files + + Source Files + Source Files @@ -60,6 +66,9 @@ Source Files + + Source Files + Source Files @@ -72,12 +81,6 @@ Source Files - - Source Files - - - Source Files - Source Files @@ -87,9 +90,6 @@ Source Files - - Source Files - Source Files @@ -164,13 +164,13 @@ Header Files - + Header Files Header Files - + Header Files