/usr/share/gtk-doc/html/zeitgeist-1.0/ZeitgeistEvent.html is in libzeitgeist-doc 0.3.18-1ubuntu2.
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 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ZeitgeistEvent</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="API Documentation for the Zeitgeist Client Library">
<link rel="up" href="ch01.html" title="Classes">
<link rel="prev" href="ch01.html" title="Classes">
<link rel="next" href="ZeitgeistLog.html" title="ZeitgeistLog">
<meta name="generator" content="GTK-Doc V1.19 (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="2">
<tr valign="middle">
<td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">API Documentation for the Zeitgeist Client Library</th>
<td><a accesskey="n" href="ZeitgeistLog.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#ZeitgeistEvent.synopsis" class="shortcut">Top</a>
|
<a href="#ZeitgeistEvent.description" class="shortcut">Description</a>
|
<a href="#ZeitgeistEvent.object-hierarchy" class="shortcut">Object Hierarchy</a>
</td></tr>
</table>
<div class="refentry">
<a name="ZeitgeistEvent"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="ZeitgeistEvent.top_of_page"></a>ZeitgeistEvent</span></h2>
<p>ZeitgeistEvent — <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> objects abstract events returned from Zeitgeist queries</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="ZeitgeistEvent.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <zeitgeist.h>
<a class="link" href="ZeitgeistEvent.html#ZeitgeistEvent-struct" title="ZeitgeistEvent">ZeitgeistEvent</a>;
struct <a class="link" href="ZeitgeistEvent.html#ZeitgeistEventClass" title="struct ZeitgeistEventClass">ZeitgeistEventClass</a>;
<span class="returnvalue">void</span> <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-add-subject" title="zeitgeist_event_add_subject ()">zeitgeist_event_add_subject</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code><a class="link" href="ZeitgeistSubject.html" title="ZeitgeistSubject"><span class="type">ZeitgeistSubject</span></a> *subject</code></em>);
const <span class="returnvalue">gchar</span> * <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-get-actor" title="zeitgeist_event_get_actor ()">zeitgeist_event_get_actor</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);
<span class="returnvalue">guint32</span> <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-get-id" title="zeitgeist_event_get_id ()">zeitgeist_event_get_id</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);
const <span class="returnvalue">gchar</span> * <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-get-interpretation" title="zeitgeist_event_get_interpretation ()">zeitgeist_event_get_interpretation</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);
const <span class="returnvalue">gchar</span> * <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-get-manifestation" title="zeitgeist_event_get_manifestation ()">zeitgeist_event_get_manifestation</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);
const <span class="returnvalue">gchar</span> * <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-get-origin" title="zeitgeist_event_get_origin ()">zeitgeist_event_get_origin</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);
<span class="returnvalue">GByteArray</span> * <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-get-payload" title="zeitgeist_event_get_payload ()">zeitgeist_event_get_payload</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);
<a class="link" href="ZeitgeistSubject.html" title="ZeitgeistSubject"><span class="returnvalue">ZeitgeistSubject</span></a> * <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-get-subject" title="zeitgeist_event_get_subject ()">zeitgeist_event_get_subject</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code><span class="type">gint</span> index</code></em>);
<span class="returnvalue">gint64</span> <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-get-timestamp" title="zeitgeist_event_get_timestamp ()">zeitgeist_event_get_timestamp</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);
<a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="returnvalue">ZeitgeistEvent</span></a> * <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-new" title="zeitgeist_event_new ()">zeitgeist_event_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="returnvalue">ZeitgeistEvent</span></a> * <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-new-from-variant" title="zeitgeist_event_new_from_variant ()">zeitgeist_event_new_from_variant</a> (<em class="parameter"><code><span class="type">GVariant</span> *event</code></em>);
<a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="returnvalue">ZeitgeistEvent</span></a> * <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-new-full" title="zeitgeist_event_new_full ()">zeitgeist_event_new_full</a> (<em class="parameter"><code>const <span class="type">gchar</span> *interpretation</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *manifestation</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *actor</code></em>,
<em class="parameter"><code>...</code></em>);
<a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="returnvalue">ZeitgeistEvent</span></a> * <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-new-full-valist" title="zeitgeist_event_new_full_valist ()">zeitgeist_event_new_full_valist</a> (<em class="parameter"><code>const <span class="type">gchar</span> *interpretation</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *manifestation</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *actor</code></em>,
<em class="parameter"><code><span class="type">va_list</span> args</code></em>);
<span class="returnvalue">gint</span> <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-num-subjects" title="zeitgeist_event_num_subjects ()">zeitgeist_event_num_subjects</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);
<span class="returnvalue">void</span> <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-set-actor" title="zeitgeist_event_set_actor ()">zeitgeist_event_set_actor</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *actor</code></em>);
<span class="returnvalue">void</span> <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-set-actor-from-app-info" title="zeitgeist_event_set_actor_from_app_info ()">zeitgeist_event_set_actor_from_app_info</a>
(<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code><span class="type">GAppInfo</span> *appinfo</code></em>);
<span class="returnvalue">void</span> <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-set-id" title="zeitgeist_event_set_id ()">zeitgeist_event_set_id</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code><span class="type">guint32</span> id</code></em>);
<span class="returnvalue">void</span> <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-set-interpretation" title="zeitgeist_event_set_interpretation ()">zeitgeist_event_set_interpretation</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *interpretation</code></em>);
<span class="returnvalue">void</span> <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-set-manifestation" title="zeitgeist_event_set_manifestation ()">zeitgeist_event_set_manifestation</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *manifestation</code></em>);
<span class="returnvalue">void</span> <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-set-origin" title="zeitgeist_event_set_origin ()">zeitgeist_event_set_origin</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *origin</code></em>);
<span class="returnvalue">void</span> <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-set-payload" title="zeitgeist_event_set_payload ()">zeitgeist_event_set_payload</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code><span class="type">GByteArray</span> *payload</code></em>);
<span class="returnvalue">void</span> <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-set-timestamp" title="zeitgeist_event_set_timestamp ()">zeitgeist_event_set_timestamp</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code><span class="type">gint64</span> timestamp</code></em>);
<span class="returnvalue">GVariant</span> * <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-to-variant" title="zeitgeist_event_to_variant ()">zeitgeist_event_to_variant</a> (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);
<span class="returnvalue">GPtrArray</span> * <a class="link" href="ZeitgeistEvent.html#zeitgeist-events-from-valist" title="zeitgeist_events_from_valist ()">zeitgeist_events_from_valist</a> (<em class="parameter"><code><span class="type">va_list</span> events</code></em>);
<span class="returnvalue">GPtrArray</span> * <a class="link" href="ZeitgeistEvent.html#zeitgeist-events-from-variant" title="zeitgeist_events_from_variant ()">zeitgeist_events_from_variant</a> (<em class="parameter"><code><span class="type">GVariant</span> *events</code></em>);
<span class="returnvalue">GVariant</span> * <a class="link" href="ZeitgeistEvent.html#zeitgeist-events-to-variant" title="zeitgeist_events_to_variant ()">zeitgeist_events_to_variant</a> (<em class="parameter"><code><span class="type">GPtrArray</span> *events</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="ZeitgeistEvent.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
GObject
+----GInitiallyUnowned
+----ZeitgeistEvent
</pre>
</div>
<div class="refsect1">
<a name="ZeitgeistEvent.description"></a><h2>Description</h2>
<p>
The <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> class is one of the primary elements for communicating
with the Zeitgeist daemon. <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a>s serve two purposes.
Unsurprisingly they represent events that have happened, but they also
can act as <span class="emphasis"><em>templates</em></span>. See also <a class="link" href="ZeitgeistSubject.html" title="ZeitgeistSubject"><span class="type">ZeitgeistSubject</span></a>.
</p>
<p>
An event in the Zeitgeist world is characterized by two main properties.
"What happened" also called the <span class="emphasis"><em>interpretation</em></span>,
and "How did it happen" also called the
<span class="emphasis"><em>manifestation</em></span>. Besides these properties and event
also has an <span class="emphasis"><em>actor</em></span> which identifies the party responsible
for triggering the event which in most cases will be an application.
Lastly there is an event <span class="emphasis"><em>timestamp</em></span> and
<span class="emphasis"><em>event id</em></span>. The timestamp is calculated as the number
of milliseconds since the Unix epoch and the event id is a serial number
assigned to the event by the Zeitgeist engine when it's logged. These
five properties are collectively known as the
<span class="emphasis"><em>event metadata</em></span>.
</p>
<p>
An event must also describe what it happened to. This is called the event
<span class="emphasis"><em>subjects</em></span>. Most events have one subject, but they are
allowed to have zero or many too. The metadata of the subjects are
recorded at the time of logging, and are encapsulated by the
<a class="link" href="ZeitgeistSubject.html" title="ZeitgeistSubject"><span class="type">ZeitgeistSubject</span></a> class. It's important to understand that it's just the
subject metadata at the time of logging, not necessarily the subject metadata
as it exists right now.
</p>
<p>
In addition to the listed properties events may also carry a free form binary
<span class="emphasis"><em>payload</em></span>. The usage of this is is application specific
and is generally useless unless you have some contextual information to
figure out what's in it.
</p>
<p>
A large part of the Zeitgeist query and monitoring API revolves around a
concept of template matching. A query is simply a list of event templates
that you want to look for in the log.
An unset property on an event template indicates that anything is allowed
in that field. If the property is set it indicates that the property
must be an exact match.
</p>
</div>
<div class="refsect1">
<a name="ZeitgeistEvent.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="ZeitgeistEvent-struct"></a><h3>ZeitgeistEvent</h3>
<pre class="programlisting">typedef struct _ZeitgeistEvent ZeitgeistEvent;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="ZeitgeistEventClass"></a><h3>struct ZeitgeistEventClass</h3>
<pre class="programlisting">struct ZeitgeistEventClass {
GInitiallyUnownedClass parent_class;
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-add-subject"></a><h3>zeitgeist_event_add_subject ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> zeitgeist_event_add_subject (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code><a class="link" href="ZeitgeistSubject.html" title="ZeitgeistSubject"><span class="type">ZeitgeistSubject</span></a> *subject</code></em>);</pre>
<p>
Append a <a class="link" href="ZeitgeistSubject.html" title="ZeitgeistSubject"><span class="type">ZeitgeistSubject</span></a> to the list of subjects for <em class="parameter"><code>event</code></em>. The
event will consume the floating reference on <em class="parameter"><code>subject</code></em> when you call this
method.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event to add a subject to</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>subject</code></em> :</span></p></td>
<td>The subject to add</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-get-actor"></a><h3>zeitgeist_event_get_actor ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> * zeitgeist_event_get_actor (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);</pre>
<p>
Get the event actor. The actor represents the party responsible for
triggering the event. When the actor is an application
(which it almost always is) the actor is encoded in the
<span class="emphasis"><em>application://</em></span> URI scheme with the base name of the .desktop
file for the application appended. Eg. <span class="emphasis"><em>application://firefox.desktop</em></span>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event to set the actor for</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A URI designating the actor of the event</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-get-id"></a><h3>zeitgeist_event_get_id ()</h3>
<pre class="programlisting"><span class="returnvalue">guint32</span> zeitgeist_event_get_id (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);</pre>
<p>
Get the event id as assigned by the Zeitgeist engine.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event to get the event id for</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The event id or 0 if it's unset. An event retrieved from the
Zeitgeist engine will always have an event id.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-get-interpretation"></a><h3>zeitgeist_event_get_interpretation ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> * zeitgeist_event_get_interpretation (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);</pre>
<p>
The event interpretation represents "what happened". It is encoded
as URI defined by the Zeitgeist Event Ontology.
Examples could be "something was opened" or
"something was modified".
</p>
<p>
FIXME: Needs link to ontology and some defines to help coding
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event to get the interpretation of</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The event interpretation as a URI or <code class="literal">NULL</code> if unset</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-get-manifestation"></a><h3>zeitgeist_event_get_manifestation ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> * zeitgeist_event_get_manifestation (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);</pre>
<p>
The event manifestation represents "how did it happen".
It is encoded as URI defined by the Zeitgeist Event Ontology. Examples
could be "the user did it" or
"the system send a notification".
</p>
<p>
FIXME: Needs link to ontology and some defines to help coding
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event to get the manifestation of</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The event interpretation as a URI or <code class="literal">NULL</code> if unset</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-get-origin"></a><h3>zeitgeist_event_get_origin ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> * zeitgeist_event_get_origin (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);</pre>
<p>
Get the origin of an event.
This differs from a subject's origin, as it describes where the event comes
from, not where it resides.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event to get the origin from</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The origin of <em class="parameter"><code>event</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.3.14</p>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-get-payload"></a><h3>zeitgeist_event_get_payload ()</h3>
<pre class="programlisting"><span class="returnvalue">GByteArray</span> * zeitgeist_event_get_payload (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);</pre>
<p>
Look up the free form binary payload of <em class="parameter"><code>event</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event to get the payload for</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The event payload or <code class="literal">NULL</code> if unset. Do not free. If you want to
keep the subject around you need to <code class="function">g_byte_array_ref()</code> it.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-get-subject"></a><h3>zeitgeist_event_get_subject ()</h3>
<pre class="programlisting"><a class="link" href="ZeitgeistSubject.html" title="ZeitgeistSubject"><span class="returnvalue">ZeitgeistSubject</span></a> * zeitgeist_event_get_subject (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code><span class="type">gint</span> index</code></em>);</pre>
<p>
Get the n'th subject of this event. You can find the number of subjects
by calling <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-num-subjects" title="zeitgeist_event_num_subjects ()"><code class="function">zeitgeist_event_num_subjects()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event to get a subject for</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>index</code></em> :</span></p></td>
<td>The 0-based offset of the subject</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The subject at position <em class="parameter"><code>index</code></em>. Do not free. If you want to
keep the subject around you need to <code class="function">g_object_ref()</code> it.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-get-timestamp"></a><h3>zeitgeist_event_get_timestamp ()</h3>
<pre class="programlisting"><span class="returnvalue">gint64</span> zeitgeist_event_get_timestamp (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);</pre>
<p>
Get the event timestamp. The timestamp is in milliseconds since the
Unix epoch. There are a few helpers available for converting to and
from other time representations such a <span class="type">GTimeVal</span>. See for example
<a class="link" href="zeitgeist-1.0-Timestamp-handling.html#zeitgeist-timestamp-to-timeval" title="zeitgeist_timestamp_to_timeval ()"><code class="function">zeitgeist_timestamp_to_timeval()</code></a> and <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#zeitgeist-timestamp-from-timeval" title="zeitgeist_timestamp_from_timeval ()"><code class="function">zeitgeist_timestamp_from_timeval()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event to get the timestamp for</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The event timestamp. Note that 0 is ambiguous as it denotes both
an unset timestamp and the time of the Unix Epoch.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-new"></a><h3>zeitgeist_event_new ()</h3>
<pre class="programlisting"><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="returnvalue">ZeitgeistEvent</span></a> * zeitgeist_event_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Create a new empty event structure
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly create <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> instance. The returned event will
have a floating reference which will be consumed if you pass the
event to any of the methods provided by this library. If you
do not do that then you must free the event youself with
<code class="function">g_object_unref()</code>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-new-from-variant"></a><h3>zeitgeist_event_new_from_variant ()</h3>
<pre class="programlisting"><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="returnvalue">ZeitgeistEvent</span></a> * zeitgeist_event_new_from_variant (<em class="parameter"><code><span class="type">GVariant</span> *event</code></em>);</pre>
<p>
Parse the data in a <span class="type">GVariant</span> and build a <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> from it.
The reverse operation of this is <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-to-variant" title="zeitgeist_event_to_variant ()"><code class="function">zeitgeist_event_to_variant()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>A <span class="type">GVariant</span> with signature defined in
<span class="type">ZEITGEIST_EVENT_VARIANT_SIGNATURE</span>. If <em class="parameter"><code>event</code></em> is a floating
reference the floating reference will be consumed.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocated <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> filled with the metadata,
subjects, and payload described by <em class="parameter"><code>event</code></em>. The returned event will
have a floating reference which will be consumed if you pass the
event to any of the methods provided by this library. If you
do not do that then you must free the event yourself with
<code class="function">g_object_unref()</code>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-new-full"></a><h3>zeitgeist_event_new_full ()</h3>
<pre class="programlisting"><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="returnvalue">ZeitgeistEvent</span></a> * zeitgeist_event_new_full (<em class="parameter"><code>const <span class="type">gchar</span> *interpretation</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *manifestation</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *actor</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>
Create a new event structure with predefined data
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>interpretation</code></em> :</span></p></td>
<td>The interpretation type of the event.
See <a class="link" href="zeitgeist-1.0-Interpretation-Ontology.html#ZEITGEIST-ZG-EVENT-INTERPRETATION:CAPS" title="ZEITGEIST_ZG_EVENT_INTERPRETATION"><span class="type">ZEITGEIST_ZG_EVENT_INTERPRETATION</span></a> for a list of
event interpretation types</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>manifestation</code></em> :</span></p></td>
<td>The manifestation type of the event.
See <a class="link" href="zeitgeist-1.0-Manifestation-Ontology.html#ZEITGEIST-ZG-EVENT-MANIFESTATION:CAPS" title="ZEITGEIST_ZG_EVENT_MANIFESTATION"><span class="type">ZEITGEIST_ZG_EVENT_MANIFESTATION</span></a> for a list of
event manifestation types</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>actor</code></em> :</span></p></td>
<td>The actor triggering the event. See <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-set-actor" title="zeitgeist_event_set_actor ()"><code class="function">zeitgeist_event_set_actor()</code></a>
for details on how to encode this.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly create <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> instance. The returned event will
have a floating reference which will be consumed if you pass the
event to any of the methods provided by this library. If you
do not do that then you must free the event yourself with
<code class="function">g_object_unref()</code>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-new-full-valist"></a><h3>zeitgeist_event_new_full_valist ()</h3>
<pre class="programlisting"><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="returnvalue">ZeitgeistEvent</span></a> * zeitgeist_event_new_full_valist (<em class="parameter"><code>const <span class="type">gchar</span> *interpretation</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *manifestation</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *actor</code></em>,
<em class="parameter"><code><span class="type">va_list</span> args</code></em>);</pre>
<p>
As <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-new-full" title="zeitgeist_event_new_full ()"><code class="function">zeitgeist_event_new_full()</code></a> but intended for language bindings
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>manifestation</code></em> :</span></p></td>
<td>The manifestation type of the event.
See <a class="link" href="zeitgeist-1.0-Manifestation-Ontology.html#ZEITGEIST-ZG-EVENT-MANIFESTATION:CAPS" title="ZEITGEIST_ZG_EVENT_MANIFESTATION"><span class="type">ZEITGEIST_ZG_EVENT_MANIFESTATION</span></a> for a list of
event manifestation types</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>actor</code></em> :</span></p></td>
<td>The actor triggering the event. See <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-set-actor" title="zeitgeist_event_set_actor ()"><code class="function">zeitgeist_event_set_actor()</code></a>
for details on how to encode this.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>args</code></em> :</span></p></td>
<td>A <code class="literal">va_list</code> of <a class="link" href="ZeitgeistSubject.html" title="ZeitgeistSubject"><span class="type">ZeitgeistSubject</span></a>s terminated by <code class="literal">NULL</code>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-num-subjects"></a><h3>zeitgeist_event_num_subjects ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span> zeitgeist_event_num_subjects (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);</pre>
<p>
Get the number of subjects for an event. This is a constant time operation.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event to get the number of subjects for</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The number of subjects for this event.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-set-actor"></a><h3>zeitgeist_event_set_actor ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> zeitgeist_event_set_actor (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *actor</code></em>);</pre>
<p>
Get the event actor. The actor represents the party responsible for
triggering the event. When the actor is an application
(which it almost always is) the actor is encoded in the
<span class="emphasis"><em>application://</em></span> URI scheme with the base name of the .desktop
file for the application appended. Eg. <span class="emphasis"><em>application://firefox.desktop</em></span>
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event to set the actor for</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>actor</code></em> :</span></p></td>
<td>URI designating the actor triggering the event.
Fx. <span class="emphasis"><em>application://firefox.desktop</em></span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-set-actor-from-app-info"></a><h3>zeitgeist_event_set_actor_from_app_info ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> zeitgeist_event_set_actor_from_app_info
(<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code><span class="type">GAppInfo</span> *appinfo</code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-set-id"></a><h3>zeitgeist_event_set_id ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> zeitgeist_event_set_id (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code><span class="type">guint32</span> id</code></em>);</pre>
<p>
Set the event id of an event. Note that it is an error to send an event
with a pre set event id to <a class="link" href="ZeitgeistLog.html#zeitgeist-log-insert-events" title="zeitgeist_log_insert_events ()"><code class="function">zeitgeist_log_insert_events()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event to get the event id for</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-set-interpretation"></a><h3>zeitgeist_event_set_interpretation ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> zeitgeist_event_set_interpretation (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *interpretation</code></em>);</pre>
<p>
The event interpretation represents "what happened". It is encoded
as URI defined by the Zeitgeist Event Ontology.
</p>
<p>
FIXME: Needs link to ontology and some defines to help coding
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event to set the interpretation of</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interpretation</code></em> :</span></p></td>
<td>URI designating the interpretation type of the event</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-set-manifestation"></a><h3>zeitgeist_event_set_manifestation ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> zeitgeist_event_set_manifestation (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *manifestation</code></em>);</pre>
<p>
The event manifestation represents "how did it happen".
It is encoded as URI defined by the Zeitgeist Event Ontology.
</p>
<p>
FIXME: Needs link to ontology and some defines to help coding
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event to set the manifestation of</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-set-origin"></a><h3>zeitgeist_event_set_origin ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> zeitgeist_event_set_origin (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *origin</code></em>);</pre>
<p>
Set the origin of an event.
This differs from a subject's origin, as it describes where the event comes
from, not where it resides.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event to set the origin of</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>origin</code></em> :</span></p></td>
<td>The origin to set</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 0.3.14</p>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-set-payload"></a><h3>zeitgeist_event_set_payload ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> zeitgeist_event_set_payload (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code><span class="type">GByteArray</span> *payload</code></em>);</pre>
<p>
Attach a a free form binary payload to <em class="parameter"><code>event</code></em>. Payloads are application
specific and can not be assumed to have any particular format unless
you have other contextual information about the event.
</p>
<p>
The event will assume ownership of <em class="parameter"><code>payload</code></em>. You should never call
<code class="function">g_byte_array_free()</code> on <em class="parameter"><code>payload</code></em> and only call <code class="function">g_byte_array_unref()</code> on it if
you have added an extra reference to it.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>Event to add the payload to</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>payload</code></em> :</span></p></td>
<td>The payload to add to <em class="parameter"><code>event</code></em>. <span class="annotation">[transfer-full]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-set-timestamp"></a><h3>zeitgeist_event_set_timestamp ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> zeitgeist_event_set_timestamp (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>,
<em class="parameter"><code><span class="type">gint64</span> timestamp</code></em>);</pre>
<p>
Set the event timestamp. The timestamp is in milliseconds since the
Unix epoch. There are a few helpers available for converting to and
from other time representations such a <span class="type">GTimeVal</span>. See for example
<a class="link" href="zeitgeist-1.0-Timestamp-handling.html#zeitgeist-timestamp-to-timeval" title="zeitgeist_timestamp_to_timeval ()"><code class="function">zeitgeist_timestamp_to_timeval()</code></a> and <a class="link" href="zeitgeist-1.0-Timestamp-handling.html#zeitgeist-timestamp-from-timeval" title="zeitgeist_timestamp_from_timeval ()"><code class="function">zeitgeist_timestamp_from_timeval()</code></a>.
</p>
<p>
Note that the if you insert events into the Zeitgeist log without a
timestamp set the Zeiteist daemon will automatically assign the timestamp
of the logging time to the event.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The event to set the timestamp for</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-event-to-variant"></a><h3>zeitgeist_event_to_variant ()</h3>
<pre class="programlisting"><span class="returnvalue">GVariant</span> * zeitgeist_event_to_variant (<em class="parameter"><code><a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> *event</code></em>);</pre>
<p>
Serialize a <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> to a <span class="type">GVariant</span>. The reverse operation
is <a class="link" href="ZeitgeistEvent.html#zeitgeist-event-new-from-variant" title="zeitgeist_event_new_from_variant ()"><code class="function">zeitgeist_event_new_from_variant()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>The <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> to serialize to a <span class="type">GVariant</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A floating reference to a <span class="type">GVariant</span> with signature
<span class="type">ZEITGEIST_EVENT_VARIANT_SIGNATURE</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-events-from-valist"></a><h3>zeitgeist_events_from_valist ()</h3>
<pre class="programlisting"><span class="returnvalue">GPtrArray</span> * zeitgeist_events_from_valist (<em class="parameter"><code><span class="type">va_list</span> events</code></em>);</pre>
<p>
Utility function to convert a <span class="type">va_list</span> of <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a> into a
<span class="type">GPtrArray</span> containing these events.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>events</code></em> :</span></p></td>
<td>a <span class="type">va_list</span> of <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a>s.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <span class="type">GPtrArray</span> of <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a>s. The events are not further
reffed and will still be floating if they where so when you called
this method. The pointer array will have its <em class="parameter"><code>free_func</code></em> set to
<code class="function">g_object_unref()</code>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-events-from-variant"></a><h3>zeitgeist_events_from_variant ()</h3>
<pre class="programlisting"><span class="returnvalue">GPtrArray</span> * zeitgeist_events_from_variant (<em class="parameter"><code><span class="type">GVariant</span> *events</code></em>);</pre>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>events</code></em> :</span></p></td>
<td>A <span class="type">GVariant</span> with signature as an array of
<span class="type">ZEITGEIST_EVENT_VARIANT_SIGNATURE</span>. If <em class="parameter"><code>event</code></em> is floating this
method will consume the floating reference.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A reference to a <span class="type">GPtrArray</span> of <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a>s.
All the events will be floating references, and the
<span class="type">GPtrArray</span>'s <em class="parameter"><code>free_func</code></em> will be set to <code class="function">g_object_unref()</code>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="zeitgeist-events-to-variant"></a><h3>zeitgeist_events_to_variant ()</h3>
<pre class="programlisting"><span class="returnvalue">GVariant</span> * zeitgeist_events_to_variant (<em class="parameter"><code><span class="type">GPtrArray</span> *events</code></em>);</pre>
<p>
Convert a set of <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a><-- -->s to a <span class="type">GVariant</span> with signature
as an array of <span class="type">ZEITGEIST_EVENT_VARIANT_SIGNATURE</span>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>events</code></em> :</span></p></td>
<td>A <span class="type">GPtrArray</span> of <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a>s. If the events has
floating references they will be consumed. Furthermore the
reference on the <span class="type">GPtrArray</span> itself will also be stolen and its
<em class="parameter"><code>free_func</code></em> set to <code class="literal">NULL</code>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A floating reference to a <span class="type">GVariant</span> as described above. Unless the
floating reference is consumed somewhere you must free it with
<code class="function">g_variant_unref()</code>.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.19</div>
</body>
</html>
|