mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-14 12:19:43 +03:00
Move coap_pdu_t to coap_pdu_internal.h. Move internal PDU based function definitions to coap_pdu_internal.h. Replace most references to "struct coap_pdu_t" with "coap_pdu_t". Create new enum coap_pdu_type_t, enum coap_pdu_code_t and coap_option_num_t, using them where appropriate for clarity of documentation. Provide new functions to allow applications to access/update parts of coap_pdu_t as appropriate and document as appropriate. Update examples to use these new access functions where appropriate.
106 lines
2.5 KiB
C
106 lines
2.5 KiB
C
/*
|
|
* coap_forward_decls.h -- Forward declarations of structures that are
|
|
* opaque to application programming that use libcoap.
|
|
*
|
|
* Copyright (C) 2019-2021 Jon Shallow <supjps-libcoap@jpshallow.com>
|
|
*
|
|
* This file is part of the CoAP library libcoap. Please see README for terms
|
|
* of use.
|
|
*/
|
|
|
|
/**
|
|
* @file coap_forward_decls.h
|
|
* @brief COAP forward definitions
|
|
*/
|
|
|
|
#ifndef COAP_FORWARD_DECLS_H_
|
|
#define COAP_FORWARD_DECLS_H_
|
|
|
|
/*
|
|
* Define the forward declations for the structures (even non-opaque)
|
|
* so that applications (using coap.h) as well as libcoap builds
|
|
* can reference them (and makes .h file dependencies a lot simpler).
|
|
*/
|
|
struct coap_address_t;
|
|
struct coap_bin_const_t;
|
|
struct coap_dtls_pki_t;
|
|
struct coap_str_const_t;
|
|
struct coap_string_t;
|
|
|
|
/*
|
|
* typedef all the opaque structures that are defined in coap_*_internal.h
|
|
*/
|
|
|
|
/* ************* coap_async_internal.h ***************** */
|
|
|
|
/**
|
|
* Async Entry information.
|
|
*/
|
|
typedef struct coap_async_t coap_async_t;
|
|
|
|
/* ************* coap_block_internal.h ***************** */
|
|
|
|
/*
|
|
* Block handling information.
|
|
*/
|
|
typedef struct coap_lg_xmit_t coap_lg_xmit_t;
|
|
typedef struct coap_lg_crcv_t coap_lg_crcv_t;
|
|
typedef struct coap_lg_srcv_t coap_lg_srcv_t;
|
|
|
|
/* ************* coap_cache_internal.h ***************** */
|
|
|
|
/*
|
|
* Cache Entry information.
|
|
*/
|
|
typedef struct coap_cache_entry_t coap_cache_entry_t;
|
|
typedef struct coap_cache_key_t coap_cache_key_t;
|
|
|
|
/* ************* coap_io_internal.h ***************** */
|
|
|
|
/**
|
|
* coap_socket_t and coap_packet_t information.
|
|
*/
|
|
typedef struct coap_packet_t coap_packet_t;
|
|
typedef struct coap_socket_t coap_socket_t;
|
|
|
|
/* ************* coap_net_internal.h ***************** */
|
|
|
|
/*
|
|
* Net information.
|
|
*/
|
|
typedef struct coap_context_t coap_context_t;
|
|
typedef struct coap_queue_t coap_queue_t;
|
|
|
|
/* ************* coap_pdu_internal.h ***************** */
|
|
|
|
/**
|
|
* PDU information.
|
|
*/
|
|
typedef struct coap_pdu_t coap_pdu_t;
|
|
|
|
/* ************* coap_resource_internal.h ***************** */
|
|
|
|
/*
|
|
* Resource information.
|
|
*/
|
|
typedef struct coap_attr_t coap_attr_t;
|
|
typedef struct coap_resource_t coap_resource_t;
|
|
|
|
/* ************* coap_session_internal.h ***************** */
|
|
|
|
/*
|
|
* Session information.
|
|
*/
|
|
typedef struct coap_addr_hash_t coap_addr_hash_t;
|
|
typedef struct coap_endpoint_t coap_endpoint_t;
|
|
typedef struct coap_session_t coap_session_t;
|
|
|
|
/* ************* coap_subscribe_internal.h ***************** */
|
|
|
|
/*
|
|
* Observe subscriber information.
|
|
*/
|
|
typedef struct coap_subscription_t coap_subscription_t;
|
|
|
|
#endif /* COAP_FORWARD_DECLS_H_ */
|