aboutsummaryrefslogtreecommitdiffstats
path: root/modules/composer-autosave/e-autosave-utils.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-03 01:21:08 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-09-03 01:37:31 +0800
commit429234ff213ba04b6d0b02a28ed68aaa8af7c02c (patch)
tree69fd485d98a78148137ab29e5c1e8d16add7c0f1 /modules/composer-autosave/e-autosave-utils.h
parentcccdb143a571cde36db9fe906864647aab546cff (diff)
downloadgsoc2013-evolution-429234ff213ba04b6d0b02a28ed68aaa8af7c02c.tar
gsoc2013-evolution-429234ff213ba04b6d0b02a28ed68aaa8af7c02c.tar.gz
gsoc2013-evolution-429234ff213ba04b6d0b02a28ed68aaa8af7c02c.tar.bz2
gsoc2013-evolution-429234ff213ba04b6d0b02a28ed68aaa8af7c02c.tar.lz
gsoc2013-evolution-429234ff213ba04b6d0b02a28ed68aaa8af7c02c.tar.xz
gsoc2013-evolution-429234ff213ba04b6d0b02a28ed68aaa8af7c02c.tar.zst
gsoc2013-evolution-429234ff213ba04b6d0b02a28ed68aaa8af7c02c.zip
Convert composer autosave to an EExtension.
Given the way the autosave feature was awkwardly bolted on to the composer, an EExtension seemed like a natural fit. And it helped clean up some object lifecycle hacks (and bugs). What we have now is a new module consisting of two EExtensions: EComposerAutosave extends EMsgComposer and determines when to kick off an asynchronous autosave operation. EComposerRegistry extends EShell and offers to restore orphaned autosave files on startup (which is also asynchronous now). e-autosave-utils.c holds the actual asynchronous functions and a few other miscellaneous utility functions. Source code for the new module lives in /modules/composer-autosave.
Diffstat (limited to 'modules/composer-autosave/e-autosave-utils.h')
-rw-r--r--modules/composer-autosave/e-autosave-utils.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/modules/composer-autosave/e-autosave-utils.h b/modules/composer-autosave/e-autosave-utils.h
new file mode 100644
index 0000000000..3a33d6b90a
--- /dev/null
+++ b/modules/composer-autosave/e-autosave-utils.h
@@ -0,0 +1,48 @@
+/*
+ * e-autosave-utils.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#ifndef E_AUTOSAVE_UTILS_H
+#define E_AUTOSAVE_UTILS_H
+
+#include <shell/e-shell.h>
+#include <composer/e-msg-composer.h>
+
+G_BEGIN_DECLS
+
+GList * e_composer_find_orphans (GQueue *registry,
+ GError **error);
+void e_composer_load_snapshot (EShell *shell,
+ GFile *snapshot_file,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+EMsgComposer * e_composer_load_snapshot_finish (EShell *shell,
+ GAsyncResult *result,
+ GError **error);
+void e_composer_save_snapshot (EMsgComposer *composer,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean e_composer_save_snapshot_finish (EMsgComposer *composer,
+ GAsyncResult *result,
+ GError **error);
+GFile * e_composer_get_snapshot_file (EMsgComposer *composer);
+
+G_END_DECLS
+
+#endif /* E_AUTOSAVE_UTILS_H */