Alchemist  0.8
Classes | Macros | Typedefs | Enumerations | Functions
alchemist.h File Reference
#include <sys/types.h>

Go to the source code of this file.

Classes

struct  adm_bb_cap_t
 

Macros

#define ALCHEMIST_ABI_MAJOR_VER   0
 
#define ALCHEMIST_ABI_MINOR_VER   0
 
#define ADM_EDEADNODE   1 /** The node has been unlinked **/
 
#define ADM_EBADTYPE
 
#define ADM_EBADNAME   3 /** The name used is not valid (illegal chars) **/
 
#define ADM_EBADDATA   4 /** Bad data was passed as input **/
 
#define ADM_ECONSTRAINT   5 /** A data constraint was violated **/
 
#define ADM_ENOINDEX   51 /** The reqeusted index is out of range **/
 
#define ADM_ENONAME   52 /** The reqeusted name was not found **/
 
#define ADM_ENOPATH   53 /** The reqeusted path was not found **/
 
#define ADM_EACCESSFAILED   101 /** The access failed **/
 
#define ADM_ENONAMESPACE   102 /** The namespace could not be found **/
 
#define ADM_ENOSUBSPACE   103 /** The subspace could not be found **/
 
#define ADM_ENOWRITE   201 /** This AdmBlackBox does not support writes **/
 
#define ADM_ENOREAD   202 /** This AdmBlackBox does not support reads **/
 
#define ADM_ENOLISTSERIAL   203 /** This AdmBlackBox does not support listSerial **/
 
#define ADM_ENOREADSERIAL   204 /** This AdmBlackBox does not support readSerial **/
 
#define ADM_ENOCACHE   205 /** This AdmBlackBox is not being cached **/
 
#define ADM_ENOBOXTYPE   251 /** The boxtype in question could not be found **/
 
#define ADM_EPARSE   301 /** The xml parse failed **/
 
#define AdmRefStr_str(REFSTR)
 
#define AdmContext_getIdentityRoot_b(CONTEXT, ERROR)
 
#define AdmIdentity_getParentA_b(ID, ERROR)
 
#define AdmIdentity_getParentB_b(ID, ERROR)
 
#define AdmIdentity_getContext_b(ID, ERROR)
 
#define AdmContext_getDataRoot_b(CONTEXT, ERROR)
 
#define AdmData_getContainer_b(DATA, ERROR)
 
#define AdmData_getPrev_b(DATA, WRAP, ERROR)
 
#define AdmData_getNext_b(DATA, WRAP, ERROR)
 
#define AdmData_getContext_b(DATA, ERROR)
 
#define AdmContext_getDataByPath_b(CONTEXT, PATH, ERROR)
 
#define AdmList_getDataByIndex_b(LIST, INDEX, ERROR)
 
#define AdmList_getDataByName_b(LIST, NAME, ERROR)
 
#define AdmList_getDataByPath_b(LIST, PATH, ERROR)
 
#define AdmList_addData_b(LIST, TYPE, NAME, ERROR)
 
#define AdmList_copyData_b(LIST, DATA, ERROR)
 
#define AdmList_renameCopyData_b(LIST, DATA, NAME, ERROR)
 
#define ADM_BBCAP_SUP_WRITE(CAP)   ((CAP).array[0] & (1 << 0))
 
#define ADM_BBCAP_SUP_READ(CAP)   ((CAP).array[0] & (1 << 1))
 
#define ADM_BBCAP_SUP_LISTSERIAL(CAP)   ((CAP).array[0] & (1 << 2))
 
#define ADM_BBCAP_SUP_READSERIAL(CAP)   ((CAP).array[0] & (1 << 3))
 
#define ADM_BBCAP_CACHED(CAP)   ((CAP).array[0] & (1 << 4))
 
#define AdmSwitchboard_getNspCfg_b(CTX, NAMESPACE, ERROR)
 
#define AdmSwitchboard_getSubspCfg_b(CTX, SUBSPACE, ERROR)
 

Typedefs

typedef struct AdmError AdmError
 
typedef struct AdmRefStr AdmRefStr
 
typedef struct AdmData AdmData
 
typedef struct AdmList AdmList
 
typedef struct AdmInt AdmInt
 
typedef struct AdmBool AdmBool
 
typedef struct AdmFloat AdmFloat
 
typedef struct AdmString AdmString
 
typedef struct AdmString AdmBase64
 
typedef struct AdmString AdmCopy
 
typedef struct AdmIdentity AdmIdentity
 
typedef struct AdmContext AdmContext
 
typedef struct AdmBlackBox AdmBlackBox
 

Enumerations

enum  AdmDataType {
  ADM_TYPE_UNKNOWN = 0, ADM_TYPE_LIST = 1, ADM_TYPE_COPY = 2, ADM_TYPE_INT = 3,
  ADM_TYPE_FLOAT = 4, ADM_TYPE_BOOL = 5, ADM_TYPE_STRING = 6, ADM_TYPE_BASE64 = 7
}
 

Functions

void AdmError_create (AdmError **error, int num, const char *format,...)
 Allocate new AdmError structure. More...
 
void AdmError_ref (AdmError *error)
 Increment the ref count of an AdmError structure. More...
 
void AdmError_unref (AdmError *error)
 Decrement the ref count of an AdmError structure. More...
 
const char * AdmError_strerr (AdmError *error)
 String description of error. More...
 
int AdmError_errno (AdmError *error)
 Integer error code of error. More...
 
AdmRefStrAdmRefStr_ref (AdmRefStr *refstr)
 
void AdmRefStr_unref (AdmRefStr *refstr)
 
size_t AdmRefStr_len (AdmRefStr *refstr)
 
AdmRefStrAdmRefStr_get (const char *str, int force)
 Get an AdmRefStr. More...
 
AdmRefStrAdmRefStr_nget (const char *str, size_t len, int force)
 Get an AdmRefStr, by length. More...
 
AdmContextAdmContext_new (const char *name, unsigned int serial, AdmError **error)
 AdmContext constructor. More...
 
AdmContextAdmContext_ref (AdmContext *context, AdmError **error)
 AdmContext reference increment. More...
 
void AdmContext_unref (AdmContext *context, AdmError **error)
 AdmContext reference decrement. More...
 
AdmContextAdmContext_copy (AdmContext *context, AdmError **error)
 AdmContext copy operator. More...
 
AdmContextAdmContext_merge (const char *name, unsigned int serial, AdmContext *contextA, AdmContext *contextB, AdmError **error)
 AdmContext merge operator. More...
 
void AdmContext_flatten (AdmContext *context, AdmError **error)
 AdmContext flatten operator. More...
 
void AdmContext_strip (AdmContext *context, AdmError **error)
 AdmContext strip function. More...
 
char * AdmContext_toXML (AdmContext *context, AdmError **error)
 
AdmContextAdmContext_fromXML (const char *xml, AdmError **error)
 
int AdmContext_readFromFile (AdmContext **context, const char *path, AdmError **error)
 
int AdmContext_writeToFile (AdmContext *context, const char *path, int mode, uid_t uid, gid_t gid, AdmError **error)
 
AdmRefStrAdmContext_getMask (AdmContext *context, unsigned int index, AdmError **error)
 AdmContext mask set accessor. More...
 
int AdmContext_setMask (AdmContext *context, const char *path, AdmError **error)
 AdmContext mask set mutator. More...
 
int AdmContext_clearMaskByIndex (AdmContext *context, unsigned int index, AdmError **error)
 AdmContext mask set element index remove. More...
 
int AdmContext_clearMaskByPath (AdmContext *context, const char *path, AdmError **error)
 AdmContext mask set element data path remove. More...
 
unsigned int AdmContext_getNumMasks (AdmContext *context, AdmError **error)
 AdmContext mask set length aggregator. More...
 
AdmIdentityAdmContext_getIdentityRoot (AdmContext *context, AdmError **error)
 AdmContext identity root accessor. More...
 
AdmIdentityAdmIdentity_getParentA (AdmIdentity *identity, AdmError **error)
 AdmIdentity parentA accessor. More...
 
AdmIdentityAdmIdentity_getParentB (AdmIdentity *identity, AdmError **error)
 AdmIdentity parentB accessor. More...
 
AdmRefStrAdmIdentity_getName (AdmIdentity *identity, AdmError **error)
 AdmIdentity name accessor. More...
 
int AdmIdentity_setName (AdmIdentity *identity, const char *name, AdmError **error)
 AdmIdentity name mutator. More...
 
unsigned int AdmIdentity_getSerial (AdmIdentity *identity, AdmError **error)
 AdmIdentity serial number accessor. More...
 
int AdmIdentity_setSerial (AdmIdentity *identity, unsigned int serial, AdmError **error)
 AdmIdentity serial number mutator. More...
 
AdmIdentityAdmIdentity_ref (AdmIdentity *identity, AdmError **error)
 AdmIdentity reference increment. More...
 
void AdmIdentity_unref (AdmIdentity *identity, AdmError **error)
 AdmIdentity reference decrement. More...
 
AdmContextAdmIdentity_getContext (AdmIdentity *identity, AdmError **error)
 AdmIdentity context accessor. More...
 
int AdmIdentity_isAlive (AdmIdentity *identity, AdmError **error)
 AdmIdentity reference check. More...
 
AdmDataAdmContext_getDataRoot (AdmContext *context, AdmError **error)
 AdmContext data root accessor. More...
 
AdmDataAdmData_getContainer (AdmData *data, AdmError **error)
 AdmData container accessor. More...
 
AdmDataAdmData_getPrev (AdmData *data, int wrap, AdmError **error)
 get the previous sibling of an AdmData element More...
 
AdmDataAdmData_getNext (AdmData *data, int wrap, AdmError **error)
 get the next sibling of an AdmData element More...
 
AdmContextAdmData_getContext (AdmData *data, AdmError **error)
 AdmData context accessor. More...
 
AdmDataAdmContext_getDataByPath (AdmContext *context, const char *path, AdmError **error)
 AdmData path lookup. More...
 
AdmDataType AdmData_getType (AdmData *data, AdmError **error)
 AdmData type accessor. More...
 
AdmDataAdmData_ref (AdmData *data, AdmError **error)
 AdmData reference increment. More...
 
void AdmData_unref (AdmData *data, AdmError **error)
 AdmData reference decrement. More...
 
int AdmData_isAlive (AdmData *data, AdmError **error)
 AdmData reference check. More...
 
int AdmData_unlink (AdmData *data, AdmError **error)
 AdmData unlink operator. More...
 
int AdmData_validName (const char *name)
 Checks a string for name validity. More...
 
AdmRefStrAdmData_getName (AdmData *data, AdmError **error)
 AdmData name accessor. More...
 
int AdmData_setName (AdmData *data, const char *name, AdmError **error)
 AdmData name mutator. More...
 
AdmRefStrAdmData_getSource (AdmData *data, AdmError **error)
 AdmData source accessor. More...
 
int AdmData_setSource (AdmData *data, const char *source, AdmError **error)
 AdmData source mutator. More...
 
int AdmData_isProtected (AdmData *data, AdmError **error)
 AdmData protected verification. More...
 
int AdmData_setProtected (AdmData *data, int state, AdmError **error)
 AdmData protected mutator. More...
 
int AdmList_isAnonymous (AdmList *list, AdmError **error)
 AdmList anonymous verification. More...
 
int AdmList_setAnonymous (AdmList *list, int state, AdmError **error)
 AdmList anonymous mutator. More...
 
int AdmList_isAtomic (AdmList *list, AdmError **error)
 AdmList atomic verification. More...
 
int AdmList_setAtomic (AdmList *list, int state, AdmError **error)
 AdmList atomic mutator. More...
 
int AdmList_isPrepend (AdmList *list, AdmError **error)
 AdmList prepend verification. More...
 
int AdmList_setPrepend (AdmList *list, int state, AdmError **error)
 AdmList prepend mutator. More...
 
unsigned int AdmList_getNumData (AdmList *list, AdmError **error)
 AdmList length aggregator. More...
 
AdmDataAdmList_getDataByIndex (AdmList *list, unsigned int index, AdmError **error)
 AdmList child index accessor. More...
 
AdmDataAdmList_getDataByName (AdmList *list, const char *name, AdmError **error)
 AdmList child name accessor. More...
 
AdmDataAdmList_getDataByPath (AdmList *list, const char *path, AdmError **error)
 AdmList child data path accessor. More...
 
AdmDataAdmList_addData (AdmList *list, AdmDataType type, const char *name, AdmError **error)
 AdmList add child operator. More...
 
int AdmList_moveData (AdmList *list, AdmData *data, unsigned int index, AdmError **error)
 AdmList child move operator. More...
 
AdmDataAdmList_copyData (AdmList *list, AdmData *data, AdmError **error)
 AdmList copy data operator. More...
 
AdmDataAdmList_renameCopyData (AdmList *list, AdmData *data, const char *name, AdmError **error)
 AdmList copy data operator. More...
 
unsigned int AdmData_getPos (AdmData *data, AdmError **error)
 AdmList child position operator. More...
 
int AdmInt_getValue (AdmInt *int_scalar, AdmError **error)
 get an AdmInt's value More...
 
int AdmInt_setValue (AdmInt *int_scalar, int value, AdmError **error)
 set an AdmInt's value More...
 
double AdmFloat_getValue (AdmFloat *float_scalar, AdmError **error)
 get an AdmFloat's value More...
 
int AdmFloat_setValue (AdmFloat *float_scalar, double value, AdmError **error)
 set an AdmFloat's value More...
 
int AdmBool_getValue (AdmBool *bool_scalar, AdmError **error)
 get an AdmBool's value More...
 
int AdmBool_setValue (AdmBool *bool_scalar, int value, AdmError **error)
 set an AdmBool's value More...
 
AdmRefStrAdmString_getValue (AdmString *string_scalar, AdmError **error)
 get an AdmString's value More...
 
int AdmString_setValue (AdmString *string_scalar, const char *value, AdmError **error)
 
AdmRefStrAdmBase64_getValue (AdmBase64 *base64_scalar, AdmError **error)
 
int AdmBase64_setValue (AdmBase64 *base64_scalar, const char *value, AdmError **error)
 Set the value of an AdmBase64 element. More...
 
size_t AdmBase64_getBinValue (AdmBase64 *base64_scalar, void **value, AdmError **error)
 Get the binary value of an AdmBase64 element. More...
 
int AdmBase64_setBinValue (AdmBase64 *base64_scalar, const void *value, size_t size, AdmError **error)
 Set the value of an AdmBase64 element. More...
 
AdmRefStrAdmCopy_getValue (AdmCopy *copy_scalar, AdmError **error)
 Get the value of an AdmCopy element. More...
 
int AdmCopy_setValue (AdmCopy *copy_scalar, const char *value, AdmError **error)
 Set the value of an AdmCopy element. More...
 
AdmRefStrAdmBlackBox_getCacheDir (AdmError **error)
 
int AdmBlackBox_setCacheDir (const char *path, AdmError **error)
 
AdmBlackBoxAdmBlackBox_getBox (AdmList *box_cfg, AdmError **error)
 
adm_bb_cap_t AdmBlackBox_caps (AdmBlackBox *box, AdmError **error)
 AdmBlackBox capability querry. More...
 
void AdmBlackBox_ref (AdmBlackBox *box, AdmError **error)
 AdmBlackbox reference increment. More...
 
void AdmBlackBox_unref (AdmBlackBox *box, AdmError **error)
 AdmBlackbox reference decrement. More...
 
AdmContextAdmBlackBox_read (AdmBlackBox *box, AdmError **error)
 AdmBlackbox read operator. More...
 
int AdmBlackBox_listSerial (AdmBlackBox *box, unsigned int *array, unsigned int array_len, unsigned int top_serial, AdmError **error)
 AdmBlackbox serial list request. More...
 
AdmContextAdmBlackBox_readSerial (AdmBlackBox *box, unsigned int serial, AdmError **error)
 AdmBlackbox serial list request. More...
 
int AdmBlackBox_write (AdmBlackBox *box, AdmContext *context, AdmError **error)
 AdmBlackbox write operator. More...
 
unsigned int AdmBlackBox_getMark (AdmBlackBox *box, const char *mark, AdmError **error)
 AdmBlackBox mark accessor. More...
 
int AdmBlackBox_setMark (AdmBlackBox *box, const char *mark, AdmError **error)
 AdmBlackBox mark mutator. More...
 
int AdmBlackBox_clearMark (AdmBlackBox *box, const char *mark, AdmError **error)
 AdmBlackbox mark destructor. More...
 
AdmRefStrAdmSwitchboard_getSwbDir (AdmError **error)
 
int AdmSwitchboard_setSwbDir (const char *path, AdmError **error)
 
int AdmSwitchboard_markNsp (const char *namespace, const char *subspace, const char *mark, AdmError **error)
 
int AdmSwitchboard_markNspWithConfig (AdmList *namespace_cfg, const char *subspace, const char *mark, AdmError **error)
 
int AdmSwitchboard_checkNspMark (const char *namespace, const char *subspace, const char *mark, AdmError **error)
 
int AdmSwitchboard_checkNspMarkWithConfig (AdmList *namespace_cfg, const char *subspace, const char *mark, AdmError **error)
 
AdmContextAdmSwitchboard_readNsp (const char *namespace, const char *subspace, unsigned int depth, AdmError **error)
 
AdmContextAdmSwitchboard_readNspWithConfig (AdmList *namespace_cfg, const char *subspace, unsigned int depth, AdmError **error)
 
int AdmSwitchboard_writeNsp (const char *namespace, const char *subspace, AdmContext *context, AdmError **error)
 
int AdmSwitchboard_writeNspWithConfig (AdmList *namespace_cfg, const char *subspace, AdmContext *context, AdmError **error)
 
AdmContextAdmSwitchboard_readNspCtx (const char *namespace, AdmError **error)
 read a switchboard namespace configuration from the system More...
 
int AdmSwitchboard_writeNspCtx (const char *namespace, AdmContext *namespace_ctx, int mode, uid_t uid, gid_t gid, AdmError **error)
 writes a switchboard namespace configuration to the system More...
 
AdmListAdmSwitchboard_getNspCfg (AdmContext *namespace_ctx, const char *namespace, AdmError **error)
 
AdmListAdmSwitchboard_getSubspCfg (AdmList *namespace_cfg, const char *subspace, AdmError **error)
 
AdmBlackBoxAdmSwitchboard_getBox (AdmList *subspace_cfg, const char *box_name, AdmError **error)
 

Macro Definition Documentation

◆ ALCHEMIST_ABI_MAJOR_VER

#define ALCHEMIST_ABI_MAJOR_VER   0

◆ ALCHEMIST_ABI_MINOR_VER

#define ALCHEMIST_ABI_MINOR_VER   0

◆ ADM_EDEADNODE

#define ADM_EDEADNODE   1 /** The node has been unlinked **/

◆ ADM_EBADTYPE

#define ADM_EBADTYPE
Value:
2

◆ ADM_EBADNAME

#define ADM_EBADNAME   3 /** The name used is not valid (illegal chars) **/

◆ ADM_EBADDATA

#define ADM_EBADDATA   4 /** Bad data was passed as input **/

◆ ADM_ECONSTRAINT

#define ADM_ECONSTRAINT   5 /** A data constraint was violated **/

◆ ADM_ENOINDEX

#define ADM_ENOINDEX   51 /** The reqeusted index is out of range **/

◆ ADM_ENONAME

#define ADM_ENONAME   52 /** The reqeusted name was not found **/

◆ ADM_ENOPATH

#define ADM_ENOPATH   53 /** The reqeusted path was not found **/

◆ ADM_EACCESSFAILED

#define ADM_EACCESSFAILED   101 /** The access failed **/

◆ ADM_ENONAMESPACE

#define ADM_ENONAMESPACE   102 /** The namespace could not be found **/

◆ ADM_ENOSUBSPACE

#define ADM_ENOSUBSPACE   103 /** The subspace could not be found **/

◆ ADM_ENOWRITE

#define ADM_ENOWRITE   201 /** This AdmBlackBox does not support writes **/

◆ ADM_ENOREAD

#define ADM_ENOREAD   202 /** This AdmBlackBox does not support reads **/

◆ ADM_ENOLISTSERIAL

#define ADM_ENOLISTSERIAL   203 /** This AdmBlackBox does not support listSerial **/

◆ ADM_ENOREADSERIAL

#define ADM_ENOREADSERIAL   204 /** This AdmBlackBox does not support readSerial **/

◆ ADM_ENOCACHE

#define ADM_ENOCACHE   205 /** This AdmBlackBox is not being cached **/

◆ ADM_ENOBOXTYPE

#define ADM_ENOBOXTYPE   251 /** The boxtype in question could not be found **/

◆ ADM_EPARSE

#define ADM_EPARSE   301 /** The xml parse failed **/

◆ AdmRefStr_str

#define AdmRefStr_str (   REFSTR)
Value:
({ \
AdmRefStr *__tok = (REFSTR); \
(const char *) __tok; \
})

◆ AdmContext_getIdentityRoot_b

#define AdmContext_getIdentityRoot_b (   CONTEXT,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmIdentity *__id; \
__id = AdmContext_getIdentityRoot((CONTEXT), __err); \
if (__id != NULL) \
AdmIdentity_unref(__id, __err); \
__id; \
})
AdmIdentity * AdmContext_getIdentityRoot(AdmContext *context, AdmError **error)
AdmContext identity root accessor.

◆ AdmIdentity_getParentA_b

#define AdmIdentity_getParentA_b (   ID,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmIdentity *__id; \
__id = AdmIdentity_getParentA((ID), __err); \
if (__id != NULL) \
AdmIdentity_unref(__id, __err); \
__id; \
})
AdmIdentity * AdmIdentity_getParentA(AdmIdentity *identity, AdmError **error)
AdmIdentity parentA accessor.

◆ AdmIdentity_getParentB_b

#define AdmIdentity_getParentB_b (   ID,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmIdentity *__id; \
__id = AdmIdentity_getParentB((ID), __err); \
if (__id != NULL) \
AdmIdentity_unref(__id, __err); \
__id; \
})
AdmIdentity * AdmIdentity_getParentB(AdmIdentity *identity, AdmError **error)
AdmIdentity parentB accessor.

◆ AdmIdentity_getContext_b

#define AdmIdentity_getContext_b (   ID,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmContext *__ctx; \
__ctx = AdmIdentity_getContext((ID), __err); \
if (__ctx != NULL) \
AdmContext_unref(__ctx, __err); \
__ctx; \
})
AdmContext * AdmIdentity_getContext(AdmIdentity *identity, AdmError **error)
AdmIdentity context accessor.

◆ AdmContext_getDataRoot_b

#define AdmContext_getDataRoot_b (   CONTEXT,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmData *__data; \
__data = AdmContext_getDataRoot((CONTEXT), __err); \
if (__data != NULL) \
AdmData_unref(__data, __err); \
__data; \
})
AdmData * AdmContext_getDataRoot(AdmContext *context, AdmError **error)
AdmContext data root accessor.

◆ AdmData_getContainer_b

#define AdmData_getContainer_b (   DATA,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmData *__data; \
__data = AdmData_getContainer((DATA), __err); \
if (__data != NULL) \
AdmData_unref(__data, __err); \
__data; \
})
AdmData * AdmData_getContainer(AdmData *data, AdmError **error)
AdmData container accessor.

◆ AdmData_getPrev_b

#define AdmData_getPrev_b (   DATA,
  WRAP,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmData *__data; \
__data = AdmData_getPrev((DATA), (WRAP), __err); \
if (__data != NULL) \
AdmData_unref(__data, __err); \
__data; \
})
AdmData * AdmData_getPrev(AdmData *data, int wrap, AdmError **error)
get the previous sibling of an AdmData element

◆ AdmData_getNext_b

#define AdmData_getNext_b (   DATA,
  WRAP,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmData *__data; \
__data = AdmData_getNext((DATA), (WRAP), __err); \
if (__data != NULL) \
AdmData_unref(__data, __err); \
__data; \
})
AdmData * AdmData_getNext(AdmData *data, int wrap, AdmError **error)
get the next sibling of an AdmData element

◆ AdmData_getContext_b

#define AdmData_getContext_b (   DATA,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmContext *__ctx; \
__ctx = AdmData_getContext((DATA), __err); \
if (__ctx != NULL) \
AdmContext_unref(__ctx, __err); \
__ctx; \
})
AdmContext * AdmData_getContext(AdmData *data, AdmError **error)
AdmData context accessor.

◆ AdmContext_getDataByPath_b

#define AdmContext_getDataByPath_b (   CONTEXT,
  PATH,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmData *__data; \
__data = AdmContext_getDataByPath((CONTEXT), (PATH), __err); \
if (__data != NULL) \
AdmData_unref(__data, __err); \
__data; \
})
AdmData * AdmContext_getDataByPath(AdmContext *context, const char *path, AdmError **error)
AdmData path lookup.

◆ AdmList_getDataByIndex_b

#define AdmList_getDataByIndex_b (   LIST,
  INDEX,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmData *__data; \
__data = AdmList_getDataByIndex((LIST), (INDEX), __err); \
if (__data != NULL) \
AdmData_unref(__data, __err); \
__data; \
})
AdmData * AdmList_getDataByIndex(AdmList *list, unsigned int index, AdmError **error)
AdmList child index accessor.

◆ AdmList_getDataByName_b

#define AdmList_getDataByName_b (   LIST,
  NAME,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmData *__data; \
__data = AdmList_getDataByName((LIST), (NAME), __err); \
if (__data != NULL) \
AdmData_unref(__data, __err); \
__data; \
})
AdmData * AdmList_getDataByName(AdmList *list, const char *name, AdmError **error)
AdmList child name accessor.

◆ AdmList_getDataByPath_b

#define AdmList_getDataByPath_b (   LIST,
  PATH,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmData *__data; \
__data = AdmList_getDataByPath((LIST), (PATH), __err); \
if (__data != NULL) \
AdmData_unref(__data, __err); \
__data; \
})
AdmData * AdmList_getDataByPath(AdmList *list, const char *path, AdmError **error)
AdmList child data path accessor.

◆ AdmList_addData_b

#define AdmList_addData_b (   LIST,
  TYPE,
  NAME,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmData *__data; \
__data = AdmList_addData((LIST), (TYPE), (NAME), __err); \
if (__data != NULL) \
AdmData_unref(__data, __err); \
__data; \
})
AdmData * AdmList_addData(AdmList *list, AdmDataType type, const char *name, AdmError **error)
AdmList add child operator.

◆ AdmList_copyData_b

#define AdmList_copyData_b (   LIST,
  DATA,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmData *__data; \
__data = AdmList_copyData((LIST), (DATA), __err); \
if (__data != NULL) \
AdmData_unref(__data, __err); \
__data; \
})
AdmData * AdmList_copyData(AdmList *list, AdmData *data, AdmError **error)
AdmList copy data operator.

◆ AdmList_renameCopyData_b

#define AdmList_renameCopyData_b (   LIST,
  DATA,
  NAME,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmData *__data; \
__data = AdmList_renameCopyData((LIST), (DATA), (NAME), __err); \
if (__data != NULL) \
AdmData_unref(__data, __err); \
__data; \
})
AdmData * AdmList_renameCopyData(AdmList *list, AdmData *data, const char *name, AdmError **error)
AdmList copy data operator.

◆ ADM_BBCAP_SUP_WRITE

#define ADM_BBCAP_SUP_WRITE (   CAP)    ((CAP).array[0] & (1 << 0))

◆ ADM_BBCAP_SUP_READ

#define ADM_BBCAP_SUP_READ (   CAP)    ((CAP).array[0] & (1 << 1))

◆ ADM_BBCAP_SUP_LISTSERIAL

#define ADM_BBCAP_SUP_LISTSERIAL (   CAP)    ((CAP).array[0] & (1 << 2))

◆ ADM_BBCAP_SUP_READSERIAL

#define ADM_BBCAP_SUP_READSERIAL (   CAP)    ((CAP).array[0] & (1 << 3))

◆ ADM_BBCAP_CACHED

#define ADM_BBCAP_CACHED (   CAP)    ((CAP).array[0] & (1 << 4))

◆ AdmSwitchboard_getNspCfg_b

#define AdmSwitchboard_getNspCfg_b (   CTX,
  NAMESPACE,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmList *__list; \
__list = AdmSwitchboard_getNspCfg((CTX), (NAMESPACE), __err); \
if (__list != NULL) \
AdmData_unref((AdmData *) __list, __err); \
__list; \
})
AdmList * AdmSwitchboard_getNspCfg(AdmContext *namespace_ctx, const char *namespace, AdmError **error)
struct AdmData AdmData
Definition: alchemist.h:133

◆ AdmSwitchboard_getSubspCfg_b

#define AdmSwitchboard_getSubspCfg_b (   CTX,
  SUBSPACE,
  ERROR 
)
Value:
({ \
AdmError **__err = (ERROR); \
AdmList *__list; \
__list = AdmSwitchboard_getSubspCfg((CTX), (SUBSPACE), __err); \
if (__list != NULL) \
AdmData_unref((AdmData *) __list, __err); \
__list; \
})
AdmList * AdmSwitchboard_getSubspCfg(AdmList *namespace_cfg, const char *subspace, AdmError **error)
struct AdmData AdmData
Definition: alchemist.h:133

Typedef Documentation

◆ AdmError

typedef struct AdmError AdmError

◆ AdmRefStr

typedef struct AdmRefStr AdmRefStr

◆ AdmData

typedef struct AdmData AdmData

◆ AdmList

typedef struct AdmList AdmList

◆ AdmInt

typedef struct AdmInt AdmInt

◆ AdmBool

typedef struct AdmBool AdmBool

◆ AdmFloat

typedef struct AdmFloat AdmFloat

◆ AdmString

typedef struct AdmString AdmString

◆ AdmBase64

typedef struct AdmString AdmBase64

◆ AdmCopy

typedef struct AdmString AdmCopy

◆ AdmIdentity

typedef struct AdmIdentity AdmIdentity

◆ AdmContext

typedef struct AdmContext AdmContext

◆ AdmBlackBox

typedef struct AdmBlackBox AdmBlackBox

Enumeration Type Documentation

◆ AdmDataType

Enumerator
ADM_TYPE_UNKNOWN 
ADM_TYPE_LIST 
ADM_TYPE_COPY 
ADM_TYPE_INT 
ADM_TYPE_FLOAT 
ADM_TYPE_BOOL 
ADM_TYPE_STRING 
ADM_TYPE_BASE64 

Function Documentation

◆ AdmError_create()

void AdmError_create ( AdmError **  error,
int  num,
const char *  format,
  ... 
)

Constructor/allocator for our AdmError structure. Fails safely and silently if error is NULL.

Parameters
errorThe pointer to the AdmError pointer in which the newly allocated AdmError structure will be returned.
numThe integer error code of the new AdmError structure.
formatThe output format in printf(3) format.
...The variable arguments for the printf(3) format.

◆ AdmError_ref()

void AdmError_ref ( AdmError error)
Parameters
errorThe pointer to the AdmError structure to be deallocated.

◆ AdmError_unref()

void AdmError_unref ( AdmError error)

Decrements the reference count of the given AdmError function, and deallocates it when the count reaches 0. This function must only be called by reference holders.

Parameters
errorThe pointer to the AdmError structure to be deallocated.

◆ AdmError_strerr()

const char* AdmError_strerr ( AdmError error)

Returns the error string of the given AdmError structure. The error string returned is guaranteed for only as long as the AdmError is refed. Users that want a copy, should make one.

Parameters
errorThe pointer to the AdmError structure.
Returns
The character string that contains the description of the error of the given AdmError structure.
Note
Based on the strerror(3) *NIX C library.

◆ AdmError_errno()

int AdmError_errno ( AdmError error)

Returns the error code of the given AdmError structure.

Parameters
errorThe pointer to the AdmError structure.
Returns
The int error code of the given AdmError structure. See admerror.h for a list of valid error code.
Note
Based on errno(3) *NIX C library.
See also
AdmError

◆ AdmRefStr_ref()

AdmRefStr* AdmRefStr_ref ( AdmRefStr refstr)

◆ AdmRefStr_unref()

void AdmRefStr_unref ( AdmRefStr refstr)

◆ AdmRefStr_len()

size_t AdmRefStr_len ( AdmRefStr refstr)

◆ AdmRefStr_get()

AdmRefStr* AdmRefStr_get ( const char *  str,
int  force 
)
Parameters
strthe string to match the AdmRefStr to
forceif we should create a matching AdmRefStr if one does not already exist
Returns
the unique matching AdmRefStr, or NULL if there is no match

◆ AdmRefStr_nget()

AdmRefStr* AdmRefStr_nget ( const char *  str,
size_t  len,
int  force 
)
Parameters
strthe string to match the AdmRefStr to
lenthe lenght of the string, as strlen would report it
forceif we should create a matching AdmRefStr if one does not already exist
Returns
the unique matching AdmRefStr, or NULL if there is no match

◆ AdmContext_new()

AdmContext* AdmContext_new ( const char *  name,
unsigned int  serial,
AdmError **  error 
)

AdmContext_new: create a new AdmContext element.

This function creates a new AdmContext element. Its root id node will be initialized using the passed name and serial. The returned AdmContext will be given a ref for the caller.

Parameters
nameThe name of the new AdmContext.
serialThe serial number of the new AdmContext.
errorOptional pointer to AdmError pointer.
Returns
The pointer to the new AdmContext element or NULL on failure.

◆ AdmContext_ref()

AdmContext* AdmContext_ref ( AdmContext context,
AdmError **  error 
)

AdmContext_ref: ref an AdmContext element.

Increases the refcount of an AdmContext element

Parameters
contextThe AdmContext to increase the reference to.
errorOptional pointer to AdmError pointer.
Returns
The AdmContext

◆ AdmContext_unref()

void AdmContext_unref ( AdmContext context,
AdmError **  error 
)

AdmContext_unref: unref an AdmContext element.

Unrefs an AdmContext. This will free the context, and all its children, when the ref count reaches 0. It is an error for an entity which does not own a ref to a context to call AdmContext_unref. AdmContext refs can be acquired only by calls to AdmContext_new, AdmContext_copy, AdmContext_merge, AdmContext_fromXML, and AdmContext_ref.

Parameters
contextThe AdmContext to decrease the reference to.
errorOptional pointer to AdmError pointer.

◆ AdmContext_copy()

AdmContext* AdmContext_copy ( AdmContext context,
AdmError **  error 
)

This function creates a full depth copy of an AdmContext element. It is one of the AdmContext refing functions.

Parameters
contextThe pointer to the AdmContext element to be copied.
errorOptional pointer to AdmError pointer.
Returns
The pointer to the copied AdmContext element.

◆ AdmContext_merge()

AdmContext* AdmContext_merge ( const char *  name,
unsigned int  serial,
AdmContext contextA,
AdmContext contextB,
AdmError **  error 
)

AdmContext_merge: merge two AdmContext elements into a third.

This is the heart function of the Alchemist. It performs the context merge algorithm upon two contexts, and returns the result. It is also one of the refing functions, as the returned child is refed for the caller.

Parameters
nameThe name of the new AdmContext.
serialThe serial number of the new AdmContext.
contextAThe pointer to the first AdmContext element.
contextBThe pointer to the second AdmContext element.
errorOptional pointer to an AdmError pointer.
Returns
The pointer to the new AdmContext element which contains the result of the merge operation of contextA and contextB or NULL on failure.

◆ AdmContext_flatten()

void AdmContext_flatten ( AdmContext context,
AdmError **  error 
)

AdmContext_flatten: flatten an AdmContext element.

This function strips all masks and AdmCopy elements from an AdmContext element.

Parameters
contextThe pointer to the AdmContext element.
errorOptional pointer to AdmError pointer.

◆ AdmContext_strip()

void AdmContext_strip ( AdmContext context,
AdmError **  error 
)

AdmContext_strip: strip an AdmContext's id tree.

This function strips all ids except for the root id from an AdmContext's id tree.

Parameters
contextThe pointer to the AdmContext element.
errorOptional pointer to AdmError pointer.

◆ AdmContext_toXML()

char* AdmContext_toXML ( AdmContext context,
AdmError **  error 
)

◆ AdmContext_fromXML()

AdmContext* AdmContext_fromXML ( const char *  xml,
AdmError **  error 
)

◆ AdmContext_readFromFile()

int AdmContext_readFromFile ( AdmContext **  context,
const char *  path,
AdmError **  error 
)

◆ AdmContext_writeToFile()

int AdmContext_writeToFile ( AdmContext context,
const char *  path,
int  mode,
uid_t  uid,
gid_t  gid,
AdmError **  error 
)

◆ AdmContext_getMask()

AdmRefStr* AdmContext_getMask ( AdmContext context,
unsigned int  index,
AdmError **  error 
)

AdmContext_getMask: Gets a mask element from an AdmContext by index.

This function is used to request the index'th mask of an AdmContext element's mask set. The string returned must be considered const and volatile, and if it is needed for long periods of time, the programmer should copy it.

Specifically, it is guranteed for only so long as the AdmContext element is refed, and the mask is not cleared.

Parameters
contextThe AdmContext to use.
indexThe index of the mask set element to get.
errorOptional pointer to AdmError pointer.
Returns
The mask set element AdmRefStr.

◆ AdmContext_setMask()

int AdmContext_setMask ( AdmContext context,
const char *  path,
AdmError **  error 
)

AdmContext_setMask: set a mask in an AdmContext element's mask set.

This function adds a mask path to an AdmContext element's mask set. It will quietly handle duplicate paths. Blank paths will not be added.

Parameters
contextThe AdmContext to use.
pathThe string of the mask set element to be added.
errorOptional pointer to AdmError pointer.
Returns
-1 on error, 0 on success
Note
This could be made much faster, if we searched the set only once.

◆ AdmContext_clearMaskByIndex()

int AdmContext_clearMaskByIndex ( AdmContext context,
unsigned int  index,
AdmError **  error 
)

AdmContext_clearMaskByIndex: remove a mask entry from an AdmContext by index.

This function removes a mask entry from an AdmContext element by searching against the passed index. It is an error to index past the end of the mask set.

Parameters
contextThe AdmContext to use.
indexThe index of the mask set element to remove.
errorOptional pointer to AdmError pointer.
Returns
-1 on error, 0 on success

◆ AdmContext_clearMaskByPath()

int AdmContext_clearMaskByPath ( AdmContext context,
const char *  path,
AdmError **  error 
)

AdmContext_clearMaskByPath: remove a mask entry from an AdmContext by string.

This function removes a mask entry from an AdmContext element by searching against the passed string.

Parameters
contextThe AdmContext to use.
pathThe data path of the mask set element to remove.
errorOptional pointer to AdmError pointer.
Returns
-1 on error, 0 on success

◆ AdmContext_getNumMasks()

unsigned int AdmContext_getNumMasks ( AdmContext context,
AdmError **  error 
)

AdmContext_getNumMasks: Gets the number of masks in an AdmContext's mask set.

This function returns the number of masks in an AdmContext's mask set.

Parameters
contextThe AdmContext to use.
errorOptional pointer to AdmError pointer.
Returns
The number of mask set element of the given AdmContext.

◆ AdmContext_getIdentityRoot()

AdmIdentity* AdmContext_getIdentityRoot ( AdmContext context,
AdmError **  error 
)

AdmContext_getIdentityRoot: Get the root AdmIdentity element of an AdmContext's id tree.

This function gets the root node AdmIdentity element of an AdmContext element's id tree.

Parameters
contextThe AdmContext of which we want to get the root AdmIdentity.
errorOptional pointer to AdmError pointer.
Returns
The pointer to the root AdmIdentity element.

◆ AdmIdentity_getParentA()

AdmIdentity* AdmIdentity_getParentA ( AdmIdentity identity,
AdmError **  error 
)

AdmIdentity_getParentA: Get the A parent of an AdmIdentity element.

This function returns the A parent of an AdmIdentity element, if it exists. Otherwise, it returns NULL.

Parameters
identityThe AdmIdentity of which to get the first parent.
errorOptional pointer to AdmError pointer.
Returns
The AdmIdentity pointer to the first parent.

◆ AdmIdentity_getParentB()

AdmIdentity* AdmIdentity_getParentB ( AdmIdentity identity,
AdmError **  error 
)

AdmIdentity_getParentB: Get the B parent of an AdmIdentity element.

This function returns the B parent of an AdmIdentity element, if it exists. Otherwise, it returns NULL.

Parameters
identityThe AdmIdentity of which to get the second parent.
errorOptional pointer to AdmError pointer.
Returns
The AdmIdentity pointer to the first parent.

◆ AdmIdentity_getName()

AdmRefStr* AdmIdentity_getName ( AdmIdentity identity,
AdmError **  error 
)

AdmIdentity_getName: Get the name of an AdmIdentity element.

This function is used to request the name of an AdmIdentity element. The string returned must be considered const and volatile, and if it is needed for long periods of time, the programmer should copy it.

Specifically, it is guranteed for only so long as the AdmCopy element is refed, and its value is not changed.

Parameters
identityThe AdmIdentity of which to get the name.
errorOptional pointer to AdmError pointer.
Returns
The name of the given AdmIdentity in an AdmRefStr.

◆ AdmIdentity_setName()

int AdmIdentity_setName ( AdmIdentity identity,
const char *  name,
AdmError **  error 
)

AdmIdentity_setName: Set the name of an AdmIdentity element.

This function sets the name of an AdmIdentity element.

Parameters
identityThe AdmIdentity of which to set the name.
nameThe new name of the AdmIdentity.
errorOptional pointer to AdmError pointer.
Returns
-1 on error, 0 on success

◆ AdmIdentity_getSerial()

unsigned int AdmIdentity_getSerial ( AdmIdentity identity,
AdmError **  error 
)

AdmIdentity_getSerial: Get the serial number of an AdmIdentity element.

This function gets the serial number of an AdmIdentity element.

Parameters
identityThe AdmIdentity of which to get the serial number.
errorOptional pointer to AdmError pointer.
Returns
The serial number of the given AdmIdentity.

◆ AdmIdentity_setSerial()

int AdmIdentity_setSerial ( AdmIdentity identity,
unsigned int  serial,
AdmError **  error 
)

AdmIdentity_setSerial: Set the serial number of an AdmIdentity element.

This function sets the serial number of an AdmIdentity element.

Parameters
identityThe AdmIdentity of which to set the serial number.
nameThe new serial number of the AdmIdentity.
errorOptional pointer to AdmError pointer.
Returns
-1 on error, 0 on success

◆ AdmIdentity_ref()

AdmIdentity* AdmIdentity_ref ( AdmIdentity identity,
AdmError **  error 
)

AdmIdentity_ref: ref an AdmIdentity element.

This function refs an AdmIdentity element. It is the only way to acquire a ref to an AdmIdentity element.

Parameters
identityThe AdmIdentity to increase the reference to.
errorOptional pointer to AdmError pointer.
Returns
The AdmIdentity (for convienience).

◆ AdmIdentity_unref()

void AdmIdentity_unref ( AdmIdentity identity,
AdmError **  error 
)

AdmIdentity_unref: unref an AdmIdentity element.

This function unrefs an AdmIdentity element, and frees it if the refcount reaches 0. It must only be called by entities which own a ref to the AdmIdentity element. AdmIdentity refs can only be aquired by calling AdmIdentity_ref.

Parameters
identityThe AdmIdentity to decrease the reference to.
errorOptional pointer to AdmError pointer.

◆ AdmIdentity_getContext()

AdmContext* AdmIdentity_getContext ( AdmIdentity identity,
AdmError **  error 
)

AdmIdentity_getContext: Get the context of an AdmIdentity element.

This function returns a pointer to the AdmContext in which this AdmIdentity element exists.

Parameters
idThe pointer to the AdmIdentity element.
errorOptional pointer to AdmError pointer.
Returns
The pointer to the AdmContext of the given AdmIdentity.

◆ AdmIdentity_isAlive()

int AdmIdentity_isAlive ( AdmIdentity identity,
AdmError **  error 
)

AdmIdentity_isAlive: check the lifecycle status of an AdmIdentity element.

This function checks the lifecycle status of an AdmIdentity element. It is used to tell if an element is still linked against an AdmContext, and is 'alive'; or if it is not, and is 'dead'.

A dead element must have a reference held against it that is not its container's reference.

Parameters
identityThe AdmIdentity to check.
errorOptional pointer to AdmError pointer.
Returns
TRUE if Identity is still referenced, FALSE otherwise.

◆ AdmContext_getDataRoot()

AdmData* AdmContext_getDataRoot ( AdmContext context,
AdmError **  error 
)

AdmContext_getDataRoot: Get the root AdmData element of an AdmContext's data tree.

This function gets the root AdmData element of an AdmContext's data tree.

Parameters
contextThe AdmContext of which we want to get the AdmData root.
errorOptional pointer to AdmError pointer.
Returns
The pointer to the root AdmData element.

◆ AdmData_getContainer()

AdmData* AdmData_getContainer ( AdmData data,
AdmError **  error 
)

AdmData_getContainer: Get the container of an AdmData element.

This function returns a pointer to the AdmData element which contains this AdmData element. For the root node, it will return a pointer to the AdmData element it was passed.

Parameters
dataThe AdmData of which we want to get the container (parent).
errorOptional pointer to AdmError pointer.
Returns
The container/parent of the given AdmData element.

◆ AdmData_getPrev()

AdmData* AdmData_getPrev ( AdmData data,
int  wrap,
AdmError **  error 
)
Parameters
dataThe AdmData element
wrapspecify if we should wrap round the begining of the list
errorOptional pointer to AdmError pointer.
Returns
the previous AdmData element

◆ AdmData_getNext()

AdmData* AdmData_getNext ( AdmData data,
int  wrap,
AdmError **  error 
)
Parameters
dataThe AdmData element
wrapspecify if we should wrap round the end of the list
errorOptional pointer to AdmError pointer.
Returns
the next AdmData element

◆ AdmData_getContext()

AdmContext* AdmData_getContext ( AdmData data,
AdmError **  error 
)

AdmData_getContext: Get the context of an AdmData element.

This function returns a pointer to the AdmContext in which this AdmData element exists.

Parameters
dataThe AdmData of which we want to get the context.
errorOptional pointer to AdmError pointer.
Returns
The context of the given AdmData element.

◆ AdmContext_getDataByPath()

AdmData* AdmContext_getDataByPath ( AdmContext context,
const char *  path,
AdmError **  error 
)

AdmContext_getDataByPath: Gets an AdmData element from an AdmContext by path.

This function does path lookups against AdmContext element's data trees. It will give an error if no matching AdmData element is found.

Parameters
contextThe AdmContext we want to search.
pathThe data path of the AdmData element to look up.
errorOptional pointer to AdmError pointer.
Returns
The pointer to the found AdmData element or NULL on failure.

◆ AdmData_getType()

AdmDataType AdmData_getType ( AdmData data,
AdmError **  error 
)

AdmData_getType: Get the type of an AdmData element.

This function gets the type of an AdmData element

Parameters
dataThe AdmData of which we want to get the data type.
errorOptional pointer to AdmError pointer.
Returns
The data type of the given AdmData element.

◆ AdmData_ref()

AdmData* AdmData_ref ( AdmData data,
AdmError **  error 
)

AdmData_ref: ref an AdmData element.

This function refs an AdmData element. It is the only way to aquire a ref to an AdmData element.

Parameters
dataThe AdmData to increase the reference to.
errorOptional pointer to AdmError pointer.
Returns
The AdmData element

◆ AdmData_unref()

void AdmData_unref ( AdmData data,
AdmError **  error 
)

AdmData_unref: unref an AdmData element.

This function unrefs an AdmData element, and frees it if the refcount reaches 0. It must only be called by entities which own a ref to the AdmData element. AdmData refs can only be aquired by calling AdmData_ref.

Parameters
dataThe AdmData to decrease the reference to.
errorOptional pointer to AdmError pointer.

◆ AdmData_isAlive()

int AdmData_isAlive ( AdmData data,
AdmError **  error 
)

AdmData_isAlive: check the lifecycle status of an AdmData element.

This function checks the lifecycle status of an AdmData element. It is used to tell if an element is still linked against an AdmContext, and is 'alive'; or if it is not, and is 'dead'.

A dead element must have a reference held against it that is not its container's reference.

Parameters
dataThe AdmData to check.
errorOptional pointer to AdmError pointer.
Returns
TRUE if Data is still referenced, FALSE otherwise.

◆ AdmData_unlink()

int AdmData_unlink ( AdmData data,
AdmError **  error 
)

AdmData_unlink: Unlink an AdmData element from its container.

This function recursively unlinks an AdmData element from its containing AdmData element. It unrefs each element which it unlinks, as they loose their parents reference. It is an error to unlink the root node, and will fail.

Parameters
dataThe AdmData to unlink.
errorOptional pointer to AdmError pointer.
Returns
-1 on error, 0 on success

◆ AdmData_validName()

int AdmData_validName ( const char *  name)

Checks a string to determine if it is a valid AdmData name. A valid name is of the form: Name = (Letter | '_') (Letter | Digit | '_' | '-' | '.'){0,254} Letter = ['a' - 'z'] | ['A' - 'Z'] Digit = ['0' - '9']

Parameters
nameThe string to check.
Returns
1 if the name is valid, 0 if the name is not.

◆ AdmData_getName()

AdmRefStr* AdmData_getName ( AdmData data,
AdmError **  error 
)

AdmData_getName: Get the name of an AdmData element.

This function is used to request the name of an AdmData element. The string returned must be considered const and volatile, and if it is needed for long periods of time, the programmer should copy it.

Specifically, it is guranteed for only so long as the AdmData element is refed, and its name is not changed.

Parameters
dataThe AdmData of which we want to get the name.
errorOptional pointer to AdmError pointer.
Returns
The name of the given AdmData element.

◆ AdmData_setName()

int AdmData_setName ( AdmData data,
const char *  name,
AdmError **  error 
)

AdmData_setName: Set the name of an AdmData element.

This function sets the name of an AdmData element to a copy of the passed string.

It will not alter the root node, and it is an error to attempt it.

Parameters
dataThe AdmData of which we want to set the name.
nameThe new name of the AdmData element.
errorOptional pointer to AdmError pointer.
Returns
-1 on error, 0 on success

◆ AdmData_getSource()

AdmRefStr* AdmData_getSource ( AdmData data,
AdmError **  error 
)

AdmData_getSource: Get the source of an AdmData element.

This function is used to request the source of an AdmData element. The string returned must be considered const and volatile, and if it is needed for long periods of time, the programmer should copy it.

Specifically, it is guranteed for only so long as the AdmData element is refed, and its source is not changed. The source of the root data node changes every time the name of the root id node changes.

Parameters
dataThe AdmData of which we want to get the source.
errorOptional pointer to AdmError pointer.
Returns
The source of the given AdmData element.

◆ AdmData_setSource()

int AdmData_setSource ( AdmData data,
const char *  source,
AdmError **  error 
)

AdmData_setSource: Set the source of an AdmData element.

This function sets the source of an AdmData element to a copy of the passed string.

It will not alter the root node, and it is an error to attempt it.

Parameters
dataThe AdmData of which we want to set the source.
nameThe new source of the AdmData element.
errorOptional pointer to AdmError pointer.
Returns
-1 on error, 0 on success

◆ AdmData_isProtected()

int AdmData_isProtected ( AdmData data,
AdmError **  error 
)

AdmData_isProtected: Get the state of an AdmData's protected flag.

This function gets the state of an AdmData's protected flag.

Parameters
dataThe AdmData which we want to check for the protected flag.
errorOptional pointer to AdmError pointer.
Returns
TRUE if the given AdmData element is protected, FALSE otherwise.

◆ AdmData_setProtected()

int AdmData_setProtected ( AdmData data,
int  state,
AdmError **  error 
)

AdmData_setProtected: Set an AdmData's protected flag.

This function sets the protected flag of an AdmData element to the value passed.

It will not set the flag of the root node, and is an error to attempt it.

Parameters
dataThe AdmData of which we want to set the protected flag.
stateThe new protection state of the AdmData element.
errorOptional pointer to AdmError pointer.
Returns
-1 on error, 0 on success

◆ AdmList_isAnonymous()

int AdmList_isAnonymous ( AdmList list,
AdmError **  error 
)

AdmList_isAnonymous: Get the state of an AdmList's anonymous flag.

This function gets the state of an AdmList's anonymous flag.

Parameters
listThe AdmList which we want to check for the anonymous flag.
errorOptional pointer to AdmError pointer.
Returns
TRUE if the given AdmList element is anonymous, FALSE otherwise.

◆ AdmList_setAnonymous()

int AdmList_setAnonymous ( AdmList list,
int  state,
AdmError **  error 
)

AdmList_setAnonymous: Set an AdmList's anonymous flag.

This function sets the anonymous flag of an AdmList element to the value passed. It will not allow the flag to be cleared if it will cause a name collide, and will raise an error.

It will not set the flag of the root node, and is an error to attempt it.

Parameters
listThe AdmList of which we want to set the anonymous flag.
stateThe new anonymous state of the AdmList element.
errorOptional pointer to AdmError pointer.
Returns
-1 on error, 0 on success

◆ AdmList_isAtomic()

int AdmList_isAtomic ( AdmList list,
AdmError **  error 
)

AdmList_isAtomic: Get the state of an AdmList's atomic flag.

This function gets the state of an AdmList's atomic flag.

Parameters
listThe AdmList which we want to check for the atomic flag.
errorOptional pointer to AdmError pointer.
Returns
TRUE if the given AdmList element is atomic, FALSE otherwise.

◆ AdmList_setAtomic()

int AdmList_setAtomic ( AdmList list,
int  state,
AdmError **  error 
)

AdmList_setAtomic: Set an AdmList's atomic flag.

This function sets the atomic flag of an AdmList element to the value passed.

It will not set the flag of the root node, and is an error to attempt it.

Parameters
listThe AdmList of which we want to set the atomic flag.
stateThe new atomic state of the AdmList element.
errorOptional pointer to AdmError pointer.
Returns
-1 on error, 0 on success

◆ AdmList_isPrepend()

int AdmList_isPrepend ( AdmList list,
AdmError **  error 
)

AdmList_isPrepend: Get the state of an AdmList's prepend flag.

This function gets the state of an AdmList's prepend flag.

Parameters
listThe AdmList which we want to check for the prepend flag.
errorOptional pointer to AdmError pointer.
Returns
TRUE if the given AdmList element is prepend, FALSE otherwise.

◆ AdmList_setPrepend()

int AdmList_setPrepend ( AdmList list,
int  state,
AdmError **  error 
)

AdmList_setPrepend: Set an AdmList's prepend flag.

This function sets the prepend flag of an AdmList element to the value passed.

It will not set the flag of the root node, and is an error to attempt it.

Parameters
listThe AdmList of which we want to set the prepend flag.
stateThe new prepend state of the AdmList element.
errorOptional pointer to AdmError pointer.
Returns
-1 on error, 0 on success

◆ AdmList_getNumData()

unsigned int AdmList_getNumData ( AdmList list,
AdmError **  error 
)

AdmList_getNumData: Get the size of an AdmList's child set.

This function gets the number of children held in an AdmList's child set.

Parameters
listThe AdmList which we want to count.
errorOptional pointer to AdmError pointer.
Returns
The number of children inside the given list.

◆ AdmList_getDataByIndex()

AdmData* AdmList_getDataByIndex ( AdmList list,
unsigned int  index,
AdmError **  error 
)

AdmList_getDataByIndex: Get a child of an AdmList element by its index.

This function seeks on an AdmList's child set, and returns its index'th child. It is an error to seek on an index greater >= the list length, since the first element is stored at index 0.

Parameters
listThe AdmList which we want to access.
indexThe index of the child we want to get.
errorOptional pointer to AdmError pointer.
Returns
The pointer to requested AdmData element of the list.

◆ AdmList_getDataByName()

AdmData* AdmList_getDataByName ( AdmList list,
const char *  name,
AdmError **  error 
)

AdmList_getDataByName: Get a child od an AdmList element by its name.

This function seeks againts an AdmList's child set, and returns the first child whose name matches the search name. It raises a AdmError if no name is found.

Parameters
listThe AdmList which we want to access.
nameThe name of the child we want to get.
errorOptional pointer to AdmError pointer.
Returns
The pointer to requested AdmData element of the list.

◆ AdmList_getDataByPath()

AdmData* AdmList_getDataByPath ( AdmList list,
const char *  path,
AdmError **  error 
)

AdmList_getDataByPath: Get a child od an AdmList element by its path.

This function seeks againts an AdmList's child set, and returns the first child whose path matches the search path. It raises a AdmError if no path is found.

Parameters
listThe AdmList which we want to access.
pathThe data path of the child we want to get.
errorOptional pointer to AdmError pointer.
Returns
The pointer to requested AdmData element of the list.

◆ AdmList_addData()

AdmData* AdmList_addData ( AdmList list,
AdmDataType  type,
const char *  name,
AdmError **  error 
)

AdmList_addData: add a new child to an AdmList element.

This function appends a new child of the given type and name to the end of the AdmList. It returns a pointer to the new AdmData element. Name collides in non-anonymous lists are errors.

Note that new AdmCopy elements will have the invalid reference "" as their initial value, and must be changed.

The new child is refed, but the ref is owned by its AdmList element, and no ref is implied to the accessor.

Parameters
listThe AdmList to which we want to add a new child.
typeThe AdmData type of the new child to be added.
nameThe name of the new child to be added.
errorOptional pointer to AdmError pointer.
Returns
The pointer to the newly added AdmData element.

◆ AdmList_moveData()

int AdmList_moveData ( AdmList list,
AdmData data,
unsigned int  index,
AdmError **  error 
)

AdmList_moveData: reposition an AdmData element in its containing AdmList.

This function extracts an AdmData element from its containing list, and then reinserts it at the index value passed. It is an error to give it an illegal index value.

Parameters
listThe AdmList which we want to move in.
dataThe AdmData pointer of the child we want to move.
indexThe index to where we want to move the child.
errorOptional pointer to AdmError pointer.
Returns
-1 on error, 0 on success

◆ AdmList_copyData()

AdmData* AdmList_copyData ( AdmList list,
AdmData data,
AdmError **  error 
)

AdmList_copyData: copy a AdmData element into an AdmList element.

This function recursively copies an AdmData tree from the passed data node, and inserts the result onto the end of the passed AdmList. It checks for name collides in Non-anonymous lists, and will not copy a root node; both are errors.

Parameters
listThe AdmList to append the data to.
dataThe AdmData element to recursively copy and append to the list.
errorOptional pointer to AdmError pointer.
Returns
The pointer to the newly copied and appended AdmData element.

◆ AdmList_renameCopyData()

AdmData* AdmList_renameCopyData ( AdmList list,
AdmData data,
const char *  name,
AdmError **  error 
)

AdmList_renameCopyData: copy and rename an AdmData element into an AdmList element.

This function recursively copies an AdmData tree from the passed data node, and inserts the result onto the end of the passed AdmList, using the specified name. It checks for name collides in Non-anonymous lists, and will not copy a root node; both are errors.

Parameters
listThe AdmList to append the data to.
dataThe AdmData element to recursively copy and append to the list.
nameThe new name to use.
errorOptional pointer to AdmError pointer.
Returns
The pointer to the newly copied and appended AdmData element.

◆ AdmData_getPos()

unsigned int AdmData_getPos ( AdmData data,
AdmError **  error 
)

AdmData_getPos: Get the position of an AdmData node in its containing list.

This function returns the position that an AdmData node holds in its containing list. The position of the root node is defined to be 0.

Parameters
dataThe AdmData of which we want to know the index.
errorOptional pointer to AdmError pointer.
Returns
The index of the data element in it's parent list.

◆ AdmInt_getValue()

int AdmInt_getValue ( AdmInt int_scalar,
AdmError **  error 
)

Gets the integer value stored in an AdmInt node.

Parameters
int_scalara pointer to an AdmInt node
erroran optional pointer to an AdmError pointer
Returns
the value of the node
See also
AdmInt
AdmError

◆ AdmInt_setValue()

int AdmInt_setValue ( AdmInt int_scalar,
int  value,
AdmError **  error 
)

Sets the integer value stored in an AdmInt node.

Parameters
int_scalara pointer to an AdmInt node
valuethe integer value to set the node to
erroran optional pointer to an AdmError pointer
Returns
-1 on error, 0 on success
See also
AdmInt
AdmError

◆ AdmFloat_getValue()

double AdmFloat_getValue ( AdmFloat float_scalar,
AdmError **  error 
)

Gets the double value stored in an AdmFloat node.

Parameters
float_scalara pointer to an AdmFloat node
erroran optional pointer to an AdmError pointer
Returns
the double value of the node
See also
AdmFloat
AdmError

◆ AdmFloat_setValue()

int AdmFloat_setValue ( AdmFloat float_scalar,
double  value,
AdmError **  error 
)

Sets the double value stored in an AdmFloat node.

Parameters
float_scalara pointer to an AdmFloat element
valuethe double value to set the node with
erroran optional pointer to an AdmError pointer
Returns
-1 on error, 0 on success
See also
AdmFloat
AdmError

◆ AdmBool_getValue()

int AdmBool_getValue ( AdmBool bool_scalar,
AdmError **  error 
)

Gets the boolean value stored in an AdmBool node.

Parameters
bool_scalara pointer to an AdmBool node
erroran optional pointer to an AdmError pointer
Returns
the value of the node as an int
See also
AdmBool
AdmError

◆ AdmBool_setValue()

int AdmBool_setValue ( AdmBool bool_scalar,
int  value,
AdmError **  error 
)

Sets the boolean value stored in an AdmBool node.

Parameters
bool_scalara pointer to an AdmBool node
valuethe value to set the node to as an int
erroran optional pointer to an AdmError pointer
Returns
-1 on error, 0 on success
See also
AdmBool
AdmError

◆ AdmString_getValue()

AdmRefStr* AdmString_getValue ( AdmString string_scalar,
AdmError **  error 
)

Get the value of an AdmString element.

This function is used to request the string stored in an AdmString element. The string returned must be considered const and volatile, and if it is needed for long periods of time, the programmer should copy it.

Specifically, it is guaranteed for only so long as the AdmString element remains refed, and its value is not changed.

Parameters
string_scalarThe pointer to the AdmString element
erroroptional pointer to an AdmError pointer
Returns
An AdmRefStr with the AdmString element's value string.

◆ AdmString_setValue()

int AdmString_setValue ( AdmString string_scalar,
const char *  value,
AdmError **  error 
)

Set the value of an AdmString element.

This function is used to set the value of an AdmString element. It stores a copy of the value string it is passed.

Parameters
string_scalarThe pointer to the AdmString element.
valueThe pointer to the string.
erroroptional pointer to an AdmError pointer
Returns
-1 on error, 0 on success

◆ AdmBase64_getValue()

AdmRefStr* AdmBase64_getValue ( AdmBase64 base64_scalar,
AdmError **  error 
)

AdmBase64_getValue: Get the value of an AdmBase64 element : a pointer to an AdmBase64 element : an optional AdmError

This function is used to request the string stored in an AdmBase64 string element. The string returned must be considered const and volatile, and if it is needed for long periods of time, the programmer should copy it.

Return value: a pointer to the AdmBase64 element's value string.

◆ AdmBase64_setValue()

int AdmBase64_setValue ( AdmBase64 base64_scalar,
const char *  value,
AdmError **  error 
)

This function is used to set the value of an AdmBase64 string element. It stores a copy of the value string it is passed.

Parameters
base64_scalara pointer to an AdmBase64 element
valuea pointer to a base64 encoded binary string
erroran optional AdmError
Returns
-1 on error, 0 on success

◆ AdmBase64_getBinValue()

size_t AdmBase64_getBinValue ( AdmBase64 base64_scalar,
void **  value,
AdmError **  error 
)
Parameters
base64_scalara pointer to an AdmBase64 element
valuea pointer to a void pointer to return the address of the new buffer.
erroran optional AdmError
Returns
the size of the new buffer.

This function will decode and return a copy of the binary string stored in a AdmBase64 element. You must free the returned buffer.

Return value: a pointer to the AdmBase64 element's value string.

◆ AdmBase64_setBinValue()

int AdmBase64_setBinValue ( AdmBase64 base64_scalar,
const void *  value,
size_t  size,
AdmError **  error 
)

This function is used to set the binary value of an AdmBase64 string element. It stores an encoded copy of the value string it is passed.

Parameters
base64_scalara pointer to an AdmBase64 element
valuea pointer to a binary string
sizethe size of the binary string
erroran optional AdmError
Returns
-1 on error, 0 on success

◆ AdmCopy_getValue()

AdmRefStr* AdmCopy_getValue ( AdmCopy copy_scalar,
AdmError **  error 
)

This function is used to request the path of an AdmCopy element. The string returned must be considered const and volatile, and if it is needed for long periods of time, the programmer should copy it.

Specifically, it is guranteed for only so long as the AdmCopy element is refed, and its value is not changed.

Parameters
copy_scalara pointer to an AdmCopy element
erroran optional GError
Returns
An AdmRefStr containing the AdmCopy's path

◆ AdmCopy_setValue()

int AdmCopy_setValue ( AdmCopy copy_scalar,
const char *  value,
AdmError **  error 
)

This function is used to set the path of an AdmCopy element. It stores a copy of the string passed to it, after checking its path validity.

Parameters
copy_scalara pointer to an AdmCopy element
valuea pointer to a valid path string
erroran optional GError
Returns
-1 on error, 0 on success

◆ AdmBlackBox_getCacheDir()

AdmRefStr* AdmBlackBox_getCacheDir ( AdmError **  error)

Gets the cache directory the alchemist is currently using.

Parameters
erroran optional pointer to an AdmError pointer
Returns
the cache dir
Note
you do not own the return stritg, and must not free it

◆ AdmBlackBox_setCacheDir()

int AdmBlackBox_setCacheDir ( const char *  path,
AdmError **  error 
)

Sets the cache directory the alchemist is currently using.

Parameters
paththe cache directory you want to use
erroran optional pointer to an AdmError pointer
Returns
-1 on failure, 0 on succes
Note
passing NULL as the path resets the path to the default

◆ AdmBlackBox_getBox()

AdmBlackBox* AdmBlackBox_getBox ( AdmList box_cfg,
AdmError **  error 
)

◆ AdmBlackBox_caps()

adm_bb_cap_t AdmBlackBox_caps ( AdmBlackBox box,
AdmError **  error 
)

Returns a capability vector listing the capabilities of an AdmBlackBox.

Parameters
boxThe AdmBlackBox to check
errorOptional pointer to AdmError pointer.
Returns
an adm_bb_cap_t structure

◆ AdmBlackBox_ref()

void AdmBlackBox_ref ( AdmBlackBox box,
AdmError **  error 
)

Increase reference to given AdmBlackBox element.

Parameters
boxThe AdmBlackBox to increase the reference to.
errorOptional pointer to AdmError pointer.

◆ AdmBlackBox_unref()

void AdmBlackBox_unref ( AdmBlackBox box,
AdmError **  error 
)

Decrease reference to given AdmBlackBox element.

Parameters
boxThe AdmBlackBox to decrease the reference to.
errorOptional pointer to AdmError pointer.

◆ AdmBlackBox_read()

AdmContext* AdmBlackBox_read ( AdmBlackBox box,
AdmError **  error 
)

Tries to read the most current context from the given AdmBlackBox and return it. The BlackBox may not be able to be readable in which case NULL will be returned. Also it may allow caching and do so transparently.

Parameters
boxThe AdmBlackBox to read from.
errorOptional pointer to AdmError pointer.
Returns
The pointer to the AdmContext retrived through the given box.

◆ AdmBlackBox_listSerial()

int AdmBlackBox_listSerial ( AdmBlackBox box,
unsigned int *  array,
unsigned int  array_len,
unsigned int  top_serial,
AdmError **  error 
)

Creates a list of serial numbers of the given AdmBlackBox subject to the constraints.

Parameters
boxThe AdmBlackBox to get the list of serial numbers from.
arrayThe pointer to the preallocated array of int values to be filled with the serial numbers.
array_lenThe size of the perallocated array.
top_serialThe highest serial number that we request. Only serial numbers below that will be returned. Use 0 to request the newest (highest) serial numbers.
errorOptional pointer to AdmError pointer.
Returns
The amount of serial numbers filled in. Always less or equal to the array length.
Note
The list of serial numbers can partially come from the local cached BlackBoxes as well.

◆ AdmBlackBox_readSerial()

AdmContext* AdmBlackBox_readSerial ( AdmBlackBox box,
unsigned int  serial,
AdmError **  error 
)

Reads a context from the given AdmBlackBox with the specified serial number.

Parameters
boxThe AdmBlackBox to read the context from.
serialThe serial number of the context we request.
errorOptional pointer to AdmError pointer.
Returns
The pointer to the AdmContext retrived through the given box or NULL if no context with that serial number exists.

◆ AdmBlackBox_write()

int AdmBlackBox_write ( AdmBlackBox box,
AdmContext context,
AdmError **  error 
)

Write the given AdmContext to the given AdmBlackBox. Does automatic caching if the given AdmBlackBox supports it.

Parameters
boxThe AdmBlackBox to write to.
contextThe AdmContext to be written to the box.
errorOptional pointer to AdmError pointer.
Returns
0 on success, all other values indicate an error.

◆ AdmBlackBox_getMark()

unsigned int AdmBlackBox_getMark ( AdmBlackBox box,
const char *  mark,
AdmError **  error 
)

Get the serial number of the given AdmBlackBox for the given mark. The whole business with marks allows us to 'tag' cached boxes and to identify if they are dirty or not.

Parameters
boxThe AdmBlackBox from which to get the marked serial.
markThe mark string.
errorOptional pointer to AdmError pointer.
Returns
The serial number of the marked cached box or 0 if no marked cached box exists.

◆ AdmBlackBox_setMark()

int AdmBlackBox_setMark ( AdmBlackBox box,
const char *  mark,
AdmError **  error 
)

Mark the given AdmBlackBox. The serial number is extracted from the given AdmBlackBox automatically. Any existing mark will be overwritten. If an AdmBlackBox is cached, then it is possible to mark it. This provides a mechanism for marking the top serial number in the cache down at a given mark, which is a string; allowing various applications to check to see if an interface has changed since the last time the accessed by doing something along the lines of:

AdmBlackBox_setMark(box_p, "app1_mark_string", error);
...
int i;
if ((AdmBlackBok_listSerial(box_p, &i, 1, 0, NULL) &&
(i != AdmBlackBox_getMark(box_p, "app1_mark_string", NULL)) {
...
}
Parameters
boxThe AdmBlackBox which we want to mark.
markThe mark string.
errorOptional pointer to AdmError pointer.
Returns
0 on success, all other values indicate an error.

◆ AdmBlackBox_clearMark()

int AdmBlackBox_clearMark ( AdmBlackBox box,
const char *  mark,
AdmError **  error 
)

Clear the mark for the given AdmBlackBox.

Parameters
boxThe AdmBlackBox where we want to clear its mark.
markThe mark string.
errorOptional pointer to AdmError pointer.
Returns
0 on success, all other values indicate an error.

◆ AdmSwitchboard_getSwbDir()

AdmRefStr* AdmSwitchboard_getSwbDir ( AdmError **  error)

Gets the swb directory the alchemist is currently using.

Parameters
erroran optional pointer to an AdmError pointer
Returns
the swb dir
Note
you do not own the return stritg, and must not free it

◆ AdmSwitchboard_setSwbDir()

int AdmSwitchboard_setSwbDir ( const char *  path,
AdmError **  error 
)

Sets the swb directory the alchemist is currently using.

Parameters
paththe swb directory you want to use
erroran optional pointer to an AdmError pointer
Returns
-1 on failure, 0 on succes
Note
passing NULL as the path resets the path to the default

◆ AdmSwitchboard_markNsp()

int AdmSwitchboard_markNsp ( const char *  namespace,
const char *  subspace,
const char *  mark,
AdmError **  error 
)

◆ AdmSwitchboard_markNspWithConfig()

int AdmSwitchboard_markNspWithConfig ( AdmList namespace_cfg,
const char *  subspace,
const char *  mark,
AdmError **  error 
)

◆ AdmSwitchboard_checkNspMark()

int AdmSwitchboard_checkNspMark ( const char *  namespace,
const char *  subspace,
const char *  mark,
AdmError **  error 
)

◆ AdmSwitchboard_checkNspMarkWithConfig()

int AdmSwitchboard_checkNspMarkWithConfig ( AdmList namespace_cfg,
const char *  subspace,
const char *  mark,
AdmError **  error 
)

◆ AdmSwitchboard_readNsp()

AdmContext* AdmSwitchboard_readNsp ( const char *  namespace,
const char *  subspace,
unsigned int  depth,
AdmError **  error 
)

read the given subspace from the given namespace

Parameters
namespacethe namespace to read
subspacethe box set to extract, NULL uses the default "config" set
depththe number of boxes in the namespace to read, 0 means all.
erroran optional pointer to an AdmError pointer

◆ AdmSwitchboard_readNspWithConfig()

AdmContext* AdmSwitchboard_readNspWithConfig ( AdmList namespace_cfg,
const char *  subspace,
unsigned int  depth,
AdmError **  error 
)

◆ AdmSwitchboard_writeNsp()

int AdmSwitchboard_writeNsp ( const char *  namespace,
const char *  subspace,
AdmContext context,
AdmError **  error 
)

writes the given subspace in the given namespace

Parameters
namespacethe namespace to write
subspacethe box set to extract, NULL uses the default "config" set
contextthe context to write
erroran optional pointer to an AdmError pointer

◆ AdmSwitchboard_writeNspWithConfig()

int AdmSwitchboard_writeNspWithConfig ( AdmList namespace_cfg,
const char *  subspace,
AdmContext context,
AdmError **  error 
)

◆ AdmSwitchboard_readNspCtx()

AdmContext* AdmSwitchboard_readNspCtx ( const char *  namespace,
AdmError **  error 
)
Parameters
namespacethe name of the namespace to read
erroran optional pointer to an AdmError pointer
Returns
an AdmContext that is the namespace configuration

◆ AdmSwitchboard_writeNspCtx()

int AdmSwitchboard_writeNspCtx ( const char *  namespace,
AdmContext namespace_ctx,
int  mode,
uid_t  uid,
gid_t  gid,
AdmError **  error 
)
Parameters
namespacethe name of the namespace to read
contextthe configuration context to write
modethe file mode to write the context out with
uidthe uid to write the file with, -1 for dont care
gidthe gid to write the file with, -1 for dont care
erroran optional pointer to an AdmError pointer
Returns
-1 on failure, 0 on succes

◆ AdmSwitchboard_getNspCfg()

AdmList* AdmSwitchboard_getNspCfg ( AdmContext namespace_ctx,
const char *  namespace,
AdmError **  error 
)

extract a namespace config from a namespace context

Parameters
namespacethe namespace to extract
configthe namespace config context

◆ AdmSwitchboard_getSubspCfg()

AdmList* AdmSwitchboard_getSubspCfg ( AdmList namespace_cfg,
const char *  subspace,
AdmError **  error 
)

extract a box set from a namespace config

Parameters
subspacethe box set to extract, NULL uses the default "config" set
namespacethe namespace used
configthe namespace config context

◆ AdmSwitchboard_getBox()

AdmBlackBox* AdmSwitchboard_getBox ( AdmList subspace_cfg,
const char *  box_name,
AdmError **  error 
)

extract a box_config set from a namespace config

Parameters
box_namethe box to extract
subspace_cfgthe subspace config no use