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 and starts the REST Engine process. More... | |
void | rest_activate_resource (resource_t *resource, char *path) |
Makes a resource available under the given URI path. 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.c.
void rest_activate_resource | ( | resource_t * | resource, |
char * | path | ||
) |
Makes a resource available under the given URI path.
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 | ) |
Returns the list of registered RESTful resources.
Definition at line 113 of file rest-engine.c.
void rest_init_engine | ( | void | ) |
Initializes and starts the REST Engine 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().