<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
  <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
]>
<refentry id="ZeitgeistTimeRange">
<refmeta>
<refentrytitle role="top_of_page" id="ZeitgeistTimeRange.top_of_page">ZeitgeistTimeRange</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  ZEITGEIST-2.0 Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>ZeitgeistTimeRange</refname>
<refpurpose>Immutable representation of an interval in time, marked by a beginning and an end</refpurpose>
</refnamediv>

<refsynopsisdiv id="ZeitgeistTimeRange.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>#define             <link linkend="ZEITGEIST-TYPE-TIME-RANGE:CAPS">ZEITGEIST_TYPE_TIME_RANGE</link>
<link linkend="GVariant"><returnvalue>GVariant</returnvalue></link> *          <link linkend="zeitgeist-time-range-to-variant">zeitgeist_time_range_to_variant</link>     (<parameter><link linkend="ZeitgeistTimeRange"><type>ZeitgeistTimeRange</type></link> *self</parameter>);
<link linkend="ZeitgeistTimeRange"><returnvalue>ZeitgeistTimeRange</returnvalue></link> * <link linkend="zeitgeist-time-range-intersect">zeitgeist_time_range_intersect</link>     (<parameter><link linkend="ZeitgeistTimeRange"><type>ZeitgeistTimeRange</type></link> *self</parameter>,
                                                         <parameter><link linkend="ZeitgeistTimeRange"><type>ZeitgeistTimeRange</type></link> *time_range</parameter>);
<link linkend="ZeitgeistTimeRange"><returnvalue>ZeitgeistTimeRange</returnvalue></link> * <link linkend="zeitgeist-time-range-new">zeitgeist_time_range_new</link>           (<parameter><link linkend="gint64"><type>gint64</type></link> start_msec</parameter>,
                                                         <parameter><link linkend="gint64"><type>gint64</type></link> end_msec</parameter>);
<link linkend="ZeitgeistTimeRange"><returnvalue>ZeitgeistTimeRange</returnvalue></link> * <link linkend="zeitgeist-time-range-new-anytime">zeitgeist_time_range_new_anytime</link>   (<parameter><type>void</type></parameter>);
<link linkend="ZeitgeistTimeRange"><returnvalue>ZeitgeistTimeRange</returnvalue></link> * <link linkend="zeitgeist-time-range-new-to-now">zeitgeist_time_range_new_to_now</link>    (<parameter><type>void</type></parameter>);
<link linkend="ZeitgeistTimeRange"><returnvalue>ZeitgeistTimeRange</returnvalue></link> * <link linkend="zeitgeist-time-range-new-from-now">zeitgeist_time_range_new_from_now</link>  (<parameter><type>void</type></parameter>);
<link linkend="ZeitgeistTimeRange"><returnvalue>ZeitgeistTimeRange</returnvalue></link> * <link linkend="zeitgeist-time-range-new-from-variant">zeitgeist_time_range_new_from_variant</link>
                                                        (<parameter><link linkend="GVariant"><type>GVariant</type></link> *variant</parameter>,
                                                         <parameter><link linkend="GError"><type>GError</type></link> **error</parameter>);
<link linkend="gint64"><returnvalue>gint64</returnvalue></link>              <link linkend="zeitgeist-time-range-get-start">zeitgeist_time_range_get_start</link>      (<parameter><link linkend="ZeitgeistTimeRange"><type>ZeitgeistTimeRange</type></link> *self</parameter>);
<link linkend="gint64"><returnvalue>gint64</returnvalue></link>              <link linkend="zeitgeist-time-range-get-end">zeitgeist_time_range_get_end</link>        (<parameter><link linkend="ZeitgeistTimeRange"><type>ZeitgeistTimeRange</type></link> *self</parameter>);
struct              <link linkend="ZeitgeistTimeRange-struct">ZeitgeistTimeRange</link>;
struct              <link linkend="ZeitgeistTimeRangeClass">ZeitgeistTimeRangeClass</link>;
</synopsis>
</refsynopsisdiv>
<refsect1 id="ZeitgeistTimeRange.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----ZeitgeistTimeRange
</synopsis>
</refsect1>
<refsect1 id="ZeitgeistTimeRange.properties" role="properties">
<title role="properties.title">Properties</title>
<synopsis>
  &quot;<link linkend="ZeitgeistTimeRange--end">end</link>&quot;                      <link linkend="gint64"><type>gint64</type></link>                : Read
  &quot;<link linkend="ZeitgeistTimeRange--start">start</link>&quot;                    <link linkend="gint64"><type>gint64</type></link>                : Read
</synopsis>
</refsect1>

<refsect1 id="ZeitgeistTimeRange.description" role="desc">
<title role="desc.title">Description</title>
<para>
<para>A light, immutable, encapsulation of an interval in time, marked by a beginning and an end.</para>
</para>
</refsect1>
<refsect1 id="ZeitgeistTimeRange.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="ZEITGEIST-TYPE-TIME-RANGE:CAPS" role="macro">
<title>ZEITGEIST_TYPE_TIME_RANGE</title>
<indexterm zone="ZEITGEIST-TYPE-TIME-RANGE:CAPS"><primary>ZEITGEIST_TYPE_TIME_RANGE</primary></indexterm>
<programlisting>#define ZEITGEIST_TYPE_TIME_RANGE (zeitgeist_time_range_get_type ())
</programlisting>
<para>
The type for <link linkend="ZeitgeistTimeRange"><type>ZeitgeistTimeRange</type></link>.
</para></refsect2>
<refsect2 id="zeitgeist-time-range-to-variant" role="function">
<title>zeitgeist_time_range_to_variant ()</title>
<indexterm zone="zeitgeist-time-range-to-variant"><primary>zeitgeist_time_range_to_variant</primary></indexterm>
<programlisting><link linkend="GVariant"><returnvalue>GVariant</returnvalue></link> *          zeitgeist_time_range_to_variant     (<parameter><link linkend="ZeitgeistTimeRange"><type>ZeitgeistTimeRange</type></link> *self</parameter>);</programlisting>
<variablelist role="params">
<varlistentry><term><parameter>self</parameter>&#160;:</term>
<listitem><simpara>the <link linkend="ZeitgeistTimeRange"><type>ZeitgeistTimeRange</type></link> instance</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>a new variant holding the time range</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="zeitgeist-time-range-intersect" role="function">
<title>zeitgeist_time_range_intersect ()</title>
<indexterm zone="zeitgeist-time-range-intersect"><primary>zeitgeist_time_range_intersect</primary></indexterm>
<programlisting><link linkend="ZeitgeistTimeRange"><returnvalue>ZeitgeistTimeRange</returnvalue></link> * zeitgeist_time_range_intersect     (<parameter><link linkend="ZeitgeistTimeRange"><type>ZeitgeistTimeRange</type></link> *self</parameter>,
                                                         <parameter><link linkend="ZeitgeistTimeRange"><type>ZeitgeistTimeRange</type></link> *time_range</parameter>);</programlisting>
<para>
Check whether two time ranges are intersecting.
</para><variablelist role="params">
<varlistentry><term><parameter>self</parameter>&#160;:</term>
<listitem><simpara>the <link linkend="ZeitgeistTimeRange"><type>ZeitgeistTimeRange</type></link> instance</simpara></listitem></varlistentry>
<varlistentry><term><parameter>time_range</parameter>&#160;:</term>
<listitem><simpara>&nbsp;.  the second time range to compare with. <emphasis role="annotation">[<acronym>in</acronym>]</emphasis></simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>a new time range representing the intersection</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="zeitgeist-time-range-new" role="function">
<title>zeitgeist_time_range_new ()</title>
<indexterm zone="zeitgeist-time-range-new"><primary>zeitgeist_time_range_new</primary></indexterm>
<programlisting><link linkend="ZeitgeistTimeRange"><returnvalue>ZeitgeistTimeRange</returnvalue></link> * zeitgeist_time_range_new           (<parameter><link linkend="gint64"><type>gint64</type></link> start_msec</parameter>,
                                                         <parameter><link linkend="gint64"><type>gint64</type></link> end_msec</parameter>);</programlisting>
<variablelist role="params">
<varlistentry><term><parameter>start_msec</parameter>&#160;:</term>
<listitem><simpara>&nbsp;.  starting timestamp in number of milliseconds since the Unix Epoch. <emphasis role="annotation">[<acronym>in</acronym>]</emphasis></simpara></listitem></varlistentry>
<varlistentry><term><parameter>end_msec</parameter>&#160;:</term>
<listitem><simpara>&nbsp;.  ending timestamp in number of milliseconds since the Unix Epoch. <emphasis role="annotation">[<acronym>in</acronym>]</emphasis></simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>a newly allocated ZeitgeistTimeRange. Free with <link linkend="g-object-unref"><function>g_object_unref()</function></link></simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="zeitgeist-time-range-new-anytime" role="function">
<title>zeitgeist_time_range_new_anytime ()</title>
<indexterm zone="zeitgeist-time-range-new-anytime"><primary>zeitgeist_time_range_new_anytime</primary></indexterm>
<programlisting><link linkend="ZeitgeistTimeRange"><returnvalue>ZeitgeistTimeRange</returnvalue></link> * zeitgeist_time_range_new_anytime   (<parameter><type>void</type></parameter>);</programlisting>
<variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>a new time range starting from the beginning of the Unix Epoch stretching to the end of time</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="zeitgeist-time-range-new-to-now" role="function">
<title>zeitgeist_time_range_new_to_now ()</title>
<indexterm zone="zeitgeist-time-range-new-to-now"><primary>zeitgeist_time_range_new_to_now</primary></indexterm>
<programlisting><link linkend="ZeitgeistTimeRange"><returnvalue>ZeitgeistTimeRange</returnvalue></link> * zeitgeist_time_range_new_to_now    (<parameter><type>void</type></parameter>);</programlisting>
<variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>a new time range starting from the beggining of the Unix Epoch ending a the moment of invocation</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="zeitgeist-time-range-new-from-now" role="function">
<title>zeitgeist_time_range_new_from_now ()</title>
<indexterm zone="zeitgeist-time-range-new-from-now"><primary>zeitgeist_time_range_new_from_now</primary></indexterm>
<programlisting><link linkend="ZeitgeistTimeRange"><returnvalue>ZeitgeistTimeRange</returnvalue></link> * zeitgeist_time_range_new_from_now  (<parameter><type>void</type></parameter>);</programlisting>
<variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>a new time range starting from the moment of invocation to the end of time</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="zeitgeist-time-range-new-from-variant" role="function">
<title>zeitgeist_time_range_new_from_variant ()</title>
<indexterm zone="zeitgeist-time-range-new-from-variant"><primary>zeitgeist_time_range_new_from_variant</primary></indexterm>
<programlisting><link linkend="ZeitgeistTimeRange"><returnvalue>ZeitgeistTimeRange</returnvalue></link> * zeitgeist_time_range_new_from_variant
                                                        (<parameter><link linkend="GVariant"><type>GVariant</type></link> *variant</parameter>,
                                                         <parameter><link linkend="GError"><type>GError</type></link> **error</parameter>);</programlisting>
<para>
Create a <link linkend="TimeRange"><type>TimeRange</type></link> from a variant.
</para><variablelist role="params">
<varlistentry><term><parameter>variant</parameter>&#160;:</term>
<listitem><simpara>&nbsp;.  a variant representing a <link linkend="TimeRange"><type>TimeRange</type></link>. <emphasis role="annotation">[<acronym>in</acronym>]</emphasis></simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&#160;:</term>
<listitem><simpara>location to store the error occuring, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to ignore. <emphasis role="annotation">[<acronym>error-domains</acronym> ZeitgeistDataModelError]</emphasis></simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>a new time range starting from the moment of invocation to the end of time</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="zeitgeist-time-range-get-start" role="function">
<title>zeitgeist_time_range_get_start ()</title>
<indexterm zone="zeitgeist-time-range-get-start"><primary>zeitgeist_time_range_get_start</primary></indexterm>
<programlisting><link linkend="gint64"><returnvalue>gint64</returnvalue></link>              zeitgeist_time_range_get_start      (<parameter><link linkend="ZeitgeistTimeRange"><type>ZeitgeistTimeRange</type></link> *self</parameter>);</programlisting>
<para>
Get and return the current value of the <link linkend="ZeitgeistTimeRange--start"><type>"start"</type></link> property.
</para><variablelist role="params">
<varlistentry><term><parameter>self</parameter>&#160;:</term>
<listitem><simpara>the <link linkend="ZeitgeistTimeRange"><type>ZeitgeistTimeRange</type></link> instance to query</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>the value of the <link linkend="ZeitgeistTimeRange--start"><type>"start"</type></link> property</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="zeitgeist-time-range-get-end" role="function">
<title>zeitgeist_time_range_get_end ()</title>
<indexterm zone="zeitgeist-time-range-get-end"><primary>zeitgeist_time_range_get_end</primary></indexterm>
<programlisting><link linkend="gint64"><returnvalue>gint64</returnvalue></link>              zeitgeist_time_range_get_end        (<parameter><link linkend="ZeitgeistTimeRange"><type>ZeitgeistTimeRange</type></link> *self</parameter>);</programlisting>
<para>
Get and return the current value of the <link linkend="ZeitgeistTimeRange--end"><type>"end"</type></link> property.
</para><variablelist role="params">
<varlistentry><term><parameter>self</parameter>&#160;:</term>
<listitem><simpara>the <link linkend="ZeitgeistTimeRange"><type>ZeitgeistTimeRange</type></link> instance to query</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>the value of the <link linkend="ZeitgeistTimeRange--end"><type>"end"</type></link> property</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ZeitgeistTimeRange-struct" role="struct">
<title>struct ZeitgeistTimeRange</title>
<indexterm zone="ZeitgeistTimeRange-struct"><primary>ZeitgeistTimeRange</primary></indexterm>
<programlisting>struct ZeitgeistTimeRange;</programlisting>
<para>
Immutable representation of an interval in time, marked by a beginning and an end
</para>
<para>
<para>A light, immutable, encapsulation of an interval in time, marked by a beginning and an end.</para>
</para></refsect2>
<refsect2 id="ZeitgeistTimeRangeClass" role="struct">
<title>struct ZeitgeistTimeRangeClass</title>
<indexterm zone="ZeitgeistTimeRangeClass"><primary>ZeitgeistTimeRangeClass</primary></indexterm>
<programlisting>struct ZeitgeistTimeRangeClass {
	GObjectClass parent_class;
};
</programlisting>
<para>
The class structure for <link linkend="ZEITGEIST-TYPE-TIME-RANGE:CAPS"><literal>ZEITGEIST_TYPE_TIME_RANGE</literal></link>. All the fields in this structure are private and should never be accessed directly.
</para><variablelist role="struct">
<varlistentry><term><link linkend="GObjectClass"><type>GObjectClass</type></link>&#160;<structfield id="ZeitgeistTimeRangeClass.parent-class">parent_class</structfield>;</term>
<listitem><simpara>the parent class structure</simpara></listitem>
</varlistentry>
</variablelist></refsect2>

</refsect1>
<refsect1 id="ZeitgeistTimeRange.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="ZeitgeistTimeRange--end" role="property"><title>The <literal>&quot;end&quot;</literal> property</title>
<indexterm zone="ZeitgeistTimeRange--end"><primary>ZeitgeistTimeRange:end</primary></indexterm>
<programlisting>  &quot;end&quot;                      <link linkend="gint64"><type>gint64</type></link>                : Read</programlisting>
<para>end.</para><para>Default value: 0</para>
</refsect2>
<refsect2 id="ZeitgeistTimeRange--start" role="property"><title>The <literal>&quot;start&quot;</literal> property</title>
<indexterm zone="ZeitgeistTimeRange--start"><primary>ZeitgeistTimeRange:start</primary></indexterm>
<programlisting>  &quot;start&quot;                    <link linkend="gint64"><type>gint64</type></link>                : Read</programlisting>
<para>start.</para><para>Default value: 0</para>
</refsect2>
</refsect1>

</refentry>
