comparison mcabber/mcabber/settings.h @ 1668:41c26b7d2890

Install mcabber headers * Change mcabber headers naming scheme * Move 'src/' -> 'mcabber/' * Add missing include <mcabber/config.h>'s * Create and install clean config.h version in 'include/' * Move "dirty" config.h version to 'mcabber/' * Add $(top_srcdir) to compiler include path * Update modules HOWTO
author Myhailo Danylenko <isbear@ukrpost.net>
date Mon, 18 Jan 2010 15:36:19 +0200
parents mcabber/src/settings.h@a087125d8fc8
children 552da310b83e
comparison
equal deleted inserted replaced
1667:8af0e0ad20ad 1668:41c26b7d2890
1 #ifndef __MCABBER_SETTINGS_H__
2 #define __MCABBER_SETTINGS_H__ 1
3
4 #include <ctype.h>
5 #include <glib.h>
6
7 #include <mcabber/roster.h>
8 #include <mcabber/config.h>
9
10 #ifndef isblank
11 # define isblank(c) ((c) == 0x20 || (c) == 0x09)
12 #endif
13
14
15 #define SETTINGS_TYPE_OPTION 1
16 #define SETTINGS_TYPE_ALIAS 2
17 #define SETTINGS_TYPE_BINDING 3
18 #ifdef HAVE_LIBOTR
19 #define SETTINGS_TYPE_OTR 4
20 #endif
21
22 #define COMMAND_CHAR '/'
23 #define COMMAND_CHARSTR "/"
24
25 #define settings_opt_get(k) settings_get(SETTINGS_TYPE_OPTION, k)
26 #define settings_opt_get_int(k) settings_get_int(SETTINGS_TYPE_OPTION, k)
27
28 #define mkcmdstr(cmd) COMMAND_CHARSTR cmd
29
30 void settings_init(void);
31 int cfg_read_file(char *filename, guint mainfile);
32 guint parse_assigment(gchar *assignment, gchar **pkey, gchar **pval);
33 void settings_set(guint type, const gchar *key, const gchar *value);
34 void settings_del(guint type, const gchar *key);
35 const gchar *settings_get(guint type, const gchar *key);
36 int settings_get_int(guint type, const gchar *key);
37 const gchar *settings_get_status_msg(enum imstatus status);
38 void settings_foreach(guint type,
39 void (*pfunc)(char *k, char *v, void *param),
40 void *param);
41
42 void settings_pgp_setdisabled(const char *bjid, guint value);
43 guint settings_pgp_getdisabled(const char *bjid);
44 void settings_pgp_setforce(const char *bjid, guint value);
45 guint settings_pgp_getforce(const char *bjid);
46 void settings_pgp_setkeyid(const char *bjid, const char *keyid);
47 const char *settings_pgp_getkeyid(const char *bjid);
48
49 #ifdef HAVE_LIBOTR
50 guint settings_otr_getpolicy(const char *bjid);
51 void settings_otr_setpolicy(const char *bjid, guint value);
52 #endif
53
54 guint get_max_history_blocks(void);
55
56 char *default_muc_nickname(const char *roomid);
57
58 const gchar *isbound(int key);
59
60 #endif /* __MCABBER_SETTINGS_H__ */
61
62 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */