1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>ZeitgeistMonitor</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7
<link rel="home" href="index.html" title="API Documentation for the Zeitgeist Client Library">
8
<link rel="up" href="ch01.html" title="Classes">
9
<link rel="prev" href="ZeitgeistLog.html" title="ZeitgeistLog">
10
<link rel="next" href="ZeitgeistResultSet.html" title="ZeitgeistResultSet">
11
<meta name="generator" content="GTK-Doc V1.16 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17
<td><a accesskey="p" href="ZeitgeistLog.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
<th width="100%" align="center">API Documentation for the Zeitgeist Client Library</th>
21
<td><a accesskey="n" href="ZeitgeistResultSet.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#ZeitgeistMonitor.synopsis" class="shortcut">Top</a>
26
<a href="#ZeitgeistMonitor.description" class="shortcut">Description</a>
28
<a href="#ZeitgeistMonitor.object-hierarchy" class="shortcut">Object Hierarchy</a>
30
<a href="#ZeitgeistMonitor.properties" class="shortcut">Properties</a>
32
<a href="#ZeitgeistMonitor.signals" class="shortcut">Signals</a>
35
<div class="refentry">
36
<a name="ZeitgeistMonitor"></a><div class="titlepage"></div>
37
<div class="refnamediv"><table width="100%"><tr>
39
<h2><span class="refentrytitle"><a name="ZeitgeistMonitor.top_of_page"></a>ZeitgeistMonitor</span></h2>
40
<p>ZeitgeistMonitor — Listens for updates to the Zeitgeist event log</p>
42
<td valign="top" align="right"></td>
44
<div class="refsynopsisdiv">
45
<a name="ZeitgeistMonitor.synopsis"></a><h2>Synopsis</h2>
46
<pre class="synopsis">
47
#include <zeitgeist.h>
49
<a class="link" href="ZeitgeistMonitor.html#ZeitgeistMonitor-struct" title="ZeitgeistMonitor">ZeitgeistMonitor</a>;
50
struct <a class="link" href="ZeitgeistMonitor.html#ZeitgeistMonitorClass" title="struct ZeitgeistMonitorClass">ZeitgeistMonitorClass</a>;
51
<a class="link" href="ZeitgeistMonitor.html" title="ZeitgeistMonitor"><span class="returnvalue">ZeitgeistMonitor</span></a> * <a class="link" href="ZeitgeistMonitor.html#zeitgeist-monitor-new" title="zeitgeist_monitor_new ()">zeitgeist_monitor_new</a> (<em class="parameter"><code><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> *time_range</code></em>,
52
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *event_templates</code></em>);
53
<a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="returnvalue">ZeitgeistTimeRange</span></a> * <a class="link" href="ZeitgeistMonitor.html#zeitgeist-monitor-get-time-range" title="zeitgeist_monitor_get_time_range ()">zeitgeist_monitor_get_time_range</a> (<em class="parameter"><code><a class="link" href="ZeitgeistMonitor.html" title="ZeitgeistMonitor"><span class="type">ZeitgeistMonitor</span></a> *self</code></em>);
54
<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * <a class="link" href="ZeitgeistMonitor.html#zeitgeist-monitor-get-templates" title="zeitgeist_monitor_get_templates ()">zeitgeist_monitor_get_templates</a> (<em class="parameter"><code><a class="link" href="ZeitgeistMonitor.html" title="ZeitgeistMonitor"><span class="type">ZeitgeistMonitor</span></a> *self</code></em>);
55
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="ZeitgeistMonitor.html#zeitgeist-monitor-get-path" title="zeitgeist_monitor_get_path ()">zeitgeist_monitor_get_path</a> (<em class="parameter"><code><a class="link" href="ZeitgeistMonitor.html" title="ZeitgeistMonitor"><span class="type">ZeitgeistMonitor</span></a> *self</code></em>);
58
<div class="refsect1">
59
<a name="ZeitgeistMonitor.object-hierarchy"></a><h2>Object Hierarchy</h2>
60
<pre class="synopsis">
61
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
65
<div class="refsect1">
66
<a name="ZeitgeistMonitor.properties"></a><h2>Properties</h2>
67
<pre class="synopsis">
68
"<a class="link" href="ZeitgeistMonitor.html#ZeitgeistMonitor--event-templates" title='The "event-templates" property'>event-templates</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a>* : Read / Write / Construct Only
69
"<a class="link" href="ZeitgeistMonitor.html#ZeitgeistMonitor--time-range" title='The "time-range" property'>time-range</a>" <a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a>* : Read / Write / Construct Only
72
<div class="refsect1">
73
<a name="ZeitgeistMonitor.signals"></a><h2>Signals</h2>
74
<pre class="synopsis">
75
"<a class="link" href="ZeitgeistMonitor.html#ZeitgeistMonitor-events-deleted" title='The "events-deleted" signal'>events-deleted</a>" : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
76
"<a class="link" href="ZeitgeistMonitor.html#ZeitgeistMonitor-events-inserted" title='The "events-inserted" signal'>events-inserted</a>" : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
79
<div class="refsect1">
80
<a name="ZeitgeistMonitor.description"></a><h2>Description</h2>
82
A <a class="link" href="ZeitgeistMonitor.html" title="ZeitgeistMonitor"><span class="type">ZeitgeistMonitor</span></a> listens for updates to the Zeitgeist event log
83
matching a given set of templates and with timestamps in some predefined
87
A monitor must be installed into the running Zeitgeist daemon by calling
88
<a class="link" href="ZeitgeistLog.html#zeitgeist-log-install-monitor" title="zeitgeist_log_install_monitor ()"><code class="function">zeitgeist_log_install_monitor()</code></a>. The monitor will not emit any of the
89
::events-added or ::events-deleted signals before this.
92
<div class="refsect1">
93
<a name="ZeitgeistMonitor.details"></a><h2>Details</h2>
94
<div class="refsect2">
95
<a name="ZeitgeistMonitor-struct"></a><h3>ZeitgeistMonitor</h3>
96
<pre class="programlisting">typedef struct _ZeitgeistMonitor ZeitgeistMonitor;</pre>
101
<div class="refsect2">
102
<a name="ZeitgeistMonitorClass"></a><h3>struct ZeitgeistMonitorClass</h3>
103
<pre class="programlisting">struct ZeitgeistMonitorClass {
104
GObjectClass parent_class;
106
/*< signals >*/
107
void (*events_inserted) (ZeitgeistMonitor *self,
108
ZeitgeistTimeRange *time_range,
111
void (*events_deleted) (ZeitgeistMonitor *self,
112
ZeitgeistTimeRange *time_range,
120
<div class="refsect2">
121
<a name="zeitgeist-monitor-new"></a><h3>zeitgeist_monitor_new ()</h3>
122
<pre class="programlisting"><a class="link" href="ZeitgeistMonitor.html" title="ZeitgeistMonitor"><span class="returnvalue">ZeitgeistMonitor</span></a> * zeitgeist_monitor_new (<em class="parameter"><code><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> *time_range</code></em>,
123
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> *event_templates</code></em>);</pre>
125
Create a new monitor. Before you can receive signals from the monitor you
126
need to install it in the running Zeitgeist daemon by calling
127
<a class="link" href="ZeitgeistLog.html#zeitgeist-log-install-monitor" title="zeitgeist_log_install_monitor ()"><code class="function">zeitgeist_log_install_monitor()</code></a>.
129
<div class="variablelist"><table border="0">
130
<col align="left" valign="top">
133
<td><p><span class="term"><em class="parameter"><code>time_range</code></em> :</span></p></td>
134
<td>The monitor will only listen for events with timestamps within
135
this time range. Note that it is legal for applications to insert
136
events that are "in the past".</td>
139
<td><p><span class="term"><em class="parameter"><code>event_templates</code></em> :</span></p></td>
140
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a>s. Only listen for
141
events that match any of these templates.
142
The monitor will assume ownership of the events and
144
If you want to keep a reference for yourself you must do a
145
<a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#g-ptr-array-ref"><code class="function">g_ptr_array_ref()</code></a> on <em class="parameter"><code>event_templates</code></em> as well as reffing
146
the events held by it before calling this method.</td>
149
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
150
<td>A reference to a newly allocated monitor.</td>
156
<div class="refsect2">
157
<a name="zeitgeist-monitor-get-time-range"></a><h3>zeitgeist_monitor_get_time_range ()</h3>
158
<pre class="programlisting"><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="returnvalue">ZeitgeistTimeRange</span></a> * zeitgeist_monitor_get_time_range (<em class="parameter"><code><a class="link" href="ZeitgeistMonitor.html" title="ZeitgeistMonitor"><span class="type">ZeitgeistMonitor</span></a> *self</code></em>);</pre>
163
<div class="refsect2">
164
<a name="zeitgeist-monitor-get-templates"></a><h3>zeitgeist_monitor_get_templates ()</h3>
165
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> * zeitgeist_monitor_get_templates (<em class="parameter"><code><a class="link" href="ZeitgeistMonitor.html" title="ZeitgeistMonitor"><span class="type">ZeitgeistMonitor</span></a> *self</code></em>);</pre>
170
<div class="refsect2">
171
<a name="zeitgeist-monitor-get-path"></a><h3>zeitgeist_monitor_get_path ()</h3>
172
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * zeitgeist_monitor_get_path (<em class="parameter"><code><a class="link" href="ZeitgeistMonitor.html" title="ZeitgeistMonitor"><span class="type">ZeitgeistMonitor</span></a> *self</code></em>);</pre>
177
<div class="refsect1">
178
<a name="ZeitgeistMonitor.property-details"></a><h2>Property Details</h2>
179
<div class="refsect2">
180
<a name="ZeitgeistMonitor--event-templates"></a><h3>The <code class="literal">"event-templates"</code> property</h3>
181
<pre class="programlisting"> "event-templates" <a href="http://library.gnome.org/devel/glib/unstable/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a>* : Read / Write / Construct Only</pre>
183
Events must match at least one these templates in order to trigger the
188
<div class="refsect2">
189
<a name="ZeitgeistMonitor--time-range"></a><h3>The <code class="literal">"time-range"</code> property</h3>
190
<pre class="programlisting"> "time-range" <a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a>* : Read / Write / Construct Only</pre>
192
Events must have timestamps within this timerange in order to trigger
197
<div class="refsect1">
198
<a name="ZeitgeistMonitor.signal-details"></a><h2>Signal Details</h2>
199
<div class="refsect2">
200
<a name="ZeitgeistMonitor-events-deleted"></a><h3>The <code class="literal">"events-deleted"</code> signal</h3>
201
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="ZeitgeistMonitor.html" title="ZeitgeistMonitor"><span class="type">ZeitgeistMonitor</span></a> *time_range,
202
<a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> *event_ids,
203
<a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> *arg2,
204
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
206
Emitted when events with timestamps within the time range of this monitor
207
has been deleted from the log. Note that the deleted events may not match
208
the event templates for the monitor.
210
<div class="variablelist"><table border="0">
211
<col align="left" valign="top">
214
<td><p><span class="term"><em class="parameter"><code>time_range</code></em> :</span></p></td>
215
<td>A <a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> that specifies the minimum and maximum
216
timestamps of the deleted events</td>
219
<td><p><span class="term"><em class="parameter"><code>event_ids</code></em> :</span></p></td>
220
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> of <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a>s holding the ids of the deleted
224
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
225
<td>user data set when the signal handler was connected.</td>
231
<div class="refsect2">
232
<a name="ZeitgeistMonitor-events-inserted"></a><h3>The <code class="literal">"events-inserted"</code> signal</h3>
233
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="ZeitgeistMonitor.html" title="ZeitgeistMonitor"><span class="type">ZeitgeistMonitor</span></a> *time_range,
234
<a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> *events,
235
<a class="link" href="ZeitgeistResultSet.html" title="ZeitgeistResultSet"><span class="type">ZeitgeistResultSet</span></a> *arg2,
236
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
238
Emitted when events matching the event templates and with timestamps
239
within the time range of the monitor has been inserted into the log.
241
<div class="variablelist"><table border="0">
242
<col align="left" valign="top">
245
<td><p><span class="term"><em class="parameter"><code>time_range</code></em> :</span></p></td>
246
<td>A <a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> that specifies the minimum and maximum
247
of the timestamps in <em class="parameter"><code>events</code></em>
251
<td><p><span class="term"><em class="parameter"><code>events</code></em> :</span></p></td>
252
<td>A <a class="link" href="ZeitgeistResultSet.html" title="ZeitgeistResultSet"><span class="type">ZeitgeistResultSet</span></a> holding the <a class="link" href="ZeitgeistEvent.html" title="ZeitgeistEvent"><span class="type">ZeitgeistEvent</span></a>s that
253
have been inserted into the log</td>
256
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
257
<td>user data set when the signal handler was connected.</td>
266
Generated by GTK-Doc V1.16</div>
b'\\ No newline at end of file'