Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

config.c File Reference

Implements the internally-used and public API configuration functions for libmacs. Unless you're interested in macs internals, you're probably looking for libmacs.h. More...

#include <stdarg.h>
#include <string.h>
#include <malloc.h>
#include "libmacs.h"
#include "common.h"

Defines

#define DF   GDOME_LOAD_PARSING | GDOME_LOAD_SUBSTITUTE_ENTITIES

Functions

GdomeNode * _macs_cf_next (_macs_ctx *ctx, GdomeNode *node)
GdomeNode * _macs_cf_descend (_macs_ctx *ctx, const char *key, GdomeNode *parent)
void * macs_init (const char *cf, int connect)
 Initializes the library.

void macs_exit (void *ctxp)
 Deinitializes the library.

const char * macs_cf (void *ctxp)
 Returns the loaded configuration file.

char * macs_get_config (const void *ctxp, const char *key,...)
 Fetch a configuration value.

char ** macs_get_configs (const void *ctxp, int *nodes, const char *key,...)
 Fetch several configuration values.

char ** macs_get_methods (const void *ctxp, int server)
 Fetch a list of available methods.


Detailed Description

Implements the internally-used and public API configuration functions for libmacs. Unless you're interested in macs internals, you're probably looking for libmacs.h.

Id:
config.c,v 1.12 2002/10/09 01:43:19 santana Exp


Define Documentation

#define DF   GDOME_LOAD_PARSING | GDOME_LOAD_SUBSTITUTE_ENTITIES
 

The flags to parse the XML with.


Function Documentation

GdomeNode * _macs_cf_next _macs_ctx   ctx,
GdomeNode *    node
 

Finds the next sibling node of the same name.

Parameters:
ctx  A _macs_ctx object from macs_init()
node  The node who's next like-named sibling to find.
Returns:
The next like-named sibling, or NULL if none found.

GdomeNode * _macs_cf_descend _macs_ctx   ctx,
const char *    key,
GdomeNode *    parent
 

Find a child node with the certain name, or "default"

Parameters:
ctx  A _macs_ctx object from macs_init()
key  The name of the child node to search for.
parent  The DOM node to search in.
Returns:
The child node, or NULL if not found.


Generated on Tue Oct 8 22:15:53 2002 for MACS Client C API by doxygen1.2.16