alchemist.hSection: Alchemist (3)Updated: 22 Sep 2004 |
alchemist.hSection: Alchemist (3)Updated: 22 Sep 2004 |
#include <sys/types.h>
#define ALCHEMIST_ABI_MAJOR_VER 0
#define ALCHEMIST_ABI_MINOR_VER 0
#define ADM_EDEADNODE 1
#define ADM_EBADTYPE 2
#define ADM_EBADNAME 3
#define ADM_EBADDATA 4
#define ADM_ECONSTRAINT 5
#define ADM_ENOINDEX 51
#define ADM_ENONAME 52
#define ADM_ENOPATH 53
#define ADM_EACCESSFAILED 101
#define ADM_ENONAMESPACE 102
#define ADM_ENOSUBSPACE 103
#define ADM_ENOWRITE 201
#define ADM_ENOREAD 202
#define ADM_ENOLISTSERIAL 203
#define ADM_ENOREADSERIAL 204
#define ADM_ENOCACHE 205
#define ADM_ENOBOXTYPE 251
#define ADM_EPARSE 301
#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)
typedef AdmError AdmError
typedef AdmRefStr AdmRefStr
typedef AdmData AdmData
typedef AdmList AdmList
typedef AdmInt AdmInt
typedef AdmBool AdmBool
typedef AdmFloat AdmFloat
typedef AdmString AdmString
typedef AdmString AdmBase64
typedef AdmString AdmCopy
typedef AdmIdentity AdmIdentity
typedef AdmContext AdmContext
typedef AdmBlackBox AdmBlackBox
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 }
void AdmError_create (AdmError **error, int num, const char *format,...)
Allocate new AdmError structure.
void AdmError_ref (AdmError *error)
Increment the ref count of an AdmError structure.
void AdmError_unref (AdmError *error)
Decrement the ref count of an AdmError structure.
const char * AdmError_strerr (AdmError *error)
String description of error.
int AdmError_errno (AdmError *error)
Integer error code of error.
AdmRefStr * AdmRefStr_ref (AdmRefStr *refstr)
void AdmRefStr_unref (AdmRefStr *refstr)
size_t AdmRefStr_len (AdmRefStr *refstr)
AdmRefStr * AdmRefStr_get (const char *str, int force)
Get an AdmRefStr.
AdmRefStr * AdmRefStr_nget (const char *str, size_t len, int force)
Get an AdmRefStr, by length.
AdmContext * AdmContext_new (const char *name, unsigned int serial, AdmError **error)
AdmContext constructor.
AdmContext * AdmContext_ref (AdmContext *context, AdmError **error)
AdmContext reference increment.
void AdmContext_unref (AdmContext *context, AdmError **error)
AdmContext reference decrement.
AdmContext * AdmContext_copy (AdmContext *context, AdmError **error)
AdmContext copy operator.
AdmContext * AdmContext_merge (const char *name, unsigned int serial, AdmContext *contextA, AdmContext *contextB, AdmError **error)
AdmContext merge operator.
void AdmContext_flatten (AdmContext *context, AdmError **error)
AdmContext flatten operator.
void AdmContext_strip (AdmContext *context, AdmError **error)
AdmContext strip function.
char * AdmContext_toXML (AdmContext *context, AdmError **error)
AdmContext * AdmContext_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)
AdmRefStr * AdmContext_getMask (AdmContext *context, unsigned int index, AdmError **error)
AdmContext mask set accessor.
int AdmContext_setMask (AdmContext *context, const char *path, AdmError **error)
AdmContext mask set mutator.
int AdmContext_clearMaskByIndex (AdmContext *context, unsigned int index, AdmError **error)
AdmContext mask set element index remove.
int AdmContext_clearMaskByPath (AdmContext *context, const char *path, AdmError **error)
AdmContext mask set element data path remove.
unsigned int AdmContext_getNumMasks (AdmContext *context, AdmError **error)
AdmContext mask set length aggregator.
AdmIdentity * AdmContext_getIdentityRoot (AdmContext *context, AdmError **error)
AdmContext identity root accessor.
AdmIdentity * AdmIdentity_getParentA (AdmIdentity *identity, AdmError **error)
AdmIdentity parentA accessor.
AdmIdentity * AdmIdentity_getParentB (AdmIdentity *identity, AdmError **error)
AdmIdentity parentB accessor.
AdmRefStr * AdmIdentity_getName (AdmIdentity *identity, AdmError **error)
AdmIdentity name accessor.
int AdmIdentity_setName (AdmIdentity *identity, const char *name, AdmError **error)
AdmIdentity name mutator.
unsigned int AdmIdentity_getSerial (AdmIdentity *identity, AdmError **error)
AdmIdentity serial number accessor.
int AdmIdentity_setSerial (AdmIdentity *identity, unsigned int serial, AdmError **error)
AdmIdentity serial number mutator.
AdmIdentity * AdmIdentity_ref (AdmIdentity *identity, AdmError **error)
AdmIdentity reference increment.
void AdmIdentity_unref (AdmIdentity *identity, AdmError **error)
AdmIdentity reference decrement.
AdmContext * AdmIdentity_getContext (AdmIdentity *identity, AdmError **error)
AdmIdentity context accessor.
int AdmIdentity_isAlive (AdmIdentity *identity, AdmError **error)
AdmIdentity reference check.
AdmData * AdmContext_getDataRoot (AdmContext *context, AdmError **error)
AdmContext data root accessor.
AdmData * AdmData_getContainer (AdmData *data, AdmError **error)
AdmData container accessor.
AdmData * AdmData_getPrev (AdmData *data, int wrap, AdmError **error)
get the previous sibling of an AdmData element
AdmData * AdmData_getNext (AdmData *data, int wrap, AdmError **error)
get the next sibling of an AdmData element
AdmContext * AdmData_getContext (AdmData *data, AdmError **error)
AdmData context accessor.
AdmData * AdmContext_getDataByPath (AdmContext *context, const char *path, AdmError **error)
AdmData path lookup.
AdmDataType AdmData_getType (AdmData *data, AdmError **error)
AdmData type accessor.
AdmData * AdmData_ref (AdmData *data, AdmError **error)
AdmData reference increment.
void AdmData_unref (AdmData *data, AdmError **error)
AdmData reference decrement.
int AdmData_isAlive (AdmData *data, AdmError **error)
AdmData reference check.
int AdmData_unlink (AdmData *data, AdmError **error)
AdmData unlink operator.
int AdmData_validName (const char *name)
Checks a string for name validity.
AdmRefStr * AdmData_getName (AdmData *data, AdmError **error)
AdmData name accessor.
int AdmData_setName (AdmData *data, const char *name, AdmError **error)
AdmData name mutator.
AdmRefStr * AdmData_getSource (AdmData *data, AdmError **error)
AdmData source accessor.
int AdmData_setSource (AdmData *data, const char *source, AdmError **error)
AdmData source mutator.
int AdmData_isProtected (AdmData *data, AdmError **error)
AdmData protected verification.
int AdmData_setProtected (AdmData *data, int state, AdmError **error)
AdmData protected mutator.
int AdmList_isAnonymous (AdmList *list, AdmError **error)
AdmList anonymous verification.
int AdmList_setAnonymous (AdmList *list, int state, AdmError **error)
AdmList anonymous mutator.
int AdmList_isAtomic (AdmList *list, AdmError **error)
AdmList atomic verification.
int AdmList_setAtomic (AdmList *list, int state, AdmError **error)
AdmList atomic mutator.
int AdmList_isPrepend (AdmList *list, AdmError **error)
AdmList prepend verification.
int AdmList_setPrepend (AdmList *list, int state, AdmError **error)
AdmList prepend mutator.
unsigned int AdmList_getNumData (AdmList *list, AdmError **error)
AdmList length aggregator.
AdmData * AdmList_getDataByIndex (AdmList *list, unsigned int index, AdmError **error)
AdmList child index accessor.
AdmData * AdmList_getDataByName (AdmList *list, const char *name, AdmError **error)
AdmList child name accessor.
AdmData * AdmList_getDataByPath (AdmList *list, const char *path, AdmError **error)
AdmList child data path accessor.
AdmData * AdmList_addData (AdmList *list, AdmDataType type, const char *name, AdmError **error)
AdmList add child operator.
int AdmList_moveData (AdmList *list, AdmData *data, unsigned int index, AdmError **error)
AdmList child move operator.
AdmData * AdmList_copyData (AdmList *list, AdmData *data, AdmError **error)
AdmList copy data operator.
AdmData * AdmList_renameCopyData (AdmList *list, AdmData *data, const char *name, AdmError **error)
AdmList copy data operator.
unsigned int AdmData_getPos (AdmData *data, AdmError **error)
AdmList child position operator.
int AdmInt_getValue (AdmInt *int_scalar, AdmError **error)
get an AdmInt's value
int AdmInt_setValue (AdmInt *int_scalar, int value, AdmError **error)
set an AdmInt's value
double AdmFloat_getValue (AdmFloat *float_scalar, AdmError **error)
get an AdmFloat's value
int AdmFloat_setValue (AdmFloat *float_scalar, double value, AdmError **error)
set an AdmFloat's value
int AdmBool_getValue (AdmBool *bool_scalar, AdmError **error)
get an AdmBool's value
int AdmBool_setValue (AdmBool *bool_scalar, int value, AdmError **error)
set an AdmBool's value
AdmRefStr * AdmString_getValue (AdmString *string_scalar, AdmError **error)
get an AdmString's value
int AdmString_setValue (AdmString *string_scalar, const char *value, AdmError **error)
AdmRefStr * AdmBase64_getValue (AdmBase64 *base64_scalar, AdmError **error)
int AdmBase64_setValue (AdmBase64 *base64_scalar, const char *value, AdmError **error)
Set the value of an AdmBase64 element.
size_t AdmBase64_getBinValue (AdmBase64 *base64_scalar, void **value, AdmError **error)
Get the binary value of an AdmBase64 element.
int AdmBase64_setBinValue (AdmBase64 *base64_scalar, const void *value, size_t size, AdmError **error)
Set the value of an AdmBase64 element.
AdmRefStr * AdmCopy_getValue (AdmCopy *copy_scalar, AdmError **error)
Get the value of an AdmCopy element.
int AdmCopy_setValue (AdmCopy *copy_scalar, const char *value, AdmError **error)
Set the value of an AdmCopy element.
AdmRefStr * AdmBlackBox_getCacheDir (AdmError **error)
int AdmBlackBox_setCacheDir (const char *path, AdmError **error)
AdmBlackBox * AdmBlackBox_getBox (AdmList *box_cfg, AdmError **error)
adm_bb_cap_t AdmBlackBox_caps (AdmBlackBox *box, AdmError **error)
AdmBlackBox capability querry.
void AdmBlackBox_ref (AdmBlackBox *box, AdmError **error)
AdmBlackbox reference increment.
void AdmBlackBox_unref (AdmBlackBox *box, AdmError **error)
AdmBlackbox reference decrement.
AdmContext * AdmBlackBox_read (AdmBlackBox *box, AdmError **error)
AdmBlackbox read operator.
int AdmBlackBox_listSerial (AdmBlackBox *box, unsigned int *array, unsigned int array_len, unsigned int top_serial, AdmError **error)
AdmBlackbox serial list request.
AdmContext * AdmBlackBox_readSerial (AdmBlackBox *box, unsigned int serial, AdmError **error)
AdmBlackbox serial list request.
int AdmBlackBox_write (AdmBlackBox *box, AdmContext *context, AdmError **error)
AdmBlackbox write operator.
unsigned int AdmBlackBox_getMark (AdmBlackBox *box, const char *mark, AdmError **error)
AdmBlackBox mark accessor.
int AdmBlackBox_setMark (AdmBlackBox *box, const char *mark, AdmError **error)
AdmBlackBox mark mutator.
int AdmBlackBox_clearMark (AdmBlackBox *box, const char *mark, AdmError **error)
AdmBlackbox mark destructor.
AdmRefStr * AdmSwitchboard_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)
AdmContext * AdmSwitchboard_readNsp (const char *namespace, const char *subspace, unsigned int depth, AdmError **error)
AdmContext * AdmSwitchboard_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)
AdmContext * AdmSwitchboard_readNspCtx (const char *namespace, AdmError **error)
read a switchboard namespace configuration from the system
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
AdmList * AdmSwitchboard_getNspCfg (AdmContext *namespace_ctx, const char *namespace, AdmError **error)
AdmList * AdmSwitchboard_getSubspCfg (AdmList *namespace_cfg, const char *subspace, AdmError **error)
AdmBlackBox * AdmSwitchboard_getBox (AdmList *subspace_cfg, const char *box_name, AdmError **error)
Value:
({ AdmRefStr *__tok = (REFSTR); (const char *) __tok; })
Value:
({ AdmError **__err = (ERROR); AdmIdentity *__id; __id = AdmContext_getIdentityRoot((CONTEXT), __err); if (__id != NULL) AdmIdentity_unref(__id, __err); __id; })
Value:
({ AdmError **__err = (ERROR); AdmIdentity *__id; __id = AdmIdentity_getParentA((ID), __err); if (__id != NULL) AdmIdentity_unref(__id, __err); __id; })
Value:
({ AdmError **__err = (ERROR); AdmIdentity *__id; __id = AdmIdentity_getParentB((ID), __err); if (__id != NULL) AdmIdentity_unref(__id, __err); __id; })
Value:
({ AdmError **__err = (ERROR); AdmContext *__ctx; __ctx = AdmIdentity_getContext((ID), __err); if (__ctx != NULL) AdmContext_unref(__ctx, __err); __ctx; })
Value:
({ AdmError **__err = (ERROR); AdmData *__data; __data = AdmContext_getDataRoot((CONTEXT), __err); if (__data != NULL) AdmData_unref(__data, __err); __data; })
Value:
({ AdmError **__err = (ERROR); AdmData *__data; __data = AdmData_getContainer((DATA), __err); if (__data != NULL) AdmData_unref(__data, __err); __data; })
Value:
({ AdmError **__err = (ERROR); AdmData *__data; __data = AdmData_getPrev((DATA), (WRAP), __err); if (__data != NULL) AdmData_unref(__data, __err); __data; })
Value:
({ AdmError **__err = (ERROR); AdmData *__data; __data = AdmData_getNext((DATA), (WRAP), __err); if (__data != NULL) AdmData_unref(__data, __err); __data; })
Value:
({ AdmError **__err = (ERROR); AdmContext *__ctx; __ctx = AdmData_getContext((DATA), __err); if (__ctx != NULL) AdmContext_unref(__ctx, __err); __ctx; })
Value:
({ AdmError **__err = (ERROR); AdmData *__data; __data = AdmContext_getDataByPath((CONTEXT), (PATH), __err); if (__data != NULL) AdmData_unref(__data, __err); __data; })
Value:
({ AdmError **__err = (ERROR); AdmData *__data; __data = AdmList_getDataByIndex((LIST), (INDEX), __err); if (__data != NULL) AdmData_unref(__data, __err); __data; })
Value:
({ AdmError **__err = (ERROR); AdmData *__data; __data = AdmList_getDataByName((LIST), (NAME), __err); if (__data != NULL) AdmData_unref(__data, __err); __data; })
Value:
({ AdmError **__err = (ERROR); AdmData *__data; __data = AdmList_getDataByPath((LIST), (PATH), __err); if (__data != NULL) AdmData_unref(__data, __err); __data; })
Value:
({ AdmError **__err = (ERROR); AdmData *__data; __data = AdmList_addData((LIST), (TYPE), (NAME), __err); if (__data != NULL) AdmData_unref(__data, __err); __data; })
Value:
({ AdmError **__err = (ERROR); AdmData *__data; __data = AdmList_copyData((LIST), (DATA), __err); if (__data != NULL) AdmData_unref(__data, __err); __data; })
Value:
({ AdmError **__err = (ERROR); AdmData *__data; __data = AdmList_renameCopyData((LIST), (DATA), (NAME), __err); if (__data != NULL) AdmData_unref(__data, __err); __data; })
Value:
({ AdmError **__err = (ERROR); AdmList *__list; __list = AdmSwitchboard_getNspCfg((CTX), (NAMESPACE), __err); if (__list != NULL) AdmData_unref((AdmData *) __list, __err); __list; })
Value:
({ AdmError **__err = (ERROR); AdmList *__list; __list = AdmSwitchboard_getSubspCfg((CTX), (SUBSPACE), __err); if (__list != NULL) AdmData_unref((AdmData *) __list, __err); __list; })
Enumeration values:
Constructor/allocator for our AdmError structure. Fails safely and silently if error is NULL.
Parameters:
Parameters:
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:
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:
Returns:
Note:
Returns the error code of the given AdmError structure.
Parameters:
Returns:
Note:
See also:
Parameters:
Returns:
Parameters:
Returns:
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:
Returns:
AdmContext_ref: ref an AdmContext element.
Increases the refcount of an AdmContext element
Parameters:
Returns:
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:
This function creates a full depth copy of an AdmContext element. It is one of the AdmContext refing functions.
Parameters:
Returns:
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:
Returns:
AdmContext_flatten: flatten an AdmContext element.
This function strips all masks and AdmCopy elements from an AdmContext element.
Parameters:
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:
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:
Returns:
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:
Returns:
Note:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
AdmIdentity_setName: Set the name of an AdmIdentity element.
This function sets the name of an AdmIdentity element.
Parameters:
Returns:
AdmIdentity_getSerial: Get the serial number of an AdmIdentity element.
This function gets the serial number of an AdmIdentity element.
Parameters:
Returns:
AdmIdentity_setSerial: Set the serial number of an AdmIdentity element.
This function sets the serial number of an AdmIdentity element.
Parameters:
Returns:
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:
Returns:
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:
AdmIdentity_getContext: Get the context of an AdmIdentity element.
This function returns a pointer to the AdmContext in which this AdmIdentity element exists.
Parameters:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
Parameters:
Returns:
Parameters:
Returns:
AdmData_getContext: Get the context of an AdmData element.
This function returns a pointer to the AdmContext in which this AdmData element exists.
Parameters:
Returns:
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:
Returns:
AdmData_getType: Get the type of an AdmData element.
This function gets the type of an AdmData element
Parameters:
Returns:
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:
Returns:
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:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
AdmData_isProtected: Get the state of an AdmData's protected flag.
This function gets the state of an AdmData's protected flag.
Parameters:
Returns:
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:
Returns:
AdmList_isAnonymous: Get the state of an AdmList's anonymous flag.
This function gets the state of an AdmList's anonymous flag.
Parameters:
Returns:
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:
Returns:
AdmList_isAtomic: Get the state of an AdmList's atomic flag.
This function gets the state of an AdmList's atomic flag.
Parameters:
Returns:
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:
Returns:
AdmList_isPrepend: Get the state of an AdmList's prepend flag.
This function gets the state of an AdmList's prepend flag.
Parameters:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
Gets the integer value stored in an AdmInt node.
Parameters:
Returns:
See also:
AdmError
Sets the integer value stored in an AdmInt node.
Parameters:
Returns:
See also:
AdmError
Gets the double value stored in an AdmFloat node.
Parameters:
Returns:
See also:
AdmError
Sets the double value stored in an AdmFloat node.
Parameters:
Returns:
See also:
AdmError
Gets the boolean value stored in an AdmBool node.
Parameters:
Returns:
See also:
AdmError
Sets the boolean value stored in an AdmBool node.
Parameters:
Returns:
See also:
AdmError
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:
Returns:
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:
Returns:
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.
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:
Returns:
Parameters:
Returns:
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.
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:
Returns:
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:
Returns:
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:
Returns:
Gets the cache directory the alchemist is currently using.
Parameters:
Returns:
Note:
Sets the cache directory the alchemist is currently using.
Parameters:
Returns:
Note:
Returns a capability vector listing the capabilities of an AdmBlackBox.
Parameters:
Returns:
Increase reference to given AdmBlackBox element.
Parameters:
Decrease reference to given AdmBlackBox element.
Parameters:
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:
Returns:
Creates a list of serial numbers of the given AdmBlackBox subject to the constraints.
Parameters:
Returns:
Note:
Reads a context from the given AdmBlackBox with the specified serial number.
Parameters:
Returns:
Write the given AdmContext to the given AdmBlackBox. Does automatic caching if the given AdmBlackBox supports it.
Parameters:
Returns:
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:
Returns:
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:
Returns:
Clear the mark for the given AdmBlackBox.
Parameters:
Returns:
Gets the swb directory the alchemist is currently using.
Parameters:
Returns:
Note:
Sets the swb directory the alchemist is currently using.
Parameters:
Returns:
Note:
read the given subspace from the given namespace
Parameters:
writes the given subspace in the given namespace
Parameters:
Parameters:
Returns:
Parameters:
Returns:
extract a namespace config from a namespace context
Parameters:
extract a box set from a namespace config
Parameters:
extract a box_config set from a namespace config
Parameters:
Generated automatically by Doxygen for Alchemist from the source code.