Property Lists

Property lists represent groups of properties. More...

Data Structures

struct   IC4_PROPERTY_LIST

Represents a list of properties. More...

Functions

struct IC4_PROPERTY_LIST ic4_proplist_ref (struct IC4_PROPERTY_LIST *list)

Increases the property list's internal reference count by one.

void ic4_proplist_unref (struct IC4_PROPERTY_LIST *list)

Decreases the property list's internal reference count by one.

bool ic4_proplist_size (struct IC4_PROPERTY_LIST *list, size_t *size)

Returns the number of properties in a property list.

bool ic4_proplist_at (struct IC4_PROPERTY_LIST *list, size_t index, struct IC4_PROPERTY **ppProperty)

Returns a property from a property list.

Detailed Description

Property lists represent groups of properties.

They are returned from functions such as ic4_prop_category_get_features() or ic4_prop_enum_get_entries().

Property lists are read-only and can be enumerated by using the ic4_proplist_size() and ic4_proplist_at() functions.

Function Documentation

◆ ic4_proplist_at()

bool ic4_proplist_at ( struct IC4_PROPERTY_LIST list,
size_t  index,
struct IC4_PROPERTY **  ppProperty 
)

Returns a property from a property list.

Parameters
[in]listA property list
[in]indexIndex of the property to retrieve from list
[out]ppPropertyPointer to a handle receiving the property object.
When the property is no longer required, release the object reference using ic4_prop_unref().
Returns
true on success, otherwise false.
Use ic4_get_last_error() to query error information.

◆ ic4_proplist_ref()

struct IC4_PROPERTY_LIST * ic4_proplist_ref ( struct IC4_PROPERTY_LIST list)

Increases the property list's internal reference count by one.

Parameters
[in]listA property list
Returns
The pointer passed via list
Remarks
If list is NULL, the function returns NULL. An error value is not set.
See also
ic4_proplist_unref

◆ ic4_proplist_size()

bool ic4_proplist_size ( struct IC4_PROPERTY_LIST list,
size_t *  size 
)

Returns the number of properties in a property list.

Parameters
[in]listA property list
[out]sizePointer to a size_t to receive the number of properties in list.
Returns
true on success, otherwise false.
Use ic4_get_last_error() to query error information.

◆ ic4_proplist_unref()

void ic4_proplist_unref ( struct IC4_PROPERTY_LIST list)

Decreases the property list's internal reference count by one.

If the reference count reaches zero, the object is destroyed.

Parameters
[in]listA property list
Remarks
If list is NULL, the function does nothing. An error value is not set.
See also
ic4_proplist_ref