42
42
<td valign="top" align="right"></td>
43
43
</tr></table></div>
44
<div class="refsynopsisdiv" title="Synopsis">
44
<div class="refsynopsisdiv">
45
45
<a name="ZeitgeistMonitor.synopsis"></a><h2>Synopsis</h2>
46
46
<pre class="synopsis">
47
47
#include <zeitgeist.h>
49
49
<a class="link" href="ZeitgeistMonitor.html#ZeitgeistMonitor-struct" title="ZeitgeistMonitor">ZeitgeistMonitor</a>;
50
<a class="link" href="ZeitgeistMonitor.html#ZeitgeistMonitorClass" title="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>,
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
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>);
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" title="Object Hierarchy">
58
<div class="refsect1">
59
59
<a name="ZeitgeistMonitor.object-hierarchy"></a><h2>Object Hierarchy</h2>
60
60
<pre class="synopsis">
61
61
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
62
62
+----ZeitgeistMonitor
65
<div class="refsect1" title="Properties">
65
<div class="refsect1">
66
66
<a name="ZeitgeistMonitor.properties"></a><h2>Properties</h2>
67
67
<pre class="synopsis">
68
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
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" title="Signals">
72
<div class="refsect1">
73
73
<a name="ZeitgeistMonitor.signals"></a><h2>Signals</h2>
74
74
<pre class="synopsis">
75
"<a class="link" href="ZeitgeistMonitor.html#ZeitgeistMonitor-events-deleted" title='The "events-deleted" signal'>events-deleted</a>" : Run Last
76
"<a class="link" href="ZeitgeistMonitor.html#ZeitgeistMonitor-events-inserted" title='The "events-inserted" signal'>events-inserted</a>" : Run Last
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" title="Description">
79
<div class="refsect1">
80
80
<a name="ZeitgeistMonitor.description"></a><h2>Description</h2>
82
82
A <a class="link" href="ZeitgeistMonitor.html" title="ZeitgeistMonitor"><span class="type">ZeitgeistMonitor</span></a> listens for updates to the Zeitgeist event log
89
89
::events-added or ::events-deleted signals before this.
92
<div class="refsect1" title="Details">
92
<div class="refsect1">
93
93
<a name="ZeitgeistMonitor.details"></a><h2>Details</h2>
94
<div class="refsect2" title="ZeitgeistMonitor">
94
<div class="refsect2">
95
95
<a name="ZeitgeistMonitor-struct"></a><h3>ZeitgeistMonitor</h3>
96
96
<pre class="programlisting">typedef struct _ZeitgeistMonitor ZeitgeistMonitor;</pre>
101
<div class="refsect2" title="ZeitgeistMonitorClass">
102
<a name="ZeitgeistMonitorClass"></a><h3>ZeitgeistMonitorClass</h3>
103
<pre class="programlisting">typedef struct {
101
<div class="refsect2">
102
<a name="ZeitgeistMonitorClass"></a><h3>struct ZeitgeistMonitorClass</h3>
103
<pre class="programlisting">struct ZeitgeistMonitorClass {
104
104
GObjectClass parent_class;
106
106
/*< signals >*/
111
111
void (*events_deleted) (ZeitgeistMonitor *self,
112
112
ZeitgeistTimeRange *time_range,
113
113
GArray *event_ids);
114
} ZeitgeistMonitorClass;
120
<div class="refsect2" title="zeitgeist_monitor_new ()">
120
<div class="refsect2">
121
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>,
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
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
125
Create a new monitor. Before you can receive signals from the monitor you
133
133
<td><p><span class="term"><em class="parameter"><code>time_range</code></em> :</span></p></td>
134
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".
135
this time range. Note that it is legal for applications to insert
136
events that are "in the past".</td>
140
139
<td><p><span class="term"><em class="parameter"><code>event_templates</code></em> :</span></p></td>
141
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
142
events that match any of these templates.
143
The monitor will assume ownership of the events and
145
If you want to keep a reference for yourself you must do a
146
<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
147
the events held by it before calling this method.
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>
151
149
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
152
<td> A reference to a newly allocated monitor.
150
<td>A reference to a newly allocated monitor.</td>
159
<div class="refsect2" title="zeitgeist_monitor_get_time_range ()">
156
<div class="refsect2">
160
157
<a name="zeitgeist-monitor-get-time-range"></a><h3>zeitgeist_monitor_get_time_range ()</h3>
161
<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>
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>
164
<div class="variablelist"><table border="0">
165
<col align="left" valign="top">
168
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
173
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
181
<div class="refsect2" title="zeitgeist_monitor_get_templates ()">
163
<div class="refsect2">
182
164
<a name="zeitgeist-monitor-get-templates"></a><h3>zeitgeist_monitor_get_templates ()</h3>
183
<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>
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>
186
<div class="variablelist"><table border="0">
187
<col align="left" valign="top">
190
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
195
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
203
<div class="refsect2" title="zeitgeist_monitor_get_path ()">
170
<div class="refsect2">
204
171
<a name="zeitgeist-monitor-get-path"></a><h3>zeitgeist_monitor_get_path ()</h3>
205
<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>
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>
208
<div class="variablelist"><table border="0">
209
<col align="left" valign="top">
212
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
217
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
225
<div class="refsect1" title="Property Details">
177
<div class="refsect1">
226
178
<a name="ZeitgeistMonitor.property-details"></a><h2>Property Details</h2>
227
<div class="refsect2" title='The "event-templates" property'>
179
<div class="refsect2">
228
180
<a name="ZeitgeistMonitor--event-templates"></a><h3>The <code class="literal">"event-templates"</code> property</h3>
229
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>
245
<div class="refsect1" title="Signal Details">
197
<div class="refsect1">
246
198
<a name="ZeitgeistMonitor.signal-details"></a><h2>Signal Details</h2>
247
<div class="refsect2" title='The "events-deleted" signal'>
199
<div class="refsect2">
248
200
<a name="ZeitgeistMonitor-events-deleted"></a><h3>The <code class="literal">"events-deleted"</code> signal</h3>
249
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,
250
202
<a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> *event_ids,
251
203
<a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> *arg2,
252
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre>
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>
254
206
Emitted when events with timestamps within the time range of this monitor
255
207
has been deleted from the log. Note that the deleted events may not match
281
<div class="refsect2" title='The "events-inserted" signal'>
231
<div class="refsect2">
282
232
<a name="ZeitgeistMonitor-events-inserted"></a><h3>The <code class="literal">"events-inserted"</code> signal</h3>
283
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,
284
234
<a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> *events,
285
235
<a class="link" href="ZeitgeistResultSet.html" title="ZeitgeistResultSet"><span class="type">ZeitgeistResultSet</span></a> *arg2,
286
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre>
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>
288
238
Emitted when events matching the event templates and with timestamps
289
239
within the time range of the monitor has been inserted into the log.
295
245
<td><p><span class="term"><em class="parameter"><code>time_range</code></em> :</span></p></td>
296
246
<td>A <a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> that specifies the minimum and maximum
297
of the timestamps in <em class="parameter"><code>events</code></em>
247
of the timestamps in <em class="parameter"><code>events</code></em>
301
251
<td><p><span class="term"><em class="parameter"><code>events</code></em> :</span></p></td>
302
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
303
have been inserted into the log
253
have been inserted into the log</td>
307
256
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>