respect https prefix
[k8lowj.git] / src / conf.h
blobb80a6d98faa1ba40ebd29b15fada891210b40221
1 /* logjam - a GTK client for LiveJournal.
2 * Copyright (C) 2000-2003 Evan Martin <evan@livejournal.com>
3 */
4 #ifndef __LOGJAM_CONF_H__
5 #define __LOGJAM_CONF_H__
7 #include "liblj/livejournal.h"
9 #ifdef HAVE_GTK
10 # include "gtk-all.h"
11 # include "jamview.h" /* need META_COUNT */
12 #endif
14 #include "account.h"
15 #include "checkfriends.h"
18 typedef struct {
19 int x, y, width, height;
20 int panedpos; /* optional; for windows with panes. */
21 } Geometry;
24 /* this should match the geometry_names[] array in conf_xml.c */
25 typedef enum {
26 GEOM_MAIN,
27 GEOM_LOGIN,
28 GEOM_FRIENDS,
29 GEOM_FRIENDGROUPS,
30 GEOM_CONSOLE,
31 GEOM_MANAGER,
32 GEOM_CFFLOAT,
33 GEOM_OFFLINE,
34 GEOM_PREVIEW,
35 GEOM_COUNT
36 } GeometryType;
39 typedef struct {
40 gboolean netdump;
41 gboolean nofork;
42 gboolean useproxy;
43 gboolean useproxyauth;
44 #ifdef HAVE_GTK
45 # ifdef HAVE_GTKSPELL
46 gboolean usespellcheck;
47 # endif
48 gboolean revertusejournal;
49 gboolean autosave;
50 gboolean cfautostart;
51 gboolean cfusemask;
52 gboolean docklet;
53 gboolean cffloat;
54 gboolean cffloatraise;
55 gboolean cffloat_decorate;
56 gboolean friends_hidestats;
57 gboolean allowmultipleinstances;
58 gboolean smartquotes;
59 gboolean smartquotes_russian;
60 gboolean showmeta[JAM_VIEW_META_COUNT];
61 #endif /* HAVE_GTK */
62 } Options;
65 enum {
66 POSTMODE_GUI,
67 POSTMODE_CMD
68 } PostmodeType;
71 typedef struct {
72 const char *label;
73 const char *command;
74 } CommandList;
77 typedef struct {
78 /* configuration file */
79 GSList *hosts;
80 JamHost *lasthost;
82 Geometry geometries[GEOM_COUNT];
84 Options options;
86 gchar *uifont;
87 #ifdef HAVE_GTKSPELL
88 gchar *spell_language;
89 #endif
90 char *spawn_command;
92 char *music_command;
94 char *proxy;
95 char *proxyuser, *proxypass;
97 LJSecurity defaultsecurity;
99 gint cfuserinterval;
100 gint cfthreshold;
102 /* run-time settings. */
103 int postmode;
104 } Configuration;
107 typedef struct {
108 gchar *programname;
109 gchar *conf_dir; /* may be null, which means <home>/.logjam/ */
111 gboolean cli; /* true if there's no gui */
112 gboolean quiet;
114 #ifdef HAVE_GTK
115 GtkTooltips *tooltips;
116 GSList *secmgr_list;
118 GSList *quiet_dlgs;
120 CFMgr *cfmgr;
121 CFFloat *cf_float;
123 gint autosave; /* timeout id */
125 void *remote;
126 void *docklet;
127 #endif
128 } Application;
131 extern Configuration conf;
132 extern Application app;
135 extern JamHost *conf_host_by_name (Configuration *c, const char *hostname);
137 extern int conf_verify_dir (void);
138 extern void conf_make_path (const char *file, char *buf, size_t bufsz);
140 extern char *conf_make_account_path (JamAccount *acc, const char *path);
142 extern void conf_verify_a_host_exists (void);
144 extern gboolean conf_rename_host (JamHost *host, const char *newname, GError **err);
147 #endif /* CONF_H */