QOF  0.8.7
kvputil.h
Go to the documentation of this file.
1 /********************************************************************\
2  * kvputil.h -- miscellaneous KVP utilities *
3  * Copyright (C) 2003 Linas Vepstas <linas@linas.org> *
4  * Copyright (c) 2006, 2008 Neil Williams <linux@codehelp.co.uk> *
5  * *
6  * This program is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU General Public License as *
8  * published by the Free Software Foundation; either version 2 of *
9  * the License, or (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License*
17  * along with this program; if not, contact: *
18  * *
19  * Free Software Foundation Voice: +1-617-542-5942 *
20  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21  * Boston, MA 02110-1301, USA gnu@gnu.org *
22 \********************************************************************/
23 
34 #ifndef KVPUTIL_H
35 #define KVPUTIL_H
36 
37 typedef struct
38 {
39  gpointer key;
40  gpointer value;
42 
57 GSList *g_hash_table_key_value_pairs (GHashTable * table);
58 void g_hash_table_kv_pair_free_gfunc (gpointer data, gpointer user_data);
59 
75 void kvp_frame_add_url_encoding (KvpFrame * frame, const gchar * enc);
76 
82 gint kvp_frame_compare (const KvpFrame * fa, const KvpFrame * fb);
83 
84 gchar *kvp_frame_to_string (const KvpFrame * frame);
85 gchar *binary_to_string (const void *data, guint32 size);
86 gchar *kvp_value_glist_to_string (const GList * list);
87 GHashTable *kvp_frame_get_hash (const KvpFrame * frame);
88 
125 KvpFrame *
126 qof_kvp_bag_add (KvpFrame * kvp_root, const gchar *path,
127  QofTime *qt, const gchar *first_name, ...);
128 
134 void
135 qof_kvp_bag_merge (KvpFrame * kvp_into, const gchar *intopath,
136  KvpFrame * kvp_from, const gchar *frompath);
137 
147 KvpFrame *
148 qof_kvp_bag_find_by_guid (KvpFrame * root, const gchar *path,
149  const gchar *guid_name,
150  GUID * desired_guid);
151 
159 void
160 qof_kvp_bag_remove_frame (KvpFrame * root, const gchar *path,
161  KvpFrame * fr);
162 
163 /***********************************************************************/
164 
167 #endif /* KVPUTIL_H */
gint kvp_frame_compare(const KvpFrame *fa, const KvpFrame *fb)
Definition: kvpframe.c:1743
struct _KvpFrame KvpFrame
Definition: kvpframe.h:74
void qof_kvp_bag_remove_frame(KvpFrame *root, const gchar *path, KvpFrame *fr)
Definition: kvputil.c:119
void qof_kvp_bag_merge(KvpFrame *kvp_into, const gchar *intopath, KvpFrame *kvp_from, const gchar *frompath)
Definition: kvputil.c:186
void kvp_frame_add_url_encoding(KvpFrame *frame, const gchar *enc)
Definition: kvpframe.c:877
KvpFrame * qof_kvp_bag_add(KvpFrame *kvp_root, const gchar *path, QofTime *qt, const gchar *first_name,...)
Definition: kvputil.c:67
GSList * g_hash_table_key_value_pairs(GHashTable *table)
Definition: kvputil.c:212
Definition: guid.h:53
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:112
KvpFrame * qof_kvp_bag_find_by_guid(KvpFrame *root, const gchar *path, const gchar *guid_name, GUID *desired_guid)
Definition: kvputil.c:89