Functions

Insert property functions
[COLLECTION interface]

Functions

int col_insert_str_property (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, const char *string, int length)
 Insert a string property.
int col_insert_binary_property (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, void *binary_data, int length)
 Insert a binary property.
int col_insert_int_property (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, int32_t number)
 Insert an integer property.
int col_insert_unsinged_property (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, uint32_t number)
 Insert an unsigned property.
int col_insert_long_property (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, int64_t number)
 Insert a long property.
int col_insert_ulong_property (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, uint64_t number)
 Insert an unsigned long property.
int col_insert_double_property (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, double number)
 Insert a property with a floating point value.
int col_insert_bool_property (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, unsigned char logical)
 Insert a property with a Boolean value.
int col_insert_str_property_with_ref (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, const char *string, int length, struct collection_item **ret_ref)
 Insert a string property and get back a reference.
int col_insert_binary_property_with_ref (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, void *binary_data, int length, struct collection_item **ret_ref)
 Insert a binary property and get back a reference.
int col_insert_int_property_with_ref (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, int32_t number, struct collection_item **ret_ref)
 Insert an integer property and get back a reference.
int col_insert_unsinged_property_with_ref (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, uint32_t number, struct collection_item **ret_ref)
 Insert an unsigned property and get back a reference.
int col_insert_long_property_with_ref (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, int64_t number, struct collection_item **ret_ref)
 Insert a long property and get back a reference.
int col_insert_ulong_property_with_ref (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, uint64_t number, struct collection_item **ret_ref)
 Insert an unsigned long property and get back a reference.
int col_insert_double_property_with_ref (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, double number, struct collection_item **ret_ref)
 Insert a property with a floating point value and get back a reference.
int col_insert_bool_property_with_ref (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, unsigned char logical, struct collection_item **ret_ref)
 Insert a property with a Boolean value and get back a reference.
int col_insert_property_with_ref (struct collection_item *ci, const char *subcollection, int disposition, const char *refprop, int idx, unsigned flags, const char *property, int type, const void *data, int length, struct collection_item **ret_ref)
 Insert property of any type and get back a reference.

Detailed Description

Functions in this section insert properties into a collection at a specified position.

Common parameters for these functions are:

Parameters:
[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] disposition Defines relation point. For more information see disposition defines.
[in] refprop Property to relate to
[in] idx Index (see comments below).
[in] flags Flags that control naming issues.
[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.

Other arguments are the same as the arguments for the col_add_xxx_property functions.

Returns:
0 - Property was insterted successfully.
ENOMEM - No memory.
EINVAL - Invalid characters in the property name. Value argument is invalid in some way.
EMSGSIZE - Property name is too long.
ENOENT - Sub collection or property to relate to is not found.
EEXIST - Property with given name already exists. This error is returned if collection should hold unique names. For more information see description of the "flags" argument.
ENOSYS - Flag or disposition value is not implemented.
 All Data Structures