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>ZeitgeistTimeRange</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="ZeitgeistSubject.html" title="ZeitgeistSubject">
10
<link rel="next" href="ch02.html" title="Utility Functions">
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="ZeitgeistSubject.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="ch02.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="#ZeitgeistTimeRange.synopsis" class="shortcut">Top</a>
26
<a href="#ZeitgeistTimeRange.description" class="shortcut">Description</a>
28
<a href="#ZeitgeistTimeRange.object-hierarchy" class="shortcut">Object Hierarchy</a>
31
<div class="refentry">
32
<a name="ZeitgeistTimeRange"></a><div class="titlepage"></div>
33
<div class="refnamediv"><table width="100%"><tr>
35
<h2><span class="refentrytitle"><a name="ZeitgeistTimeRange.top_of_page"></a>ZeitgeistTimeRange</span></h2>
36
<p>ZeitgeistTimeRange — Immutable representation of an interval in time, marked by a beginning and an end</p>
38
<td valign="top" align="right"></td>
40
<div class="refsynopsisdiv">
41
<a name="ZeitgeistTimeRange.synopsis"></a><h2>Synopsis</h2>
42
<pre class="synopsis">
43
#include <zeitgeist.h>
45
<a class="link" href="ZeitgeistTimeRange.html#ZeitgeistTimeRange-struct" title="ZeitgeistTimeRange">ZeitgeistTimeRange</a>;
46
struct <a class="link" href="ZeitgeistTimeRange.html#ZeitgeistTimeRangeClass" title="struct ZeitgeistTimeRangeClass">ZeitgeistTimeRangeClass</a>;
47
<a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="returnvalue">ZeitgeistTimeRange</span></a> * <a class="link" href="ZeitgeistTimeRange.html#zeitgeist-time-range-new" title="zeitgeist_time_range_new ()">zeitgeist_time_range_new</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> start_msec</code></em>,
48
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> end_msec</code></em>);
49
<a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="returnvalue">ZeitgeistTimeRange</span></a>* <a class="link" href="ZeitgeistTimeRange.html#zeitgeist-time-range-new-from-variant" title="zeitgeist_time_range_new_from_variant ()">zeitgeist_time_range_new_from_variant</a>
50
(<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *time_range</code></em>);
51
<a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="returnvalue">ZeitgeistTimeRange</span></a> * <a class="link" href="ZeitgeistTimeRange.html#zeitgeist-time-range-new-from-now" title="zeitgeist_time_range_new_from_now ()">zeitgeist_time_range_new_from_now</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
52
<a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="returnvalue">ZeitgeistTimeRange</span></a> * <a class="link" href="ZeitgeistTimeRange.html#zeitgeist-time-range-new-to-now" title="zeitgeist_time_range_new_to_now ()">zeitgeist_time_range_new_to_now</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
53
<a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="returnvalue">ZeitgeistTimeRange</span></a> * <a class="link" href="ZeitgeistTimeRange.html#zeitgeist-time-range-new-anytime" title="zeitgeist_time_range_new_anytime ()">zeitgeist_time_range_new_anytime</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
54
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> <a class="link" href="ZeitgeistTimeRange.html#zeitgeist-time-range-get-start" title="zeitgeist_time_range_get_start ()">zeitgeist_time_range_get_start</a> (<em class="parameter"><code><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> *time_range</code></em>);
55
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> <a class="link" href="ZeitgeistTimeRange.html#zeitgeist-time-range-get-end" title="zeitgeist_time_range_get_end ()">zeitgeist_time_range_get_end</a> (<em class="parameter"><code><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> *time_range</code></em>);
56
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="ZeitgeistTimeRange.html#zeitgeist-time-range-get-start-iso8601" title="zeitgeist_time_range_get_start_iso8601 ()">zeitgeist_time_range_get_start_iso8601</a>
57
(<em class="parameter"><code><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> *time_range</code></em>);
58
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="ZeitgeistTimeRange.html#zeitgeist-time-range-get-end-iso8601" title="zeitgeist_time_range_get_end_iso8601 ()">zeitgeist_time_range_get_end_iso8601</a>
59
(<em class="parameter"><code><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> *time_range</code></em>);
60
<a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * <a class="link" href="ZeitgeistTimeRange.html#zeitgeist-time-range-to-variant" title="zeitgeist_time_range_to_variant ()">zeitgeist_time_range_to_variant</a> (<em class="parameter"><code><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> *time_range</code></em>);
61
#define <a class="link" href="ZeitgeistTimeRange.html#ZEITGEIST-TIME-RANGE-VARIANT-SIGNATURE:CAPS" title="ZEITGEIST_TIME_RANGE_VARIANT_SIGNATURE">ZEITGEIST_TIME_RANGE_VARIANT_SIGNATURE</a>
62
#define <a class="link" href="ZeitgeistTimeRange.html#ZEITGEIST-TIME-RANGE-VARIANT-TYPE:CAPS" title="ZEITGEIST_TIME_RANGE_VARIANT_TYPE">ZEITGEIST_TIME_RANGE_VARIANT_TYPE</a>
65
<div class="refsect1">
66
<a name="ZeitgeistTimeRange.object-hierarchy"></a><h2>Object Hierarchy</h2>
67
<pre class="synopsis">
68
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
69
+----<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
70
+----ZeitgeistTimeRange
73
<div class="refsect1">
74
<a name="ZeitgeistTimeRange.description"></a><h2>Description</h2>
76
<a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> is a light, immutable, encapsulation of an interval
77
in time, marked by a beginning and an end.
80
Time ranges are sub classes of <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned"><span class="type">GInitiallyUnowned</span></a> which means that
81
you may pass them directly to methods provided by the Zeitgeist library
82
and forget about them. The callee will own the floating reference.
85
<div class="refsect1">
86
<a name="ZeitgeistTimeRange.details"></a><h2>Details</h2>
87
<div class="refsect2">
88
<a name="ZeitgeistTimeRange-struct"></a><h3>ZeitgeistTimeRange</h3>
89
<pre class="programlisting">typedef struct _ZeitgeistTimeRange ZeitgeistTimeRange;</pre>
94
<div class="refsect2">
95
<a name="ZeitgeistTimeRangeClass"></a><h3>struct ZeitgeistTimeRangeClass</h3>
96
<pre class="programlisting">struct ZeitgeistTimeRangeClass {
97
GInitiallyUnownedClass parent_class;
104
<div class="refsect2">
105
<a name="zeitgeist-time-range-new"></a><h3>zeitgeist_time_range_new ()</h3>
106
<pre class="programlisting"><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="returnvalue">ZeitgeistTimeRange</span></a> * zeitgeist_time_range_new (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> start_msec</code></em>,
107
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> end_msec</code></em>);</pre>
108
<div class="variablelist"><table border="0">
109
<col align="left" valign="top">
112
<td><p><span class="term"><em class="parameter"><code>start_msec</code></em> :</span></p></td>
113
<td>Starting timestamp in number of milliseconds since the Unix Epoch</td>
116
<td><p><span class="term"><em class="parameter"><code>end_msec</code></em> :</span></p></td>
117
<td>Ending timestamp in number of milliseconds since the Unix Epoch</td>
120
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
121
<td>A newly allocated <a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a>. Free with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>.</td>
127
<div class="refsect2">
128
<a name="zeitgeist-time-range-new-from-variant"></a><h3>zeitgeist_time_range_new_from_variant ()</h3>
129
<pre class="programlisting"><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="returnvalue">ZeitgeistTimeRange</span></a>* zeitgeist_time_range_new_from_variant
130
(<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *time_range</code></em>);</pre>
132
Create a <span class="type">ZeitgeistTimeRane</span> from a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a>
134
<div class="variablelist"><table border="0">
135
<col align="left" valign="top">
138
<td><p><span class="term"><em class="parameter"><code>time_range</code></em> :</span></p></td>
139
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> with signature
140
<a class="link" href="ZeitgeistTimeRange.html#ZEITGEIST-TIME-RANGE-VARIANT-SIGNATURE:CAPS" title="ZEITGEIST_TIME_RANGE_VARIANT_SIGNATURE"><span class="type">ZEITGEIST_TIME_RANGE_VARIANT_SIGNATURE</span></a>. If <em class="parameter"><code>time_range</code></em> is
141
a floating reference this method will assume ownership of it</td>
144
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
145
<td>A floating reference to a newly created <a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a>
152
<div class="refsect2">
153
<a name="zeitgeist-time-range-new-from-now"></a><h3>zeitgeist_time_range_new_from_now ()</h3>
154
<pre class="programlisting"><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="returnvalue">ZeitgeistTimeRange</span></a> * zeitgeist_time_range_new_from_now (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
155
<div class="variablelist"><table border="0">
156
<col align="left" valign="top">
158
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
159
<td>A new time range starting from the moment of invocation to the end
165
<div class="refsect2">
166
<a name="zeitgeist-time-range-new-to-now"></a><h3>zeitgeist_time_range_new_to_now ()</h3>
167
<pre class="programlisting"><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="returnvalue">ZeitgeistTimeRange</span></a> * zeitgeist_time_range_new_to_now (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
168
<div class="variablelist"><table border="0">
169
<col align="left" valign="top">
171
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
172
<td>A new time range starting from the beginning of the Unix Epoch
173
ending at the moment of invocation</td>
178
<div class="refsect2">
179
<a name="zeitgeist-time-range-new-anytime"></a><h3>zeitgeist_time_range_new_anytime ()</h3>
180
<pre class="programlisting"><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="returnvalue">ZeitgeistTimeRange</span></a> * zeitgeist_time_range_new_anytime (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
181
<div class="variablelist"><table border="0">
182
<col align="left" valign="top">
184
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
185
<td>A new time range starting from the beginning of the Unix Epoch
186
stretching to the end of time</td>
191
<div class="refsect2">
192
<a name="zeitgeist-time-range-get-start"></a><h3>zeitgeist_time_range_get_start ()</h3>
193
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> zeitgeist_time_range_get_start (<em class="parameter"><code><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> *time_range</code></em>);</pre>
194
<div class="variablelist"><table border="0">
195
<col align="left" valign="top">
198
<td><p><span class="term"><em class="parameter"><code>time_range</code></em> :</span></p></td>
199
<td>The time range to inspect</td>
202
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
203
<td>The starting timestamp of the time range in miiliseconds since the
210
<div class="refsect2">
211
<a name="zeitgeist-time-range-get-end"></a><h3>zeitgeist_time_range_get_end ()</h3>
212
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a> zeitgeist_time_range_get_end (<em class="parameter"><code><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> *time_range</code></em>);</pre>
213
<div class="variablelist"><table border="0">
214
<col align="left" valign="top">
217
<td><p><span class="term"><em class="parameter"><code>time_range</code></em> :</span></p></td>
218
<td>The time range to inspect</td>
221
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
222
<td>The ending timestamp of the time range in miiliseconds since the
229
<div class="refsect2">
230
<a name="zeitgeist-time-range-get-start-iso8601"></a><h3>zeitgeist_time_range_get_start_iso8601 ()</h3>
231
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * zeitgeist_time_range_get_start_iso8601
232
(<em class="parameter"><code><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> *time_range</code></em>);</pre>
234
Converts the a timestamp to a human readable format. Eg. 1970-01-01T00:00:00Z
235
or 2010-04-09T07:24:08.082000Z. Note that the timezone of the formatted
236
string will always be UTC disregarding locale.
238
<div class="variablelist"><table border="0">
239
<col align="left" valign="top">
242
<td><p><span class="term"><em class="parameter"><code>time_range</code></em> :</span></p></td>
243
<td>The time range to extract the start timestamp from</td>
246
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
247
<td>A newly allocated string containing the timestamp formatted
248
according to ISO-8601. Free with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</td>
254
<div class="refsect2">
255
<a name="zeitgeist-time-range-get-end-iso8601"></a><h3>zeitgeist_time_range_get_end_iso8601 ()</h3>
256
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * zeitgeist_time_range_get_end_iso8601
257
(<em class="parameter"><code><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> *time_range</code></em>);</pre>
259
Converts the a timestamp to a human readable format. Eg. 1970-01-01T00:00:00Z
260
or 2010-04-09T07:24:08.082000Z. Note that the timezone of the formatted
261
string will always be UTC disregarding locale.
263
<div class="variablelist"><table border="0">
264
<col align="left" valign="top">
267
<td><p><span class="term"><em class="parameter"><code>time_range</code></em> :</span></p></td>
268
<td>The time range to extract the end timestamp from</td>
271
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
272
<td>A newly allocated string containing the timestamp formatted
273
according to ISO-8601. Free with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</td>
279
<div class="refsect2">
280
<a name="zeitgeist-time-range-to-variant"></a><h3>zeitgeist_time_range_to_variant ()</h3>
281
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="returnvalue">GVariant</span></a> * zeitgeist_time_range_to_variant (<em class="parameter"><code><a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a> *time_range</code></em>);</pre>
282
<div class="variablelist"><table border="0">
283
<col align="left" valign="top">
286
<td><p><span class="term"><em class="parameter"><code>time_range</code></em> :</span></p></td>
287
<td>A <a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a>. If the reference is floating this method
288
will assume ownership of it</td>
291
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
292
<td>A floating reference to a <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> with signature
293
<a class="link" href="ZeitgeistTimeRange.html#ZEITGEIST-TIME-RANGE-VARIANT-SIGNATURE:CAPS" title="ZEITGEIST_TIME_RANGE_VARIANT_SIGNATURE"><span class="type">ZEITGEIST_TIME_RANGE_VARIANT_SIGNATURE</span></a>
300
<div class="refsect2">
301
<a name="ZEITGEIST-TIME-RANGE-VARIANT-SIGNATURE:CAPS"></a><h3>ZEITGEIST_TIME_RANGE_VARIANT_SIGNATURE</h3>
302
<pre class="programlisting">#define ZEITGEIST_TIME_RANGE_VARIANT_SIGNATURE "(xx)"
305
The <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> signature of a serialized <a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a>
309
<div class="refsect2">
310
<a name="ZEITGEIST-TIME-RANGE-VARIANT-TYPE:CAPS"></a><h3>ZEITGEIST_TIME_RANGE_VARIANT_TYPE</h3>
311
<pre class="programlisting">#define ZEITGEIST_TIME_RANGE_VARIANT_TYPE G_VARIANT_TYPE(ZEITGEIST_TIME_RANGE_VARIANT_SIGNATURE)
314
The <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariantType.html#GVariantType"><span class="type">GVariantType</span></a> of a serialized <a class="link" href="ZeitgeistTimeRange.html" title="ZeitgeistTimeRange"><span class="type">ZeitgeistTimeRange</span></a>
321
Generated by GTK-Doc V1.16</div>
b'\\ No newline at end of file'