diff --git a/core/internals.h b/core/internals.h index 7617bca..f0ea7c2 100644 --- a/core/internals.h +++ b/core/internals.h @@ -70,6 +70,7 @@ #include "observe.h" #include "registration.h" #include "reporting.h" +#include "uri.h" #include "utils.h" #if LWM2M_LOG_LEVEL != LWM2M_LOG_DISABLED @@ -377,15 +378,6 @@ typedef struct } bs_data_t; #endif -typedef enum { - LWM2M_REQUEST_TYPE_UNKNOWN, - LWM2M_REQUEST_TYPE_DM, - LWM2M_REQUEST_TYPE_REGISTRATION, - LWM2M_REQUEST_TYPE_BOOTSTRAP, - LWM2M_REQUEST_TYPE_DELETE_ALL, - LWM2M_REQUEST_TYPE_SEND, -} lwm2m_request_type_t; - #ifdef LWM2M_SUPPORT_SENML_CBOR typedef enum { CBOR_TYPE_UNKNOWN, @@ -412,10 +404,6 @@ typedef struct { typedef bool (*senml_convertValue)(const senml_record_t *recordP, lwm2m_data_t *targetP); #endif -// defined in uri.c -lwm2m_request_type_t uri_decode(char * altPath, multi_option_t *uriPath, uint8_t code, lwm2m_uri_t *uriP); -int uri_getNumber(uint8_t * uriString, size_t uriLength); - // defined in transaction.c lwm2m_transaction_t * transaction_new(void * sessionH, coap_method_t method, char * altPath, lwm2m_uri_t * uriP, uint16_t mID, uint8_t token_len, uint8_t* token); int transaction_send(lwm2m_context_t * contextP, lwm2m_transaction_t * transacP); diff --git a/core/uri.h b/core/uri.h new file mode 100644 index 0000000..9b2a1e5 --- /dev/null +++ b/core/uri.h @@ -0,0 +1,34 @@ +/******************************************************************************* + * + * Copyright (c) 2024 GARDENA GmbH + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * and Eclipse Distribution License v1.0 which accompany this distribution. + * + * The Eclipse Public License is available at + * http://www.eclipse.org/legal/epl-v20.html + * The Eclipse Distribution License is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * Contributors: + * Lukas Woodtli, GARDENA GmbH - Please refer to git log + * + *******************************************************************************/ +#ifndef WAKAAMA_URI_H +#define WAKAAMA_URI_H +#include "internals.h" + +typedef enum { + LWM2M_REQUEST_TYPE_UNKNOWN, + LWM2M_REQUEST_TYPE_DM, + LWM2M_REQUEST_TYPE_REGISTRATION, + LWM2M_REQUEST_TYPE_BOOTSTRAP, + LWM2M_REQUEST_TYPE_DELETE_ALL, + LWM2M_REQUEST_TYPE_SEND, +} lwm2m_request_type_t; + +lwm2m_request_type_t uri_decode(char *altPath, multi_option_t *uriPath, uint8_t code, lwm2m_uri_t *uriP); +int uri_getNumber(uint8_t *uriString, size_t uriLength); + +#endif /* WAKAAMA_URI_H */