Lines Matching full:resource
2 * coap_resource.h -- generic resource handling
14 * @brief Generic resource handling
27 * @defgroup coap_resource Resource Configuraton
73 * This resource has support for multicast requests.
138 * Force all large traffic to this resource to be presented as a single body
144 * Define this resource as an OSCORE enabled access only.
149 * Creates a new resource object and initializes the link field to the string
157 * @param uri_path The string URI path of the new resource. The leading '/' is
158 * not normally required - e.g. just "full/path/for/resource".
178 * Creates a new resource object for the unknown resource handler with support
181 * In the same way that additional handlers can be added to the resource
183 * POST, GET, DELETE etc. handlers can be added to this resource. It is the
186 * DELETE handler specified for the resource removal) or by maintaining an
187 * active resource list.
189 * Note: There can only be one unknown resource handler per context - attaching
192 * Note: It is not possible to observe the unknown resource with a GET request
193 * - a separate resource needs to be created by the PUT (or POST)
194 * handler, and make that resource observable.
198 * @param put_handler The PUT handler to register with @p resource for
206 * Creates a new resource object for the unknown resource handler with support
209 * In the same way that additional handlers can be added to the resource
211 * POST, GET, DELETE etc. handlers can be added to this resource. It is the
214 * DELETE handler specified for the resource removal) or by maintaining an
215 * active resource list.
217 * Note: There can only be one unknown resource handler per context - attaching
220 * Note: It is not possible to observe the unknown resource with a GET request
221 * - a separate resource needs to be created by the PUT (or POST)
222 * handler, and make that resource observable.
226 * @param put_handler The PUT handler to register with @p resource for
237 * Creates a new resource object for handling proxy URIs.
240 * Note: There can only be one proxy resource handler per context - attaching
255 * Creates a new resource object for handling proxy URIs with configurable
259 * Note: There can only be one proxy resource handler per context - attaching
278 * Returns the resource identified by the unique string @p uri_path. If no
279 * resource was found, this function returns @c NULL.
281 * @param context The context to look for this resource.
282 * @param uri_path The unique string uri of the resource.
284 * @return A pointer to the resource or @c NULL if not found.
290 * Get the uri_path from a @p resource.
292 * @param resource The CoAP resource to check.
296 coap_str_const_t *coap_resource_get_uri_path(coap_resource_t *resource);
299 * Sets the notification message type of resource @p resource to given
302 * @param resource The resource to update.
306 void coap_resource_set_mode(coap_resource_t *resource, int mode);
312 * @param resource Resource to attach the data to
316 void coap_resource_set_userdata(coap_resource_t *resource, void *data);
322 * @param resource Resource to retrieve the user_data from
326 void *coap_resource_get_userdata(coap_resource_t *resource);
329 * Definition of release resource user_data callback function
334 * Defines the context wide callback to use to when the resource is deleted
335 * to release the data held in the resource's user_data.
338 * @param callback The callback to invoke when the resource is deleted or NULL
345 * Registers the given @p resource for @p context. The resource must have been
347 * storage allocated for the resource will be released by coap_delete_resource().
350 * @param resource The resource to store.
352 void coap_add_resource(coap_context_t *context, coap_resource_t *resource);
355 * Deletes a resource identified by @p resource. The storage allocated for that
356 * resource is freed, and removed from the context.
360 * @param resource The resource to delete.
362 * @return @c 1 if the resource was found (and destroyed),
365 int coap_delete_resource(coap_context_t *context, coap_resource_t *resource);
373 * @param resource The resource for which the handler shall be registered.
375 * @param handler The handler to register with @p resource.
377 void coap_register_handler(coap_resource_t *resource,
385 * @param resource The resource for which the handler shall be registered.
387 * @param handler The handler to register with @p resource.
389 void coap_register_request_handler(coap_resource_t *resource,
394 * Registers a new attribute with the given @p resource. As the
405 * @param resource The resource to register the attribute with.
423 coap_attr_t *coap_add_attr(coap_resource_t *resource,
429 * Returns @p resource's coap_attr_t object with given @p name if found, @c NULL
432 * @param resource The resource to search for attribute @p name.
437 coap_attr_t *coap_find_attr(coap_resource_t *resource,
466 * Writes a description of this resource in link-format to given text buffer. @p
471 * @param resource The resource to describe.
475 * @param offset The offset within the resource description where to
486 coap_print_status_t coap_print_link(const coap_resource_t *resource,
494 * Returns the resource identified by the unique string @p uri_path. If no
495 * resource was found, this function returns @c NULL.
497 * @param context The context to look for this resource.
498 * @param uri_path The unique string uri of the resource.
500 * @return A pointer to the resource or @c NULL if not found.