![]() |
![]() |
![]() |
API Documentation for the Zeitgeist Client Library | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#include <zeitgeist.h> ZeitgeistLog; ZeitgeistLogClass; ZeitgeistLog* zeitgeist_log_new (void
); void zeitgeist_log_insert_events (ZeitgeistLog *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
,...
); void zeitgeist_log_insert_events_no_reply (ZeitgeistLog *self
,...
); void zeitgeist_log_insert_events_valist (ZeitgeistLog *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
,va_list events
); void zeitgeist_log_insert_events_from_ptrarray (ZeitgeistLog *self
,GPtrArray *events
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); GArray* zeitgeist_log_insert_events_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
); void zeitgeist_log_find_events (ZeitgeistLog *self
,ZeitgeistTimeRange *time_range
,GPtrArray *event_templates
,ZeitgeistStorageState storage_state
,guint32 num_events
,ZeitgeistResultType result_type
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); ZeitgeistResultSet * zeitgeist_log_find_events_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
); void zeitgeist_log_find_event_ids (ZeitgeistLog *self
,ZeitgeistTimeRange *time_range
,GPtrArray *event_templates
,ZeitgeistStorageState storage_state
,guint32 num_events
,ZeitgeistResultType result_type
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); GArray* zeitgeist_log_find_event_ids_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
); void zeitgeist_log_get_events (ZeitgeistLog *self
,GArray *event_ids
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); ZeitgeistResultSet * zeitgeist_log_get_events_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
); void zeitgeist_log_find_related_uris (ZeitgeistLog *self
,ZeitgeistTimeRange *time_range
,GPtrArray *event_templates
,GPtrArray *result_event_templates
,ZeitgeistStorageState storage_state
,guint32 num_events
,ZeitgeistResultType result_type
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gchar** zeitgeist_log_find_related_uris_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
); void zeitgeist_log_delete_events (ZeitgeistLog *self
,GArray *event_ids
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean zeitgeist_log_delete_events_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
); void zeitgeist_log_delete_log (ZeitgeistLog *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean zeitgeist_log_delete_log_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
); void zeitgeist_log_quit (ZeitgeistLog *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean zeitgeist_log_quit_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
); void zeitgeist_log_install_monitor (ZeitgeistLog *self
,ZeitgeistMonitor *monitor
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean zeitgeist_log_install_monitor_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
); void zeitgeist_log_remove_monitor (ZeitgeistLog *self
,ZeitgeistMonitor *monitor
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); gboolean zeitgeist_log_remove_monitor_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
);
ZeitgeistLog encapsulates the low level access to the Zeitgeist daemon. You can use it to manage the log by inserting and deleting entries as well as do queries on the logged data.
It's important to realize that the ZeitgeistLog class does not expose any API that does synchronous communications with the message bus - everything is asynchronous. To ease development some of the methods have variants that are "fire and forget" ignoring the normal return value, so that callbacks does not have to be set up.
ZeitgeistLog* zeitgeist_log_new (void
);
Log instances are not overly expensive for neither client or the Zeitgeist daemon so there's no need to go to lenghts to keep singleton instances around.
Returns : |
A reference to a newly allocated log. |
void zeitgeist_log_insert_events (ZeitgeistLog *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
,...
);
Asynchrnously send a set of events to the Zeitgeist daemon, requesting they be inserted into the log.
|
The log logging the events |
|
To cancel the operation or NULL
|
|
GAsyncReadyCallback to invoke once the logging operation has
completed. Set to NULL to ignore the result. In this callback
you can invoke zeitgeist_log_insert_events_finish() to collect
the event ids of the inserted events
|
|
Any user data to pass back to callback
|
|
A list of ZeitgeistEvents terminated by a NULL
|
void zeitgeist_log_insert_events_no_reply (ZeitgeistLog *self
,...
);
Asynchrnously send a set of events to the Zeitgeist daemon, requesting they be inserted into the log. This method is "fire and forget" and the caller will never know whether the events was succesfully inserted or not.
This method is exactly equivalent to calling zeitgeist_log_insert_events()
with NULL
set as cancellable
, callback
, and user_data
.
|
The log logging the events |
|
A list of ZeitgeistEvents terminated by a NULL
|
void zeitgeist_log_insert_events_valist (ZeitgeistLog *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
,va_list events
);
This method is intended for language bindings. If calling this function
from C code it's generally more handy to use zeitgeist_log_insert_events()
or zeitgeist_log_insert_events_from_ptrarray()
.
Asynchrnously send a set of events to the Zeitgeist daemon, requesting they be inserted into the log.
|
The log logging the events |
|
To cancel the operation or NULL
|
|
GAsyncReadyCallback to invoke once the logging operation has
completed. Set to NULL to ignore the result. In this callback
you can invoke zeitgeist_log_insert_events_finish() to collect
the event ids of the inserted events
|
|
Any user data to pass back to callback
|
|
A GPtrArray of ZeitgeistEvents to insert. This method
steals the reference to events and consumes all floating refs
on the event members. It is assumed that the free_func on events
is set to g_object_unref() .
|
void zeitgeist_log_insert_events_from_ptrarray (ZeitgeistLog *self
,GPtrArray *events
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchrnously send a set of events to the Zeitgeist daemon, requesting they be inserted into the log.
|
The log logging the events |
|
A GPtrArray of ZeitgeistEvents to insert. This method
steals the reference to events and consumes all floating refs
on the event members. It is assumed that the free_func on events
is set to g_object_unref() .
|
|
To cancel the operation or NULL
|
|
GAsyncReadyCallback to invoke once the logging operation has
completed. Set to NULL to ignore the result. In this callback
you can invoke zeitgeist_log_insert_events_finish() to collect
the event ids of the inserted events
|
|
Any user data to pass back to callback
|
GArray* zeitgeist_log_insert_events_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
);
|
|
|
|
|
|
Returns : |
void zeitgeist_log_find_events (ZeitgeistLog *self
,ZeitgeistTimeRange *time_range
,GPtrArray *event_templates
,ZeitgeistStorageState storage_state
,guint32 num_events
,ZeitgeistResultType result_type
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ZeitgeistResultSet * zeitgeist_log_find_events_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
);
Retrieve the result from an asynchronous query started with
zeitgeist_log_find_events()
.
Returns : |
A newly allocated ZeitgeistResultSet containing
the ZeitgeistEvents
matching the query. You must free the result set with
g_object_unref() . The events held in the result set will
automatically be unreffed when the result set is finalized. [transfer-full]
|
void zeitgeist_log_find_event_ids (ZeitgeistLog *self
,ZeitgeistTimeRange *time_range
,GPtrArray *event_templates
,ZeitgeistStorageState storage_state
,guint32 num_events
,ZeitgeistResultType result_type
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GArray* zeitgeist_log_find_event_ids_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
);
|
|
|
|
|
|
Returns : |
void zeitgeist_log_get_events (ZeitgeistLog *self
,GArray *event_ids
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
|
|
|
|
|
|
|
|
|
ZeitgeistResultSet * zeitgeist_log_get_events_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
);
|
|
|
|
|
|
Returns : |
void zeitgeist_log_find_related_uris (ZeitgeistLog *self
,ZeitgeistTimeRange *time_range
,GPtrArray *event_templates
,GPtrArray *result_event_templates
,ZeitgeistStorageState storage_state
,guint32 num_events
,ZeitgeistResultType result_type
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gchar** zeitgeist_log_find_related_uris_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
);
|
|
|
|
|
|
Returns : |
void zeitgeist_log_delete_events (ZeitgeistLog *self
,GArray *event_ids
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
|
|
|
|
|
|
|
|
|
gboolean zeitgeist_log_delete_events_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
);
|
|
|
|
|
|
Returns : |
void zeitgeist_log_delete_log (ZeitgeistLog *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
|
|
|
|
|
|
|
gboolean zeitgeist_log_delete_log_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
);
|
|
|
|
|
|
Returns : |
void zeitgeist_log_quit (ZeitgeistLog *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
|
|
|
|
|
|
|
gboolean zeitgeist_log_quit_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
);
|
|
|
|
|
|
Returns : |
void zeitgeist_log_install_monitor (ZeitgeistLog *self
,ZeitgeistMonitor *monitor
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
|
|
|
|
|
|
|
|
|
gboolean zeitgeist_log_install_monitor_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
);
|
|
|
|
|
|
Returns : |
void zeitgeist_log_remove_monitor (ZeitgeistLog *self
,ZeitgeistMonitor *monitor
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
|
|
|
|
|
|
|
|
|
gboolean zeitgeist_log_remove_monitor_finish (ZeitgeistLog *self
,GAsyncResult *res
,GError **error
);
|
|
|
|
|
|
Returns : |
"connected"
property"connected" gboolean : Read
Determines if this Log instance is currently connected to Zeitgeist daemon.
Default value: FALSE