.TH "config.h" 3 "23 Oct 2003" "libnewmail" \" -*- nroff -*- .ad l .nh .SH NAME config.h \- Some routines to ease the configuration file access. .SH SYNOPSIS .br .PP \fC#include \fP .br .SS "Data Structures" .in +1c .ti -1c .RI "struct \fBconfig_t\fP" .br .RI "\fIA configuration file handle.\fP" .in -1c .SS "Functions" .in +1c .ti -1c .RI "\fBconfig_t\fP * \fBnm_config_open\fP (const char *fn)" .br .RI "\fIOpen the specified configuration file.\fP" .ti -1c .RI "void \fBnm_config_close\fP (\fBconfig_t\fP *c)" .br .RI "\fIClose a configuration file oject.\fP" .ti -1c .RI "const char * \fBnm_config_get\fP (\fBconfig_t\fP *c, const char *entry, const char *def)" .br .RI "\fIRequest a specific configuration key from the configuration file.\fP" .ti -1c .RI "int \fBnm_config_get_int\fP (\fBconfig_t\fP *c, const char *entry, int def)" .br .RI "\fISame as \fBnm_config_get()\fP but requests an integer.\fP" .ti -1c .RI "int \fBnm_config_get_bool\fP (\fBconfig_t\fP *c, const char *entry, int def)" .br .RI "\fISame as \fBnm_config_get()\fP but requests a boolean.\fP" .in -1c .SH "DETAILED DESCRIPTION" .PP Some routines to ease the configuration file access. .PP This is only used by the plugins, not by applications linking to libnewmail. .PP .PP Definition in file \fBconfig.h\fP. .SH "FUNCTION DOCUMENTATION" .PP .SS "void nm_config_close (\fBconfig_t\fP * c)" .PP Close a configuration file oject. .PP \fBParameters: \fP .in +1c .TP \fB\fIc\fP\fP The configuration file object to be freed .SS "const char* nm_config_get (\fBconfig_t\fP * c, const char * entry, const char * def)" .PP Request a specific configuration key from the configuration file. .PP \fBParameters: \fP .in +1c .TP \fB\fIc\fP\fP The configuration file object .TP \fB\fIentry\fP\fP The configuration file key .TP \fB\fIdef\fP\fP The default value, when the key is not found. May be NULL .PP \fBReturns: \fP .in +1c A pointer to a statically allocated string containing the value read or def. .SS "int nm_config_get_bool (\fBconfig_t\fP * c, const char * entry, int def)" .PP Same as \fBnm_config_get()\fP but requests a boolean. .PP \fBParameters: \fP .in +1c .TP \fB\fIc\fP\fP The configuration file object .TP \fB\fIentry\fP\fP The configuration file key .TP \fB\fIdef\fP\fP The default value, when the key is not found. .PP \fBReturns: \fP .in +1c The value read or def .SS "int nm_config_get_int (\fBconfig_t\fP * c, const char * entry, int def)" .PP Same as \fBnm_config_get()\fP but requests an integer. .PP \fBParameters: \fP .in +1c .TP \fB\fIc\fP\fP The configuration file object .TP \fB\fIentry\fP\fP The configuration file key .TP \fB\fIdef\fP\fP The default value, when the key is not found. .PP \fBReturns: \fP .in +1c The value read or def .SS "\fBconfig_t\fP* nm_config_open (const char * fn)" .PP Open the specified configuration file. .PP \fBParameters: \fP .in +1c .TP \fB\fIfn\fP\fP Path to configuration file .PP \fBReturns: \fP .in +1c A handle to the configuration file object .SH "AUTHOR" .PP Generated automatically by Doxygen for libnewmail from the source code.