libcollection
0.6.1
|
Functions | |
int | col_modify_item_property (struct collection_item *item, const char *property) |
Modify item property. More... | |
int | col_modify_str_item (struct collection_item *item, const char *property, const char *string, int length) |
Modify item value to be a string. More... | |
int | col_modify_binary_item (struct collection_item *item, const char *property, void *binary_data, int length) |
Modify item value to be a binary blob. More... | |
int | col_modify_bool_item (struct collection_item *item, const char *property, unsigned char logical) |
Modify item value to be a Boolean. More... | |
int | col_modify_int_item (struct collection_item *item, const char *property, int32_t number) |
Modify item value to be an integer. More... | |
int | col_modify_long_item (struct collection_item *item, const char *property, int64_t number) |
Modify item value to be a long integer. More... | |
int | col_modify_ulong_item (struct collection_item *item, const char *property, uint64_t number) |
Modify item value to be an unsigned long. More... | |
int | col_modify_unsigned_item (struct collection_item *item, const char *property, uint32_t number) |
Modify item value to be an unsigned integer. More... | |
int | col_modify_double_item (struct collection_item *item, const char *property, double number) |
Modify item value to be a floating point. More... | |
The functions in this section are convenience wrappers around col_modify_item. They return same error codes.
int col_modify_item_property | ( | struct collection_item * | item, |
const char * | property | ||
) |
Modify item property.
This function is a convenience wrapper around col_modify_item. It is equivalent to: col_modify_item(item, property, 0, NULL, 0);
int col_modify_str_item | ( | struct collection_item * | item, |
const char * | property, | ||
const char * | string, | ||
int | length | ||
) |
Modify item value to be a string.
This function is a convenience wrapper around col_modify_item. It sets a value of the item to a provided string. If property is not NULL it also renames the property. If the length argument is not zero the string will be truncated to this length. If the length is 0 the length will be calculated based on the length of the actual string. Original value is always destroyed.
int col_modify_binary_item | ( | struct collection_item * | item, |
const char * | property, | ||
void * | binary_data, | ||
int | length | ||
) |
Modify item value to be a binary blob.
This function is a convenience wrapper around col_modify_item. It sets a value of the item to a provided binary buffer. If property is not NULL it also renames the property. Original value is always destroyed.
int col_modify_bool_item | ( | struct collection_item * | item, |
const char * | property, | ||
unsigned char | logical | ||
) |
Modify item value to be a Boolean.
This function is a convenience wrapper around col_modify_item. It sets a value of the item to a provided logical value. If property is not NULL it also renames the property. Original value is always destroyed.
int col_modify_int_item | ( | struct collection_item * | item, |
const char * | property, | ||
int32_t | number | ||
) |
Modify item value to be an integer.
This function is a convenience wrapper around col_modify_item. It sets a value of the item to a provided integer value. If property is not NULL it also renames the property. Original value is always destroyed.
int col_modify_long_item | ( | struct collection_item * | item, |
const char * | property, | ||
int64_t | number | ||
) |
Modify item value to be a long integer.
This function is a convenience wrapper around col_modify_item. It sets a value of the item to a provided long integer value. If property is not NULL it also renames the property. Original value is always destroyed.
int col_modify_ulong_item | ( | struct collection_item * | item, |
const char * | property, | ||
uint64_t | number | ||
) |
Modify item value to be an unsigned long.
This function is a convenience wrapper around col_modify_item. It sets a value of the item to a provided unsigned long value. If property is not NULL it also renames the property. Original value is always destroyed.
int col_modify_unsigned_item | ( | struct collection_item * | item, |
const char * | property, | ||
uint32_t | number | ||
) |
Modify item value to be an unsigned integer.
This function is a convenience wrapper around col_modify_item. It sets a value of the item to a provided unsigned integer value. If property is not NULL it also renames the property. Original value is always destroyed.
int col_modify_double_item | ( | struct collection_item * | item, |
const char * | property, | ||
double | number | ||
) |
Modify item value to be a floating point.
This function is a convenience wrapper around col_modify_item. It sets a value of the item to a provided floating point value. If property is not NULL it also renames the property. Original value is always destroyed.