1 ///////////////////////////////////////////////////////////////////////////////
3 // configuration file parser, part of wmail
5 // Copyright 2000~2002, Sven Geisenhainer <sveng@informatik.uni-jena.de>.
6 // All rights reserved.
8 // Redistribution and use in source and binary forms, with or without
9 // modification, are permitted provided that the following conditions
11 // 1. Redistributions of source code must retain the above copyright
12 // notice, this list of conditions, and the following disclaimer.
13 // 2. Redistributions in binary form must reproduce the above copyright
14 // notice, this list of conditions, and the following disclaimer in the
15 // documentation and/or other materials provided with the distribution.
16 // 3. The name of the author may not be used to endorse or promote products
17 // derived from this software without specific prior written permission.
19 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #ifndef _CONFIG_H_a6ebf0e22e2f5e21fc1657a8d9975e5c_
32 #define _CONFIG_H_a6ebf0e22e2f5e21fc1657a8d9975e5c_
36 TICKER_FAMILYNAME
= 1,
40 // re-allocated color-names (to enable disposing of them on reconfiguration)
49 // flags to mark used cmdline options
54 CL_SYMBOLCOLOR
= 1<<3,
57 CL_OFFLIGHTCOLOR
= 1<<6,
58 CL_BACKGROUNDCOLOR
= 1<<7,
59 CL_CHECKSUMFILENAME
= 1<<8,
60 CL_CHECKINTERVAL
= 1<<9,
62 CL_NEWMAILONLY
= 1<<11,
64 CL_TICKERMODE
= 1<<13,
67 CL_CONSIDERSTATUSFIELD
= 1<<16,
68 CL_READSTATUS
= 1<<17,
72 typedef struct _config_t
{
73 char *display
; // display-name
74 char *mailBox
; // mailbox-name
75 char *runCmd
; // command to run when the run-btn was pressed
76 char *symbolColor
; // colorname of the upper-symbols while they are active
77 char *fontColor
; // colorname of the ticker- and counter-digits-font
78 char *backColor
; // colorname of the background
79 char *offlightColor
; // colorname of inactive symbols and counter-digits
80 char *backgroundColor
; // colorname of the frame when in noshape-mode
81 char *checksumFileName
; // name of the checksum-file
82 int checkInterval
; // sesonds between mailbox-checks
83 int fps
; // ticker-frames per second
84 bool newMailsOnly
; // true means only ticker and count new (unread) mail
85 bool noshape
; // true means don't use shape the dockapp
86 ticker_mode_t tickerMode
; // ticker senders adress, family-name or nick-name
87 char **skipNames
; // sender-names that wmail has to skip
88 char *cmdOnMail
; // command to execute when a new mail has received
89 bool considerStatusField
; // use the status-field of the mail-header to determine its read-status
90 char *readStatus
; // status field content that indicates read mails ("O" for netscape, "ro" for pine etc.)
91 char *useX11Font
; // X11 font to render the ticker (NULL -> fallback to buildin font)
92 // ---------------------- //
93 int colorsUsed
; // used (malloced) color-names
94 int givenOptions
; // bitfield flags all options specified on the cmd-line
98 // app configuration data (declared in config.c)
99 extern config_t config
;
101 // config manipulation functions
102 void ReadConfigFile( bool resetConfigStrings
);