/usr/share/gtk-doc/html/libtracker-sparql/TrackerNotifier.html is in libtracker-sparql-doc 2.0.3-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 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>TrackerNotifier: Tracker SPARQL Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Tracker SPARQL Library Reference Manual">
<link rel="up" href="libtracker-sparql-reference.html" title="Part II. Reference">
<link rel="prev" href="TrackerSparqlCursor.html" title="TrackerSparqlCursor">
<link rel="next" href="libtracker-sparql-Utilities.html" title="Utilities">
<meta name="generator" content="GTK-Doc V1.27 (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="5"><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="#TrackerNotifier.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#TrackerNotifier.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span>
<a href="#TrackerNotifier.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span>
<a href="#TrackerNotifier.properties" class="shortcut">Properties</a></span><span id="nav_signals"> <span class="dim">|</span>
<a href="#TrackerNotifier.signals" class="shortcut">Signals</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="libtracker-sparql-reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="TrackerSparqlCursor.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libtracker-sparql-Utilities.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="TrackerNotifier"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="TrackerNotifier.top_of_page"></a>TrackerNotifier</span></h2>
<p>TrackerNotifier — Listen to changes in the Tracker database</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="TrackerNotifier.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="TrackerNotifier.html" title="TrackerNotifier"><span class="returnvalue">TrackerNotifier</span></a> *
</td>
<td class="function_name">
<a class="link" href="TrackerNotifier.html#tracker-notifier-new" title="tracker_notifier_new ()">tracker_notifier_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="TrackerNotifier.html#TrackerNotifierEventType" title="enum TrackerNotifierEventType"><span class="returnvalue">TrackerNotifierEventType</span></a>
</td>
<td class="function_name">
<a class="link" href="TrackerNotifier.html#tracker-notifier-event-get-event-type" title="tracker_notifier_event_get_event_type ()">tracker_notifier_event_get_event_type</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a>
</td>
<td class="function_name">
<a class="link" href="TrackerNotifier.html#tracker-notifier-event-get-id" title="tracker_notifier_event_get_id ()">tracker_notifier_event_get_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="TrackerNotifier.html#tracker-notifier-event-get-type" title="tracker_notifier_event_get_type ()">tracker_notifier_event_get_type</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="TrackerNotifier.html#tracker-notifier-event-get-urn" title="tracker_notifier_event_get_urn ()">tracker_notifier_event_get_urn</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="TrackerNotifier.html#tracker-notifier-event-get-location" title="tracker_notifier_event_get_location ()">tracker_notifier_event_get_location</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="TrackerNotifier.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><a href="../glib/glib-String-Utility-Functions.html#GStrv"><span class="type">GStrv</span></a></td>
<td class="property_name"><a class="link" href="TrackerNotifier.html#TrackerNotifier--classes" title="The “classes” property">classes</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type"><a class="link" href="TrackerNotifier.html#TrackerNotifierFlags" title="enum TrackerNotifierFlags"><span class="type">TrackerNotifierFlags</span></a></td>
<td class="property_name"><a class="link" href="TrackerNotifier.html#TrackerNotifier--flags" title="The “flags” property">flags</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="TrackerNotifier.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signals_return">
<col width="300px" class="signals_name">
<col width="200px" class="signals_flags">
</colgroup>
<tbody><tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="TrackerNotifier.html#TrackerNotifier-events" title="The “events” signal">events</a></td>
<td class="signal_flags"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="TrackerNotifier.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="TrackerNotifier.html#TrackerNotifierFlags" title="enum TrackerNotifierFlags">TrackerNotifierFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="TrackerNotifier.html#TrackerNotifier-struct" title="TrackerNotifier">TrackerNotifier</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="TrackerNotifier.html#TrackerNotifierClass" title="struct TrackerNotifierClass">TrackerNotifierClass</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="TrackerNotifier.html#TrackerNotifierEventType" title="enum TrackerNotifierEventType">TrackerNotifierEventType</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="TrackerNotifier.html#TrackerNotifierEvent" title="TrackerNotifierEvent">TrackerNotifierEvent</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="TrackerNotifier.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="../gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> TrackerNotifier
</pre>
</div>
<div class="refsect1">
<a name="TrackerNotifier.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
TrackerNotifier implements
<a href="../gio/GInitable.html#GInitable-struct">GInitable</a>.</p>
</div>
<div class="refsect1">
<a name="TrackerNotifier.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <libtracker-sparql/tracker-sparql.h>
</pre>
</div>
<div class="refsect1">
<a name="TrackerNotifier.description"></a><h2>Description</h2>
<p><a class="link" href="TrackerNotifier.html" title="TrackerNotifier"><span class="type">TrackerNotifier</span></a> is an object that receives notifications about
changes to the Tracker database. A <a class="link" href="TrackerNotifier.html" title="TrackerNotifier"><span class="type">TrackerNotifier</span></a> is created
through <a class="link" href="TrackerNotifier.html#tracker-notifier-new" title="tracker_notifier_new ()"><code class="function">tracker_notifier_new()</code></a>, passing the RDF types that are
relevant to the caller, and possible different <a class="link" href="TrackerNotifier.html#TrackerNotifierFlags" title="enum TrackerNotifierFlags"><span class="type">TrackerNotifierFlags</span></a>
to change <a class="link" href="TrackerNotifier.html" title="TrackerNotifier"><span class="type">TrackerNotifier</span></a> behavior. After the notifier is created,
events can be listened for by connecting to the <a class="link" href="TrackerNotifier.html#TrackerNotifier-events" title="The “events” signal"><span class="type">“events”</span></a>
signal. This object was added in Tracker 1.12.</p>
<p><a class="link" href="TrackerNotifier.html" title="TrackerNotifier"><span class="type">TrackerNotifier</span></a> by default coalesces events so the user is only
notified of changes after all metadata is extracted and inserted
in the database, so the user is guaranteed that all relevant data
will be available at the time of notification. If this is not desired,
or when dealing with data not dealt with by tracker-extract, the
<a class="link" href="TrackerNotifier.html#TRACKER-NOTIFIER-FLAG-NOTIFY-UNEXTRACTED:CAPS"><code class="literal">TRACKER_NOTIFIER_FLAG_NOTIFY_UNEXTRACTED</code></a> flag can be passed.</p>
<p>If the <a class="link" href="TrackerNotifier.html#TRACKER-NOTIFIER-FLAG-NOTIFY-UNEXTRACTED:CAPS"><code class="literal">TRACKER_NOTIFIER_FLAG_NOTIFY_UNEXTRACTED</code></a> flag is passed,
created/updated elements may be notified in two steps, first a
CREATED/UPDATED event will be emitted, and then a second UPDATED
event might appear after further metadata is extracted.</p>
<p><a class="link" href="TrackerNotifier.html" title="TrackerNotifier"><span class="type">TrackerNotifier</span></a> is tracker:id centric, the ID can be
obtained from every event through <a class="link" href="TrackerNotifier.html#tracker-notifier-event-get-id" title="tracker_notifier_event_get_id ()"><code class="function">tracker_notifier_event_get_id()</code></a>.
The expected way to retrieving metadata is a query of the form:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6</pre></td>
<td class="listing_code"><pre class="programlisting">SELECT <span class="gtkdoc opt">?</span>urn …
WHERE <span class="gtkdoc opt">{</span>
<span class="gtkdoc opt">?</span>urn a rdfs<span class="gtkdoc opt">:</span>Resource <span class="gtkdoc opt">.</span>
…
<span class="function">FILTER</span> <span class="gtkdoc opt">(</span>tracker<span class="gtkdoc opt">:</span><span class="function">id</span><span class="gtkdoc opt">(?</span>urn<span class="gtkdoc opt">) =</span> …<span class="gtkdoc opt">)</span>
<span class="gtkdoc opt">}</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<p>If the flags <a class="link" href="TrackerNotifier.html#TRACKER-NOTIFIER-FLAG-QUERY-URN:CAPS"><code class="literal">TRACKER_NOTIFIER_FLAG_QUERY_URN</code></a> or
<a class="link" href="TrackerNotifier.html#TRACKER-NOTIFIER-FLAG-QUERY-LOCATION:CAPS"><code class="literal">TRACKER_NOTIFIER_FLAG_QUERY_LOCATION</code></a> are passed, the extra metadata
will be available through <a class="link" href="TrackerNotifier.html#tracker-notifier-event-get-urn" title="tracker_notifier_event_get_urn ()"><code class="function">tracker_notifier_event_get_urn()</code></a> and/or
<a class="link" href="TrackerNotifier.html#tracker-notifier-event-get-location" title="tracker_notifier_event_get_location ()"><code class="function">tracker_notifier_event_get_location()</code></a>. Note that this metadata can't
be obtained for every element and situation, most notably during
<a class="link" href="TrackerNotifier.html#TRACKER-NOTIFIER-EVENT-DELETE:CAPS"><code class="literal">TRACKER_NOTIFIER_EVENT_DELETE</code></a> events.</p>
<div class="refsect2">
<a name="trackernotifier-caveats"></a><h3>Known caveats</h3>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>If a resource is deleted, the <a class="link" href="TrackerNotifier.html#TRACKER-NOTIFIER-EVENT-DELETE:CAPS"><code class="literal">TRACKER_NOTIFIER_EVENT_DELETE</code></a> event
emitted will have a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> location, even if the notifier was created
with the <a class="link" href="TrackerNotifier.html#TRACKER-NOTIFIER-FLAG-QUERY-LOCATION:CAPS"><code class="literal">TRACKER_NOTIFIER_FLAG_QUERY_LOCATION</code></a> flag enabled. At the
time of notifying, the resource does not exist anymore, so no
meatadata can be retrieved.</p></li>
<li class="listitem"><p>Notifications of files being moved across indexed folders will
appear as <a class="link" href="TrackerNotifier.html#TRACKER-NOTIFIER-EVENT-UPDATE:CAPS"><code class="literal">TRACKER_NOTIFIER_EVENT_UPDATE</code></a> events, containing
the new location (if requested). The older location is no longer
known to Tracker, this may make tracking of elements in specific
folders hard using solely the <a class="link" href="TrackerNotifier.html" title="TrackerNotifier"><span class="type">TrackerNotifier</span></a>/Tracker data
available at event notification time.</p></li>
</ul></div>
<p>The recommendation to fix those is making the caller aware
of tracker:ids, querying those in the application SPARQL
queries so the client can search the formerly queried data for
matching IDs when <a class="link" href="TrackerNotifier.html" title="TrackerNotifier"><span class="type">TrackerNotifier</span></a> events happen. URNs are just
as effective as a matching mechanism, but more costly.</p>
</div>
</div>
<div class="refsect1">
<a name="TrackerNotifier.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="tracker-notifier-new"></a><h3>tracker_notifier_new ()</h3>
<pre class="programlisting"><a class="link" href="TrackerNotifier.html" title="TrackerNotifier"><span class="returnvalue">TrackerNotifier</span></a> *
tracker_notifier_new (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *classes</code></em>,
<em class="parameter"><code><a class="link" href="TrackerNotifier.html#TrackerNotifierFlags" title="enum TrackerNotifierFlags"><span class="type">TrackerNotifierFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="../gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
<em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Creates a new notifier, events can be listened through the
TrackerNotifier::events signal.</p>
<div class="refsect3">
<a name="tracker-notifier-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>classes</p></td>
<td class="parameter_description"><p>Array of RDF classes to
receive notifications from, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for all. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>flags affecting the notifier behavior</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cancellable</p></td>
<td class="parameter_description"><p>Cancellable for the operation</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>location for the possible resulting error.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="tracker-notifier-new.returns"></a><h4>Returns</h4>
<p>a newly created <a class="link" href="TrackerNotifier.html" title="TrackerNotifier"><span class="type">TrackerNotifier</span></a>, <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: 1.12</p>
</div>
<hr>
<div class="refsect2">
<a name="tracker-notifier-event-get-event-type"></a><h3>tracker_notifier_event_get_event_type ()</h3>
<pre class="programlisting"><a class="link" href="TrackerNotifier.html#TrackerNotifierEventType" title="enum TrackerNotifierEventType"><span class="returnvalue">TrackerNotifierEventType</span></a>
tracker_notifier_event_get_event_type (<em class="parameter"><code><a class="link" href="TrackerNotifier.html#TrackerNotifierEvent" title="TrackerNotifierEvent"><span class="type">TrackerNotifierEvent</span></a> *event</code></em>);</pre>
<p>Returns the event type.</p>
<div class="refsect3">
<a name="tracker-notifier-event-get-event-type.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>event</p></td>
<td class="parameter_description"><p>A <a class="link" href="TrackerNotifier.html#TrackerNotifierEvent" title="TrackerNotifierEvent"><span class="type">TrackerNotifierEvent</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="tracker-notifier-event-get-event-type.returns"></a><h4>Returns</h4>
<p> The event type</p>
</div>
<p class="since">Since: 1.12</p>
</div>
<hr>
<div class="refsect2">
<a name="tracker-notifier-event-get-id"></a><h3>tracker_notifier_event_get_id ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a>
tracker_notifier_event_get_id (<em class="parameter"><code><a class="link" href="TrackerNotifier.html#TrackerNotifierEvent" title="TrackerNotifierEvent"><span class="type">TrackerNotifierEvent</span></a> *event</code></em>);</pre>
<p>Returns the tracker:id of the element being notified upon.</p>
<div class="refsect3">
<a name="tracker-notifier-event-get-id.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>event</p></td>
<td class="parameter_description"><p>A <a class="link" href="TrackerNotifier.html#TrackerNotifierEvent" title="TrackerNotifierEvent"><span class="type">TrackerNotifierEvent</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="tracker-notifier-event-get-id.returns"></a><h4>Returns</h4>
<p> the resource ID</p>
</div>
<p class="since">Since: 1.12</p>
</div>
<hr>
<div class="refsect2">
<a name="tracker-notifier-event-get-type"></a><h3>tracker_notifier_event_get_type ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
tracker_notifier_event_get_type (<em class="parameter"><code><a class="link" href="TrackerNotifier.html#TrackerNotifierEvent" title="TrackerNotifierEvent"><span class="type">TrackerNotifierEvent</span></a> *event</code></em>);</pre>
<p>Returns the RDF type that this notification event relates to, in their
expanded forms (for example,
http://www.semanticdesktop.org/ontologies/2007/03/22/nfo<span class="type">Audio</span>).</p>
<p>A resource may have multiple RDF types. In the case of changes to a
resource with multiple types, one event will be notified for each
RDF type the notifier is subscribed to.</p>
<p>For performance reasons, Tracker only sends notifications for events that
are explicitly marked with the tracker:notify property in their ontology.</p>
<div class="refsect3">
<a name="tracker-notifier-event-get-type.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>event</p></td>
<td class="parameter_description"><p>A <a class="link" href="TrackerNotifier.html#TrackerNotifierEvent" title="TrackerNotifierEvent"><span class="type">TrackerNotifierEvent</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="tracker-notifier-event-get-type.returns"></a><h4>Returns</h4>
<p> the RDF type of the element</p>
</div>
<p class="since">Since: 1.12</p>
</div>
<hr>
<div class="refsect2">
<a name="tracker-notifier-event-get-urn"></a><h3>tracker_notifier_event_get_urn ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
tracker_notifier_event_get_urn (<em class="parameter"><code><a class="link" href="TrackerNotifier.html#TrackerNotifierEvent" title="TrackerNotifierEvent"><span class="type">TrackerNotifierEvent</span></a> *event</code></em>);</pre>
<p>Returns the Uniform Resource Name of the element if the
notifier has the flag <a class="link" href="TrackerNotifier.html#TRACKER-NOTIFIER-FLAG-QUERY-URN:CAPS"><code class="literal">TRACKER_NOTIFIER_FLAG_QUERY_URN</code></a> enabled.</p>
<p>This URN is an unique string identifier for the resource being
notified upon, typically of the form "urn:uuid:...".</p>
<div class="refsect3">
<a name="tracker-notifier-event-get-urn.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>event</p></td>
<td class="parameter_description"><p>A <a class="link" href="TrackerNotifier.html#TrackerNotifierEvent" title="TrackerNotifierEvent"><span class="type">TrackerNotifierEvent</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="tracker-notifier-event-get-urn.returns"></a><h4>Returns</h4>
<p> The element URN</p>
</div>
<p class="since">Since: 1.12</p>
</div>
<hr>
<div class="refsect2">
<a name="tracker-notifier-event-get-location"></a><h3>tracker_notifier_event_get_location ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
tracker_notifier_event_get_location (<em class="parameter"><code><a class="link" href="TrackerNotifier.html#TrackerNotifierEvent" title="TrackerNotifierEvent"><span class="type">TrackerNotifierEvent</span></a> *event</code></em>);</pre>
<p>Returns the location (e.g. an URI) of the element if the notifier
has the flag <a class="link" href="TrackerNotifier.html#TRACKER-NOTIFIER-FLAG-QUERY-LOCATION:CAPS"><code class="literal">TRACKER_NOTIFIER_FLAG_QUERY_LOCATION</code></a>, and it can
be obtained at the time of emission.</p>
<div class="refsect3">
<a name="tracker-notifier-event-get-location.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>event</p></td>
<td class="parameter_description"><p>A <a class="link" href="TrackerNotifier.html#TrackerNotifierEvent" title="TrackerNotifierEvent"><span class="type">TrackerNotifierEvent</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="tracker-notifier-event-get-location.returns"></a><h4>Returns</h4>
<p>The element location, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: 1.12</p>
</div>
</div>
<div class="refsect1">
<a name="TrackerNotifier.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="TrackerNotifierFlags"></a><h3>enum TrackerNotifierFlags</h3>
<p>Flags affecting <a class="link" href="TrackerNotifier.html" title="TrackerNotifier"><span class="type">TrackerNotifier</span></a> behavior.</p>
<div class="refsect3">
<a name="TrackerNotifierFlags.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="TRACKER-NOTIFIER-FLAG-NONE:CAPS"></a>TRACKER_NOTIFIER_FLAG_NONE</p></td>
<td class="enum_member_description">
<p>No flags</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="TRACKER-NOTIFIER-FLAG-QUERY-URN:CAPS"></a>TRACKER_NOTIFIER_FLAG_QUERY_URN</p></td>
<td class="enum_member_description">
<p>Query URN of notified elements</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="TRACKER-NOTIFIER-FLAG-QUERY-LOCATION:CAPS"></a>TRACKER_NOTIFIER_FLAG_QUERY_LOCATION</p></td>
<td class="enum_member_description">
<p>Query location of notified elements</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="TRACKER-NOTIFIER-FLAG-NOTIFY-UNEXTRACTED:CAPS"></a>TRACKER_NOTIFIER_FLAG_NOTIFY_UNEXTRACTED</p></td>
<td class="enum_member_description">
<p>Added/updated Elements are
notified in 2 steps (a CREATE/UPDATE event after the file is first
known, and an UPDATE event after metadata is extracted). The default
<a class="link" href="TrackerNotifier.html" title="TrackerNotifier"><span class="type">TrackerNotifier</span></a> behavior coalesces those events in one.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="TrackerNotifier-struct"></a><h3>TrackerNotifier</h3>
<pre class="programlisting">typedef struct _TrackerNotifier TrackerNotifier;</pre>
</div>
<hr>
<div class="refsect2">
<a name="TrackerNotifierClass"></a><h3>struct TrackerNotifierClass</h3>
<pre class="programlisting">struct TrackerNotifierClass {
GObjectClass parent_class;
void (* events) (TrackerNotifier *notifier,
const GPtrArray *events);
/* <Private> */
gpointer padding[20];
};
</pre>
</div>
<hr>
<div class="refsect2">
<a name="TrackerNotifierEventType"></a><h3>enum TrackerNotifierEventType</h3>
<p>Notifier event types.</p>
<div class="refsect3">
<a name="TrackerNotifierEventType.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="TRACKER-NOTIFIER-EVENT-CREATE:CAPS"></a>TRACKER_NOTIFIER_EVENT_CREATE</p></td>
<td class="enum_member_description">
<p>An element was created.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="TRACKER-NOTIFIER-EVENT-DELETE:CAPS"></a>TRACKER_NOTIFIER_EVENT_DELETE</p></td>
<td class="enum_member_description">
<p>An element was deleted.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="TRACKER-NOTIFIER-EVENT-UPDATE:CAPS"></a>TRACKER_NOTIFIER_EVENT_UPDATE</p></td>
<td class="enum_member_description">
<p>An element was updated.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="TrackerNotifierEvent"></a><h3>TrackerNotifierEvent</h3>
<pre class="programlisting">typedef struct _TrackerNotifierEvent TrackerNotifierEvent;</pre>
</div>
</div>
<div class="refsect1">
<a name="TrackerNotifier.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="TrackerNotifier--classes"></a><h3>The <code class="literal">“classes”</code> property</h3>
<pre class="programlisting"> “classes” <a href="../glib/glib-String-Utility-Functions.html#GStrv"><span class="type">GStrv</span></a></pre>
<p>RDF classes to listen notifications about.</p>
<p>Flags: Read / Write / Construct Only</p>
</div>
<hr>
<div class="refsect2">
<a name="TrackerNotifier--flags"></a><h3>The <code class="literal">“flags”</code> property</h3>
<pre class="programlisting"> “flags” <a class="link" href="TrackerNotifier.html#TrackerNotifierFlags" title="enum TrackerNotifierFlags"><span class="type">TrackerNotifierFlags</span></a></pre>
<p>Flags affecting <a class="link" href="TrackerNotifier.html" title="TrackerNotifier"><span class="type">TrackerNotifier</span></a> behavior.</p>
<p>Flags: Read / Write / Construct Only</p>
</div>
</div>
<div class="refsect1">
<a name="TrackerNotifier.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="TrackerNotifier-events"></a><h3>The <code class="literal">“events”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="TrackerNotifier.html" title="TrackerNotifier"><span class="type">TrackerNotifier</span></a> *self,
<a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *events,
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
<p>Notifies of changes in the Tracker database.</p>
<div class="refsect3">
<a name="TrackerNotifier-events.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>self</p></td>
<td class="parameter_description"><p>The <a class="link" href="TrackerNotifier.html" title="TrackerNotifier"><span class="type">TrackerNotifier</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>events</p></td>
<td class="parameter_description"><p>A <a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="TrackerNotifier.html#TrackerNotifierEvent" title="TrackerNotifierEvent"><span class="type">TrackerNotifierEvent</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> TrackerNotifierEvent]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.27</div>
</body>
</html>
|