1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0">
4
3
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
4
<title>EXMLHash</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.69.0">
5
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
7
6
<link rel="start" href="index.html" title="Evolution API Reference: libedataserver, utility library">
8
7
<link rel="up" href="ch01.html" title="Evolution API Reference: libedataserver, utility library">
9
8
<link rel="prev" href="libedataserver-e-url.html" title="EUrl">
13
12
<link rel="chapter" href="ch01.html" title="Evolution API Reference: libedataserver, utility library">
15
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
16
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
15
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
18
16
<td><a accesskey="p" href="libedataserver-e-url.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
19
17
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
20
18
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
21
19
<th width="100%" align="center">Evolution API Reference: libedataserver, utility library</th>
22
20
<td><a accesskey="n" href="libedataserver-md5-utils.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
24
<tr><td colspan="5" class="shortcuts"><nobr><a href="#top_of_page" class="shortcut">Top</a>
26
<a href="#desc" class="shortcut">Description</a></nobr></td></tr>
28
22
<div class="refentry" lang="en">
29
23
<a name="libedataserver-e-xml-hash-utils"></a><div class="titlepage"></div>
30
24
<div class="refnamediv"><table width="100%"><tr>
32
<h2><span class="refentrytitle"><a name="top_of_page"></a>EXMLHash</span></h2>
26
<h2><span class="refentrytitle">EXMLHash</span></h2>
33
27
<p>EXMLHash — Functions for manipulating xml as a hash table.</p>
35
29
<td valign="top" align="right"></td>
36
30
</tr></table></div>
37
31
<div class="refsynopsisdiv">
38
<a name="synopsis"></a><h2>Synopsis</h2>
39
33
<pre class="synopsis">
43
37
enum <a href="libedataserver-e-xml-hash-utils.html#EXmlHashType">EXmlHashType</a>;
45
href="../glib/glib-Hash-Tables.html#GHashTable"
39
href="/opt/gnome/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"
46
40
>GHashTable</a>* <a href="libedataserver-e-xml-hash-utils.html#e-xml-to-hash">e_xml_to_hash</a> (xmlDoc *doc,
47
41
<a href="libedataserver-e-xml-hash-utils.html#EXmlHashType">EXmlHashType</a> type);
48
42
xmlDoc* <a href="libedataserver-e-xml-hash-utils.html#e-xml-from-hash">e_xml_from_hash</a> (<a
49
href="../glib/glib-Hash-Tables.html#GHashTable"
43
href="/opt/gnome/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"
50
44
>GHashTable</a> *hash,
51
45
<a href="libedataserver-e-xml-hash-utils.html#EXmlHashType">EXmlHashType</a> type,
52
46
const char *root_node);
53
47
void <a href="libedataserver-e-xml-hash-utils.html#e-xml-destroy-hash">e_xml_destroy_hash</a> (<a
54
href="../glib/glib-Hash-Tables.html#GHashTable"
48
href="/opt/gnome/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"
55
49
>GHashTable</a> *hash);
56
50
enum <a href="libedataserver-e-xml-hash-utils.html#EXmlHashStatus">EXmlHashStatus</a>;
57
51
void (<a href="libedataserver-e-xml-hash-utils.html#EXmlHashFunc">*EXmlHashFunc</a>) (const char *key,
60
href="../glib/glib-Basic-Types.html#gpointer"
54
href="/opt/gnome/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
61
55
>gpointer</a> user_data);
62
56
typedef <a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a>;
63
57
<a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a>* <a href="libedataserver-e-xml-hash-utils.html#e-xmlhash-new">e_xmlhash_new</a> (const char *filename);
72
66
void <a href="libedataserver-e-xml-hash-utils.html#e-xmlhash-foreach-key">e_xmlhash_foreach_key</a> (<a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a> *hash,
73
67
<a href="libedataserver-e-xml-hash-utils.html#EXmlHashFunc">EXmlHashFunc</a> func,
75
href="../glib/glib-Basic-Types.html#gpointer"
69
href="/opt/gnome/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
76
70
>gpointer</a> user_data);
77
71
void <a href="libedataserver-e-xml-hash-utils.html#e-xmlhash-write">e_xmlhash_write</a> (<a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a> *hash);
78
72
void <a href="libedataserver-e-xml-hash-utils.html#e-xmlhash-destroy">e_xmlhash_destroy</a> (<a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a> *hash);
81
75
<div class="refsect1" lang="en">
82
<a name="desc"></a><h2>Description</h2>
76
<a name="id2590443"></a><h2>Description</h2>
87
81
<div class="refsect1" lang="en">
88
<a name="details"></a><h2>Details</h2>
82
<a name="id2590455"></a><h2>Details</h2>
89
83
<div class="refsect2" lang="en">
90
<a name="id2599945"></a><h3>
84
<a name="id2590461"></a><h3>
91
85
<a name="EXmlHashType"></a>enum EXmlHashType</h3>
92
<a class="indexterm" name="id2599957"></a><pre class="programlisting">typedef enum {
86
<a class="indexterm" name="id2590471"></a><pre class="programlisting">typedef enum {
93
87
E_XML_HASH_TYPE_OBJECT_UID,
94
88
E_XML_HASH_TYPE_PROPERTY
121
115
<div class="refsect2" lang="en">
122
<a name="id2600012"></a><h3>
116
<a name="id2596543"></a><h3>
123
117
<a name="e-xml-to-hash"></a>e_xml_to_hash ()</h3>
124
<a class="indexterm" name="id2600025"></a><pre class="programlisting"><a
125
href="../glib/glib-Hash-Tables.html#GHashTable"
118
<a class="indexterm" name="id2596553"></a><pre class="programlisting"><a
119
href="/opt/gnome/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"
126
120
>GHashTable</a>* e_xml_to_hash (xmlDoc *doc,
127
121
<a href="libedataserver-e-xml-hash-utils.html#EXmlHashType">EXmlHashType</a> type);</pre>
130
href="../glib/glib-Hash-Tables.html#GHashTable"
124
href="/opt/gnome/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"
131
125
><span class="type">GHashTable</span></a> representation of the <span class="type">xmlDoc</span> <em class="parameter"><code>doc</code></em>.
132
126
If <em class="parameter"><code>type</code></em> is * <em class="parameter"><code>E_XML_HASH_TYPE_PROPERTY</code></em>, all XML nodes will be
133
127
indexed in the <a
134
href="../glib/glib-Hash-Tables.html#GHashTable"
128
href="/opt/gnome/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"
135
129
><span class="type">GHashTable</span></a> by name. If <em class="parameter"><code>type</code></em> is
136
130
<code class="literal">E_XML_HASH_TYPE_OBJECT_UID</code>, then XML objects will be indexed in
137
131
the hash by their UID (other nodes will still be indexed by name).</p>
168
162
<div class="refsect2" lang="en">
169
<a name="id2596721"></a><h3>
163
<a name="id2596706"></a><h3>
170
164
<a name="e-xml-from-hash"></a>e_xml_from_hash ()</h3>
171
<a class="indexterm" name="id2596733"></a><pre class="programlisting">xmlDoc* e_xml_from_hash (<a
172
href="../glib/glib-Hash-Tables.html#GHashTable"
165
<a class="indexterm" name="id2596717"></a><pre class="programlisting">xmlDoc* e_xml_from_hash (<a
166
href="/opt/gnome/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"
173
167
>GHashTable</a> *hash,
174
168
<a href="libedataserver-e-xml-hash-utils.html#EXmlHashType">EXmlHashType</a> type,
175
169
const char *root_node);</pre>
216
210
<div class="refsect2" lang="en">
217
<a name="id2596884"></a><h3>
211
<a name="id2593322"></a><h3>
218
212
<a name="e-xml-destroy-hash"></a>e_xml_destroy_hash ()</h3>
219
<a class="indexterm" name="id2596896"></a><pre class="programlisting">void e_xml_destroy_hash (<a
220
href="../glib/glib-Hash-Tables.html#GHashTable"
213
<a class="indexterm" name="id2593332"></a><pre class="programlisting">void e_xml_destroy_hash (<a
214
href="/opt/gnome/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"
221
215
>GHashTable</a> *hash);</pre>
223
217
Frees the memory used by <em class="parameter"><code>hash</code></em> and its contents.</p>
240
234
<div class="refsect2" lang="en">
241
<a name="id2596958"></a><h3>
235
<a name="id2593393"></a><h3>
242
236
<a name="EXmlHashStatus"></a>enum EXmlHashStatus</h3>
243
<a class="indexterm" name="id2596971"></a><pre class="programlisting">typedef enum {
237
<a class="indexterm" name="id2593403"></a><pre class="programlisting">typedef enum {
244
238
E_XMLHASH_STATUS_SAME,
245
239
E_XMLHASH_STATUS_DIFFERENT,
246
240
E_XMLHASH_STATUS_NOT_FOUND
279
273
<div class="refsect2" lang="en">
280
<a name="id2597044"></a><h3>
274
<a name="id2593476"></a><h3>
281
275
<a name="EXmlHashFunc"></a>EXmlHashFunc ()</h3>
282
<a class="indexterm" name="id2597056"></a><pre class="programlisting">void (*EXmlHashFunc) (const char *key,
276
<a class="indexterm" name="id2597760"></a><pre class="programlisting">void (*EXmlHashFunc) (const char *key,
283
277
const char *value,
285
href="../glib/glib-Basic-Types.html#gpointer"
279
href="/opt/gnome/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
286
280
>gpointer</a> user_data);</pre>
317
311
<div class="refsect2" lang="en">
318
<a name="id2600985"></a><h3>
312
<a name="id2597838"></a><h3>
319
313
<a name="EXmlHash"></a>EXmlHash</h3>
320
<a class="indexterm" name="id2600995"></a><pre class="programlisting">typedef struct EXmlHash EXmlHash;
314
<a class="indexterm" name="id2597847"></a><pre class="programlisting">typedef struct EXmlHash EXmlHash;
323
317
A hash table representation of an XML file.</p>
329
323
<div class="refsect2" lang="en">
330
<a name="id2601013"></a><h3>
324
<a name="id2597864"></a><h3>
331
325
<a name="e-xmlhash-new"></a>e_xmlhash_new ()</h3>
332
<a class="indexterm" name="id2601023"></a><pre class="programlisting"><a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a>* e_xmlhash_new (const char *filename);</pre>
326
<a class="indexterm" name="id2597873"></a><pre class="programlisting"><a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a>* e_xmlhash_new (const char *filename);</pre>
334
328
Creates a new <a href="libedataserver-e-xml-hash-utils.html#EXmlHash"><span class="type">EXmlHash</span></a> from the file <em class="parameter"><code>filename</code></em>. If <em class="parameter"><code>filename</code></em> does
335
329
not already exist, an empty <a href="libedataserver-e-xml-hash-utils.html#EXmlHash"><span class="type">EXmlHash</span></a> will be created.</p>
359
353
<div class="refsect2" lang="en">
360
<a name="id2601118"></a><h3>
354
<a name="id2597977"></a><h3>
361
355
<a name="e-xmlhash-add"></a>e_xmlhash_add ()</h3>
362
<a class="indexterm" name="id2601130"></a><pre class="programlisting">void e_xmlhash_add (<a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a> *hash,
356
<a class="indexterm" name="id2597988"></a><pre class="programlisting">void e_xmlhash_add (<a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a> *hash,
364
358
const char *data);</pre>
395
389
<div class="refsect2" lang="en">
396
<a name="id2601241"></a><h3>
390
<a name="id2598100"></a><h3>
397
391
<a name="e-xmlhash-remove"></a>e_xmlhash_remove ()</h3>
398
<a class="indexterm" name="id2601254"></a><pre class="programlisting">void e_xmlhash_remove (<a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a> *hash,
392
<a class="indexterm" name="id2598110"></a><pre class="programlisting">void e_xmlhash_remove (<a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a> *hash,
399
393
const char *key);</pre>
401
395
Remove the entry in <em class="parameter"><code>hash</code></em> with key equal to <em class="parameter"><code>key</code></em>, if it exists.</p>
424
418
<div class="refsect2" lang="en">
425
<a name="id2601343"></a><h3>
419
<a name="id2598200"></a><h3>
426
420
<a name="e-xmlhash-compare"></a>e_xmlhash_compare ()</h3>
427
<a class="indexterm" name="id2601356"></a><pre class="programlisting"><a href="libedataserver-e-xml-hash-utils.html#EXmlHashStatus">EXmlHashStatus</a> e_xmlhash_compare (<a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a> *hash,
421
<a class="indexterm" name="id2598210"></a><pre class="programlisting"><a href="libedataserver-e-xml-hash-utils.html#EXmlHashStatus">EXmlHashStatus</a> e_xmlhash_compare (<a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a> *hash,
429
423
const char *compare_data);</pre>
470
464
<div class="refsect2" lang="en">
471
<a name="id2601506"></a><h3>
465
<a name="id2598361"></a><h3>
472
466
<a name="e-xmlhash-foreach-key"></a>e_xmlhash_foreach_key ()</h3>
473
<a class="indexterm" name="id2601517"></a><pre class="programlisting">void e_xmlhash_foreach_key (<a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a> *hash,
467
<a class="indexterm" name="id2598370"></a><pre class="programlisting">void e_xmlhash_foreach_key (<a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a> *hash,
474
468
<a href="libedataserver-e-xml-hash-utils.html#EXmlHashFunc">EXmlHashFunc</a> func,
476
href="../glib/glib-Basic-Types.html#gpointer"
470
href="/opt/gnome/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
477
471
>gpointer</a> user_data);</pre>
479
473
Executes <em class="parameter"><code>func</code></em> against each key/value pair in <em class="parameter"><code>hash</code></em>.</p>
508
502
<div class="refsect2" lang="en">
509
<a name="id2601647"></a><h3>
503
<a name="id2598500"></a><h3>
510
504
<a name="e-xmlhash-write"></a>e_xmlhash_write ()</h3>
511
<a class="indexterm" name="id2601660"></a><pre class="programlisting">void e_xmlhash_write (<a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a> *hash);</pre>
505
<a class="indexterm" name="id2598510"></a><pre class="programlisting">void e_xmlhash_write (<a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a> *hash);</pre>
513
507
Writes the XML represented by <em class="parameter"><code>hash</code></em> to the file originally passed
514
508
to <a href="libedataserver-e-xml-hash-utils.html#e-xmlhash-new"><code class="function">e_xmlhash_new()</code></a>.</p>
529
523
<div class="refsect2" lang="en">
530
<a name="id2601733"></a><h3>
524
<a name="id2598583"></a><h3>
531
525
<a name="e-xmlhash-destroy"></a>e_xmlhash_destroy ()</h3>
532
<a class="indexterm" name="id2601745"></a><pre class="programlisting">void e_xmlhash_destroy (<a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a> *hash);</pre>
526
<a class="indexterm" name="id2598593"></a><pre class="programlisting">void e_xmlhash_destroy (<a href="libedataserver-e-xml-hash-utils.html#EXmlHash">EXmlHash</a> *hash);</pre>
534
528
Frees the memory associated with <em class="parameter"><code>hash</code></em>.</p>