Mercurial > hg
annotate mcabber/src/settings.h @ 1461:8fa24a6d1a93
Improve Remote Controlling Clients
The XEP recommends adding the node to the IQ response.
Some clients seem not to understand the answer when it is omitted.
Problem reported by Rhaamo and js (thanks to js for spotting the
node issue!).
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 12 Apr 2008 13:35:03 +0200 |
parents | d431cd75eb53 |
children | a087125d8fc8 |
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 | |
1299
3b338a5c01fc
OTR support
Frank Zschockelt <mcabber_otr[at]freakysoft.de>
parents:
1197
diff
changeset
|
17 #ifdef HAVE_LIBOTR |
3b338a5c01fc
OTR support
Frank Zschockelt <mcabber_otr[at]freakysoft.de>
parents:
1197
diff
changeset
|
18 #define SETTINGS_TYPE_OTR 4 |
3b338a5c01fc
OTR support
Frank Zschockelt <mcabber_otr[at]freakysoft.de>
parents:
1197
diff
changeset
|
19 #endif |
279 | 20 |
967 | 21 #define COMMAND_CHAR '/' |
22 #define COMMAND_CHARSTR "/" | |
23 | |
279 | 24 #define settings_opt_get(k) settings_get(SETTINGS_TYPE_OPTION, k) |
25 #define settings_opt_get_int(k) settings_get_int(SETTINGS_TYPE_OPTION, k) | |
26 | |
967 | 27 #define mkcmdstr(cmd) COMMAND_CHARSTR cmd |
28 | |
1065
230dca34dbea
Extand pgp_data structure
Mikael Berthe <mikael@lilotux.net>
parents:
1004
diff
changeset
|
29 void settings_init(void); |
1192 | 30 int cfg_read_file(char *filename, guint mainfile); |
1074
b2fc694a8228
Fix a few memory leaks after calls to parse_assigment()
Mikael Berthe <mikael@lilotux.net>
parents:
1070
diff
changeset
|
31 guint parse_assigment(gchar *assignment, gchar **pkey, gchar **pval); |
281
f562b9af2de7
Add "const" specifier in prototypes
Mikael Berthe <mikael@lilotux.net>
parents:
280
diff
changeset
|
32 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
|
33 void settings_del(guint type, const gchar *key); |
f562b9af2de7
Add "const" specifier in prototypes
Mikael Berthe <mikael@lilotux.net>
parents:
280
diff
changeset
|
34 const gchar *settings_get(guint type, const gchar *key); |
f562b9af2de7
Add "const" specifier in prototypes
Mikael Berthe <mikael@lilotux.net>
parents:
280
diff
changeset
|
35 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
|
36 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
|
37 void settings_foreach(guint type, |
1070
9eaacc0ad3a2
Use a hash for settings
Mikael Berthe <mikael@lilotux.net>
parents:
1065
diff
changeset
|
38 void (*pfunc)(char *k, char *v, void *param), |
867
7f056c566569
Commands /alias & /bind list the key bindings and aliases
Mikael Berthe <mikael@lilotux.net>
parents:
580
diff
changeset
|
39 void *param); |
279 | 40 |
1065
230dca34dbea
Extand pgp_data structure
Mikael Berthe <mikael@lilotux.net>
parents:
1004
diff
changeset
|
41 void settings_pgp_setdisabled(const char *bjid, guint value); |
230dca34dbea
Extand pgp_data structure
Mikael Berthe <mikael@lilotux.net>
parents:
1004
diff
changeset
|
42 guint settings_pgp_getdisabled(const char *bjid); |
1197 | 43 void settings_pgp_setforce(const char *bjid, guint value); |
44 guint settings_pgp_getforce(const char *bjid); | |
1065
230dca34dbea
Extand pgp_data structure
Mikael Berthe <mikael@lilotux.net>
parents:
1004
diff
changeset
|
45 void settings_pgp_setkeyid(const char *bjid, const char *keyid); |
230dca34dbea
Extand pgp_data structure
Mikael Berthe <mikael@lilotux.net>
parents:
1004
diff
changeset
|
46 const char *settings_pgp_getkeyid(const char *bjid); |
230dca34dbea
Extand pgp_data structure
Mikael Berthe <mikael@lilotux.net>
parents:
1004
diff
changeset
|
47 |
1301
37b41ed9ed35
Fixed compiler warnings
Frank Zschockelt <mcabber_otr[at]freakysoft.de>
parents:
1299
diff
changeset
|
48 #ifdef HAVE_LIBOTR |
37b41ed9ed35
Fixed compiler warnings
Frank Zschockelt <mcabber_otr[at]freakysoft.de>
parents:
1299
diff
changeset
|
49 guint settings_otr_getpolicy(const char *bjid); |
37b41ed9ed35
Fixed compiler warnings
Frank Zschockelt <mcabber_otr[at]freakysoft.de>
parents:
1299
diff
changeset
|
50 void settings_otr_setpolicy(const char *bjid, guint value); |
37b41ed9ed35
Fixed compiler warnings
Frank Zschockelt <mcabber_otr[at]freakysoft.de>
parents:
1299
diff
changeset
|
51 #endif |
37b41ed9ed35
Fixed compiler warnings
Frank Zschockelt <mcabber_otr[at]freakysoft.de>
parents:
1299
diff
changeset
|
52 |
1141
5be2408a6534
Add option "max_history_blocks"
Mikael Berthe <mikael@lilotux.net>
parents:
1074
diff
changeset
|
53 guint get_max_history_blocks(void); |
5be2408a6534
Add option "max_history_blocks"
Mikael Berthe <mikael@lilotux.net>
parents:
1074
diff
changeset
|
54 |
1395
d431cd75eb53
Use bookmarked nickname when manually joining a room
Mikael Berthe <mikael@lilotux.net>
parents:
1301
diff
changeset
|
55 char *default_muc_nickname(const char *roomid); |
1004
b57a01ffeed6
Use existing conference bookmarks
Mikael Berthe <mikael@lilotux.net>
parents:
967
diff
changeset
|
56 |
288 | 57 const gchar *isbound(int key); |
58 | |
279 | 59 #endif /* __SETTINGS_H__ */ |
60 | |
580 | 61 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |