From dbe2c0d59ebc4b1239cb5f07383069d805437baf Mon Sep 17 00:00:00 2001 From: Christopher Friedt Date: Tue, 11 Oct 2022 18:53:39 -0400 Subject: [PATCH] include: net: http: rename http_x.h http/x.h Some minor housekeeping prior to adding an http server implementation. There are already a number of http headers and that number will likely increase with subsequent work. Moving them into a common directory cleans up the `include/net` directory a bit. Signed-off-by: Christopher Friedt --- include/zephyr/net/{http_client.h => http/client.h} | 2 +- include/zephyr/net/{http_parser.h => http/parser.h} | 4 ++-- .../zephyr/net/{http_parser_state.h => http/parser_state.h} | 0 include/zephyr/net/{http_parser_url.h => http/parser_url.h} | 2 +- include/zephyr/net/websocket.h | 4 ++-- samples/net/cloud/tagoio_http_post/src/main.c | 2 +- samples/net/cloud/tagoio_http_post/src/sockets.c | 2 +- samples/net/sockets/http_client/src/main.c | 2 +- subsys/mgmt/hawkbit/hawkbit.c | 2 +- subsys/net/lib/http/http_client.c | 2 +- subsys/net/lib/http/http_parser.c | 2 +- subsys/net/lib/http/http_parser_url.c | 2 +- subsys/net/lib/lwm2m/lwm2m_engine.c | 2 +- subsys/net/lib/lwm2m/lwm2m_message_handling.c | 2 +- subsys/net/lib/lwm2m/lwm2m_observation.c | 2 +- subsys/net/lib/lwm2m/lwm2m_pull_context.c | 2 +- subsys/net/lib/websocket/websocket.c | 2 +- tests/net/lib/http_header_fields/src/main.c | 2 +- 18 files changed, 19 insertions(+), 19 deletions(-) rename include/zephyr/net/{http_client.h => http/client.h} (99%) rename include/zephyr/net/{http_parser.h => http/parser.h} (99%) rename include/zephyr/net/{http_parser_state.h => http/parser_state.h} (100%) rename include/zephyr/net/{http_parser_url.h => http/parser_url.h} (98%) diff --git a/include/zephyr/net/http_client.h b/include/zephyr/net/http/client.h similarity index 99% rename from include/zephyr/net/http_client.h rename to include/zephyr/net/http/client.h index f00895e7331..22ea242a517 100644 --- a/include/zephyr/net/http_client.h +++ b/include/zephyr/net/http/client.h @@ -22,7 +22,7 @@ #include #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/zephyr/net/http_parser.h b/include/zephyr/net/http/parser.h similarity index 99% rename from include/zephyr/net/http_parser.h rename to include/zephyr/net/http/parser.h index 3604e18bafc..38006f5e985 100644 --- a/include/zephyr/net/http_parser.h +++ b/include/zephyr/net/http/parser.h @@ -46,8 +46,8 @@ typedef unsigned __int64 uint64_t; #include #endif #include -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/zephyr/net/http_parser_state.h b/include/zephyr/net/http/parser_state.h similarity index 100% rename from include/zephyr/net/http_parser_state.h rename to include/zephyr/net/http/parser_state.h diff --git a/include/zephyr/net/http_parser_url.h b/include/zephyr/net/http/parser_url.h similarity index 98% rename from include/zephyr/net/http_parser_url.h rename to include/zephyr/net/http/parser_url.h index cba9ddc4462..e795e18ab3a 100644 --- a/include/zephyr/net/http_parser_url.h +++ b/include/zephyr/net/http/parser_url.h @@ -26,7 +26,7 @@ #include #include #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/zephyr/net/websocket.h b/include/zephyr/net/websocket.h index ee45dcdce49..5d0301c0316 100644 --- a/include/zephyr/net/websocket.h +++ b/include/zephyr/net/websocket.h @@ -16,8 +16,8 @@ #include #include -#include -#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/samples/net/cloud/tagoio_http_post/src/main.c b/samples/net/cloud/tagoio_http_post/src/main.c index b24d91d45c6..9c0b1ce3572 100644 --- a/samples/net/cloud/tagoio_http_post/src/main.c +++ b/samples/net/cloud/tagoio_http_post/src/main.c @@ -9,7 +9,7 @@ LOG_MODULE_REGISTER(tagoio_http_post, CONFIG_TAGOIO_HTTP_POST_LOG_LEVEL); #include #include -#include +#include #include #include diff --git a/samples/net/cloud/tagoio_http_post/src/sockets.c b/samples/net/cloud/tagoio_http_post/src/sockets.c index adbfe2251e5..b7b278c0331 100644 --- a/samples/net/cloud/tagoio_http_post/src/sockets.c +++ b/samples/net/cloud/tagoio_http_post/src/sockets.c @@ -12,7 +12,7 @@ LOG_MODULE_DECLARE(tagoio_http_post, CONFIG_TAGOIO_HTTP_POST_LOG_LEVEL); #include #include #include -#include +#include #include "sockets.h" diff --git a/samples/net/sockets/http_client/src/main.c b/samples/net/sockets/http_client/src/main.c index 28934c0c367..43a7c3798dc 100644 --- a/samples/net/sockets/http_client/src/main.c +++ b/samples/net/sockets/http_client/src/main.c @@ -10,7 +10,7 @@ LOG_MODULE_REGISTER(net_http_client_sample, LOG_LEVEL_DBG); #include #include #include -#include +#include #include "ca_certificate.h" diff --git a/subsys/mgmt/hawkbit/hawkbit.c b/subsys/mgmt/hawkbit/hawkbit.c index 2ea2f3cbff9..a4b1a8d4548 100644 --- a/subsys/mgmt/hawkbit/hawkbit.c +++ b/subsys/mgmt/hawkbit/hawkbit.c @@ -23,7 +23,7 @@ LOG_MODULE_REGISTER(hawkbit, CONFIG_HAWKBIT_LOG_LEVEL); #include #include #include -#include +#include #include #include #include diff --git a/subsys/net/lib/http/http_client.c b/subsys/net/lib/http/http_client.c index 64954d1146a..160250a47e4 100644 --- a/subsys/net/lib/http/http_client.c +++ b/subsys/net/lib/http/http_client.c @@ -22,7 +22,7 @@ LOG_MODULE_REGISTER(net_http, CONFIG_NET_HTTP_LOG_LEVEL); #include #include -#include +#include #include "net_private.h" diff --git a/subsys/net/lib/http/http_parser.c b/subsys/net/lib/http/http_parser.c index 8626b101cda..7622a2556ef 100644 --- a/subsys/net/lib/http/http_parser.c +++ b/subsys/net/lib/http/http_parser.c @@ -23,7 +23,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ -#include +#include #include #include #include diff --git a/subsys/net/lib/http/http_parser_url.c b/subsys/net/lib/http/http_parser_url.c index 84a41540eba..a03c209b95b 100644 --- a/subsys/net/lib/http/http_parser_url.c +++ b/subsys/net/lib/http/http_parser_url.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #ifndef BIT_AT diff --git a/subsys/net/lib/lwm2m/lwm2m_engine.c b/subsys/net/lib/lwm2m/lwm2m_engine.c index 18eaa975655..6ad1423dc66 100644 --- a/subsys/net/lib/lwm2m/lwm2m_engine.c +++ b/subsys/net/lib/lwm2m/lwm2m_engine.c @@ -26,7 +26,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include #include -#include +#include #include #include #include diff --git a/subsys/net/lib/lwm2m/lwm2m_message_handling.c b/subsys/net/lib/lwm2m/lwm2m_message_handling.c index 4ff774835b8..3033235634c 100644 --- a/subsys/net/lib/lwm2m/lwm2m_message_handling.c +++ b/subsys/net/lib/lwm2m/lwm2m_message_handling.c @@ -26,7 +26,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include #include -#include +#include #include #include #include diff --git a/subsys/net/lib/lwm2m/lwm2m_observation.c b/subsys/net/lib/lwm2m/lwm2m_observation.c index 171d705b3ee..6157df17ae6 100644 --- a/subsys/net/lib/lwm2m/lwm2m_observation.c +++ b/subsys/net/lib/lwm2m/lwm2m_observation.c @@ -30,7 +30,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include #include -#include +#include #include #include #include diff --git a/subsys/net/lib/lwm2m/lwm2m_pull_context.c b/subsys/net/lib/lwm2m/lwm2m_pull_context.c index b0555327af0..e1eac08554f 100644 --- a/subsys/net/lib/lwm2m/lwm2m_pull_context.c +++ b/subsys/net/lib/lwm2m/lwm2m_pull_context.c @@ -15,7 +15,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include #include -#include +#include #include #include "lwm2m_pull_context.h" diff --git a/subsys/net/lib/websocket/websocket.c b/subsys/net/lib/websocket/websocket.c index 6c11fc2db55..2c7d5c0e253 100644 --- a/subsys/net/lib/websocket/websocket.c +++ b/subsys/net/lib/websocket/websocket.c @@ -28,7 +28,7 @@ LOG_MODULE_REGISTER(net_websocket, CONFIG_NET_WEBSOCKET_LOG_LEVEL); #else #include #endif -#include +#include #include #include diff --git a/tests/net/lib/http_header_fields/src/main.c b/tests/net/lib/http_header_fields/src/main.c index 02b9fd9b0d9..19b6320647c 100644 --- a/tests/net/lib/http_header_fields/src/main.c +++ b/tests/net/lib/http_header_fields/src/main.c @@ -19,7 +19,7 @@ * IN THE SOFTWARE. */ -#include +#include #include #include