1 /* 2 * Copyright (C) 2001 - 2002 Rodrigo Moya <rodrigo@gnome-db.org> 3 * Copyright (C) 2001 - 2012 Vivien Malerba <malerba@gnome-db.org> 4 * Copyright (C) 2002 Gonzalo Paniagua Javier <gonzalo@src.gnome.org> 5 * Copyright (C) 2003 Laurent Sansonetti <laurent@datarescue.be> 6 * Copyright (C) 2008 Przemysław Grzegorczyk <pgrzegorczyk@gmail.com> 7 * Copyright (C) 2011 Murray Cumming <murrayc@murrayc.com> 8 * 9 * This library is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Lesser General Public 11 * License as published by the Free Software Foundation; either 12 * version 2 of the License, or (at your option) any later version. 13 * 14 * This library is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public 20 * License along with this library; if not, write to the 21 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 22 * Boston, MA 02110-1301, USA. 23 */ 24 25 #ifndef __GDA_QUARK_LIST_H__ 26 #define __GDA_QUARK_LIST_H__ 27 28 #include <glib.h> 29 #include <glib-object.h> 30 31 G_BEGIN_DECLS 32 33 typedef struct _GdaQuarkList GdaQuarkList; 34 35 #define GDA_TYPE_QUARK_LIST (gda_quark_list_get_type()) 36 37 /** 38 * SECTION:gda-quark-list 39 * @short_description: Manages lists of KEY=VALUE pairs 40 * @title: Quark list 41 * @stability: Stable 42 * @see_also: 43 * 44 * This object is used to store KEY=VALUE pairs. It is mainly used internally by Libgda to store connection 45 * parameters. 46 * 47 * Authentification values are kept in a mangled form in memory, and unmangled when 48 * they are requested using gda_quark_list_find(), and when you don't need them anymore, 49 * call gda_quark_list_protect_values() to remove the unmangled version. 50 */ 51 52 GType gda_quark_list_get_type (void) G_GNUC_CONST; 53 GdaQuarkList *gda_quark_list_new (void); 54 GdaQuarkList *gda_quark_list_new_from_string (const gchar *string); 55 GdaQuarkList *gda_quark_list_copy (GdaQuarkList *qlist); 56 void gda_quark_list_free (GdaQuarkList *qlist); 57 58 void gda_quark_list_add_from_string (GdaQuarkList *qlist, 59 const gchar *string, 60 gboolean cleanup); 61 const gchar *gda_quark_list_find (GdaQuarkList *qlist, const gchar *name); 62 void gda_quark_list_protect_values (GdaQuarkList *qlist); 63 64 void gda_quark_list_remove (GdaQuarkList *qlist, const gchar *name); 65 void gda_quark_list_clear (GdaQuarkList *qlist); 66 void gda_quark_list_foreach (GdaQuarkList *qlist, GHFunc func, gpointer user_data); 67 68 G_END_DECLS 69 70 #endif 71