|
libngf
|
#include <stdint.h>Go to the source code of this file.
Typedefs | |
| typedef enum _NgfProplistType | NgfProplistType |
| typedef struct _NgfProplist | NgfProplist |
| Internal property list instance. More... | |
| typedef void(* | NgfProplistCallback) (const char *key, const void *value, void *userdata) |
| Property list callback for iterating over each entry. More... | |
| typedef void(* | NgfProplistExtendedCallback) (const char *key, const void *value, NgfProplistType type, void *userdata) |
| Extended iteration callback with type information. More... | |
Functions | |
| NgfProplist * | ngf_proplist_new (void) |
| Create a new property list instance. More... | |
| NgfProplist * | ngf_proplist_copy (NgfProplist *orig) |
| Create an identical copy of other proplist. More... | |
| void | ngf_proplist_free (NgfProplist *proplist) |
| Free property list. More... | |
| int | ngf_proplist_sets (NgfProplist *proplist, const char *key, const char *value) |
| Set a string value to property list. More... | |
| const char * | ngf_proplist_gets (NgfProplist *proplist, const char *key) |
| Get a string value from property list. More... | |
| int | ngf_proplist_set_as_integer (NgfProplist *proplist, const char *key, int32_t value) |
| Set a integer value to property list. More... | |
| int | ngf_proplist_get_as_integer (NgfProplist *proplist, const char *key, int32_t *integer_value) |
| Get integer value from the property list. More... | |
| int | ngf_proplist_set_as_unsigned (NgfProplist *proplist, const char *key, uint32_t value) |
| Set a unsigned integer value to property list. More... | |
| int | ngf_proplist_get_as_unsigned (NgfProplist *proplist, const char *key, uint32_t *unsigned_value) |
| Get unsigned integer value from the property list. More... | |
| int | ngf_proplist_set_as_boolean (NgfProplist *proplist, const char *key, int value) |
| Set a boolean value to property list. More... | |
| int | ngf_proplist_get_as_boolean (NgfProplist *proplist, const char *key, int *boolean_value) |
| Get a boolean value from the property list. More... | |
| NgfProplistType | ngf_proplist_get_value_type (NgfProplist *proplist, const char *key) |
| Get value type of the property. More... | |
| int | ngf_proplist_parse_integer (const char *value, int32_t *integer_value) |
| Parse integer value. More... | |
| int | ngf_proplist_parse_unsigned (const char *value, uint32_t *unsigned_value) |
| Parse unsigned integer value. More... | |
| int | ngf_proplist_parse_boolean (const char *value, int *boolean_value) |
| Parse boolean value. More... | |
| void | ngf_proplist_foreach (NgfProplist *proplist, NgfProplistCallback callback, void *userdata) |
| Iterate over each entry in the property list. More... | |
| void | ngf_proplist_foreach_extended (NgfProplist *proplist, NgfProplistExtendedCallback callback, void *userdata) |
| Iterate over each entry in the property list and supply a value type. More... | |
| const char ** | ngf_proplist_get_keys (NgfProplist *proplist) |
| Get a list of all keys in the property list. More... | |
| void | ngf_proplist_free_keys (const char **keys) |
| Free a list of property keys. More... | |
| typedef struct _NgfProplist NgfProplist |
Internal property list instance.
| typedef void(* NgfProplistCallback) (const char *key, const void *value, void *userdata) |
Property list callback for iterating over each entry.
| typedef void(* NgfProplistExtendedCallback) (const char *key, const void *value, NgfProplistType type, void *userdata) |
Extended iteration callback with type information.
| typedef enum _NgfProplistType NgfProplistType |
| enum _NgfProplistType |
| NgfProplist* ngf_proplist_copy | ( | NgfProplist * | orig | ) |
Create an identical copy of other proplist.
| orig | Original NgfProplist a copy is made from. |
| void ngf_proplist_foreach | ( | NgfProplist * | proplist, |
| NgfProplistCallback | callback, | ||
| void * | userdata | ||
| ) |
Iterate over each entry in the property list.
| proplist | NgfProplist |
| callback | Callback function type of NgfProplistCallback |
| userdata | User data |
| void ngf_proplist_foreach_extended | ( | NgfProplist * | proplist, |
| NgfProplistExtendedCallback | callback, | ||
| void * | userdata | ||
| ) |
Iterate over each entry in the property list and supply a value type.
| proplist | NgfProplist |
| callback | NgfProplistExtendedCallback |
| userdata | User data |
| void ngf_proplist_free | ( | NgfProplist * | proplist | ) |
Free property list.
| proplist | NgfProplist, if NULL nothing done. |
| void ngf_proplist_free_keys | ( | const char ** | keys | ) |
Free a list of property keys.
| keys | Array of keys provided by ngf_proplist_get_keys |
| int ngf_proplist_get_as_boolean | ( | NgfProplist * | proplist, |
| const char * | key, | ||
| int * | boolean_value | ||
| ) |
Get a boolean value from the property list.
| proplist | NgfProplist |
| key | Key name |
| boolean_value | 1 for TRUE, 0 for FALSE. |
| int ngf_proplist_get_as_integer | ( | NgfProplist * | proplist, |
| const char * | key, | ||
| int32_t * | integer_value | ||
| ) |
Get integer value from the property list.
| proplist | NgfProplist |
| key | Key name |
| integer_value | Value for the key if key exists in proplist |
| int ngf_proplist_get_as_unsigned | ( | NgfProplist * | proplist, |
| const char * | key, | ||
| uint32_t * | unsigned_value | ||
| ) |
Get unsigned integer value from the property list.
| proplist | NgfProplist |
| key | Key name |
| unsigned_value | Value for the key if key exists in proplist |
| const char** ngf_proplist_get_keys | ( | NgfProplist * | proplist | ) |
Get a list of all keys in the property list.
| proplist | NgfProplist |
| NgfProplistType ngf_proplist_get_value_type | ( | NgfProplist * | proplist, |
| const char * | key | ||
| ) |
Get value type of the property.
| proplist | NgfProplist |
| key | Key name |
| const char* ngf_proplist_gets | ( | NgfProplist * | proplist, |
| const char * | key | ||
| ) |
Get a string value from property list.
| proplist | NgfProplist |
| key | Key name |
| NgfProplist* ngf_proplist_new | ( | void | ) |
Create a new property list instance.
| int ngf_proplist_parse_boolean | ( | const char * | value, |
| int * | boolean_value | ||
| ) |
Parse boolean value.
| value | Value to parse. |
| boolean_value | Parsed boolean value, 1 for TRUE 0 for FALSE. |
| int ngf_proplist_parse_integer | ( | const char * | value, |
| int32_t * | integer_value | ||
| ) |
Parse integer value.
| value | Value to parse. |
| integer_value | Parsed integer value. |
| int ngf_proplist_parse_unsigned | ( | const char * | value, |
| uint32_t * | unsigned_value | ||
| ) |
Parse unsigned integer value.
| value | Value to parse. |
| integer_value | Parsed integer value. |
| int ngf_proplist_set_as_boolean | ( | NgfProplist * | proplist, |
| const char * | key, | ||
| int | value | ||
| ) |
Set a boolean value to property list.
| proplist | NgfProplist |
| key | Key name |
| value | Value for the key |
| int ngf_proplist_set_as_integer | ( | NgfProplist * | proplist, |
| const char * | key, | ||
| int32_t | value | ||
| ) |
Set a integer value to property list.
| proplist | NgfProplist |
| key | Key name |
| value | Value for the key |
| int ngf_proplist_set_as_unsigned | ( | NgfProplist * | proplist, |
| const char * | key, | ||
| uint32_t | value | ||
| ) |
Set a unsigned integer value to property list.
| proplist | NgfProplist |
| key | Key name |
| value | Value for the key |
| int ngf_proplist_sets | ( | NgfProplist * | proplist, |
| const char * | key, | ||
| const char * | value | ||
| ) |
Set a string value to property list.
| proplist | NgfProplist |
| key | Key name |
| value | Value for the key |