Soletta™ Framework
|
structure defining the type of a resource. More...
#include <sol-oic-server.h>
Data Fields | |
uint16_t | api_version |
API version. More... | |
struct { | |
int(* handle )(void *data, struct sol_oic_request *request) | |
} | del |
Callback handle to DELETE requests. More... | |
struct { | |
int(* handle )(void *data, struct sol_oic_request *request) | |
} | get |
Callback handle to GET requests. More... | |
struct sol_str_slice | interface |
String representation of the interface implemeneted by this resource. More... | |
struct sol_str_slice | path |
String representation of the path of this resource. More... | |
struct { | |
int(* handle )(void *data, struct sol_oic_request *request) | |
} | post |
Callback handle to POST requests. More... | |
struct { | |
int(* handle )(void *data, struct sol_oic_request *request) | |
} | put |
Callback handle to PUT requests. More... | |
struct sol_str_slice | resource_type |
String representation of the resource type. More... | |
structure defining the type of a resource.
uint16_t sol_oic_resource_type::api_version |
API version.
Referenced by register_light_resource_type().
struct { ... } sol_oic_resource_type::del |
Callback handle to DELETE requests.
data | The user's data pointer. |
request | Information about this request. Use sol_oic_server_request_get_reader() to get the request data reader, sol_oic_server_response_new() to create a response and sol_oic_server_send_response() to reply this request with the response created. |
0
on success or a negative number on errors.struct { ... } sol_oic_resource_type::get |
Callback handle to GET requests.
data | The user's data pointer. |
request | Information about this request. Use sol_oic_server_request_get_reader() to get the request data reader, sol_oic_server_response_new() to create a response and sol_oic_server_send_response() to reply this request with the response created. |
0
on success or a negative number on errors.int(* sol_oic_resource_type::handle)(void *data, struct sol_oic_request *request) |
struct sol_str_slice sol_oic_resource_type::interface |
String representation of the interface implemeneted by this resource.
struct sol_str_slice sol_oic_resource_type::path |
String representation of the path of this resource.
If path.data == NULL or path.len == 0, a path will be generated automatically for this resource.
struct { ... } sol_oic_resource_type::post |
Callback handle to POST requests.
data | The user's data pointer. |
request | Information about this request. Use sol_oic_server_request_get_reader() to get the request data reader, sol_oic_server_response_new() to create a response and sol_oic_server_send_response() to reply this request with the response created. |
0
on success or a negative number on errors.struct { ... } sol_oic_resource_type::put |
Callback handle to PUT requests.
data | The user's data pointer. |
request | Information about this request. Use sol_oic_server_request_get_reader() to get the request data reader, sol_oic_server_response_new() to create a response and sol_oic_server_send_response() to reply this request with the response created. |
0
on success or a negative number on errors.struct sol_str_slice sol_oic_resource_type::resource_type |
String representation of the resource type.
The string may have namespace segments, separated by a dot ('.').