annotate src/configfile.h @ 494:372f8b55506e noffle

[svn] Apply patch from Jan De Luyck. Add new option 'add-messageid-if-missing', which optionally postpones adding a message ID to the upstream server. If this is done, post-locally must be off. This is to deal with an upstream server troubling Jan. It usually (but not always) rejects posts with a Noffle message ID. I have changed Jan's original option of 'add-message-id-if-missing' for consistency with 'replace-messageid' and added the manual page entry. See SourceForge feature request 1513395.
author bears
date Wed, 12 Jul 2006 20:26:41 +0100
parents 6cb66f5a0479
children 614a3177b15c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
43
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
1 /*
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
2 configfile.h
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
3
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
4 Common declarations and handling of the configuration file.
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
5
494
372f8b55506e [svn] Apply patch from Jan De Luyck. Add new option 'add-messageid-if-missing',
bears
parents: 391
diff changeset
6 $Id: configfile.h 645 2006-07-12 19:26:41Z bears $
43
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
7 */
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
8
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
9 #ifndef CONFIGFILE_H
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
10 #define CONFIGFILE_H
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
11
45
32ba1198c6fa [svn] * Makefile.in, configure, configure.in, docs/Makefile.in, src/Makefile.in:
uh1763
parents: 43
diff changeset
12 #if HAVE_CONFIG_H
32ba1198c6fa [svn] * Makefile.in, configure, configure.in, docs/Makefile.in, src/Makefile.in:
uh1763
parents: 43
diff changeset
13 #include <config.h>
32ba1198c6fa [svn] * Makefile.in, configure, configure.in, docs/Makefile.in, src/Makefile.in:
uh1763
parents: 43
diff changeset
14 #endif
32ba1198c6fa [svn] * Makefile.in, configure, configure.in, docs/Makefile.in, src/Makefile.in:
uh1763
parents: 43
diff changeset
15
43
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
16 #include "common.h"
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
17
88
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
18 struct GroupEnum;
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
19 typedef struct GroupEnum GroupEnum;
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
20
43
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
21 const char * Cfg_spoolDir( void );
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
22 const char * Cfg_version( void );
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
23
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
24 int Cfg_maxFetch( void );
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
25 int Cfg_autoUnsubscribeDays( void );
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
26 int Cfg_threadFollowTime( void );
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
27 int Cfg_connectTimeout( void );
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
28 Bool Cfg_autoUnsubscribe( void );
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
29 Bool Cfg_autoSubscribe( void );
82
1eb0cdd17c76 [svn] info-always-unread config/doc/implementation
bears
parents: 45
diff changeset
30 Bool Cfg_infoAlways( void );
357
b0ee77fa24d4 [svn] * src/post.c,src/configfile.c,src/configfile.h,docs/noffle.conf.5,
bears
parents: 287
diff changeset
31 Bool Cfg_appendReplyTo ( void );
85
dfcb28566d36 [svn] Merged in changes from release-1-0 up to release-1-0-merge-1.
enz
parents: 82
diff changeset
32
43
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
33 Bool Cfg_replaceMsgId( void );
195
76460d98b2fb [svn] * noffle.conf.example,docs/noffle.conf.5,src/configfile.h,src/configfile.c,
bears
parents: 150
diff changeset
34 const char * Cfg_hostnameMsgId( void );
88
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
35 Bool Cfg_postLocal( void );
43
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
36 const char * Cfg_mailTo( void );
494
372f8b55506e [svn] Apply patch from Jan De Luyck. Add new option 'add-messageid-if-missing',
bears
parents: 391
diff changeset
37 Bool Cfg_addMsgIdIfMissing( void );
43
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
38
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
39 /* Begin iteration through the server names */
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
40 void Cfg_beginServEnum( void );
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
41
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
42 /* Save next server name in "name". Return TRUE if name has been was saved.
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
43 Return FALSE if there are no more server names. */
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
44 Bool Cfg_nextServ( Str name );
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
45
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
46 Bool Cfg_servListContains( const char *name );
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
47 /* Prefer server earlier in config file. Known servers are always preferential
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
48 to unknown servers. */
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
49 Bool Cfg_servIsPreferential( const char *name1, const char *name2 );
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
50 void Cfg_authInfo( const char *name, Str user, Str pass );
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
51
287
01755687c565 [svn] * src/configfile.c: Change snprintf() to Utl_cpyStr();
bears
parents: 195
diff changeset
52 Bool Cfg_needClientAuth( void );
391
6cb66f5a0479 [svn] * docs/noffle.1,src/configure.h,src/configfile.c,src/noffle.c: Add optional
bears
parents: 357
diff changeset
53 void Cfg_setClientAuth( Bool needsAuth );
287
01755687c565 [svn] * src/configfile.c: Change snprintf() to Utl_cpyStr();
bears
parents: 195
diff changeset
54
104
402300614185 [svn] Remove expire enum, add Cfg_expire(grp). Rename Cfg_autoSubscribeMode()
bears
parents: 88
diff changeset
55 /* Return expire period for named group. */
402300614185 [svn] Remove expire enum, add Cfg_expire(grp). Rename Cfg_autoSubscribeMode()
bears
parents: 88
diff changeset
56 int Cfg_expire( const char *grp );
43
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
57
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
58 /* Return default expire days. */
104
402300614185 [svn] Remove expire enum, add Cfg_expire(grp). Rename Cfg_autoSubscribeMode()
bears
parents: 88
diff changeset
59 int Cfg_defaultExpire( void );
402300614185 [svn] Remove expire enum, add Cfg_expire(grp). Rename Cfg_autoSubscribeMode()
bears
parents: 88
diff changeset
60
402300614185 [svn] Remove expire enum, add Cfg_expire(grp). Rename Cfg_autoSubscribeMode()
bears
parents: 88
diff changeset
61 /* Return auto subscribe mode for named group. Can be: full, thread, over */
402300614185 [svn] Remove expire enum, add Cfg_expire(grp). Rename Cfg_autoSubscribeMode()
bears
parents: 88
diff changeset
62 const char * Cfg_autoSubscribeMode( const char *grp );
402300614185 [svn] Remove expire enum, add Cfg_expire(grp). Rename Cfg_autoSubscribeMode()
bears
parents: 88
diff changeset
63
402300614185 [svn] Remove expire enum, add Cfg_expire(grp). Rename Cfg_autoSubscribeMode()
bears
parents: 88
diff changeset
64 /* Return default auto subscribe mode. Can be: full, thread, over */
402300614185 [svn] Remove expire enum, add Cfg_expire(grp). Rename Cfg_autoSubscribeMode()
bears
parents: 88
diff changeset
65 const char * Cfg_defaultAutoSubscribeMode( void );
43
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
66
111
6f681d41734c [svn] path-header added.
bears
parents: 104
diff changeset
67 /* Return Path: header contents */
6f681d41734c [svn] path-header added.
bears
parents: 104
diff changeset
68 const char * Cfg_pathHeader( void );
6f681d41734c [svn] path-header added.
bears
parents: 104
diff changeset
69
150
1c7303c71f66 [svn] * src/protocol.c: Fix bug in Prt_getLn if we should read a line
bears
parents: 111
diff changeset
70 /* Return domain for generated From: lines */
1c7303c71f66 [svn] * src/protocol.c: Fix bug in Prt_getLn if we should read a line
bears
parents: 111
diff changeset
71 const char * Cfg_fromDomain( void );
1c7303c71f66 [svn] * src/protocol.c: Fix bug in Prt_getLn if we should read a line
bears
parents: 111
diff changeset
72
1c7303c71f66 [svn] * src/protocol.c: Fix bug in Prt_getLn if we should read a line
bears
parents: 111
diff changeset
73 /* Return default Organization: contents */
1c7303c71f66 [svn] * src/protocol.c: Fix bug in Prt_getLn if we should read a line
bears
parents: 111
diff changeset
74 const char * Cfg_organization( void );
1c7303c71f66 [svn] * src/protocol.c: Fix bug in Prt_getLn if we should read a line
bears
parents: 111
diff changeset
75
287
01755687c565 [svn] * src/configfile.c: Change snprintf() to Utl_cpyStr();
bears
parents: 195
diff changeset
76 /* Return the user Noffle should run as */
01755687c565 [svn] * src/configfile.c: Change snprintf() to Utl_cpyStr();
bears
parents: 195
diff changeset
77 const char * Cfg_noffleUser( void );
01755687c565 [svn] * src/configfile.c: Change snprintf() to Utl_cpyStr();
bears
parents: 195
diff changeset
78
01755687c565 [svn] * src/configfile.c: Change snprintf() to Utl_cpyStr();
bears
parents: 195
diff changeset
79 /* Return the group Noffle should run as */
01755687c565 [svn] * src/configfile.c: Change snprintf() to Utl_cpyStr();
bears
parents: 195
diff changeset
80 const char * Cfg_noffleGroup( void );
01755687c565 [svn] * src/configfile.c: Change snprintf() to Utl_cpyStr();
bears
parents: 195
diff changeset
81
43
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
82 void Cfg_read( void );
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
83
88
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
84 /* Get a new iterator for get group patterns for the given server */
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
85 GroupEnum *
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
86 new_GetGrEn( const char *name );
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
87
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
88 /* Get a new iterator for omit group patterns for the given server */
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
89 GroupEnum *
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
90 new_OmitGrEn( const char *name );
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
91
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
92 /* Free up a group enumerator */
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
93 void
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
94 del_GrEn( GroupEnum * ge );
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
95
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
96 /* Rewind to first group */
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
97 void
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
98 GrEn_first( GroupEnum * ge );
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
99
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
100 /* Get next group pattern or NULL if no more */
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
101 const char *
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
102 GrEn_next( GroupEnum *ge );
1fcdced0246e [svn] Move posting code to post.c, add command line posting
bears
parents: 85
diff changeset
103
43
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
104 #endif