Main Page   Data Structures   File List   Data Fields   Globals  

config.h File Reference

Some routines to ease the configuration file access. More...

#include <stdio.h>

Go to the source code of this file.

Data Structures

struct  config_t
 A configuration file handle. More...


Functions

config_tnm_config_open (char *fn)
 Open the specified configuration file.

void nm_config_close (config_t *c)
 Close a configuration file oject.

char * nm_config_get (config_t *c, char *entry, char *def)
 Request a specific configuration key from the configuration file.

int nm_config_get_int (config_t *c, char *entry, int def)
 Same as nm_config_get() but requests an integer.

int nm_config_get_bool (config_t *c, char *entry, int def)
 Same as nm_config_get() but requests a boolean.


Detailed Description

Some routines to ease the configuration file access.

This is only used by the plugins, not by applications linking to libnewmail.


Function Documentation

void nm_config_close config_t   c
 

Close a configuration file oject.

Parameters:
c  The configuration file object to be freed

char* nm_config_get config_t   c,
char *    entry,
char *    def
 

Request a specific configuration key from the configuration file.

Parameters:
c  The configuration file object
entry  The configuration file key
def  The default value, when the key is not found. May be NULL
Returns:
A pointer to a statically allocated string containing the value read or def.

int nm_config_get_bool config_t   c,
char *    entry,
int    def
 

Same as nm_config_get() but requests a boolean.

Parameters:
c  The configuration file object
entry  The configuration file key
def  The default value, when the key is not found.
Returns:
The value read or def

int nm_config_get_int config_t   c,
char *    entry,
int    def
 

Same as nm_config_get() but requests an integer.

Parameters:
c  The configuration file object
entry  The configuration file key
def  The default value, when the key is not found.
Returns:
The value read or def

config_t* nm_config_open char *    fn
 

Open the specified configuration file.

Parameters:
fn  Path to configuration file
Returns:
A handle to the configuration file object


Generated on Thu Jun 5 09:27:46 2003 for libnewmail by doxygen1.2.18