libcollection
0.5.0
|
Functions | |
int | col_add_str_property_with_ref (struct collection_item *ci, const char *subcollection, const char *property, char *string, int length, struct collection_item **ret_ref) |
Add a string property to a collection. More... | |
int | col_add_binary_property_with_ref (struct collection_item *ci, const char *subcollection, const char *property, void *binary_data, int length, struct collection_item **ret_ref) |
Add a binary property to a collection. More... | |
int | col_add_int_property_with_ref (struct collection_item *ci, const char *subcollection, const char *property, int32_t number, struct collection_item **ret_ref) |
Add an integer property to a collection. More... | |
int | col_add_unsigned_property_with_ref (struct collection_item *ci, const char *subcollection, const char *property, uint32_t number, struct collection_item **ret_ref) |
Add an unsigned integer property to a collection. More... | |
int | col_add_long_property_with_ref (struct collection_item *ci, const char *subcollection, const char *property, int64_t number, struct collection_item **ret_ref) |
Add an long property to a collection. More... | |
int | col_add_ulong_property_with_ref (struct collection_item *ci, const char *subcollection, const char *property, uint64_t number, struct collection_item **ret_ref) |
Add an unsigned long property to a collection. More... | |
int | col_add_double_property_with_ref (struct collection_item *ci, const char *subcollection, const char *property, double number, struct collection_item **ret_ref) |
Add a property of type double to a collection. More... | |
int | col_add_bool_property_with_ref (struct collection_item *ci, const char *subcollection, const char *property, unsigned char logical, struct collection_item **ret_ref) |
Add a Boolean property to a collection. More... | |
int | col_add_any_property_with_ref (struct collection_item *ci, const char *subcollection, const char *property, int type, void *data, int length, struct collection_item **ret_ref) |
Add a property of a specified type to a collection. More... | |
Family of functions that add properties to a collection and return reference to an item that holds a newly created property.
All the functions in this section append a property of the specified type to the collection object.
Parameters for the functions and return values are the same as for the col_add_xxx_property functions. The only difference is that these functions have one additional argument:
[out] | ret_ref | Reference to the newly added item that holds the property. |
int col_add_str_property_with_ref | ( | struct collection_item * | ci, |
const char * | subcollection, | ||
const char * | property, | ||
char * | string, | ||
int | length, | ||
struct collection_item ** | ret_ref | ||
) |
Add a string property to a collection.
[in] | ci | Root collection object. |
[in] | subcollection | Name of the inner collection to add property to. If NULL the property is added to the root collection. |
[in] | property | Name of the property. Name should consist of the ASCII characters with codes non less than space. Exclamation mark character is a special character and can't be used in name of collection or property. Maximum allowed length is defined at compile time. The default value is 64k. |
[in] | string | Null terminated string to add. |
[in] | length | Length of the string. Should include the length of the terminating 0. If the length is shorter than the full string the string will be truncated. If the length is longer than the actual string there might be garbage at end of the actual string. Library will always properly NULL terminate the string at the given position dictated by length but in no way will inspect the validity of the passed in data. This is left to the calling application. |
[out] | ret_ref | Reference to the newly added item that holds the property. |
int col_add_binary_property_with_ref | ( | struct collection_item * | ci, |
const char * | subcollection, | ||
const char * | property, | ||
void * | binary_data, | ||
int | length, | ||
struct collection_item ** | ret_ref | ||
) |
Add a binary property to a collection.
[in] | ci | Root collection object. |
[in] | subcollection | Name of the inner collection to add property to. If NULL the property is added to the root collection. |
[in] | property | Name of the property. Name should consist of the ASCII characters with codes non less than space. Exclamation mark character is a special character and can't be used in name of collection or property. Maximum allowed length is defined at compile time. The default value is 64k. |
[in] | binary_data | Data to add. |
[in] | length | Length of the data. |
[out] | ret_ref | Reference to the newly added item that holds the property. |
int col_add_int_property_with_ref | ( | struct collection_item * | ci, |
const char * | subcollection, | ||
const char * | property, | ||
int32_t | number, | ||
struct collection_item ** | ret_ref | ||
) |
Add an integer property to a collection.
[in] | ci | Root collection object. |
[in] | subcollection | Name of the inner collection to add property to. If NULL the property is added to the root collection. |
[in] | property | Name of the property. Name should consist of the ASCII characters with codes non less than space. Exclamation mark character is a special character and can't be used in name of collection or property. Maximum allowed length is defined at compile time. The default value is 64k. |
[in] | number | Integer value to add. Value is signed. |
[out] | ret_ref | Reference to the newly added item that holds the property. |
int col_add_unsigned_property_with_ref | ( | struct collection_item * | ci, |
const char * | subcollection, | ||
const char * | property, | ||
uint32_t | number, | ||
struct collection_item ** | ret_ref | ||
) |
Add an unsigned integer property to a collection.
[in] | ci | Root collection object. |
[in] | subcollection | Name of the inner collection to add property to. If NULL the property is added to the root collection. |
[in] | property | Name of the property. Name should consist of the ASCII characters with codes non less than space. Exclamation mark character is a special character and can't be used in name of collection or property. Maximum allowed length is defined at compile time. The default value is 64k. |
[in] | number | Unsigned integer value to add. |
[out] | ret_ref | Reference to the newly added item that holds the property. |
int col_add_long_property_with_ref | ( | struct collection_item * | ci, |
const char * | subcollection, | ||
const char * | property, | ||
int64_t | number, | ||
struct collection_item ** | ret_ref | ||
) |
Add an long property to a collection.
[in] | ci | Root collection object. |
[in] | subcollection | Name of the inner collection to add property to. If NULL the property is added to the root collection. |
[in] | property | Name of the property. Name should consist of the ASCII characters with codes non less than space. Exclamation mark character is a special character and can't be used in name of collection or property. Maximum allowed length is defined at compile time. The default value is 64k. |
[in] | number | Long integer value to add. Value is signed. |
[out] | ret_ref | Reference to the newly added item that holds the property. |
int col_add_ulong_property_with_ref | ( | struct collection_item * | ci, |
const char * | subcollection, | ||
const char * | property, | ||
uint64_t | number, | ||
struct collection_item ** | ret_ref | ||
) |
Add an unsigned long property to a collection.
[in] | ci | Root collection object. |
[in] | subcollection | Name of the inner collection to add property to. If NULL the property is added to the root collection. |
[in] | property | Name of the property. Name should consist of the ASCII characters with codes non less than space. Exclamation mark character is a special character and can't be used in name of collection or property. Maximum allowed length is defined at compile time. The default value is 64k. |
[in] | number | Unsigned long integer value to add. |
[out] | ret_ref | Reference to the newly added item that holds the property. |
int col_add_double_property_with_ref | ( | struct collection_item * | ci, |
const char * | subcollection, | ||
const char * | property, | ||
double | number, | ||
struct collection_item ** | ret_ref | ||
) |
Add a property of type double to a collection.
[in] | ci | Root collection object. |
[in] | subcollection | Name of the inner collection to add property to. If NULL the property is added to the root collection. |
[in] | property | Name of the property. Name should consist of the ASCII characters with codes non less than space. Exclamation mark character is a special character and can't be used in name of collection or property. Maximum allowed length is defined at compile time. The default value is 64k. |
[in] | number | Floating point value. |
[out] | ret_ref | Reference to the newly added item that holds the property. |
int col_add_bool_property_with_ref | ( | struct collection_item * | ci, |
const char * | subcollection, | ||
const char * | property, | ||
unsigned char | logical, | ||
struct collection_item ** | ret_ref | ||
) |
Add a Boolean property to a collection.
[in] | ci | Root collection object. |
[in] | subcollection | Name of the inner collection to add property to. If NULL the property is added to the root collection. |
[in] | property | Name of the property. Name should consist of the ASCII characters with codes non less than space. Exclamation mark character is a special character and can't be used in name of collection or property. Maximum allowed length is defined at compile time. The default value is 64k. |
[in] | logical | Boolean value. 0 - false, nonzero - true. |
[out] | ret_ref | Reference to the newly added item that holds the property. |
int col_add_any_property_with_ref | ( | struct collection_item * | ci, |
const char * | subcollection, | ||
const char * | property, | ||
int | type, | ||
void * | data, | ||
int | length, | ||
struct collection_item ** | ret_ref | ||
) |
Add a property of a specified type to a collection.
[in] | ci | Root collection object. |
[in] | subcollection | Name of the inner collection to add property to. If NULL the property is added to the root collection. |
[in] | property | Name of the property. Name should consist of the ASCII characters with codes non less than space. Exclamation mark character is a special character and can't be used in name of collection or property. Maximum allowed length is defined at compile time. The default value is 64k. |
[in] | type | See type definitions here. |
[in] | data | Data to add. |
[in] | length | Length of the data. |
[out] | ret_ref | Reference to the newly added item that holds the property. |