comparison libpurple/prefs.h @ 32819:2c6510167895 default tip

propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24) to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 02 Jun 2012 02:30:49 +0000
parents 98520ee78f12
children
comparison
equal deleted inserted replaced
32818:01ff09d4a463 32819:2c6510167895
30 #include <glib.h> 30 #include <glib.h>
31 31
32 /** 32 /**
33 * Preference data types. 33 * Preference data types.
34 */ 34 */
35 typedef enum _PurplePrefType 35 typedef enum
36 { 36 {
37 PURPLE_PREF_NONE, /**< No type. */ 37 PURPLE_PREF_NONE, /**< No type. */
38 PURPLE_PREF_BOOLEAN, /**< Boolean. */ 38 PURPLE_PREF_BOOLEAN, /**< Boolean. */
39 PURPLE_PREF_INT, /**< Integer. */ 39 PURPLE_PREF_INT, /**< Integer. */
40 PURPLE_PREF_STRING, /**< String. */ 40 PURPLE_PREF_STRING, /**< String. */
60 * @see purple_prefs_connect_callback() 60 * @see purple_prefs_connect_callback()
61 */ 61 */
62 typedef void (*PurplePrefCallback) (const char *name, PurplePrefType type, 62 typedef void (*PurplePrefCallback) (const char *name, PurplePrefType type,
63 gconstpointer val, gpointer data); 63 gconstpointer val, gpointer data);
64 64
65 #ifdef __cplusplus 65 G_BEGIN_DECLS
66 extern "C" {
67 #endif
68 66
69 /**************************************************************************/ 67 /**************************************************************************/
70 /** @name Prefs API 68 /** @name Prefs API
71 Preferences are named according to a directory-like structure. 69 Preferences are named according to a directory-like structure.
72 Example: "/plugins/core/potato/is_from_idaho" (probably a boolean) */ 70 Example: "/plugins/core/potato/is_from_idaho" (probably a boolean) */
315 * 313 *
316 * @param name The parent pref 314 * @param name The parent pref
317 * @return A list of newly allocated strings denoting the names of the children. 315 * @return A list of newly allocated strings denoting the names of the children.
318 * Returns @c NULL if there are no children or if pref doesn't exist. 316 * Returns @c NULL if there are no children or if pref doesn't exist.
319 * The caller must free all the strings and the list. 317 * The caller must free all the strings and the list.
320 *
321 * @since 2.1.0
322 */ 318 */
323 GList *purple_prefs_get_children_names(const char *name); 319 GList *purple_prefs_get_children_names(const char *name);
324 320
325 /** 321 /**
326 * Add a callback to a pref (and its children) 322 * Add a callback to a pref (and its children)
362 */ 358 */
363 void purple_prefs_update_old(void); 359 void purple_prefs_update_old(void);
364 360
365 /*@}*/ 361 /*@}*/
366 362
367 #ifdef __cplusplus 363 G_END_DECLS
368 }
369 #endif
370 364
371 #endif /* _PURPLE_PREFS_H_ */ 365 #endif /* _PURPLE_PREFS_H_ */