diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-11-07 02:33:55 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-11-08 03:01:46 +0800 |
commit | aa66a17e401d73cbe394ed7f99bf73350e9b938b (patch) | |
tree | 305c80be39d688cf8386b5e123f3df631f2cfc84 /e-util/e-io-activity.h | |
parent | b2dd9c153519d315f96bfd760e91a6f6b32affd6 (diff) | |
download | gsoc2013-evolution-aa66a17e401d73cbe394ed7f99bf73350e9b938b.tar.gz gsoc2013-evolution-aa66a17e401d73cbe394ed7f99bf73350e9b938b.tar.zst gsoc2013-evolution-aa66a17e401d73cbe394ed7f99bf73350e9b938b.zip |
Test drive EIOActivity with a simple asynchronous function.
Rename e-fsutils to e-file-utils. This is where we'll add asynchronous
functions for common file I/O operations with EActivity integration.
Start with e_file_replace_contents_async() (and corresponding finish()
function). This is a simple wrapper for g_file_replace_contents_async()
which also returns an EActivity. It replaces e_write_file_uri().
Also redesign EIOActivity to -contain- a GAsyncResult rather than
implement the interface for itself. This is easier for now but I may
change my mind again when I figure out how to tie centralized error
reporting into the EActivity framework.
Diffstat (limited to 'e-util/e-io-activity.h')
-rw-r--r-- | e-util/e-io-activity.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/e-util/e-io-activity.h b/e-util/e-io-activity.h index c94953af3e..773417472d 100644 --- a/e-util/e-io-activity.h +++ b/e-util/e-io-activity.h @@ -60,11 +60,15 @@ struct _EIOActivityClass { }; GType e_io_activity_get_type (void); -EActivity * e_io_activity_new (GObject *source_object, - const gchar *primary_text, - GAsyncReadyCallback callback, - gpointer user_data); +EActivity * e_io_activity_new (const gchar *primary_text, + GAsyncResult *async_result, + GCancellable *cancellable); +GAsyncResult * e_io_activity_get_async_result (EIOActivity *io_activity); +void e_io_activity_set_async_result (EIOActivity *io_activity, + GAsyncResult *async_result); GCancellable * e_io_activity_get_cancellable (EIOActivity *io_activity); +void e_io_activity_set_cancellable (EIOActivity *io_activity, + GCancellable *cancellable); G_END_DECLS |