Main Page   Compound List   File List   Compound Members   File Members  

usercfg.c File Reference

#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "../include/libuser/user_private.h"

Compounds

struct  config_config

Functions

gboolean lu_cfg_init (struct lu_context *context, struct lu_error **error)
void lu_cfg_done (struct lu_context *context)
GList* lu_cfg_read (struct lu_context *context, const char *key, const char *default_value)
GList* lu_cfg_read_keys (struct lu_context *context, const char *parent_key)
const char* lu_cfg_read_single (struct lu_context *context, const char *key, const char *default_value)

Detailed Description


Function Documentation

GList * lu_cfg_read ( struct lu_context * context,
const char * key,
const char * default_value )
 

lu_cfg_read:

Parameters:
context   A valid library context.
key   A hierarchical name for the setting being queried.
default_value   A default value which will be returned in the @key is not found. It may be NULL.

Reads the values of a configuration setting from libuser's configuration settings (wherever they may be).

Returns:
A GList of strings.

GList * lu_cfg_read_keys ( struct lu_context * context,
const char * parent_key )
 

lu_cfg_read_keys:

Parameters:
context   A valid library context.
parent_key   A hierarchical name for the setting whose children are being queried.

Reads the values of a configuration setting on the level of the configuration hierarchy immediately below the parent_key.

Returns:
A GList of strings.

const char * lu_cfg_read_single ( struct lu_context * context,
const char * key,
const char * default_value )
 

lu_cfg_read_single:

Parameters:
context   A valid library context.
key   A hierarchical name for the setting being queried.
default_value   A default value which will be returned in the @key is not found. It may be NULL.

Reads the values of a named configuration setting.

Returns:
A single string containing any of the values the @key contains, or the @default_value if none are found.


Generated at Wed Aug 29 13:14:11 2001 for libuser by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001