17#ifndef COAP_RESOURCE_INTERNAL_H_
18#define COAP_RESOURCE_INTERNAL_H_
21#include "coap_uthash_internal.h"
27#if COAP_SERVER_SUPPORT
39#ifndef COAP_RESOURCE_MAX_SUBSCRIBER
40#define COAP_RESOURCE_MAX_SUBSCRIBER 0
59 unsigned int partiallydirty:1;
61 unsigned int observable:1;
62 unsigned int cacheable:1;
63 unsigned int is_unknown:1;
64 unsigned int is_proxy_uri:1;
65 unsigned int is_reverse_proxy:1;
66 unsigned int list_being_traversed:1;
67 unsigned int is_dynamic:1;
107 size_t proxy_name_count;
125typedef enum coap_deleting_resource_t {
126 COAP_DELETING_RESOURCE,
127 COAP_NOT_DELETING_RESOURCE,
128 COAP_DELETING_RESOURCE_ON_EXIT
129} coap_deleting_resource_t;
167 return coap_delete_resource_lkd(resource);
187#define RESOURCES_ADD(r, obj) \
188 HASH_ADD(hh, (r), uri_path->s[0], (obj)->uri_path->length, (obj))
190#define RESOURCES_DELETE(r, obj) \
191 HASH_DELETE(hh, (r), (obj))
193#define RESOURCES_ITER(r,tmp) \
194 coap_resource_t *tmp, *rtmp; \
195 HASH_ITER(hh, (r), tmp, rtmp)
197#define RESOURCE_ITER_SAFE(e, el, rtmp) \
198 for ((el) = (e); (el) && ((rtmp) = (el)->hh.next, 1); (el) = (rtmp))
200#define RESOURCES_FIND(r, k, res) { \
201 HASH_FIND(hh, (r), (k)->s, (k)->length, (res)); \
struct coap_attr_t coap_attr_t
struct coap_subscription_t coap_subscription_t
struct coap_resource_t coap_resource_t
CoAP mapping of locking functions.
void(* coap_method_handler_t)(coap_resource_t *resource, coap_session_t *session, const coap_pdu_t *request, const coap_string_t *query, coap_pdu_t *response)
Definition of message handler function.
uint32_t coap_print_status_t
Status word to encode the result of conditional print or copy operations such as coap_print_link().
#define COAP_STATIC_INLINE
The CoAP stack's global state is stored in a coap_context_t object.
CoAP string data definition with const data.
CoAP string data definition.