This file is indexed.

/usr/share/gtk-doc/html/libtracker-extract/libtracker-extract-Data-utilities.html is in libtracker-extract-doc 0.16.2-1ubuntu4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Tracker Extract Library Reference Manual: Data utilities</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Tracker Extract Library Reference Manual">
<link rel="up" href="ch02.html" title="Core API">
<link rel="prev" href="libtracker-extract-TrackerExtractInfo.html" title="TrackerExtractInfo">
<link rel="next" href="ch03.html" title="Common Embedded Support API">
<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
                  <a href="#libtracker-extract-Data-utilities.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
                  <a href="#libtracker-extract-Data-utilities.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libtracker-extract-TrackerExtractInfo.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="ch03.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libtracker-extract-Data-utilities"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libtracker-extract-Data-utilities.top_of_page"></a>Data utilities</span></h2>
<p>Data utilities — Functions for coalescing, merging, date
handling and normalizing</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libtracker-extract-Data-utilities.stability-level"></a><h2>Stability Level</h2>
Stable, unless otherwise indicated
</div>
<div class="refsect1">
<a name="libtracker-extract-Data-utilities.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libtracker-extract-Data-utilities.html#tracker-coalesce" title="tracker_coalesce ()">tracker_coalesce</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libtracker-extract-Data-utilities.html#tracker-coalesce-strip" title="tracker_coalesce_strip ()">tracker_coalesce_strip</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libtracker-extract-Data-utilities.html#tracker-merge" title="tracker_merge ()">tracker_merge</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libtracker-extract-Data-utilities.html#tracker-merge-const" title="tracker_merge_const ()">tracker_merge_const</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gssize</span>
</td>
<td class="function_name">
<a class="link" href="libtracker-extract-Data-utilities.html#tracker-getline" title="tracker_getline ()">tracker_getline</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libtracker-extract-Data-utilities.html#tracker-text-normalize" title="tracker_text_normalize ()">tracker_text_normalize</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libtracker-extract-Data-utilities.html#tracker-text-validate-utf8" title="tracker_text_validate_utf8 ()">tracker_text_validate_utf8</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libtracker-extract-Data-utilities.html#tracker-date-format-to-iso8601" title="tracker_date_format_to_iso8601 ()">tracker_date_format_to_iso8601</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libtracker-extract-Data-utilities.html#tracker-date-guess" title="tracker_date_guess ()">tracker_date_guess</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libtracker-extract-Data-utilities.html#tracker-keywords-parse" title="tracker_keywords_parse ()">tracker_keywords_parse</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libtracker-extract-Data-utilities.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">
</pre>
</div>
<div class="refsect1">
<a name="libtracker-extract-Data-utilities.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;libtracker-extract/tracker-extract.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="libtracker-extract-Data-utilities.description"></a><h2>Description</h2>
<p>This API is provided to facilitate common more general functions
which extractors may find useful. These functions are also used by
the in-house extractors quite frequently.</p>
</div>
<div class="refsect1">
<a name="libtracker-extract-Data-utilities.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="tracker-coalesce"></a><h3>tracker_coalesce ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
tracker_coalesce (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_values</code></em>,
                  <em class="parameter"><code>...</code></em>);</pre>
<div class="warning">
<p><code class="literal">tracker_coalesce</code> has been deprecated since version 0.10 and should not be used in newly-written code.</p>
<p>Use <a class="link" href="libtracker-extract-Data-utilities.html#tracker-coalesce-strip" title="tracker_coalesce_strip ()"><code class="function">tracker_coalesce_strip()</code></a> instead.</p>
</div>
<p>This function iterates through a series of string pointers passed
using @... and returns the first which is not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, not empty
(i.e. "") and not comprised of one or more spaces (i.e. " ").</p>
<p>The returned value is stripped using <a href="/usr/share/gtk-doc/html/glib/glib-String-Utility-Functions.html#g-strstrip"><code class="function">g_strstrip()</code></a>. All other values
supplied are freed. It is MOST important NOT to pass constant
string pointers to this function!</p>
<div class="refsect3">
<a name="id-1.3.3.4.8.2.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>n_values</p></td>
<td class="parameter_description"><p>the number of <em class="parameter"><code>Varargs</code></em>
supplied</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>the string pointers to coalesce</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.4.8.2.9"></a><h4>Returns</h4>
<p> the first string pointer from those provided which
matches, otherwise <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p></p>
</div>
<p class="since">Since 0.8</p>
</div>
<hr>
<div class="refsect2">
<a name="tracker-coalesce-strip"></a><h3>tracker_coalesce_strip ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
tracker_coalesce_strip (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_values</code></em>,
                        <em class="parameter"><code>...</code></em>);</pre>
<p>This function iterates through a series of string pointers passed
using @... and returns the first which is not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, not empty
(i.e. "") and not comprised of one or more spaces (i.e. " ").</p>
<p>The returned value is stripped using <a href="/usr/share/gtk-doc/html/glib/glib-String-Utility-Functions.html#g-strstrip"><code class="function">g_strstrip()</code></a>. It is MOST
important NOT to pass constant string pointers to this function!</p>
<div class="refsect3">
<a name="id-1.3.3.4.8.3.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>n_values</p></td>
<td class="parameter_description"><p>the number of @... supplied</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>the string pointers to coalesce</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.4.8.3.7"></a><h4>Returns</h4>
<p> the first string pointer from those provided which
matches, otherwise <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p></p>
</div>
<p class="since">Since 0.10</p>
</div>
<hr>
<div class="refsect2">
<a name="tracker-merge"></a><h3>tracker_merge ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
tracker_merge (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *delimiter</code></em>,
               <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_values</code></em>,
               <em class="parameter"><code>...</code></em>);</pre>
<div class="warning">
<p><code class="literal">tracker_merge</code> has been deprecated since version 0.10 and should not be used in newly-written code.</p>
<p>Use <a class="link" href="libtracker-extract-Data-utilities.html#tracker-merge-const" title="tracker_merge_const ()"><code class="function">tracker_merge_const()</code></a> instead.</p>
</div>
<p>This function iterates through a series of string pointers passed
using @... and returns a newly allocated string of the merged
strings. All passed strings are freed (don't pass const values)/</p>
<p>The <em class="parameter"><code>delimiter</code></em>
 can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. If specified, it will be used in
between each merged string in the result.</p>
<div class="refsect3">
<a name="id-1.3.3.4.8.4.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>delimiter</p></td>
<td class="parameter_description"><p>the delimiter to use when merging</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_values</p></td>
<td class="parameter_description"><p>the number of @... supplied</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>the string pointers to merge</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.4.8.4.9"></a><h4>Returns</h4>
<p> a newly-allocated string holding the result which should
be freed with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when finished with, otherwise <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p></p>
</div>
<p class="since">Since 0.8</p>
</div>
<hr>
<div class="refsect2">
<a name="tracker-merge-const"></a><h3>tracker_merge_const ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
tracker_merge_const (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *delimiter</code></em>,
                     <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_values</code></em>,
                     <em class="parameter"><code>...</code></em>);</pre>
<p>This function iterates through a series of string pointers passed
using @... and returns a newly allocated string of the merged
strings.</p>
<p>The <em class="parameter"><code>delimiter</code></em>
 can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. If specified, it will be used in
between each merged string in the result.</p>
<div class="refsect3">
<a name="id-1.3.3.4.8.5.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>delimiter</p></td>
<td class="parameter_description"><p>the delimiter to use when merging</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_values</p></td>
<td class="parameter_description"><p>the number of @... supplied</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>the string pointers to merge</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.4.8.5.7"></a><h4>Returns</h4>
<p> a newly-allocated string holding the result which should
be freed with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when finished with, otherwise <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p></p>
</div>
<p class="since">Since 0.10</p>
</div>
<hr>
<div class="refsect2">
<a name="tracker-getline"></a><h3>tracker_getline ()</h3>
<pre class="programlisting"><span class="returnvalue">gssize</span>
tracker_getline (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **lineptr</code></em>,
                 <em class="parameter"><code><span class="type">gsize</span> *n</code></em>,
                 <em class="parameter"><code><span class="type">FILE</span> *stream</code></em>);</pre>
<p>Reads an entire line from stream, storing the address of the buffer
containing  the  text into *lineptr.  The buffer is null-terminated
and includes the newline character, if one was found.</p>
<p>Read GNU <code class="function">getline()</code>'s manpage for more information</p>
<div class="refsect3">
<a name="id-1.3.3.4.8.6.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>lineptr</p></td>
<td class="parameter_description"><p>Buffer to write into</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n</p></td>
<td class="parameter_description"><p>Max bytes of linebuf</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>stream</p></td>
<td class="parameter_description"><p>Filestream to read from</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.4.8.6.7"></a><h4>Returns</h4>
<p> the number of characters read, including the delimiter
character, but not including the terminating <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> byte. This value
can be used to handle embedded <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> bytes in the line read. Upon
failure, -1 is returned.</p>
<p></p>
</div>
<p class="since">Since 0.10</p>
</div>
<hr>
<div class="refsect2">
<a name="tracker-text-normalize"></a><h3>tracker_text_normalize ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
tracker_text_normalize (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>,
                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> max_words</code></em>,
                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *n_words</code></em>);</pre>
<div class="warning">
<p><code class="literal">tracker_text_normalize</code> has been deprecated since version 0.10 and should not be used in newly-written code.</p>
<p>Use <a class="link" href="libtracker-extract-Data-utilities.html#tracker-text-validate-utf8" title="tracker_text_validate_utf8 ()"><code class="function">tracker_text_validate_utf8()</code></a> instead.</p>
</div>
<p>This function iterates through <em class="parameter"><code>text</code></em>
 checking for UTF-8 validity
using <a href="/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#g-utf8-get-char-validated"><code class="function">g_utf8_get_char_validated()</code></a>. For each character found, the
<a href="/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#GUnicodeType"><code class="literal">GUnicodeType</code></a> is checked to make sure it is one fo the following
values:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p><code class="literal">G_UNICODE_LOWERCASE_LETTER</code></p></li>
<li class="listitem"><p><code class="literal">G_UNICODE_MODIFIER_LETTER</code></p></li>
<li class="listitem"><p><code class="literal">G_UNICODE_OTHER_LETTER</code></p></li>
<li class="listitem"><p><code class="literal">G_UNICODE_TITLECASE_LETTER</code></p></li>
<li class="listitem"><p><code class="literal">G_UNICODE_UPPERCASE_LETTER</code></p></li>
</ul></div>
<p>All other symbols, punctuation, marks, numbers and separators are
stripped. A regular space (i.e. " ") is used to separate the words
in the returned string.</p>
<p>The <em class="parameter"><code>n_words</code></em>
 can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. If specified, it will be populated with
the number of words that were normalized in the result.</p>
<div class="refsect3">
<a name="id-1.3.3.4.8.7.10"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>text</p></td>
<td class="parameter_description"><p>the text to normalize</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>max_words</p></td>
<td class="parameter_description"><p>the maximum words of <em class="parameter"><code>text</code></em>
to normalize</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_words</p></td>
<td class="parameter_description"><p>the number of words actually normalized</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.4.8.7.11"></a><h4>Returns</h4>
<p> a newly-allocated string holding the result which should
be freed with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when finished with, otherwise <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p></p>
</div>
<p class="since">Since 0.8</p>
</div>
<hr>
<div class="refsect2">
<a name="tracker-text-validate-utf8"></a><h3>tracker_text_validate_utf8 ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
tracker_text_validate_utf8 (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *text</code></em>,
                            <em class="parameter"><code><span class="type">gssize</span> text_len</code></em>,
                            <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Strings.html#GString"><span class="type">GString</span></a> **str</code></em>,
                            <em class="parameter"><code><span class="type">gsize</span> *valid_len</code></em>);</pre>
<div class="warning"><p><code class="literal">tracker_text_validate_utf8</code> is deprecated and should not be used in newly-written code.</p></div>
<p>This function iterates through <em class="parameter"><code>text</code></em>
 checking for UTF-8 validity
using <a href="/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#g-utf8-validate"><code class="function">g_utf8_validate()</code></a>, appends the first chunk of valid characters
to <em class="parameter"><code>str</code></em>
, and gives the number of valid UTF-8 bytes in <em class="parameter"><code>valid_len</code></em>
.</p>
<div class="refsect3">
<a name="id-1.3.3.4.8.8.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>text</p></td>
<td class="parameter_description"><p>the text to validate</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>text_len</p></td>
<td class="parameter_description"><p>length of <em class="parameter"><code>text</code></em>
, or -1 if NUL-terminated</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>the string where to place the validated UTF-8 characters, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
not needed.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>valid_len</p></td>
<td class="parameter_description"><p>Output number of valid UTF-8 bytes found, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not needed</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.4.8.8.8"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if some bytes were found to be valid, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
<p></p>
</div>
<p class="since">Since 0.10</p>
</div>
<hr>
<div class="refsect2">
<a name="tracker-date-format-to-iso8601"></a><h3>tracker_date_format_to_iso8601 ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
tracker_date_format_to_iso8601 (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *date_string</code></em>,
                                <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *format</code></em>);</pre>
<p>This function uses <code class="function">strptime()</code> to create a time tm structure using
<em class="parameter"><code>date_string</code></em>
 and <em class="parameter"><code>format</code></em>
.</p>
<div class="refsect3">
<a name="id-1.3.3.4.8.9.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>date_string</p></td>
<td class="parameter_description"><p>the date in a string pointer</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>format</p></td>
<td class="parameter_description"><p>the format of the <em class="parameter"><code>date_string</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.4.8.9.6"></a><h4>Returns</h4>
<p> a newly-allocated string with the time represented in
ISO8601 date format which should be freed with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when
finished with, otherwise <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p></p>
</div>
<p class="since">Since 0.8</p>
</div>
<hr>
<div class="refsect2">
<a name="tracker-date-guess"></a><h3>tracker_date_guess ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
tracker_date_guess (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *date_string</code></em>);</pre>
<p>This function uses a number of methods to try and guess the date
held in <em class="parameter"><code>date_string</code></em>
. The <em class="parameter"><code>date_string</code></em>
 must be at least 5
characters in length or longer for any guessing to be attempted.
Some of the string formats guessed include:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>"YYYY-MM-DD" (Simple format)</p></li>
<li class="listitem"><p>"20050315113224-08'00'" (PDF format)</p></li>
<li class="listitem"><p>"20050216111533Z" (PDF format)</p></li>
<li class="listitem"><p>"Mon Feb  9 10:10:00 2004" (Microsoft Office format)</p></li>
<li class="listitem"><p>"2005:04:29 14:56:54" (Exif format)</p></li>
<li class="listitem"><p>"YYYY-MM-DDThh:mm:ss.ff+zz:zz</p></li>
</ul></div>
<div class="refsect3">
<a name="id-1.3.3.4.8.10.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>date_string</p></td>
<td class="parameter_description"><p>the date in a string pointer</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.3.3.4.8.10.7"></a><h4>Returns</h4>
<p> a newly-allocated string with the time represented in
ISO8601 date format which should be freed with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when
finished with, otherwise <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p></p>
</div>
<p class="since">Since 0.8</p>
</div>
<hr>
<div class="refsect2">
<a name="tracker-keywords-parse"></a><h3>tracker_keywords_parse ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
tracker_keywords_parse (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *store</code></em>,
                        <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *keywords</code></em>);</pre>
<p>Parses a keywords line into store, avoiding duplicates and stripping leading
and trailing spaces from keywords. Allowed delimiters are , and ;</p>
<div class="refsect3">
<a name="id-1.3.3.4.8.11.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>store</p></td>
<td class="parameter_description"><p>Array where to store the keywords</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>keywords</p></td>
<td class="parameter_description"><p>Keywords line to parse</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since 0.10</p>
</div>
</div>
<div class="refsect1">
<a name="libtracker-extract-Data-utilities.other_details"></a><h2>Types and Values</h2>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.20</div>
</body>
</html>