The Assimilation Project
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ConfigContext class

A base class for remembering configuration values of various types in a hash table with capabilities to go to and from JSON. More...

Collaboration diagram for ConfigContext class:

Macros

#define JSONREPLACES   "\\\"\b\f\n\r\t"
 
#define JSONREPLACEMENTS   "\\\"bfnrt"
 
#define TOKEN_COLON   ':'
 
#define GULP   (void)g_scanner_get_next_token(scan)
 
#define SYNERROR(scan, token, symbol, msg)   {g_warning("In Function %s line %d", __FUNCTION__, __LINE__);g_scanner_unexp_token(scan, token, "keyword", "keyword", symbol, msg, TRUE);}
 

Functions

FSTATIC void _key_free (gpointer vself)
 
ConfigContextconfigcontext_new (gsize objsize)
 Construct a new ConfigContext object - with no values defaulted. More...
 
FSTATIC void _configcontext_finalize (AssimObj *aself)
 Finalize (free) a ConfigContext object. More...
 
FSTATIC gint _configcontext_key_compare (gconstpointer a, gconstpointer b)
 Compare two string keys (for GSList sorting) More...
 
FSTATIC void _configcontext_delkey (const ConfigContext *cfg, const char *key)
 Delete the key with the given value. More...
 
FSTATIC guint _configcontext_keycount (const ConfigContext *cfg)
 Return the number of keys in a ConfigContext object. More...
 
FSTATIC GSList * _configcontext_keys (const ConfigContext *cfg)
 Return a GSList of all the keys in a ConfigContext object. More...
 
FSTATIC enum ConfigValType _configcontext_gettype (const ConfigContext *self, const char *name)
 Return a the type of value associated with a given name. More...
 
FSTATIC ConfigValue_configcontext_getvalue (const ConfigContext *self, const char *name)
 Return a the value structure associated with a given name. More...
 
FSTATIC gint64 _configcontext_getint (const ConfigContext *self, const char *name)
 Get an integer value. More...
 
FSTATIC void _configcontext_setint (ConfigContext *self, const char *name, gint value)
 Set a name to an integer value. More...
 
FSTATIC gboolean _configcontext_appendint (ConfigContext *, const char *name, gint value)
 
FSTATIC double _configcontext_getdouble (const ConfigContext *, const char *name)
 
FSTATIC void _configcontext_setdouble (ConfigContext *, const char *name, double value)
 
FSTATIC gboolean _configcontext_appenddouble (ConfigContext *, const char *name, double value)
 
FSTATIC gboolean _configcontext_getbool (const ConfigContext *self, const char *name)
 Get an boolean value. More...
 
FSTATIC void _configcontext_setbool (ConfigContext *self, const char *name, gint value)
 Set a name to an integer value. More...
 
FSTATIC gboolean _configcontext_appendbool (ConfigContext *, const char *name, gboolean value)
 
FSTATIC const char * _configcontext_getstring (const ConfigContext *self, const char *name)
 Return the value of a string name. More...
 
FSTATIC void _configcontext_setstring (ConfigContext *self,const char *name,const char *value)
 Set a name to a string value. More...
 
FSTATIC gboolean _configcontext_appendstring (ConfigContext *, const char *name, const char *value)
 
FSTATIC GSList * _configcontext_getarray (const ConfigContext *, const char *name)
 
FSTATIC void _configcontext_setarray (ConfigContext *, const char *name, GSList *value)
 
FSTATIC NetAddr_configcontext_getaddr (const ConfigContext *self, const char *name)
 Return the NetAddr value of a name. More...
 
FSTATIC void _configcontext_setaddr (ConfigContext *self, const char *name, NetAddr *addr)
 Set the NetAddr value of a name. More...
 
FSTATIC gboolean _configcontext_appendaddr (ConfigContext *self, const char *name, NetAddr *value)
 
FSTATIC Frame_configcontext_getframe (const ConfigContext *self, const char *name)
 Return the Frame class value of a name. More...
 
FSTATIC void _configcontext_setframe (ConfigContext *self, const char *name, Frame *frame)
 Set the signature frame to the given SignFrame. More...
 
FSTATIC ConfigContext_configcontext_getconfig (const ConfigContext *self, const char *name)
 Return a the a ConfigContext value associated with a given name. More...
 
FSTATIC void _configcontext_setconfig (ConfigContext *self, const char *name, ConfigContext *value)
 Save/Set a ConfigContext value associated with a given name. More...
 
FSTATIC gboolean _configcontext_appendconfig (ConfigContext *, const char *, ConfigContext *)
 
FSTATIC char * _configcontext_getstr (const ConfigContext *self, const char *name)
 Return a string value (toString) associated with a given name. More...
 
FSTATIC ConfigValue_configcontext_value_new (enum ConfigValType t)
 Create a ConfigValue object (containing an object and its type) More...
 
FSTATIC void _configcontext_value_vfinalize (void *vself)
 Finalize (free) a ConfigValue object. More...
 
FSTATIC void _configcontext_value_finalize (AssimObj *aself)
 
FSTATIC char * JSONquotestring (char *s)
 Escape characters in a string according to JSON conventions... More...
 
FSTATIC char * _configcontext_toString (gconstpointer aself)
 Convert a ConfigContext to a printable string (in JSON notation) More...
 
FSTATIC char * _configcontext_elem_toString (ConfigValue *val)
 Convert a ConfigContext element (ConfigValue) to a String. More...
 
FSTATIC GScanner * _configcontext_JSON_GScanner_new (void)
 Create a GScanner object that is set up to scan JSON text. More...
 
ConfigContextconfigcontext_new_JSON_string (const char *jsontext)
 Construct a ConfigContext object from the given JSON string. More...
 
FSTATIC ConfigContext_configcontext_JSON_parse_objandEOF (GScanner *scan)
 Parse complete JSON object followed by EOF. More...
 
FSTATIC ConfigContext_configcontext_JSON_parse_object (GScanner *scan)
 Parse a JSON object. More...
 
FSTATIC ConfigContext_configcontext_JSON_parse_members (GScanner *scan, ConfigContext *cfg)
 Parse a JSON (object) members (a list of "name" : "value" pairs) More...
 
FSTATIC ConfigContext_configcontext_JSON_parse_pair (GScanner *scan, ConfigContext *cfg)
 
FSTATIC ConfigValue_configcontext_JSON_parse_value (GScanner *scan)
 
FSTATIC gboolean _configcontext_JSON_parse_array (GScanner *scan, GSList **retval)
 
typedef struct _ConfigContext ConfigContext
 This is the base ConfigContext class object providing configuration context for our clients, and is managed by our C-Class Management system. More...
 

Detailed Description

A base class for remembering configuration values of various types in a hash table with capabilities to go to and from JSON.

Macro Definition Documentation

#define JSONREPLACEMENTS   "\\\"bfnrt"

Definition at line 644 of file configcontext.c.

Referenced by JSONquotestring().

#define JSONREPLACES   "\\\"\b\f\n\r\t"

Definition at line 643 of file configcontext.c.

Referenced by JSONquotestring().

#define SYNERROR (   scan,
  token,
  symbol,
  msg 
)    {g_warning("In Function %s line %d", __FUNCTION__, __LINE__);g_scanner_unexp_token(scan, token, "keyword", "keyword", symbol, msg, TRUE);}
#define TOKEN_COLON   ':'

Definition at line 821 of file configcontext.c.

Referenced by _configcontext_JSON_parse_pair().

Typedef Documentation

typedef struct _ConfigContext ConfigContext

This is the base ConfigContext class object providing configuration context for our clients, and is managed by our C-Class Management system.

It provides the analog of global variables for remembering configuration defaults, etc, but in a hash table, with capabilities to go to and from JSON.

Definition at line 42 of file configcontext.h.

Function Documentation

FSTATIC gboolean _configcontext_appendaddr ( ConfigContext self,
const char *  name,
NetAddr value 
)

Definition at line 477 of file configcontext.c.

References _configcontext_value_new(), _ConfigValue::addrvalue, _ConfigValue::arrayvalue, CFG_ARRAY, CFG_NETADDR, REF, _ConfigValue::u, and _ConfigValue::valtype.

Referenced by configcontext_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC gboolean _configcontext_appendbool ( ConfigContext self,
const char *  name,
gboolean  value 
)

Definition at line 363 of file configcontext.c.

References _configcontext_value_new(), _ConfigValue::arrayvalue, CFG_ARRAY, CFG_BOOL, _ConfigValue::intvalue, _ConfigValue::u, and _ConfigValue::valtype.

Referenced by configcontext_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC gboolean _configcontext_appendconfig ( ConfigContext self,
const char *  name,
ConfigContext value 
)

Definition at line 550 of file configcontext.c.

References _configcontext_value_new(), _ConfigValue::arrayvalue, CFG_ARRAY, CFG_CFGCTX, _ConfigValue::cfgctxvalue, REF, _ConfigValue::u, and _ConfigValue::valtype.

Referenced by configcontext_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC gboolean _configcontext_appenddouble ( ConfigContext self,
const char *  name,
double  value 
)

Definition at line 319 of file configcontext.c.

References _configcontext_value_new(), _ConfigValue::arrayvalue, CFG_ARRAY, CFG_FLOAT, _ConfigValue::floatvalue, _ConfigValue::u, and _ConfigValue::valtype.

Here is the call graph for this function:

FSTATIC gboolean _configcontext_appendint ( ConfigContext self,
const char *  name,
gint  value 
)

Definition at line 293 of file configcontext.c.

References _configcontext_value_new(), _ConfigValue::arrayvalue, CFG_ARRAY, CFG_INT64, _ConfigValue::intvalue, _ConfigValue::u, and _ConfigValue::valtype.

Referenced by configcontext_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC gboolean _configcontext_appendstring ( ConfigContext self,
const char *  name,
const char *  value 
)

Definition at line 405 of file configcontext.c.

References _configcontext_value_new(), _ConfigValue::arrayvalue, CFG_ARRAY, CFG_STRING, _ConfigValue::strvalue, _ConfigValue::u, and _ConfigValue::valtype.

Referenced by configcontext_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC void _configcontext_delkey ( const ConfigContext cfg,
const char *  key 
)

Delete the key with the given value.

Definition at line 197 of file configcontext.c.

References _ConfigContext::_values.

Referenced by configcontext_new().

Here is the caller graph for this function:

FSTATIC char * _configcontext_elem_toString ( ConfigValue val)

Convert a ConfigContext element (ConfigValue) to a String.

Todo:
  • make NetAddrs into things that we can recognize and make back into a NetAddr when we parse the JSON.

Definition at line 700 of file configcontext.c.

References _ConfigValue::addrvalue, _ConfigValue::arrayvalue, _ConfigContext::baseclass, CASTTOCLASS, CFG_ARRAY, CFG_BOOL, CFG_CFGCTX, CFG_EEXIST, CFG_FLOAT, CFG_FRAME, CFG_INT64, CFG_NETADDR, CFG_NULL, CFG_STRING, _ConfigValue::cfgctxvalue, _ConfigValue::floatvalue, FMT_64BIT, _ConfigValue::framevalue, FREE, _ConfigValue::intvalue, JSONquotestring(), _ConfigValue::strvalue, _AssimObj::toString, _ConfigValue::u, and _ConfigValue::valtype.

Referenced by _configcontext_getstr(), and _configcontext_toString().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC void _configcontext_finalize ( AssimObj self)

Finalize (free) a ConfigContext object.

Definition at line 177 of file configcontext.c.

References CASTTOCLASS, and FREECLASSOBJ.

Referenced by configcontext_new().

Here is the caller graph for this function:

FSTATIC NetAddr * _configcontext_getaddr ( const ConfigContext self,
const char *  name 
)

Return the NetAddr value of a name.

Parameters
[in]selfConfigContext object
[in]nameName to get the NetAddr value of

Definition at line 446 of file configcontext.c.

References _ConfigValue::addrvalue, CASTTOCLASS, CFG_NETADDR, _ConfigValue::u, and _ConfigValue::valtype.

Referenced by configcontext_new().

Here is the caller graph for this function:

FSTATIC GSList * _configcontext_getarray ( const ConfigContext self,
const char *  name 
)

Definition at line 417 of file configcontext.c.

References _ConfigValue::arrayvalue, CASTTOCLASS, CFG_ARRAY, _ConfigValue::u, and _ConfigValue::valtype.

Referenced by configcontext_new().

Here is the caller graph for this function:

FSTATIC gboolean _configcontext_getbool ( const ConfigContext self,
const char *  name 
)

Get an boolean value.

Parameters
[in]selfConfigContext object
[in]nameName to get the associated int value of

Definition at line 332 of file configcontext.c.

References CASTTOCLASS, CFG_BOOL, _ConfigValue::intvalue, _ConfigValue::u, and _ConfigValue::valtype.

Referenced by configcontext_new().

Here is the caller graph for this function:

FSTATIC ConfigContext * _configcontext_getconfig ( const ConfigContext self,
const char *  name 
)

Return a the a ConfigContext value associated with a given name.

Definition at line 524 of file configcontext.c.

References CASTTOCLASS, CFG_CFGCTX, _ConfigValue::cfgctxvalue, _ConfigValue::u, and _ConfigValue::valtype.

Referenced by configcontext_new().

Here is the caller graph for this function:

FSTATIC double _configcontext_getdouble ( const ConfigContext self,
const char *  name 
)
FSTATIC Frame * _configcontext_getframe ( const ConfigContext self,
const char *  name 
)

Return the Frame class value of a name.

Parameters
[in]selfConfigContext object
[in]nameName to retrieve the Frame class value of

Definition at line 491 of file configcontext.c.

References CASTTOCLASS, CFG_FRAME, _ConfigValue::framevalue, _ConfigValue::u, and _ConfigValue::valtype.

Referenced by configcontext_new().

Here is the caller graph for this function:

FSTATIC gint64 _configcontext_getint ( const ConfigContext self,
const char *  name 
)

Get an integer value.

Parameters
[in]selfConfigContext object
[in]nameName to get the associated int value of

Definition at line 263 of file configcontext.c.

References CASTTOCLASS, CFG_INT64, _ConfigValue::intvalue, _ConfigValue::u, and _ConfigValue::valtype.

Referenced by configcontext_new().

Here is the caller graph for this function:

FSTATIC char * _configcontext_getstr ( const ConfigContext self,
const char *  name 
)

Return a string value (toString) associated with a given name.

Definition at line 564 of file configcontext.c.

References _configcontext_elem_toString().

Here is the call graph for this function:

FSTATIC const char * _configcontext_getstring ( const ConfigContext self,
const char *  name 
)

Return the value of a string name.

Parameters
[in]selfConfigContext object
[in]nameName to get the associated string value of

Definition at line 376 of file configcontext.c.

References CASTTOCLASS, CFG_STRING, _ConfigValue::strvalue, _ConfigValue::u, and _ConfigValue::valtype.

Referenced by configcontext_new().

Here is the caller graph for this function:

FSTATIC enum ConfigValType _configcontext_gettype ( const ConfigContext self,
const char *  name 
)

Return a the type of value associated with a given name.

Definition at line 241 of file configcontext.c.

References CFG_EEXIST, and _ConfigValue::valtype.

Referenced by configcontext_new().

Here is the caller graph for this function:

FSTATIC ConfigValue * _configcontext_getvalue ( const ConfigContext self,
const char *  name 
)

Return a the value structure associated with a given name.

Definition at line 252 of file configcontext.c.

References CASTTOCLASS.

Referenced by configcontext_new().

Here is the caller graph for this function:

FSTATIC GScanner * _configcontext_JSON_GScanner_new ( void  )

Create a GScanner object that is set up to scan JSON text.

See JSON web site for details on JSON syntax.

Definition at line 767 of file configcontext.c.

References obsolete_cma::config.

Referenced by configcontext_new_JSON_string().

Here is the caller graph for this function:

FSTATIC gboolean _configcontext_JSON_parse_array ( GScanner *  scan,
GSList **  retval 
)

Definition at line 1043 of file configcontext.c.

References _configcontext_JSON_parse_value(), _configcontext_value_vfinalize(), g_slist_free_full, GULP, and SYNERROR.

Referenced by _configcontext_JSON_parse_value().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC ConfigContext * _configcontext_JSON_parse_members ( GScanner *  scan,
ConfigContext cfg 
)

Parse a JSON (object) members (a list of "name" : "value" pairs)

Definition at line 888 of file configcontext.c.

References _configcontext_JSON_parse_pair(), and GULP.

Referenced by _configcontext_JSON_parse_object().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC ConfigContext * _configcontext_JSON_parse_objandEOF ( GScanner *  scan)

Parse complete JSON object followed by EOF.

Definition at line 842 of file configcontext.c.

References _configcontext_JSON_parse_object(), SYNERROR, and UNREF.

Referenced by configcontext_new_JSON_string().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC ConfigContext * _configcontext_JSON_parse_object ( GScanner *  scan)

Parse a JSON object.

Definition at line 855 of file configcontext.c.

References _configcontext_JSON_parse_members(), configcontext_new(), GULP, SYNERROR, and UNREF.

Referenced by _configcontext_JSON_parse_objandEOF(), and _configcontext_JSON_parse_value().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC ConfigContext * _configcontext_JSON_parse_pair ( GScanner *  scan,
ConfigContext cfg 
)

Definition at line 903 of file configcontext.c.

References _configcontext_JSON_parse_value(), _ConfigContext::_values, GULP, cma.store::name, SYNERROR, and TOKEN_COLON.

Referenced by _configcontext_JSON_parse_members().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC ConfigValue * _configcontext_JSON_parse_value ( GScanner *  scan)
Todo:
recognize NetAddr objects encoded as strings and reconstitute them

FIXME: Need to make the conversion to a NetAddr optional...

Definition at line 946 of file configcontext.c.

References _configcontext_JSON_parse_array(), _configcontext_JSON_parse_object(), _configcontext_value_new(), _ConfigValue::addrvalue, _ConfigValue::arrayvalue, CFG_ARRAY, CFG_BOOL, CFG_CFGCTX, CFG_FLOAT, CFG_INT64, CFG_NETADDR, CFG_NULL, CFG_STRING, _ConfigValue::cfgctxvalue, _ConfigValue::floatvalue, GULP, _ConfigValue::intvalue, netaddr_string_new(), _ConfigValue::strvalue, SYNERROR, and _ConfigValue::u.

Referenced by _configcontext_JSON_parse_array(), and _configcontext_JSON_parse_pair().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC gint _configcontext_key_compare ( gconstpointer  a,
gconstpointer  b 
)

Compare two string keys (for GSList sorting)

Definition at line 190 of file configcontext.c.

Referenced by _configcontext_keys().

Here is the caller graph for this function:

FSTATIC guint _configcontext_keycount ( const ConfigContext cfg)

Return the number of keys in a ConfigContext object.

Definition at line 203 of file configcontext.c.

References _ConfigContext::_values.

Referenced by configcontext_new().

Here is the caller graph for this function:

FSTATIC GSList * _configcontext_keys ( const ConfigContext cfg)

Return a GSList of all the keys in a ConfigContext object.

Definition at line 219 of file configcontext.c.

References _configcontext_key_compare(), and _ConfigContext::_values.

Referenced by configcontext_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC void _configcontext_setaddr ( ConfigContext self,
const char *  name,
NetAddr addr 
)

Set the NetAddr value of a name.

Parameters
[in,out]selfConfigContext object
[in]nameName to set to 'addr' (we copy it)
[in,out]addrAddress to set it to (we hold a ref to it)

Definition at line 464 of file configcontext.c.

References _configcontext_value_new(), _ConfigValue::addrvalue, CFG_NETADDR, REF, and _ConfigValue::u.

Referenced by configcontext_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC void _configcontext_setarray ( ConfigContext self,
const char *  name,
GSList *  value 
)
Todo:
WHAT ABOUT OBJECT LIFE??

Definition at line 434 of file configcontext.c.

References _configcontext_value_new(), _ConfigValue::arrayvalue, CFG_ARRAY, and _ConfigValue::u.

Referenced by configcontext_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC void _configcontext_setbool ( ConfigContext self,
const char *  name,
gint  value 
)

Set a name to an integer value.

Parameters
[in,out]selfConfigContext Object
[in]nameName to set the associated int value of
[in]valueInt value to set the 'name' to

Definition at line 351 of file configcontext.c.

References _configcontext_value_new(), CFG_BOOL, _ConfigValue::intvalue, and _ConfigValue::u.

Here is the call graph for this function:

FSTATIC void _configcontext_setconfig ( ConfigContext self,
const char *  name,
ConfigContext value 
)

Save/Set a ConfigContext value associated with a given name.

Definition at line 540 of file configcontext.c.

References _configcontext_value_new(), CFG_CFGCTX, _ConfigValue::cfgctxvalue, REF, and _ConfigValue::u.

Referenced by configcontext_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC void _configcontext_setdouble ( ConfigContext self,
const char *  name,
double  value 
)

Definition at line 312 of file configcontext.c.

References _configcontext_value_new(), CFG_FLOAT, _ConfigValue::floatvalue, and _ConfigValue::u.

Here is the call graph for this function:

FSTATIC void _configcontext_setframe ( ConfigContext self,
const char *  name,
Frame frame 
)

Set the signature frame to the given SignFrame.

Parameters
[in,out]selfConfigContext object
[in]namename to set value of (we copy it)
[in,out]frameFrame class value to set 'name' to (we hold a ref to it)

Definition at line 509 of file configcontext.c.

References _configcontext_value_new(), CFG_FRAME, _ConfigValue::framevalue, REF, and _ConfigValue::u.

Referenced by configcontext_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC void _configcontext_setint ( ConfigContext self,
const char *  name,
gint  value 
)

Set a name to an integer value.

Parameters
[in,out]selfConfigContext Object
[in]nameName to set the associated int value of
[in]valueInt value to set the 'name' to

Definition at line 282 of file configcontext.c.

References _configcontext_value_new(), CFG_INT64, _ConfigValue::intvalue, and _ConfigValue::u.

Referenced by configcontext_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC void _configcontext_setstring ( ConfigContext self,
const char *  name,
const char *  value 
)

Set a name to a string value.

Parameters
[in,out]selfConfigContext object
[in]nameName to set the string value of (we copy it)
[in]valueValue to set 'name' to (we copy it)

Definition at line 394 of file configcontext.c.

References _configcontext_value_new(), CFG_STRING, _ConfigValue::strvalue, and _ConfigValue::u.

Referenced by configcontext_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC char * _configcontext_toString ( gconstpointer  aself)

Convert a ConfigContext to a printable string (in JSON notation)

Definition at line 672 of file configcontext.c.

References _configcontext_elem_toString(), and CASTTOCONSTCLASS.

Referenced by configcontext_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC void _configcontext_value_finalize ( AssimObj aself)

Definition at line 599 of file configcontext.c.

References _configcontext_value_vfinalize(), CASTTOCLASS, CFG_ARRAY, CFG_CFGCTX, CFG_EEXIST, CFG_FRAME, CFG_NETADDR, CFG_STRING, FREECLASSOBJ, g_slist_free_full, and UNREF.

Referenced by _configcontext_value_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC void _configcontext_value_vfinalize ( void *  vself)

Finalize (free) a ConfigValue object.

Definition at line 590 of file configcontext.c.

References CASTTOCLASS, and UNREF.

FSTATIC void _key_free ( gpointer  vself)

Definition at line 125 of file configcontext.c.

Referenced by configcontext_new().

Here is the caller graph for this function:

ConfigContext* configcontext_new ( gsize  objsize)

Construct a new ConfigContext object - with no values defaulted.

Parameters
objsizesize of ConfigContext structure (or zero for min size)

Definition at line 134 of file configcontext.c.

References _configcontext_appendaddr(), _configcontext_appendbool(), _configcontext_appendconfig(), _configcontext_appendint(), _configcontext_appendstring(), _configcontext_delkey(), _configcontext_finalize(), _configcontext_getaddr(), _configcontext_getarray(), _configcontext_getbool(), _configcontext_getconfig(), _configcontext_getframe(), _configcontext_getint(), _configcontext_getstring(), _configcontext_gettype(), _configcontext_getvalue(), _configcontext_keycount(), _configcontext_keys(), _configcontext_setaddr(), _configcontext_setarray(), _configcontext_setbool(), _configcontext_setconfig(), _configcontext_setframe(), _configcontext_setint(), _configcontext_setstring(), _configcontext_toString(), _configcontext_value_vfinalize(), _AssimObj::_finalize, _key_free(), _ConfigContext::_values, _ConfigContext::appendaddr, _ConfigContext::appendbool, _ConfigContext::appendconfig, _ConfigContext::appendint, _ConfigContext::appendstring, assimobj_new(), _ConfigContext::delkey, _ConfigContext::getaddr, _ConfigContext::getarray, _ConfigContext::getbool, _ConfigContext::getconfig, _ConfigContext::getframe, _ConfigContext::getint, _ConfigContext::getstring, _ConfigContext::gettype, _ConfigContext::getvalue, _ConfigContext::keycount, _ConfigContext::keys, NEWSUBCLASS, _ConfigContext::setaddr, _ConfigContext::setarray, _ConfigContext::setbool, _ConfigContext::setconfig, _ConfigContext::setframe, _ConfigContext::setint, _ConfigContext::setstring, and _AssimObj::toString.

Referenced by cma.AssimCclasses.pyConfigContext::__init__(), _childprocess_toString(), _configcontext_JSON_parse_object(), _nano_send_rscexitstatus(), create_sendexpecthb(), main(), and resourceocf_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC char * JSONquotestring ( char *  s)

Escape characters in a string according to JSON conventions...

Definition at line 647 of file configcontext.c.

References JSONREPLACEMENTS, and JSONREPLACES.

Referenced by _configcontext_elem_toString().

Here is the caller graph for this function: