libcoap  4.3.0rc2
subscribe.h
Go to the documentation of this file.
1 /*
2  * subscribe.h -- subscription handling for CoAP
3  * see RFC7641
4  *
5  * Copyright (C) 2010-2012,2014-2021 Olaf Bergmann <bergmann@tzi.org>
6  *
7  * This file is part of the CoAP library libcoap. Please see README for terms
8  * of use.
9  */
10 
16 #ifndef COAP_SUBSCRIBE_H_
17 #define COAP_SUBSCRIBE_H_
18 
30 #define COAP_OBSERVE_ESTABLISH 0
31 
37 #define COAP_OBSERVE_CANCEL 1
38 
49 void coap_resource_set_get_observable(coap_resource_t *resource, int mode);
50 
60 int
62  const coap_string_t *query);
63 
66 #endif /* COAP_SUBSCRIBE_H_ */
int coap_resource_notify_observers(coap_resource_t *resource, const coap_string_t *query)
Initiate the sending of an Observe packet for all observers of resource, optionally matching query if...
Definition: resource.c:960
void coap_resource_set_get_observable(coap_resource_t *resource, int mode)
Set whether a resource is observable.
Definition: resource.c:1034
Abstraction of resource that can be attached to coap_context_t.
CoAP string data definition.
Definition: str.h:30