* Fix syntax errors in da.po
[citadel.git] / webcit / preferences.h
blob70db2e36caa1dec16664bb7a6cba3c638eeef280
3 #define PRF_STRING 1
4 #define PRF_INT 2
5 #define PRF_QP_STRING 3
6 #define PRF_YESNO 4
10 typedef void (*PrefEvalFunc)(StrBuf *Preference, long lvalue);
11 void RegisterPreference(const char *Setting, long SettingLen,
12 const char *PrefStr,
13 long Type,
14 PrefEvalFunc OnLoad);
17 void load_preferences(void);
18 void save_preferences(void);
19 #define get_preference(a, b) get_PREFERENCE(a, sizeof(a) - 1, b)
20 #define get_pref(a, b) get_PREFERENCE(SKEY(a), b)
21 int get_PREFERENCE(const char *key, size_t keylen, StrBuf **value);
22 #define set_preference(a, b, c) set_PREFERENCE(a, sizeof(a) - 1, b, c)
23 #define set_pref(a, b, c) set_PREFERENCE(SKEY(a), b, c)
24 void set_PREFERENCE(const char *key, size_t keylen, StrBuf *value, int save_to_server);
26 #define get_pref_long(a, b, c) get_PREF_LONG(a, sizeof(a) - 1, b, c)
27 int get_PREF_LONG(const char *key, size_t keylen, long *value, long Default);
28 #define set_pref_long(a, b, c) set_PREF_LONG(a, sizeof(a) - 1, b, c)
29 void set_PREF_LONG(const char *key, size_t keylen, long value, int save_to_server);
31 #define get_pref_yesno(a, b, c) get_PREF_YESNO(a, sizeof(a) - 1, b, c)
32 int get_PREF_YESNO(const char *key, size_t keylen, int *value, int Default);
33 #define set_pref_yesno(a, b, c) set_PREF_YESNO(a, sizeof(a) - 1, b, c)
34 void set_PREF_YESNO(const char *key, size_t keylen, long value, int save_to_server);
36 #define get_room_pref(a) get_ROOM_PREFS(a, sizeof(a) - 1)
37 StrBuf *get_ROOM_PREFS(const char *key, size_t keylen);
39 #define set_room_pref(a, b, c) set_ROOM_PREFS(a, sizeof(a) - 1, b, c)
40 void set_ROOM_PREFS(const char *key, size_t keylen, StrBuf *value, int save_to_server);
43 #define get_x_pref(a, b) get_ROOM_PREFS(a, sizeof(a) - 1, b, sizeof(b) - 1)
44 const StrBuf *get_X_PREFS(const char *key, size_t keylen,
45 const char *xkey, size_t xkeylen);
47 #define set_x_pref(a, b, c) set_ROOM_PREFS(a, sizeof(a) - 1, b, sizeof(b) - 1, c, d)
48 void set_X_PREFS(const char *key, size_t keylen, const char *xkey, size_t xkeylen, StrBuf *value, int save_to_server);