aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-io-activity.c
Commit message (Collapse)AuthorAgeFilesLines
* Test drive EIOActivity with a simple asynchronous function.Matthew Barnes2009-11-081-77/+129
| | | | | | | | | | | | | | 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.
* Prototype EIOActivity, which integrates with GIO.Matthew Barnes2009-11-081-0/+243
EIOActivity implements the GAsyncResult interface, and the idea is to use this instead of GSimpleAsyncResult. In addition to the features offered by EActivity, it also contains GAsyncReadyCallback information and a GCancellable. - Calling e_activity_cancel() triggers the GCancellable. - Calling e_activity_complete() triggers the GAsyncReadyCallback. Functions that follow GIO's asynchronous pattern should return an EIOActivity (cast as an EActivity) instead of 'void', so it can be handed to an EShellBackend or whatever else dispatches activities. This is not yet feature-complete. It's missing API for storing result values and GErrors. I don't have a complete picture of the final API in my head yet, so I'll copy things over from GSimpleAsyncResult as needed.