|
int32_t | ds_add_record_char (ds_data_t *data, const char *field, char value) |
| Add a character value to a record object. More...
|
|
int32_t | ds_add_record_float (ds_data_t *data, const char *field, double value) |
| Add a floating point value to a record object. More...
|
|
int32_t | ds_add_record_fmt (ds_data_t *data, const char *field, const char *fmt,...) |
| Add a formatted string to a record object. More...
|
|
int32_t | ds_add_record_int (ds_data_t *data, const char *field, int value) |
| Add an integer value to a record object. More...
|
|
int32_t | ds_add_record_str (ds_data_t *data, const char *field, const char *value) |
| Add a string value to a record object. More...
|
|
Fields may be added to record data objects using the field name as opposed to the field identifier number.
- See also
- Data Object Flags
-
Creating Data Objects
Example: Create a record update and send to subscribed peers
int32_t ds_add_record_char |
( |
ds_data_t * |
data, |
|
|
const char * |
field, |
|
|
char |
value |
|
) |
| |
Add a character value to a record object.
- Parameters
-
data | The record object |
field | The fieldname |
value | Character value for this field |
- See also
- ds_add_data_char()
int32_t ds_add_record_float |
( |
ds_data_t * |
data, |
|
|
const char * |
field, |
|
|
double |
value |
|
) |
| |
int32_t ds_add_record_fmt |
( |
ds_data_t * |
data, |
|
|
const char * |
field, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Add a formatted string to a record object.
- Parameters
-
data | The record object |
field | The fieldname |
fmt | The sprintf style format string |
- See also
- ds_add_data_fmt()
int32_t ds_add_record_int |
( |
ds_data_t * |
data, |
|
|
const char * |
field, |
|
|
int |
value |
|
) |
| |
Add an integer value to a record object.
- Parameters
-
data | The record object |
field | The fieldname |
value | Integer value for this field |
- See also
- ds_add_data_int32()
int32_t ds_add_record_str |
( |
ds_data_t * |
data, |
|
|
const char * |
field, |
|
|
const char * |
value |
|
) |
| |
Add a string value to a record object.
- Parameters
-
data | The record object |
field | The fieldname |
value | String value for this field |
- See also
- ds_add_data_str()