Remove webpages for release
[browser-switch] / config.h
1 /*
2  * config.h -- definitions for Browser Switchboard configuration
3  *
4  * Copyright (C) 2009-2010 Steven Luo
5  * Derived from a Python implementation by Jason Simpson and Steven Luo
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20  * USA.
21  */
22
23 #ifndef _CONFIG_H
24 #define _CONFIG_H
25
26 #define SWB_CONFIG_INITIALIZED                  0x01
27 #define SWB_CONFIG_CONTINUOUS_MODE_SET          0x02
28 #define SWB_CONFIG_DEFAULT_BROWSER_SET          0x04
29 #define SWB_CONFIG_OTHER_BROWSER_CMD_SET        0x08
30 #define SWB_CONFIG_LOGGING_SET                  0x10
31 #define SWB_CONFIG_AUTOSTART_MICROB_SET         0x20
32
33 struct swb_config {
34         unsigned int flags;
35         /* Array of pointers to the elements of the struct, in the order given
36            in swb_config_options[] */
37         void *entries[5];
38
39         int continuous_mode;
40         char *default_browser;
41         char *other_browser_cmd;
42         char *logging;
43         int autostart_microb;
44 };
45
46 struct swb_config_option {
47         char *name;
48         enum {
49                 SWB_CONFIG_OPT_STRING,
50                 SWB_CONFIG_OPT_INT
51         } type;
52         int set_mask;
53 };
54
55 void swb_config_copy(struct swb_config *dst, struct swb_config *src);
56 void swb_config_init(struct swb_config *cfg);
57 void swb_config_free(struct swb_config *cfg);
58
59 int swb_config_load(struct swb_config *cfg);
60
61 #endif /* _CONFIG_H */