1 /* 2 configfile.h 3 4 Common declarations and handling of the configuration file. 5 6 $Id: configfile.h,v 1.12 2003/05/23 09:33:10 bears Exp $ 7 */ 8 9 #ifndef CONFIGFILE_H 10 #define CONFIGFILE_H 11 12 #if HAVE_CONFIG_H 13 #include <config.h> 14 #endif 15 16 #include "common.h" 17 18 struct GroupEnum; 19 typedef struct GroupEnum GroupEnum; 20 21 const char * Cfg_spoolDir( void ); 22 const char * Cfg_version( void ); 23 24 int Cfg_maxFetch( void ); 25 int Cfg_autoUnsubscribeDays( void ); 26 int Cfg_threadFollowTime( void ); 27 int Cfg_connectTimeout( void ); 28 Bool Cfg_autoUnsubscribe( void ); 29 Bool Cfg_autoSubscribe( void ); 30 Bool Cfg_infoAlways( void ); 31 Bool Cfg_appendReplyTo ( void ); 32 33 Bool Cfg_replaceMsgId( void ); 34 const char * Cfg_hostnameMsgId( void ); 35 Bool Cfg_postLocal( void ); 36 const char * Cfg_mailTo( void ); 37 38 /* Begin iteration through the server names */ 39 void Cfg_beginServEnum( void ); 40 41 /* Save next server name in "name". Return TRUE if name has been was saved. 42 Return FALSE if there are no more server names. */ 43 Bool Cfg_nextServ( Str name ); 44 45 Bool Cfg_servListContains( const char *name ); 46 /* Prefer server earlier in config file. Known servers are always preferential 47 to unknown servers. */ 48 Bool Cfg_servIsPreferential( const char *name1, const char *name2 ); 49 void Cfg_authInfo( const char *name, Str user, Str pass ); 50 51 Bool Cfg_needClientAuth( void ); 52 void Cfg_setClientAuth( Bool needsAuth ); 53 54 /* Return expire period for named group. */ 55 int Cfg_expire( const char *grp ); 56 57 /* Return default expire days. */ 58 int Cfg_defaultExpire( void ); 59 60 /* Return auto subscribe mode for named group. Can be: full, thread, over */ 61 const char * Cfg_autoSubscribeMode( const char *grp ); 62 63 /* Return default auto subscribe mode. Can be: full, thread, over */ 64 const char * Cfg_defaultAutoSubscribeMode( void ); 65 66 /* Return Path: header contents */ 67 const char * Cfg_pathHeader( void ); 68 69 /* Return domain for generated From: lines */ 70 const char * Cfg_fromDomain( void ); 71 72 /* Return default Organization: contents */ 73 const char * Cfg_organization( void ); 74 75 /* Return the user Noffle should run as */ 76 const char * Cfg_noffleUser( void ); 77 78 /* Return the group Noffle should run as */ 79 const char * Cfg_noffleGroup( void ); 80 81 void Cfg_read( void ); 82 83 /* Get a new iterator for get group patterns for the given server */ 84 GroupEnum * 85 new_GetGrEn( const char *name ); 86 87 /* Get a new iterator for omit group patterns for the given server */ 88 GroupEnum * 89 new_OmitGrEn( const char *name ); 90 91 /* Free up a group enumerator */ 92 void 93 del_GrEn( GroupEnum * ge ); 94 95 /* Rewind to first group */ 96 void 97 GrEn_first( GroupEnum * ge ); 98 99 /* Get next group pattern or NULL if no more */ 100 const char * 101 GrEn_next( GroupEnum *ge ); 102 103 #endif 104