summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-10-21 20:47:44 -0400
committerMatthew Barnes <mbarnes@redhat.com>2011-10-21 20:47:44 -0400
commit1baddb8b7225cd3ea1cd186f663e859bfae84ba5 (patch)
tree61590358d97a4b2e076dc666213b42c537d99463
parent9cc37f242e9d5cf6778f8a232397f7a9a6da217f (diff)
downloadevolution-data-server-1baddb8b7225cd3ea1cd186f663e859bfae84ba5.tar.gz
Add camel_folder_refresh_info()/_finish().
I forget to write wrapper functions for CamelFolderClass.refresh_info() and CamelFolderClass.refresh_info_finish() even though the class methods have been there for awhile. Thanks to Srini for pointing this out.
-rw-r--r--camel/camel-folder.c61
1 files changed, 61 insertions, 0 deletions
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index 7fe8685e7..b987a10f6 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -3513,6 +3513,67 @@ camel_folder_refresh_info_sync (CamelFolder *folder,
}
/**
+ * camel_folder_refresh_info:
+ * @folder: a #CamelFolder
+ * @io_priority: the I/O priority of the request
+ * @cancellable: optional #GCancellable object, or %NULL
+ * @callback: a #GAsyncReadyCallback to call when the request is satisfied
+ * @user_data: data to pass to the callback function
+ *
+ * Asynchronously synchronizes a folder's summary with its backing store.
+ *
+ * When the operation is finished, @callback will be called. You can then
+ * call camel_folder_refresh_info_finish() to get the result of the operation.
+ *
+ * Since: 3.2
+ **/
+void
+camel_folder_refresh_info (CamelFolder *folder,
+ gint io_priority,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ CamelFolderClass *class;
+
+ g_return_if_fail (CAMEL_IS_FOLDER (folder));
+
+ class = CAMEL_FOLDER_GET_CLASS (folder);
+ g_return_if_fail (class->refresh_info != NULL);
+
+ class->refresh_info (
+ folder, io_priority, cancellable, callback, user_data);
+}
+
+/**
+ * camel_folder_refresh_info_finish:
+ * @folder: a #CamelFolder
+ * @result: a #GAsyncResult
+ * @error: return location for a #GError, or %NULL
+ *
+ * Finishes the operation started with camel_folder_refresh_info().
+ *
+ * Returns: %TRUE on success, %FALSE on error
+ *
+ * Since: 3.2
+ **/
+gboolean
+camel_folder_refresh_info_finish (CamelFolder *folder,
+ GAsyncResult *result,
+ GError **error)
+{
+ CamelFolderClass *class;
+
+ g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
+ g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
+
+ class = CAMEL_FOLDER_GET_CLASS (folder);
+ g_return_val_if_fail (class->refresh_info_finish != NULL, FALSE);
+
+ return class->refresh_info_finish (folder, result, error);
+}
+
+/**
* camel_folder_synchronize_sync:
* @folder: a #CamelFolder
* @expunge: whether to expunge after synchronizing