Move declaration for 'reporting' into own header

This is more C like and leads to a better modularized project.
This commit is contained in:
Lukas Woodtli 2024-08-12 15:01:40 +02:00 committed by Lukas Woodtli
parent 5ec7c099ae
commit e59c2ce0b3
2 changed files with 26 additions and 5 deletions

View File

@ -63,6 +63,7 @@
#include <stdbool.h>
#include "er-coap-13/er-coap-13.h"
#include "reporting.h"
#if LWM2M_LOG_LEVEL != LWM2M_LOG_DISABLED
#include <inttypes.h>
@ -600,9 +601,4 @@ lwm2m_server_t * utils_findBootstrapServer(lwm2m_context_t * contextP, void * fr
lwm2m_client_t * utils_findClient(lwm2m_context_t * contextP, void * fromSessionH);
#endif
// defined in reporting.c
#if defined(LWM2M_SERVER_MODE) && !defined(LWM2M_VERSION_1_0)
uint8_t reporting_handleSend(lwm2m_context_t *contextP, void *fromSessionH, coap_packet_t *message);
#endif
#endif

25
core/reporting.h Normal file
View File

@ -0,0 +1,25 @@
/*******************************************************************************
*
* 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_REPORTING_H
#define WAKAAMA_REPORTING_H
#if defined(LWM2M_SERVER_MODE) && !defined(LWM2M_VERSION_1_0)
uint8_t reporting_handleSend(lwm2m_context_t *contextP, void *fromSessionH, coap_packet_t *message);
#endif
#endif /* WAKAAMA_REPORTING_H */