init.h File Reference

Go to the source code of this file.

Data Structures

struct  _veldfire
 Veldfire Structure. More...

Typedefs

typedef _veldfire veldfire
 Veldfire Structure.

Functions

veldfireVF__init (int ac, char *av[])
 Initialise a veldfire data structure.
char * VF__get_msg (veldfire *v)
 Get the email message, either via the terminal or via stdin (eg pipe).
void VF__version (veldfire *v)
 Print a version information string.
void VF__help (veldfire *v)
 Usage message printed to standard out.
int VF__check_config (veldfire *v)
 Check the configuration for sanity.
void VF__cleanup (veldfire *v)
 Release resources.


Detailed Description

Author:
Jason Armstrong <ja@riverdrums.com>
Version:
Id
init.h,v 1.9 2006/02/11 20:40:21 riverdrums Exp

Definition in file init.h.


Typedef Documentation

typedef struct _veldfire veldfire
 

Veldfire Structure.

Contains everything we need to know


Function Documentation

int VF__check_config veldfire v  ) 
 

Check the configuration for sanity.

Parameters:
v - Veldfire structure
We check:

  1. We have a 'to' address
  2. All attached files exist and can be read

Definition at line 558 of file init.c.

References _veldfire::files, _veldfire::to, and VF__help().

Referenced by VF__init().

Here is the call graph for this function:

void VF__cleanup veldfire v  ) 
 

Release resources.

Parameters:
v - Veldfire structure

Definition at line 146 of file init.c.

References __veldfire_cleanup().

Referenced by main().

Here is the call graph for this function:

char* VF__get_msg veldfire v  ) 
 

Get the email message, either via the terminal or via stdin (eg pipe).

Parameters:
v - Veldfire structure
Returns:
Pointer to the message, which has been malloced and must be freed

Definition at line 613 of file init.c.

References _veldfire::freemsg, _veldfire::nomessage, and VF_READ_BUFSIZE.

Referenced by main().

void VF__help veldfire v  ) 
 

Usage message printed to standard out.

Parameters:
v - Veldfire structure

Definition at line 488 of file init.c.

References __veldfire_cleanup(), _veldfire::prog, VF_DEFAULT_CONFIGFILE, VF_DEFAULT_HOST, VF_DEFAULT_LOGFILE, VF_DEFAULT_LOGLEVEL, VF_DEFAULT_MAXCONNECTION, VF_DEFAULT_PORT, and VF_DEFAULT_SECTION.

Referenced by __veldfire_commandline(), and VF__check_config().

Here is the call graph for this function:

veldfire* VF__init int  ac,
char *  av[]
 

Initialise a veldfire data structure.

Parameters:
ac - Argument number
av - Array of command line arguments
Returns:
veldfire structure pointer on success

NULL on failure

Definition at line 117 of file init.c.

References __veldfire_cleanup(), __veldfire_commandline(), __veldfire_configfile(), __veldfire_defaults(), __veldfire_env(), __veldfire_init(), _veldfire::log, _veldfire::logfile, _veldfire::loglevel, _veldfire::printlog, and VF__check_config().

Referenced by main().

Here is the call graph for this function:

void VF__version veldfire v  ) 
 

Print a version information string.

Parameters:
v - Veldfire structure
This function frees resources and exits

Definition at line 475 of file init.c.

References __veldfire_cleanup(), and VF_VERSION.

Here is the call graph for this function:

 

 


Jason Armstrong <ja@riverdrums.com>