libxr — developer's documentation

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

Data Structures | Typedefs | Enumerations | Functions
xr-value.h File Reference

Intermediate Representation of XML-RPC Values. More...

`#include "xr-lib.h"`

Go to the source code of this file.

## Data Structures

struct | _xr_blob
| Type used to pass blobs around in the user code. More...

## Typedefs

typedef struct _xr_value | xr_value
| Opaque data structure that holds information about particular node. More...
typedef struct _xr_blob | xr_blob
| Type used to pass blobs around in the user code. More...

## Enumerations

enum | _xr_value_node_type { XRV_ARRAY, XRV_STRUCT, XRV_MEMBER, XRV_INT, XRV_STRING, XRV_BOOLEAN, XRV_DOUBLE, XRV_TIME, XRV_BLOB }
| Value Node Types. More...

## Functions

G_BEGIN_DECLS xr_blob * | xr_blob_new (char *buf, int len)
| Create new blob. More...
void | xr_blob_unref (xr_blob *blob)
| Free blob. More...
xr_blob * | xr_blob_ref (xr_blob *blob)
| Take reference to blbo. More...
xr_value * | xr_value_ref (xr_value *val)
| Take reference to the node. More...
void | xr_value_unref (xr_value *val)
| Unref xr_value node. More...
xr_value * | xr_value_string_new (const char *val)
| Create new xr_value node of type XRV_STRING. More...
xr_value * | xr_value_int_new (int val)
| Create new xr_value node of type XRV_INT. More...
xr_value * | xr_value_bool_new (int val)
| Create new xr_value node of type XRV_BOOLEAN. More...
xr_value * | xr_value_double_new (double val)
| Create new xr_value node of type XRV_DOUBLE. More...
xr_value * | xr_value_time_new (const char *val)
| Create new xr_value node of type XRV_TIME. More...
xr_value * | xr_value_blob_new (xr_blob *val)
| Create new xr_value node of type XRV_BLOB. More...
gboolean | xr_value_to_int (xr_value *val, int *nval)
| Extract xr_value of type XRV_INT into the native language type. More...
gboolean | xr_value_to_string (xr_value *val, char **nval)
| Extract xr_value of type XRV_STRING into the native language type. More...
gboolean | xr_value_to_bool (xr_value *val, int *nval)
| Extract xr_value of type XRV_BOOLEAN into the native language type. More...
gboolean | xr_value_to_double (xr_value *val, double *nval)
| Extract xr_value of type XRV_DOUBLE into the native language type. More...
gboolean | xr_value_to_time (xr_value *val, char **nval)
| Extract xr_value of type XRV_TIME into the native language type. More...
gboolean | xr_value_to_blob (xr_value *val, xr_blob **nval)
| Extract xr_value of type XRV_BLOB into the native language type. More...
gboolean | xr_value_to_value (xr_value *val, xr_value **nval)
| Just a convenience interface to xr_value_ref. More...
int | xr_value_get_type (xr_value *val)
| Get type of xr_value node. More...
xr_value * | xr_value_array_new ()
| Create new array xr_value node. More...
void | xr_value_array_append (xr_value *arr, xr_value *val)
| Add value to the array node. More...
GSList * | xr_value_get_items (xr_value *arr)
| Get list of items from the array node. More...
xr_value * | xr_value_struct_new ()
| Create new struct xr_value node. More...
void | xr_value_struct_set_member (xr_value *str, const char *name, xr_value *val)
| Set struct member value. More...
xr_value * | xr_value_get_member (xr_value *str, const char *name)
| Get member value from the struct node. More...
GSList * | xr_value_get_members (xr_value *str)
| Get list of XRV_MEMBER nodes from the struct node. More...
const char * | xr_value_get_member_name (xr_value *mem)
| Get name of the struct member from the XRV_MEMBER node. More...
xr_value * | xr_value_get_member_value (xr_value *mem)
| Get value of the struct member from the XRV_MEMBER node. More...
gboolean | xr_value_is_error_retval (xr_value *val, int *errcode, char **errmsg)
| Check if given node is stadard XML-RPC error struct. More...
void | xr_value_dump (xr_value *v, GString *string, int indent)
| Debugging function that dumps node tree to the string. More...

## Detailed Description

Intermediate Representation of XML-RPC Values.

This code is used to manipulate tree of xr_value nodes, which represent all types defined in the XML-RPC specification.

These types are: int, string, boolean, double, time, base64 (blob), struct and array.

There is one additional node type to represent struct memeber (XRV_MEMBER).

Note
  You should not need to wory about this code unless you use any type in the XDL Language.

Documentation for libxr, Mon Jan 6 2014 07:31:24.