ngfd-plugin: /build/ngfd/src/ngfd-1.4.1/src/include/ngf/proplist.h File Reference

ngfd-plugin

Typedefs | Functions
proplist.h File Reference
`#include <ngf/value.h>`

Go to the source code of this file.

## Typedefs
typedef struct _NProplist | NProplist
| Internal proplist structure.
typedef void(* | NProplistFunc) (const char *key, const NValue *value, gpointer userdata)
| Proplist manipulation function definition.

## Functions
NProplist * | n_proplist_new ()
| Initializes new proplist.
NProplist * | n_proplist_copy (const NProplist *source)
| Create copy of existing proplist.
NProplist * | n_proplist_copy_keys (const NProplist *source, GList *keys)
| Create copy of existing proplist, copying only selected keys.
void | n_proplist_merge (NProplist *target, const NProplist *source)
| Merge two proplists.
void | n_proplist_merge_keys (NProplist *target, const NProplist *source, GList *keys)
| Merge only selected keys on proplists.
void | n_proplist_free (NProplist *proplist)
| Free proplist.
int | n_proplist_size (const NProplist *proplist)
| Return number of keys in the proplist.
void | n_proplist_foreach (const NProplist *proplist, NProplistFunc func, gpointer userdata)
| Run function on each key in the proplist.
gboolean | n_proplist_is_empty (const NProplist *proplist)
| Check if the proplist is empty.
gboolean | n_proplist_has_key (const NProplist *proplist, const char *key)
| Check if the proplist has key.
gboolean | n_proplist_match_exact (const NProplist *a, const NProplist *b)
| Check if two proplists are identical.
void | n_proplist_set (NProplist *proplist, const char *key, const NValue *value)
| Insert or update key/value pair in proplist.
NValue * | n_proplist_get (const NProplist *proplist, const char *key)
| Get value from proplist.
void | n_proplist_unset (NProplist *proplist, const char *key)
| Remove key from proplist.
void | n_proplist_set_string (NProplist *proplist, const char *key, const char *value)
| Set or update string value in proplist.
const char * | n_proplist_get_string (const NProplist *proplist, const char *key)
| Get string value from proplist.
gchar * | n_proplist_dup_string (const NProplist *proplist, const char *key)
| Get duplicate of string value from proplist.
void | n_proplist_set_int (NProplist *proplist, const char *key, gint value)
| Set or update int value in proplist.
gint | n_proplist_get_int (const NProplist *proplist, const char *key)
| Get int value from proplist.
void | n_proplist_set_uint (NProplist *proplist, const char *key, guint value)
| Set or update uint value in proplist.
guint | n_proplist_get_uint (const NProplist *proplist, const char *key)
| Get uint value from proplist.
void | n_proplist_set_bool (NProplist *proplist, const char *key, gboolean value)
| Set or update boolean value in proplist.
gboolean | n_proplist_get_bool (const NProplist *proplist, const char *key)
| Get boolean value from proplist.
void | n_proplist_set_pointer (NProplist *proplist, const char *key, gpointer value)
| Set or update pointer value in proplist.
gpointer | n_proplist_get_pointer (const NProplist *proplist, const char *key)
| Get pointer value from proplist.
void | n_proplist_dump (const NProplist *proplist)
| Dump contents of proplist to debug log.

## Typedef Documentation

## ◆ NProplist

typedef struct _NProplist NProplist

Internal proplist structure.

## ◆ NProplistFunc

typedef void(* NProplistFunc) (const char *key, const NValue *value, gpointer userdata)

Proplist manipulation function definition.

Used in n_proplist_foreach

Parameters

  key | Proplist key
  value | Value associated with key
  userdata | Userdata

## Function Documentation

## ◆ n_proplist_copy()

NProplist * n_proplist_copy | ( | const NProplist * | source | ) |

Create copy of existing proplist.

Parameters

  source | Source proplist

Returns
  Copy of source proplist

## ◆ n_proplist_copy_keys()

NProplist * n_proplist_copy_keys | ( | const NProplist * | source,
|  | GList * | keys )

Create copy of existing proplist, copying only selected keys.

Parameters

  source | Source proplist
  keys | Keys to be copied as GList

Returns
  Copy of source proplist containing only selected keys

## ◆ n_proplist_dump()

void n_proplist_dump | ( | const NProplist * | proplist | ) |

Dump contents of proplist to debug log.

Parameters

  proplist | Proplist

See also
  log.h

## ◆ n_proplist_dup_string()

gchar * n_proplist_dup_string | ( | const NProplist * | proplist,
|  | const char * | key )

Get duplicate of string value from proplist.

Parameters

  proplist | Proplist
  key | Key

Returns
  Newly allocated string of value or NULL if key is not found. Value must be freed afterwards.

## ◆ n_proplist_foreach()

void n_proplist_foreach | ( | const NProplist * | proplist,
|  | NProplistFunc | func,
|  | gpointer | userdata )

Run function on each key in the proplist.

Parameters

  proplist | Target proplist
  func | Function to be run
  userdata | Userdata

## ◆ n_proplist_free()

void n_proplist_free | ( | NProplist * | proplist | ) |

Free proplist.

Parameters

  proplist | Proplist

## ◆ n_proplist_get()

NValue * n_proplist_get | ( | const NProplist * | proplist,
|  | const char * | key )

Get value from proplist.

Parameters

  proplist | Proplist
  key | Key

Returns
  Value of the key as NValue or NULL if empty

## ◆ n_proplist_get_bool()

gboolean n_proplist_get_bool | ( | const NProplist * | proplist,
|  | const char * | key )

Get boolean value from proplist.

Parameters

  proplist | Proplist
  key | Key

Returns
  Value or FALSE if key is not found

## ◆ n_proplist_get_int()

gint n_proplist_get_int | ( | const NProplist * | proplist,
|  | const char * | key )

Get int value from proplist.

Parameters

  proplist | Proplist
  key | Key

Returns
  Value or 0 if key is not found

## ◆ n_proplist_get_pointer()

gpointer n_proplist_get_pointer | ( | const NProplist * | proplist,
|  | const char * | key )

Get pointer value from proplist.

Parameters

  proplist | Proplist
  key | Key

Returns
  Value or FALSE if key is not found

## ◆ n_proplist_get_string()

const char * n_proplist_get_string | ( | const NProplist * | proplist,
|  | const char * | key )

Get string value from proplist.

Parameters

  proplist | Proplist
  key | Key

Returns
  Value or NULL if key is not found

## ◆ n_proplist_get_uint()

guint n_proplist_get_uint | ( | const NProplist * | proplist,
|  | const char * | key )

Get uint value from proplist.

Parameters

  proplist | Proplist
  key | Key

Returns
  Value or 0 if key is not found

## ◆ n_proplist_has_key()

gboolean n_proplist_has_key | ( | const NProplist * | proplist,
|  | const char * | key )

Check if the proplist has key.

Parameters

  proplist | Proplist
  key | Key

Returns
  TRUE if proplist has key

## ◆ n_proplist_is_empty()

gboolean n_proplist_is_empty | ( | const NProplist * | proplist | ) |

Check if the proplist is empty.

Parameters

  proplist | Proplist

Returns
  TRUE if proplist is empty

## ◆ n_proplist_match_exact()

gboolean n_proplist_match_exact | ( | const NProplist * | a,
|  | const NProplist * | b )

Check if two proplists are identical.

Parameters

  a | Proplist A
  b | Proplist B

Returns
  TRUE if proplists are identical

## ◆ n_proplist_merge()

void n_proplist_merge | ( | NProplist * | target,
|  | const NProplist * | source )

Merge two proplists.

Parameters

  target | Target proplist
  source | Source to be merged to target

## ◆ n_proplist_merge_keys()

void n_proplist_merge_keys | ( | NProplist * | target,
|  | const NProplist * | source,
|  | GList * | keys )

Merge only selected keys on proplists.

Parameters

  target | Target proplist
  source | Source to be merged to target
  keys | List of keys to be merged as GList

## ◆ n_proplist_new()

NProplist * n_proplist_new | ( |  | ) |

Initializes new proplist.

Returns
  Empty proplist

## ◆ n_proplist_set()

void n_proplist_set | ( | NProplist * | proplist,
|  | const char * | key,
|  | const NValue * | value )

Insert or update key/value pair in proplist.

Parameters

  proplist | Proplist
  key | Key
  value | Value

## ◆ n_proplist_set_bool()

void n_proplist_set_bool | ( | NProplist * | proplist,
|  | const char * | key,
|  | gboolean | value )

Set or update boolean value in proplist.

Parameters

  proplist | Proplist
  key | Key
  value | Value

## ◆ n_proplist_set_int()

void n_proplist_set_int | ( | NProplist * | proplist,
|  | const char * | key,
|  | gint | value )

Set or update int value in proplist.

Parameters

  proplist | Proplist
  key | Key
  value | Value

## ◆ n_proplist_set_pointer()

void n_proplist_set_pointer | ( | NProplist * | proplist,
|  | const char * | key,
|  | gpointer | value )

Set or update pointer value in proplist.

Parameters

  proplist | Proplist
  key | Key
  value | Value

## ◆ n_proplist_set_string()

void n_proplist_set_string | ( | NProplist * | proplist,
|  | const char * | key,
|  | const char * | value )

Set or update string value in proplist.

Parameters

  proplist | Proplist
  key | Key
  value | Value

## ◆ n_proplist_set_uint()

void n_proplist_set_uint | ( | NProplist * | proplist,
|  | const char * | key,
|  | guint | value )

Set or update uint value in proplist.

Parameters

  proplist | Proplist
  key | Key
  value | Value

## ◆ n_proplist_size()

int n_proplist_size | ( | const NProplist * | proplist | ) |

Return number of keys in the proplist.

Parameters

  proplist | Proplist

Returns
  Number of keys

## ◆ n_proplist_unset()

void n_proplist_unset | ( | NProplist * | proplist,
|  | const char * | key )

Remove key from proplist.

Parameters

  proplist | Proplist
  key | Key