libcollection
0.6.0
|
Functions | |
int | col_update_str_property (struct collection_item *ci, const char *property, int mode_flags, char *string, int length) |
int | col_update_binary_property (struct collection_item *ci, const char *property, int mode_flags, void *binary_data, int length) |
int | col_update_int_property (struct collection_item *ci, const char *property, int mode_flags, int32_t number) |
int | col_update_unsigned_property (struct collection_item *ci, const char *property, int mode_flags, uint32_t number) |
int | col_update_long_property (struct collection_item *ci, const char *property, int mode_flags, int64_t number) |
int | col_update_ulong_property (struct collection_item *ci, const char *property, int mode_flags, uint64_t number) |
int | col_update_double_property (struct collection_item *ci, const char *property, int mode_flags, double number) |
int | col_update_bool_property (struct collection_item *ci, const char *property, int mode_flags, unsigned char logical) |
int | col_update_property (struct collection_item *ci, const char *property, int type, void *new_data, int length, int mode_flags) |
Functions in this section update properties in a collection.
All update functions search the property using the internal traverse function. Use same "x!y" notation to specify a property. For more details about the search logic see col_get_item_and_do function.
The existing value of the property is destroyed and lost.
It is not possible to rename the property using these functions. To do more advanced modifications see col_modify_item function and item modification wrappers .
Common parameters for these functions are:
[in] | ci | Root collection object. |
[in] | property | Name of the property. |
[in] | mode_flags | Specify how the collection should to be traversed. |
The rest of the arguments specify the new values for the property. For more details about these arguments see the description of the col_add_xxx_property corresponding function.
int col_update_str_property | ( | struct collection_item * | ci, |
const char * | property, | ||
int | mode_flags, | ||
char * | string, | ||
int | length | ||
) |
Update a property with a string value. Length should include the terminating 0.
int col_update_binary_property | ( | struct collection_item * | ci, |
const char * | property, | ||
int | mode_flags, | ||
void * | binary_data, | ||
int | length | ||
) |
Update a property with a binary value.
int col_update_int_property | ( | struct collection_item * | ci, |
const char * | property, | ||
int | mode_flags, | ||
int32_t | number | ||
) |
Update a property with an integer value.
int col_update_unsigned_property | ( | struct collection_item * | ci, |
const char * | property, | ||
int | mode_flags, | ||
uint32_t | number | ||
) |
Update a property with an unsigned value.
int col_update_long_property | ( | struct collection_item * | ci, |
const char * | property, | ||
int | mode_flags, | ||
int64_t | number | ||
) |
Update a property with a long value.
int col_update_ulong_property | ( | struct collection_item * | ci, |
const char * | property, | ||
int | mode_flags, | ||
uint64_t | number | ||
) |
Update a property with an unsigned long value.
int col_update_double_property | ( | struct collection_item * | ci, |
const char * | property, | ||
int | mode_flags, | ||
double | number | ||
) |
Update a property with a floating point value.
int col_update_bool_property | ( | struct collection_item * | ci, |
const char * | property, | ||
int | mode_flags, | ||
unsigned char | logical | ||
) |
Update a property with a Boolean value.
int col_update_property | ( | struct collection_item * | ci, |
const char * | property, | ||
int | type, | ||
void * | new_data, | ||
int | length, | ||
int | mode_flags | ||
) |
Update a property with a value by specifying type and value. See definitions of the type constants here. All other col_update_xxx_property functions are wrappers around this one.