Mercurial > hg
annotate mcabber/src/settings.h @ 1068:6646d2ed7f74
Allow pgp commands in config file, update sample configuration file
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 02 Dec 2006 13:29:56 +0100 |
parents | 230dca34dbea |
children | 9eaacc0ad3a2 |
rev | line source |
---|---|
279 | 1 #ifndef __SETTINGS_H__ |
2 #define __SETTINGS_H__ 1 | |
3 | |
498
879ffddc13b0
Suppress a compilation warning
Mikael Berthe <mikael@lilotux.net>
parents:
364
diff
changeset
|
4 #include <ctype.h> |
279 | 5 #include <glib.h> |
6 | |
294
871e53769084
Allow one status message per Jabber status
Mikael Berthe <mikael@lilotux.net>
parents:
292
diff
changeset
|
7 #include "jabglue.h" |
871e53769084
Allow one status message per Jabber status
Mikael Berthe <mikael@lilotux.net>
parents:
292
diff
changeset
|
8 |
498
879ffddc13b0
Suppress a compilation warning
Mikael Berthe <mikael@lilotux.net>
parents:
364
diff
changeset
|
9 #ifndef isblank |
292
96917f04c841
Define isblank() when C99 is not used
Mikael Berthe <mikael@lilotux.net>
parents:
288
diff
changeset
|
10 # define isblank(c) ((c) == 0x20 || (c) == 0x09) |
96917f04c841
Define isblank() when C99 is not used
Mikael Berthe <mikael@lilotux.net>
parents:
288
diff
changeset
|
11 #endif |
96917f04c841
Define isblank() when C99 is not used
Mikael Berthe <mikael@lilotux.net>
parents:
288
diff
changeset
|
12 |
294
871e53769084
Allow one status message per Jabber status
Mikael Berthe <mikael@lilotux.net>
parents:
292
diff
changeset
|
13 |
279 | 14 #define SETTINGS_TYPE_OPTION 1 |
15 #define SETTINGS_TYPE_ALIAS 2 | |
16 #define SETTINGS_TYPE_BINDING 3 | |
17 | |
967 | 18 #define COMMAND_CHAR '/' |
19 #define COMMAND_CHARSTR "/" | |
20 | |
279 | 21 #define settings_opt_get(k) settings_get(SETTINGS_TYPE_OPTION, k) |
22 #define settings_opt_get_int(k) settings_get_int(SETTINGS_TYPE_OPTION, k) | |
23 | |
967 | 24 #define mkcmdstr(cmd) COMMAND_CHARSTR cmd |
25 | |
1065
230dca34dbea
Extand pgp_data structure
Mikael Berthe <mikael@lilotux.net>
parents:
1004
diff
changeset
|
26 void settings_init(void); |
341
dea407d53fe6
Improve configuration file reading
Mikael Berthe <mikael@lilotux.net>
parents:
294
diff
changeset
|
27 int cfg_read_file(char *filename); |
281
f562b9af2de7
Add "const" specifier in prototypes
Mikael Berthe <mikael@lilotux.net>
parents:
280
diff
changeset
|
28 guint parse_assigment(gchar *assignment, |
f562b9af2de7
Add "const" specifier in prototypes
Mikael Berthe <mikael@lilotux.net>
parents:
280
diff
changeset
|
29 const gchar **pkey, const gchar **pval); |
f562b9af2de7
Add "const" specifier in prototypes
Mikael Berthe <mikael@lilotux.net>
parents:
280
diff
changeset
|
30 void settings_set(guint type, const gchar *key, const gchar *value); |
f562b9af2de7
Add "const" specifier in prototypes
Mikael Berthe <mikael@lilotux.net>
parents:
280
diff
changeset
|
31 void settings_del(guint type, const gchar *key); |
f562b9af2de7
Add "const" specifier in prototypes
Mikael Berthe <mikael@lilotux.net>
parents:
280
diff
changeset
|
32 const gchar *settings_get(guint type, const gchar *key); |
f562b9af2de7
Add "const" specifier in prototypes
Mikael Berthe <mikael@lilotux.net>
parents:
280
diff
changeset
|
33 int settings_get_int(guint type, const gchar *key); |
294
871e53769084
Allow one status message per Jabber status
Mikael Berthe <mikael@lilotux.net>
parents:
292
diff
changeset
|
34 const gchar *settings_get_status_msg(enum imstatus status); |
867
7f056c566569
Commands /alias & /bind list the key bindings and aliases
Mikael Berthe <mikael@lilotux.net>
parents:
580
diff
changeset
|
35 void settings_foreach(guint type, |
7f056c566569
Commands /alias & /bind list the key bindings and aliases
Mikael Berthe <mikael@lilotux.net>
parents:
580
diff
changeset
|
36 void (*pfunc)(void *param, char *k, char *v), |
7f056c566569
Commands /alias & /bind list the key bindings and aliases
Mikael Berthe <mikael@lilotux.net>
parents:
580
diff
changeset
|
37 void *param); |
279 | 38 |
1065
230dca34dbea
Extand pgp_data structure
Mikael Berthe <mikael@lilotux.net>
parents:
1004
diff
changeset
|
39 void settings_pgp_setdisabled(const char *bjid, guint value); |
230dca34dbea
Extand pgp_data structure
Mikael Berthe <mikael@lilotux.net>
parents:
1004
diff
changeset
|
40 guint settings_pgp_getdisabled(const char *bjid); |
230dca34dbea
Extand pgp_data structure
Mikael Berthe <mikael@lilotux.net>
parents:
1004
diff
changeset
|
41 void settings_pgp_setkeyid(const char *bjid, const char *keyid); |
230dca34dbea
Extand pgp_data structure
Mikael Berthe <mikael@lilotux.net>
parents:
1004
diff
changeset
|
42 const char *settings_pgp_getkeyid(const char *bjid); |
230dca34dbea
Extand pgp_data structure
Mikael Berthe <mikael@lilotux.net>
parents:
1004
diff
changeset
|
43 |
1004
b57a01ffeed6
Use existing conference bookmarks
Mikael Berthe <mikael@lilotux.net>
parents:
967
diff
changeset
|
44 char *default_muc_nickname(void); |
b57a01ffeed6
Use existing conference bookmarks
Mikael Berthe <mikael@lilotux.net>
parents:
967
diff
changeset
|
45 |
288 | 46 const gchar *isbound(int key); |
47 | |
279 | 48 #endif /* __SETTINGS_H__ */ |
49 | |
580 | 50 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |