Contiki 3.x
|
An abstraction layer for RESTful Web services (Erbium).More...
Go to the source code of this file.
Functions | |
void | rest_init_engine (void) |
Initializes REST framework and starts the HTTP or CoAP process. More... | |
void | rest_activate_resource (resource_t *resource, char *path) |
Resources wanted to be accessible should be activated with the following code. More... | |
list_t | rest_get_resources (void) |
Returns the list of registered RESTful resources. More... | |
An abstraction layer for RESTful Web services (Erbium).
Inspired by RESTful Contiki by Dogan Yazar.
Definition in file rest-engine.h.
void rest_activate_resource | ( | resource_t * | resource, |
char * | path | ||
) |
Resources wanted to be accessible should be activated with the following code.
resource | A RESTful resource defined through the RESOURCE macros. |
path | The local URI path where to provide the resource. |
Resources wanted to be accessible should be activated with the following code.
resource | A pointer to a resource implementation |
path | The URI path string for this resource |
The resource implementation must be imported first using the extern keyword. The build system takes care of compiling every *.c file in the ./resources/ sub-directory (see example Makefile).
Definition at line 94 of file rest-engine.c.
References list_add().
list_t rest_get_resources | ( | void | ) |
void rest_init_engine | ( | void | ) |
Initializes REST framework and starts the HTTP or CoAP process.
Initializes REST framework and starts the HTTP or CoAP process.
This function must be called by server processes before any resources are registered through rest_activate_resource().
Definition at line 71 of file rest-engine.c.
References list_init(), NULL, and process_start().