QOF
0.8.7
|
00001 /********************************************************************\ 00002 * kvputil.h -- miscellaneous KVP utilities * 00003 * Copyright (C) 2003 Linas Vepstas <linas@linas.org> * 00004 * Copyright (c) 2006, 2008 Neil Williams <linux@codehelp.co.uk> * 00005 * * 00006 * This program is free software; you can redistribute it and/or * 00007 * modify it under the terms of the GNU General Public License as * 00008 * published by the Free Software Foundation; either version 2 of * 00009 * the License, or (at your option) any later version. * 00010 * * 00011 * This program is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU General Public License* 00017 * along with this program; if not, contact: * 00018 * * 00019 * Free Software Foundation Voice: +1-617-542-5942 * 00020 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * 00021 * Boston, MA 02110-1301, USA gnu@gnu.org * 00022 \********************************************************************/ 00023 00034 #ifndef KVPUTIL_H 00035 #define KVPUTIL_H 00036 00037 typedef struct 00038 { 00039 gpointer key; 00040 gpointer value; 00041 } GHashTableKVPair; 00042 00057 GSList *g_hash_table_key_value_pairs (GHashTable * table); 00058 void g_hash_table_kv_pair_free_gfunc (gpointer data, gpointer user_data); 00059 00075 void kvp_frame_add_url_encoding (KvpFrame * frame, const gchar * enc); 00076 00082 gint kvp_frame_compare (const KvpFrame * fa, const KvpFrame * fb); 00083 00084 gchar *kvp_frame_to_string (const KvpFrame * frame); 00085 gchar *binary_to_string (const void *data, guint32 size); 00086 gchar *kvp_value_glist_to_string (const GList * list); 00087 GHashTable *kvp_frame_get_hash (const KvpFrame * frame); 00088 00125 KvpFrame * 00126 qof_kvp_bag_add (KvpFrame * kvp_root, const gchar *path, 00127 QofTime *qt, const gchar *first_name, ...); 00128 00134 void 00135 qof_kvp_bag_merge (KvpFrame * kvp_into, const gchar *intopath, 00136 KvpFrame * kvp_from, const gchar *frompath); 00137 00147 KvpFrame * 00148 qof_kvp_bag_find_by_guid (KvpFrame * root, const gchar *path, 00149 const gchar *guid_name, 00150 GUID * desired_guid); 00151 00159 void 00160 qof_kvp_bag_remove_frame (KvpFrame * root, const gchar *path, 00161 KvpFrame * fr); 00162 00163 /***********************************************************************/ 00164 00167 #endif /* KVPUTIL_H */