Teonet library
0.4.7
|
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | teo_db_data |
Teo DB binary network structure. More... | |
struct | teo_db_data_range |
CMD_D_GET_LIST_RANGE extended Data structure. More... | |
Typedefs | |
typedef struct teo_db_data_range | teo_db_data_range |
CMD_D_GET_LIST_RANGE extended Data structure. More... | |
Enumerations | |
enum | CMD_D { CMD_D_SET = 129, CMD_D_GET, CMD_D_LIST, CMD_D_GET_ANSWER, CMD_D_LIST_ANSWER, CMD_D_LIST_LENGTH, CMD_D_LIST_LENGTH_ANSWER, CMD_D_LIST_RANGE, CMD_D_LIST_RANGE_ANSWER, CMD_D_ERROR_ANSWER, CMD_R_NONE } |
Teonet database API commands. More... | |
Functions | |
teo_db_data * | prepare_request_data (const void *key, size_t key_len, const void *data, size_t data_len, uint32_t id, size_t *tdd_len) |
Prepare teonet db data. More... | |
Created on February 15, 2016, 3:43 PM
Created on February 15, 2016, 2:44 AM
typedef struct teo_db_data_range teo_db_data_range |
CMD_D_GET_LIST_RANGE extended Data structure.
enum CMD_D |
Teonet database API commands.
teo_db_data* prepare_request_data | ( | const void * | key, |
size_t | key_len, | ||
const void * | data, | ||
size_t | data_len, | ||
uint32_t | id, | ||
size_t * | tdd_len | ||
) |
Prepare teonet db data.
key | Key |
key_len | Key length |
data | Pointer to value |
data_len | Value length |
id | Request ID |
tdd_len | Pointer to variable to hold result packet length |
References teo_db_data::data_length, teo_db_data::id, teo_db_data::key_data, teo_db_data::key_length, and malloc().
Referenced by event_cb(), get_cb(), and teo::Teonet::TeoDB::prepareRequest().