gee
oldstatus
2005-09-19, Nathan Walp
* @file prefs.h Prefs API * Gaim is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA typedef enum _GaimPrefType * Pref change callback type typedef void (*GaimPrefCallback) (const char *name, GaimPrefType type, gpointer val, gpointer data); /**************************************************************************/ /**************************************************************************/ * Uninitializes the prefs subsystem. void gaim_prefs_uninit(void); * Add a new typeless pref. * @param name The name of the pref void gaim_prefs_add_none(const char *name); * Add a new boolean pref. * @param name The name of the pref * @param value The initial value to set void gaim_prefs_add_bool(const char *name, gboolean value); * Add a new integer pref. * @param name The name of the pref * @param value The initial value to set void gaim_prefs_add_int(const char *name, int value); * @param name The name of the pref * @param value The initial value to set void gaim_prefs_add_string(const char *name, const char *value); * Add a new string list pref. * @param name The name of the pref * @param value The initial value to set void gaim_prefs_add_string_list(const char *name, GList *value); * @param name The name of the pref void gaim_prefs_remove(const char *name); * @param oldname The old name of the pref * @param newname The new name for the pref void gaim_prefs_rename(const char *oldname, const char *newname); * Rename a boolean pref, toggling it's value * @param oldname The old name of the pref * @param newname The new name for the pref void gaim_prefs_rename_boolean_toggle(const char *oldname, const char *newname); void gaim_prefs_destroy(); * @param name The name of the pref * @param value The value to set void gaim_prefs_set_generic(const char *name, gpointer value); * @param name The name of the pref * @param value The value to set void gaim_prefs_set_bool(const char *name, gboolean value); * @param name The name of the pref * @param value The value to set void gaim_prefs_set_int(const char *name, int value); * @param name The name of the pref * @param value The value to set void gaim_prefs_set_string(const char *name, const char *value); * @param name The name of the pref * @param value The value to set void gaim_prefs_set_string_list(const char *name, GList *value); * @param name The name of the pref * @return TRUE if the pref exists. Otherwise FALSE. gboolean gaim_prefs_exists(const char *name); * @param name The name of the pref * @return The type of the pref GaimPrefType gaim_prefs_get_type(const char *name); * @param name The name of the pref * @return The value of the pref gboolean gaim_prefs_get_bool(const char *name); * @param name The name of the pref * @return The value of the pref int gaim_prefs_get_int(const char *name); * @param name The name of the pref * @return The value of the pref const char *gaim_prefs_get_string(const char *name); * @param name The name of the pref * @return The value of the pref GList *gaim_prefs_get_string_list(const char *name); * Add a callback to a pref (and its children) guint gaim_prefs_connect_callback(const char *name, GaimPrefCallback cb, * Remove a callback to a pref void gaim_prefs_disconnect_callback(guint callback_id); * Trigger callbacks as if the pref changed void gaim_prefs_trigger_callback(const char *name); gboolean gaim_prefs_load(); * Force an immediate write of preferences * Rename legacy prefs and delete some that no longer exist. void gaim_prefs_update_old(); #endif /* _GAIM_PREFS_H_ */