Low-level Serialization Structures.

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

Data Structures | Typedefs | Functions
Low-level Serialization Structures.
Eet

Functions that create, destroy and manipulate serialization nodes used by Eet Data Serialization. More...

## Data Structures
struct | _Eet_Node_Data
| Contains an union that can fit any kind of node. More...

## Typedefs
typedef struct _Eet_Node | Eet_Node
| Opaque handle to manage serialization node.
typedef struct _Eet_Node_Data | Eet_Node_Data
| Contains an union that can fit any kind of node.

## Functions
EAPI Eet_Node * | eet_node_char_new (const char *name, char c)
| Creates a new character node.
EAPI Eet_Node * | eet_node_short_new (const char *name, short s)
| Creates a new short node.
EAPI Eet_Node * | eet_node_int_new (const char *name, int i)
| Creates a new integer node.
EAPI Eet_Node * | eet_node_long_long_new (const char *name, long long l)
| Creates a new long long integer node.
EAPI Eet_Node * | eet_node_float_new (const char *name, float f)
| Creates a new float node.
EAPI Eet_Node * | eet_node_double_new (const char *name, double d)
| Creates a new double node.
EAPI Eet_Node * | eet_node_unsigned_char_new (const char *name, unsigned char uc)
| Creates a new unsigned character node.
EAPI Eet_Node * | eet_node_unsigned_short_new (const char *name, unsigned short us)
| Creates a new unsigned short node.
EAPI Eet_Node * | eet_node_unsigned_int_new (const char *name, unsigned int ui)
| Creates a new unsigned integer node.
EAPI Eet_Node * | eet_node_unsigned_long_long_new (const char *name, unsigned long long l)
| Creates a new unsigned long long integer node.
EAPI Eet_Node * | eet_node_string_new (const char *name, const char *str)
| Creates a new string node.
EAPI Eet_Node * | eet_node_inlined_string_new (const char *name, const char *str)
| Creates a new inlined string node.
EAPI Eet_Node * | eet_node_null_new (const char *name)
| Creates a new empty node.
EAPI Eet_Node * | eet_node_list_new (const char *name, Eina_List *nodes)
| Creates a new list node.
EAPI Eet_Node * | eet_node_array_new (const char *name, int count, Eina_List *nodes)
| Creates a new array node.
EAPI Eet_Node * | eet_node_var_array_new (const char *name, Eina_List *nodes)
| Creates a new variable array node.
EAPI Eet_Node * | eet_node_hash_new (const char *name, const char *key, Eet_Node *node)
| TODO FIX ME.
EAPI Eet_Node * | eet_node_struct_new (const char *name, Eina_List *nodes)
| Creates a new struct node.
EAPI Eet_Node * | eet_node_struct_child_new (const char *parent, Eet_Node *child)
| TODO FIX ME.
EAPI Eet_Node * | eet_node_children_get (Eet_Node *node)
| Gets a node's child nodes.
EAPI Eet_Node * | eet_node_next_get (Eet_Node *node)
| Gets the next node in a list of nodes.
EAPI Eet_Node * | eet_node_parent_get (Eet_Node *node)
| Gets the parent node of a node.
EAPI void | eet_node_list_append (Eet_Node *parent, const char *name, Eet_Node *child)
| Appends a "list" node TODO FIX ME.
EAPI void | eet_node_struct_append (Eet_Node *parent, const char *name, Eet_Node *child)
| TODO FIX ME.
EAPI void | eet_node_hash_add (Eet_Node *parent, const char *name, const char *key, Eet_Node *child)
| TODO FIX ME.
EAPI void | eet_node_dump (Eet_Node *n, int dumplevel, Eet_Dump_Callback dumpfunc, void *dumpdata)
| TODO FIX ME.
EAPI int | eet_node_type_get (Eet_Node *node)
| Returns the type of a node.
EAPI Eet_Node_Data * | eet_node_value_get (Eet_Node *node)
| Returns the node's data.
EAPI void | eet_node_del (Eet_Node *n)
| TODO FIX ME.
EAPI void * | eet_data_node_encode_cipher (Eet_Node *node, const char *cipher_key, int *size_ret)
| TODO FIX ME.
EAPI Eet_Node * | eet_data_node_decode_cipher (const void *data_in, const char *cipher_key, int size_in)
| TODO FIX ME.
EAPI Eet_Node * | eet_data_node_read_cipher (Eet_File *ef, const char *name, const char *cipher_key)
| TODO FIX ME.
EAPI int | eet_data_node_write_cipher (Eet_File *ef, const char *name, const char *cipher_key, Eet_Node *node, int compress)
| TODO FIX ME.
EAPI void * | eet_node_walk (void *parent, const char *name, Eet_Node *root, Eet_Node_Walk *cb, void *user_data)
| Walks trees of Eet_Node.

## Detailed Description

Functions that create, destroy and manipulate serialization nodes used by Eet Data Serialization.

## Function Documentation

## ◆ eet_node_char_new()

EAPI Eet_Node * eet_node_char_new | ( | const char * | name,
|  | char | c
| ) |  |

Creates a new character node.

Parameters

  name | Name of the node.
  c | Character value.

Returns
  A new character node.

## ◆ eet_node_short_new()

EAPI Eet_Node * eet_node_short_new | ( | const char * | name,
|  | short | s
| ) |  |

Creates a new short node.

Parameters

  name | Name of the node.
  s | Short value.

Returns
  A new short node.

## ◆ eet_node_int_new()

EAPI Eet_Node * eet_node_int_new | ( | const char * | name,
|  | int | i
| ) |  |

Creates a new integer node.

Parameters

  name | Name of the node.
  i | Integer value.

Returns
  A new integer node.

## ◆ eet_node_long_long_new()

EAPI Eet_Node * eet_node_long_long_new | ( | const char * | name,
|  | long long | l
| ) |  |

Creates a new long long integer node.

Parameters

  name | Name of the node.
  l | Long long integer value.

Returns
  A new long long integer node.

## ◆ eet_node_float_new()

EAPI Eet_Node * eet_node_float_new | ( | const char * | name,
|  | float | f
| ) |  |

Creates a new float node.

Parameters

  name | Name of the node.
  f | Float value.

Returns
  A new float node.

## ◆ eet_node_double_new()

EAPI Eet_Node * eet_node_double_new | ( | const char * | name,
|  | double | d
| ) |  |

Creates a new double node.

Parameters

  name | Name of the node.
  d | Double value.

Returns
  A new double node.

## ◆ eet_node_unsigned_char_new()

EAPI Eet_Node * eet_node_unsigned_char_new | ( | const char * | name,
|  | unsigned char | uc
| ) |  |

Creates a new unsigned character node.

Parameters

  name | Name of the node.
  uc | Unsigned char value.

Returns
  A new unsigned char node.

## ◆ eet_node_unsigned_short_new()

EAPI Eet_Node * eet_node_unsigned_short_new | ( | const char * | name,
|  | unsigned short | us
| ) |  |

Creates a new unsigned short node.

Parameters

  name | Name of the node.
  us | Unsigned short value.

Returns
  A new unsigned short node.

## ◆ eet_node_unsigned_int_new()

EAPI Eet_Node * eet_node_unsigned_int_new | ( | const char * | name,
|  | unsigned int | ui
| ) |  |

Creates a new unsigned integer node.

Parameters

  name | Name of the node.
  ui | Unsigned integer value.

Returns
  A new unsigned integer node.

## ◆ eet_node_unsigned_long_long_new()

EAPI Eet_Node * eet_node_unsigned_long_long_new | ( | const char * | name,
|  | unsigned long long | l
| ) |  |

Creates a new unsigned long long integer node.

Parameters

  name | Name of the node.
  l | Unsigned long long integer value.

Returns
  A new unsigned long long integer node.

## ◆ eet_node_string_new()

EAPI Eet_Node * eet_node_string_new | ( | const char * | name,
|  | const char * | str
| ) |  |

Creates a new string node.

Parameters

  name | Name of the node.
  str | String value.

Returns
  A new string node.

## ◆ eet_node_inlined_string_new()

EAPI Eet_Node * eet_node_inlined_string_new | ( | const char * | name,
|  | const char * | str
| ) |  |

Creates a new inlined string node.

Parameters

  name | Name of the node.
  str | String value.

Returns
  A new inlined string node.

## ◆ eet_node_null_new()

EAPI Eet_Node * eet_node_null_new | ( | const char * | name | ) |

Creates a new empty node.

Parameters

  name | Name of the node.

Returns
  A new empty node.

References EET_T_NULL.

## ◆ eet_node_list_new()

EAPI Eet_Node * eet_node_list_new | ( | const char * | name,
|  | Eina_List * | nodes
| ) |  |

Creates a new list node.

Parameters

  name | Name of the node.
  nodes | List of nodes.

Returns
  A new list node.

References EET_G_LIST.

Referenced by eet_node_list_append().

## ◆ eet_node_array_new()

EAPI Eet_Node * eet_node_array_new | ( | const char * | name,
|  | int | count,
|  | Eina_List * | nodes
| ) |  |

Creates a new array node.

Parameters

  name | Name of the node.
  count | Number of nodes
  nodes | List of nodes.

Returns
  A new array node.

References EET_G_ARRAY.

## ◆ eet_node_var_array_new()

EAPI Eet_Node * eet_node_var_array_new | ( | const char * | name,
|  | Eina_List * | nodes
| ) |  |

Creates a new variable array node.

Parameters

  name | Name of the node.
  nodes | List of nodes.

Returns
  A new variable array node.

References EET_G_VAR_ARRAY.

## ◆ eet_node_hash_new()

EAPI Eet_Node * eet_node_hash_new | ( | const char * | name,
|  | const char * | key,
|  | Eet_Node * | node
| ) |  |

TODO FIX ME.

Creates a new hash node.

Parameters

  name | Name of the node.
  key | Key of the node.
  node | The node.

Returns
  A new hash node.

References EET_G_HASH, eina_list_append(), and eina_stringshare_add().

Referenced by eet_node_hash_add().

## ◆ eet_node_struct_new()

EAPI Eet_Node * eet_node_struct_new | ( | const char * | name,
|  | Eina_List * | nodes
| ) |  |

Creates a new struct node.

Parameters

  name | Name of the node.
  nodes | List of nodes.

Returns
  A new struct node.

References EET_G_UNKNOWN.

## ◆ eet_node_struct_child_new()

EAPI Eet_Node * eet_node_struct_child_new | ( | const char * | parent,
|  | Eet_Node * | child
| ) |  |

TODO FIX ME.

Creates a new struct child node.

Parameters

  parent | The name of parent node.
  child | The child node.

Returns
  A new struct child node.

References EET_G_UNKNOWN, and eina_list_prepend().

## ◆ eet_node_children_get()

EAPI Eet_Node * eet_node_children_get | ( | Eet_Node * | node | ) |

Gets a node's child nodes.

Parameters

  node | The node

Returns
  The first child node which contains a pointer to the next child node and the parent.

Since
  1.5

## ◆ eet_node_next_get()

EAPI Eet_Node * eet_node_next_get | ( | Eet_Node * | node | ) |

Gets the next node in a list of nodes.

Parameters

  node | The node

Returns
  A node which contains a pointer to the next child node and the parent.

Since
  1.5

## ◆ eet_node_parent_get()

EAPI Eet_Node * eet_node_parent_get | ( | Eet_Node * | node | ) |

Gets the parent node of a node.

Parameters

  node | The node

Returns
  The parent node of `node`

Since
  1.5

## ◆ eet_node_list_append()

EAPI void eet_node_list_append | ( | Eet_Node * | parent,
|  | const char * | name,
|  | Eet_Node * | child
| ) |  |

Appends a "list" node TODO FIX ME.

Parameters

  parent | The parent node.
  name | The name of new node.
  child | The child node.

References EET_G_LIST, eet_node_list_new(), eina_list_append(), eina_stringshare_add(), and eina_stringshare_del().

## ◆ eet_node_struct_append()

EAPI void eet_node_struct_append | ( | Eet_Node * | parent,
|  | const char * | name,
|  | Eet_Node * | child
| ) |  |

TODO FIX ME.

Appends a struct node.

Parameters

  parent | The parent node.
  name | The name of new node.
  child | The child node.

References EET_G_UNKNOWN, eet_node_del(), eina_stringshare_add(), and eina_stringshare_del().

## ◆ eet_node_hash_add()

EAPI void eet_node_hash_add | ( | Eet_Node * | parent,
|  | const char * | name,
|  | const char * | key,
|  | Eet_Node * | child
| ) |  |

TODO FIX ME.

Adds a hash node.

Parameters

  parent | The parent node.
  name | Name of the node.
  key | Key of the node.
  child | The child node.

References eet_node_hash_new().

## ◆ eet_node_dump()

EAPI void eet_node_dump | ( | Eet_Node * | n,
|  | int | dumplevel,
|  | Eet_Dump_Callback | dumpfunc,
|  | void * | dumpdata
| ) |  |

TODO FIX ME.

Dumps a node from an eet encoded data structure into ascii text.

Parameters

  n | The node.
  dumplevel | The dump level.
  dumpfunc | dumpfunc The function to call passed a string when new data is converted to text.
  dumpdata | The data to pass to the `dumpfunc` callback.

References EET_G_ARRAY, EET_G_HASH, EET_G_LIST, EET_G_UNKNOWN, EET_G_VAR_ARRAY, eet_node_dump(), EET_T_CHAR, EET_T_DOUBLE, EET_T_FLOAT, EET_T_INLINED_STRING, EET_T_INT, EET_T_LONG_LONG, EET_T_SHORT, EET_T_STRING, EET_T_UCHAR, EET_T_UINT, EET_T_ULONG_LONG, EET_T_USHORT, and eina_convert_itoa().

Referenced by eet_data_dump_cipher(), eet_data_text_dump_cipher(), and eet_node_dump().

## ◆ eet_node_type_get()

EAPI int eet_node_type_get | ( | Eet_Node * | node | ) |

Returns the type of a node.

Parameters

  node | The node

Returns
  The node's type (EET_T_$TYPE)

Since
  1.5

References EET_T_UNKNOW.

## ◆ eet_node_value_get()

EAPI Eet_Node_Data * eet_node_value_get | ( | Eet_Node * | node | ) |

Returns the node's data.

Parameters

  node | The node

Returns
  The data contained in the node

Since
  1.5

## ◆ eet_node_del()

EAPI void eet_node_del | ( | Eet_Node * | n | ) |

TODO FIX ME.

Deletes the given node.

Parameters

  n | The node.

References EET_G_ARRAY, EET_G_HASH, EET_G_LIST, EET_G_UNKNOWN, EET_G_VAR_ARRAY, eet_node_del(), EET_T_CHAR, EET_T_DOUBLE, EET_T_FLOAT, EET_T_INLINED_STRING, EET_T_INT, EET_T_LONG_LONG, EET_T_SHORT, EET_T_STRING, EET_T_UCHAR, EET_T_UINT, EET_T_USHORT, EINA_FALLTHROUGH, and eina_stringshare_del().

Referenced by eet_data_dump_cipher(), eet_data_text_dump_cipher(), eet_node_del(), and eet_node_struct_append().

## ◆ eet_data_node_encode_cipher()

EAPI void * eet_data_node_encode_cipher | ( | Eet_Node * | node,
|  | const char * | cipher_key,
|  | int * | size_ret
| ) |  |

TODO FIX ME.

Encodes node data using a cipher.

Parameters

  node | The node.
  cipher_key | The key to use as cipher.
  size_ret | Number of bytes read from entry and returned.

References EET_G_UNKNOWN.

Referenced by eet_connection_node_send().

## ◆ eet_data_node_decode_cipher()

EAPI Eet_Node * eet_data_node_decode_cipher | ( | const void * | data_in,
|  | const char * | cipher_key,
|  | int | size_in
| ) |  |

TODO FIX ME.

Decodes node data using a cipher.

Parameters

  data_in | The pointer to the data to decode into a struct.
  cipher_key | The key to use as cipher.
  size_in | The size of the data pointed to in bytes.

Returns
  The decoded node.

## ◆ eet_data_node_read_cipher()

EAPI Eet_Node * eet_data_node_read_cipher | ( | Eet_File * | ef,
|  | const char * | name,
|  | const char * | cipher_key
| ) |  |

TODO FIX ME.

Reads a node data from an eet file and decodes it using a cipher.

Parameters

  ef | The eet file handle to read from.
  name | The key the data is stored under in the eet file.
  cipher_key | The key to use as cipher.

Returns
  A node to the decoded data structure.

References eet_dictionary_get(), eet_read_cipher(), and eet_read_direct().

## ◆ eet_data_node_write_cipher()

EAPI int eet_data_node_write_cipher | ( | Eet_File * | ef,
|  | const char * | name,
|  | const char * | cipher_key,
|  | Eet_Node * | node,
|  | int | compress
| ) |  |

TODO FIX ME.

Writes node data to the named key in an eet file using a cipher.

Parameters

  ef | The eet file handle to write to.
  name | The key to store the data under in the eet file.
  cipher_key | The key to use as cipher.
  node | The node.
  compress | Compression flags for storage.

Returns
  bytes written on successful write, 0 on failure.

References eet_dictionary_get(), EET_G_UNKNOWN, and eet_write_cipher().