![]() |
![]() |
![]() |
Zeitgeist Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
ZeitgeistTimeRangeZeitgeistTimeRange — Immutable representation of an interval in time, marked by a beginning and an end |
#define ZEITGEIST_TYPE_TIME_RANGE GVariant * zeitgeist_time_range_to_variant (ZeitgeistTimeRange *self
); ZeitgeistTimeRange * zeitgeist_time_range_intersect (ZeitgeistTimeRange *self
,ZeitgeistTimeRange *time_range
); ZeitgeistTimeRange * zeitgeist_time_range_new (gint64 start_msec
,gint64 end_msec
); ZeitgeistTimeRange * zeitgeist_time_range_new_anytime (void
); ZeitgeistTimeRange * zeitgeist_time_range_new_to_now (void
); ZeitgeistTimeRange * zeitgeist_time_range_new_from_now (void
); ZeitgeistTimeRange * zeitgeist_time_range_new_from_variant (GVariant *variant
,GError **error
); gint64 zeitgeist_time_range_get_start (ZeitgeistTimeRange *self
); gint64 zeitgeist_time_range_get_end (ZeitgeistTimeRange *self
); struct ZeitgeistTimeRange; struct ZeitgeistTimeRangeClass;
A light, immutable, encapsulation of an interval in time, marked by a beginning and an end.
#define ZEITGEIST_TYPE_TIME_RANGE (zeitgeist_time_range_get_type ())
The type for ZeitgeistTimeRange.
GVariant * zeitgeist_time_range_to_variant (ZeitgeistTimeRange *self
);
|
the ZeitgeistTimeRange instance |
Returns : |
a new variant holding the time range |
ZeitgeistTimeRange * zeitgeist_time_range_intersect (ZeitgeistTimeRange *self
,ZeitgeistTimeRange *time_range
);
Check whether two time ranges are intersecting.
|
the ZeitgeistTimeRange instance |
|
. the second time range to compare with. [in] |
Returns : |
a new time range representing the intersection |
ZeitgeistTimeRange * zeitgeist_time_range_new (gint64 start_msec
,gint64 end_msec
);
|
. starting timestamp in number of milliseconds since the Unix Epoch. [in] |
|
. ending timestamp in number of milliseconds since the Unix Epoch. [in] |
Returns : |
a newly allocated ZeitgeistTimeRange. Free with g_object_unref()
|
ZeitgeistTimeRange * zeitgeist_time_range_new_anytime (void
);
Returns : |
a new time range starting from the beginning of the Unix Epoch stretching to the end of time |
ZeitgeistTimeRange * zeitgeist_time_range_new_to_now (void
);
Returns : |
a new time range starting from the beggining of the Unix Epoch ending a the moment of invocation |
ZeitgeistTimeRange * zeitgeist_time_range_new_from_now (void
);
Returns : |
a new time range starting from the moment of invocation to the end of time |
ZeitgeistTimeRange * zeitgeist_time_range_new_from_variant (GVariant *variant
,GError **error
);
Create a TimeRange from a variant.
|
. a variant representing a TimeRange. [in] |
|
location to store the error occuring, or NULL to ignore. [error-domains ZeitgeistDataModelError]
|
Returns : |
a new time range starting from the moment of invocation to the end of time |
gint64 zeitgeist_time_range_get_start (ZeitgeistTimeRange *self
);
Get and return the current value of the "start" property.
|
the ZeitgeistTimeRange instance to query |
Returns : |
the value of the "start" property |
gint64 zeitgeist_time_range_get_end (ZeitgeistTimeRange *self
);
Get and return the current value of the "end" property.
|
the ZeitgeistTimeRange instance to query |
Returns : |
the value of the "end" property |
struct ZeitgeistTimeRange;
Immutable representation of an interval in time, marked by a beginning and an end
A light, immutable, encapsulation of an interval in time, marked by a beginning and an end.
struct ZeitgeistTimeRangeClass { GObjectClass parent_class; };
The class structure for ZEITGEIST_TYPE_TIME_RANGE
. All the fields in this structure are private and should never be accessed directly.
GObjectClass |
the parent class structure |