Re: Resubmission for patch 0002-add-a-refresh-parameter-to-tny_folder_store_get_folders
- From: Philip Van Hoof <spam pvanhoof be>
- To: Martin Bonnin <martinbonnin gmail com>
- Cc: tinymail-devel-list <tinymail-devel-list gnome org>
- Subject: Re: Resubmission for patch 0002-add-a-refresh-parameter-to-tny_folder_store_get_folders
- Date: Sun, 26 Oct 2008 12:06:05 +0100
Approved, accepted and committed
Thanks
For the others: This was a major API change
On Fri, 2008-10-24 at 17:03 +0200, Martin Bonnin wrote:
> Hello Philip,
>
> Sorry for the long silence, I had to rethink a bit the application
> code before resuming the work on the latest patches. The idea today is
> to get rid of patch #3 that introduced duplicates and also of #10,
> that I do not really need.
> From now on I'm going to submit the patches one after the other so
> that we can make sure we can track the changes and move forward. I'm
> beginning today with patch #2 that makes the get_folders() more
> similar to the get_headers() one by adding a refresh parameter.
> It's the original patch + adaptation to the new api everywhere to
> make the patch atomic and honouring the camel flasg in the below
> (fixes the camel critical warnings )
>
> + if (!refresh && CAMEL_IS_DISCO_STORE(store)) {
> + iter =
> CAMEL_DISCO_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(store))->get_folder_info_offline(store, "", flags, &ex);
> + } else {
> + iter = camel_store_get_folder_info (store, "", flags,
> &ex);
> + }
>
>
> Regards,
>
> --
> Martin
>
> Index: libtinymail-camel/tny-camel-folder.c
> ===================================================================
> --- libtinymail-camel/tny-camel-folder.c (révision 70)
> +++ libtinymail-camel/tny-camel-folder.c (copie de travail)
> @@ -3176,7 +3176,7 @@
> TnyList *folders = tny_simple_list_new ();
> TnyIterator *iter;
>
> - tny_folder_store_get_folders (TNY_FOLDER_STORE (folder),
> folders, NULL, &nerr);
> + tny_folder_store_get_folders (TNY_FOLDER_STORE (folder),
> folders, NULL, TRUE, &nerr);
>
> if (nerr != NULL)
> {
> @@ -3348,7 +3348,7 @@
> g_object_unref (acc);
>
> list = func (list, cpy_event_new (TNY_FOLDER_STORE (into),
> folder));
> - tny_folder_store_get_folders (TNY_FOLDER_STORE (folder), folders,
> NULL, NULL);
> + tny_folder_store_get_folders (TNY_FOLDER_STORE (folder), folders,
> NULL, TRUE, NULL);
> iter = tny_list_create_iterator (folders);
> while (!tny_iterator_is_done (iter))
> {
> @@ -4884,8 +4884,8 @@
> TnyList *folders = tny_simple_list_new ();
> TnyIterator *iter;
>
> - tny_folder_store_get_folders (TNY_FOLDER_STORE (folder),
> - folders, NULL, &nerr);
> + tny_folder_store_get_folders (TNY_FOLDER_STORE (folder),
> + folders, NULL, TRUE, &nerr);
>
> if (nerr != NULL)
> {
> @@ -5328,13 +5328,13 @@
> }
>
> static void
> -tny_camel_folder_get_folders (TnyFolderStore *self, TnyList *list,
> TnyFolderStoreQuery *query, GError **err)
> +tny_camel_folder_get_folders (TnyFolderStore *self, TnyList *list,
> TnyFolderStoreQuery *query, gboolean refresh, GError **err)
> {
> - TNY_CAMEL_FOLDER_GET_CLASS (self)->get_folders(self, list, query,
> err);
> + TNY_CAMEL_FOLDER_GET_CLASS (self)->get_folders(self, list, query,
> refresh, err);
> }
>
> static void
> -tny_camel_folder_get_folders_default (TnyFolderStore *self, TnyList
> *list, TnyFolderStoreQuery *query, GError **err)
> +tny_camel_folder_get_folders_default (TnyFolderStore *self, TnyList
> *list, TnyFolderStoreQuery *query, gboolean refresh, GError **err)
> {
> gboolean cant_reuse_iter = TRUE;
> TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (self);
> @@ -5365,7 +5365,11 @@
>
> g_return_if_fail (priv->folder_name != NULL);
>
> - priv->iter = camel_store_get_folder_info (store,
> priv->folder_name, 0, &ex);
> + if (!refresh && CAMEL_IS_DISCO_STORE(store)) {
> + priv->iter =
> CAMEL_DISCO_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(store))->get_folder_info_offline(store, priv->folder_name, 0, &ex);
> + } else {
> + priv->iter = camel_store_get_folder_info (store,
> priv->folder_name, 0, &ex);
> + }
>
> priv->cant_reuse_iter = FALSE;
>
> @@ -5429,7 +5433,6 @@
> return;
> }
>
> -
> typedef struct
> {
> TnyCamelQueueable parent;
> @@ -5439,6 +5442,7 @@
> TnyList *list;
> TnyGetFoldersCallback callback;
> TnyFolderStoreQuery *query;
> + gboolean refresh;
> gpointer user_data;
> TnySessionCamel *session;
> gboolean cancelled;
> @@ -5489,7 +5493,7 @@
> GetFoldersInfo *info = (GetFoldersInfo*) thr_user_data;
>
> tny_folder_store_get_folders (TNY_FOLDER_STORE (info->self),
> - info->list, info->query, &info->err);
> + info->list, info->query, info->refresh, &info->err);
>
> info->cancelled = FALSE;
> if (info->err != NULL) {
> @@ -5536,14 +5540,14 @@
> }
>
> static void
> -tny_camel_folder_get_folders_async (TnyFolderStore *self, TnyList
> *list, TnyFolderStoreQuery *query, TnyGetFoldersCallback callback,
> TnyStatusCallback status_callback, gpointer user_data)
> +tny_camel_folder_get_folders_async (TnyFolderStore *self, TnyList
> *list, TnyFolderStoreQuery *query, gboolean refresh,
> TnyGetFoldersCallback callback, TnyStatusCallback status_callback,
> gpointer user_data)
> {
> - TNY_CAMEL_FOLDER_GET_CLASS (self)->get_folders_async(self, list,
> query, callback, status_callback, user_data);
> + TNY_CAMEL_FOLDER_GET_CLASS (self)->get_folders_async(self, list,
> query, refresh, callback, status_callback, user_data);
> }
>
>
> static void
> -tny_camel_folder_get_folders_async_default (TnyFolderStore *self,
> TnyList *list, TnyFolderStoreQuery *query, TnyGetFoldersCallback
> callback, TnyStatusCallback status_callback, gpointer user_data)
> +tny_camel_folder_get_folders_async_default (TnyFolderStore *self,
> TnyList *list, TnyFolderStoreQuery *query, gboolean refresh,
> TnyGetFoldersCallback callback, TnyStatusCallback status_callback,
> gpointer user_data)
> {
> GetFoldersInfo *info;
> TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (self);
> @@ -5557,6 +5561,7 @@
> info->callback = callback;
> info->user_data = user_data;
> info->query = query;
> + info->refresh = refresh;
> info->err = NULL;
>
> /* thread reference */
> @@ -5579,7 +5584,201 @@
> return;
> }
>
> +static void
> +tny_camel_folder_store_refresh (TnyFolderStore *self, GError **err)
> +{
> + TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (self);
> + CamelFolderInfo *iter;
> + TnyAccount *account = NULL;
> + CamelStore *store = priv->store;
> + CamelException ex = CAMEL_EXCEPTION_INITIALISER;
>
> + if (!_tny_session_check_operation
> (TNY_FOLDER_PRIV_GET_SESSION(priv),
> + priv->account, err, TNY_ERROR_DOMAIN,
> + TNY_SERVICE_ERROR_GET_FOLDERS))
> + return;
> +
> + account = tny_folder_get_account (TNY_FOLDER (self));
> +
> + g_return_if_fail (priv->folder_name != NULL);
> +
> + priv->iter = camel_store_get_folder_info (store,
> priv->folder_name, 0, &ex);
> + priv->cant_reuse_iter = FALSE;
> +
> + if (camel_exception_is_set (&ex))
> + {
> + _tny_camel_exception_to_tny_error (&ex, err);
> + camel_exception_clear (&ex);
> + _tny_session_stop_operation (TNY_FOLDER_PRIV_GET_SESSION
> (priv));
> +
> + if (priv->iter == NULL)
> + return;
> + }
> +
> + priv->iter_parented = FALSE;
> +
> + iter = priv->iter;
> +
> + if (iter)
> + {
> + iter = iter->child;
> + while (iter)
> + {
> + /* Also take a look at camel-maildir-store.c:525 */
> + if (!(iter->flags & CAMEL_FOLDER_VIRTUAL) && priv->account)
> + {
> + gboolean was_new = FALSE;
> + TnyCamelFolder *folder = (TnyCamelFolder *)
> tny_camel_store_account_factor_folder (
> + TNY_CAMEL_STORE_ACCOUNT (priv->account),
> + iter->full_name, &was_new);
> + if (was_new) {
> + TnyFolderStoreChange *change;
> + _tny_camel_folder_set_folder_info (self, folder,
> iter);
> + change = tny_folder_store_change_new
> (TNY_FOLDER_STORE(self));
> + tny_folder_store_change_add_created_folder (change,
> TNY_FOLDER(folder));
> + notify_folder_store_observers_about_in_idle (self,
> + change,
> + TNY_FOLDER_PRIV_GET_SESSION (priv));
> + g_object_unref(change);
> + }
> + g_object_unref (folder);
> + }
> + iter = iter->next;
> + }
> + }
> +
> +
> + _tny_session_stop_operation (TNY_FOLDER_PRIV_GET_SESSION (priv));
> +
> + return;
> +}
> +
> +typedef struct
> +{
> + TnyCamelQueueable parent;
> +
> + GError *err;
> + TnyFolderStore *self;
> + TnyFolderStoreCallback callback;
> + gpointer user_data;
> + TnySessionCamel *session;
> + gboolean cancelled;
> +} StoreRefreshInfo;
> +
> +
> +static void
> +tny_camel_folder_store_refresh_async_destroyer (gpointer
> thr_user_data)
> +{
> + StoreRefreshInfo *info = thr_user_data;
> + TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE
> (info->self);
> +
> + /* thread reference */
> + _tny_camel_folder_unreason (priv);
> + g_object_unref (info->self);
> +
> + if (info->err)
> + g_error_free (info->err);
> +
> + _tny_session_stop_operation (info->session);
> +
> + camel_object_unref (info->session);
> +
> + return;
> +}
> +
> +static gboolean
> +tny_camel_folder_store_refresh_async_callback (gpointer
> thr_user_data)
> +{
> + StoreRefreshInfo *info = thr_user_data;
> + if (info->callback) {
> + tny_lockable_lock (info->session->priv->ui_lock);
> + info->callback (info->self, info->cancelled, info->err,
> info->user_data);
> + tny_lockable_unlock (info->session->priv->ui_lock);
> + }
> + return FALSE;
> +}
> +
> +
> +static gpointer
> +tny_camel_folder_store_refresh_async_thread (gpointer thr_user_data)
> +{
> + StoreRefreshInfo *info = (StoreRefreshInfo*) thr_user_data;
> +
> + tny_camel_folder_store_refresh (TNY_FOLDER_STORE (info->self),
> &info->err);
> +
> + info->cancelled = FALSE;
> + if (info->err != NULL) {
> + if (camel_strstrcase (info->err->message, "cancel") != NULL)
> + info->cancelled = TRUE;
> + }
> +
> + return NULL;
> +}
> +
> +static void
> +tny_camel_folder_store_refresh_async_cancelled_destroyer (gpointer
> thr_user_data)
> +{
> + StoreRefreshInfo *info = thr_user_data;
> + TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE
> (info->self);
> +
> + /* thread reference */
> + _tny_camel_folder_unreason (priv);
> + g_object_unref (info->self);
> +
> + if (info->err)
> + g_error_free (info->err);
> +
> + /**/
> +
> + camel_object_unref (info->session);
> +
> + return;
> +}
> +
> +static gboolean
> +tny_camel_folder_store_refresh_async_cancelled_callback (gpointer
> thr_user_data)
> +{
> + StoreRefreshInfo *info = thr_user_data;
> + if (info->callback) {
> + tny_lockable_lock (info->session->priv->ui_lock);
> + info->callback (info->self, TRUE, info->err,
> info->user_data);
> + tny_lockable_unlock (info->session->priv->ui_lock);
> + }
> + return FALSE;
> +}
> +
> +static void
> +tny_camel_folder_store_refresh_async (TnyFolderStore *self,
> TnyFolderStoreCallback callback, TnyStatusCallback status_callback,
> gpointer user_data)
> +{
> + StoreRefreshInfo *info;
> + TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (self);
> +
> + /* Idle info for the callbacks */
> + info = g_slice_new (StoreRefreshInfo);
> + info->session = TNY_FOLDER_PRIV_GET_SESSION (priv);
> + camel_object_ref (info->session);
> + info->self = self;
> + info->callback = callback;
> + info->user_data = user_data;
> + info->err = NULL;
> +
> + /* thread reference */
> + _tny_camel_folder_reason (priv);
> + g_object_ref (info->self);
> +
> + _tny_camel_queue_launch (TNY_FOLDER_PRIV_GET_QUEUE (priv),
> + tny_camel_folder_store_refresh_async_thread,
> + tny_camel_folder_store_refresh_async_callback,
> + tny_camel_folder_store_refresh_async_destroyer,
> + tny_camel_folder_store_refresh_async_cancelled_callback,
> + tny_camel_folder_store_refresh_async_cancelled_destroyer,
> + &info->cancelled,
> + info, sizeof (StoreRefreshInfo),
> + __FUNCTION__);
> +
> + return;
> +}
> +
> void
> _tny_camel_folder_set_folder (TnyCamelFolder *self, CamelFolder
> *camel_folder)
> {
> @@ -6230,6 +6429,7 @@
> klass->get_folders_async= tny_camel_folder_get_folders_async;
> klass->add_observer= tny_camel_folder_store_add_observer;
> klass->remove_observer= tny_camel_folder_store_remove_observer;
> + klass->refresh_async = tny_camel_folder_store_refresh_async;
>
> return;
> }
> Index: libtinymail-camel/tny-camel-folder.h
> ===================================================================
> --- libtinymail-camel/tny-camel-folder.h (révision 70)
> +++ libtinymail-camel/tny-camel-folder.h (copie de travail)
> @@ -92,8 +92,8 @@
> TnyFolderCaps (*get_caps) (TnyFolder *self);
> void (*remove_msgs_async) (TnyFolder *self, TnyList *headers,
> TnyFolderCallback callback, TnyStatusCallback status_callback,
> gpointer user_data);
>
> - void (*get_folders_async) (TnyFolderStore *self, TnyList *list,
> TnyFolderStoreQuery *query, TnyGetFoldersCallback callback,
> TnyStatusCallback status_callback, gpointer user_data);
> - void (*get_folders) (TnyFolderStore *self, TnyList *list,
> TnyFolderStoreQuery *query, GError **err);
> + void (*get_folders_async) (TnyFolderStore *self, TnyList *list,
> TnyFolderStoreQuery *query, gboolean refresh, TnyGetFoldersCallback
> callback, TnyStatusCallback status_callback, gpointer user_data);
> + void (*get_folders) (TnyFolderStore *self, TnyList *list,
> TnyFolderStoreQuery *query, gboolean refresh, GError **err);
> void (*remove_folder) (TnyFolderStore *self, TnyFolder *folder,
> GError **err);
> TnyFolder* (*create_folder) (TnyFolderStore *self, const gchar
> *name, GError **err);
> void (*create_folder_async) (TnyFolderStore *self, const gchar
> *name, TnyCreateFolderCallback callback, TnyStatusCallback
> status_callback, gpointer user_data);
> Index: libtinymail-camel/tny-camel-store-account.c
> ===================================================================
> --- libtinymail-camel/tny-camel-store-account.c (révision 70)
> +++ libtinymail-camel/tny-camel-store-account.c (copie de travail)
> @@ -952,7 +952,7 @@
> TnyIterator *iter;
>
> tny_folder_store_get_folders (TNY_FOLDER_STORE (folder),
> - folders, NULL, &nerr);
> + folders, NULL, TRUE, &nerr);
>
> if (nerr != NULL)
> {
> @@ -1276,9 +1276,9 @@
>
>
> static void
> -tny_camel_store_account_get_folders (TnyFolderStore *self, TnyList
> *list, TnyFolderStoreQuery *query, GError **err)
> +tny_camel_store_account_get_folders (TnyFolderStore *self, TnyList
> *list, TnyFolderStoreQuery *query, gboolean refresh, GError **err)
> {
> - TNY_CAMEL_STORE_ACCOUNT_GET_CLASS (self)->get_folders(self, list,
> query, err);
> + TNY_CAMEL_STORE_ACCOUNT_GET_CLASS (self)->get_folders(self, list,
> query, refresh, err);
> }
>
> /**
> @@ -1351,7 +1351,7 @@
> }
>
> static void
> -tny_camel_store_account_get_folders_default (TnyFolderStore *self,
> TnyList *list, TnyFolderStoreQuery *query, GError **err)
> +tny_camel_store_account_get_folders_default (TnyFolderStore *self,
> TnyList *list, TnyFolderStoreQuery *query, gboolean refresh, GError
> **err)
> {
> TnyCamelAccountPriv *apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE
> (self);
> TnyCamelStoreAccountPriv *priv =
> TNY_CAMEL_STORE_ACCOUNT_GET_PRIVATE (self);
> @@ -1401,9 +1401,15 @@
>
> iter = priv->iter;
>
> + }
> +
> /*else
> iter = priv->iter;*/
>
> @@ -1472,6 +1478,7 @@
> TnyList *list;
> TnyGetFoldersCallback callback;
> TnyFolderStoreQuery *query;
> + gboolean refresh;
> gpointer user_data;
> TnySessionCamel *session;
> gboolean cancelled;
> @@ -1518,7 +1525,7 @@
> GetFoldersInfo *info = (GetFoldersInfo*) thr_user_data;
>
> tny_folder_store_get_folders (TNY_FOLDER_STORE (info->self),
> - info->list, info->query, &info->err);
> + info->list, info->query, info->refresh, &info->err);
>
> info->cancelled = FALSE;
> if (info->err != NULL) {
> @@ -1559,13 +1566,13 @@
> }
>
> static void
> -tny_camel_store_account_get_folders_async (TnyFolderStore *self,
> TnyList *list, TnyFolderStoreQuery *query, TnyGetFoldersCallback
> callback, TnyStatusCallback status_callback, gpointer user_data)
> +tny_camel_store_account_get_folders_async (TnyFolderStore *self,
> TnyList *list, TnyFolderStoreQuery *query, gboolean refresh,
> TnyGetFoldersCallback callback, TnyStatusCallback status_callback,
> gpointer user_data)
> {
> - TNY_CAMEL_STORE_ACCOUNT_GET_CLASS (self)->get_folders_async(self,
> list, query, callback, status_callback, user_data);
> + TNY_CAMEL_STORE_ACCOUNT_GET_CLASS (self)->get_folders_async(self,
> list, query, refresh, callback, status_callback, user_data);
> }
>
> static void
> -tny_camel_store_account_get_folders_async_default (TnyFolderStore
> *self, TnyList *list, TnyFolderStoreQuery *query,
> TnyGetFoldersCallback callback, TnyStatusCallback status_callback,
> gpointer user_data)
> +tny_camel_store_account_get_folders_async_default (TnyFolderStore
> *self, TnyList *list, TnyFolderStoreQuery *query, gboolean refresh,
> TnyGetFoldersCallback callback, TnyStatusCallback status_callback,
> gpointer user_data)
> {
> GetFoldersInfo *info;
> TnyCamelAccountPriv *apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE
> (self);
> @@ -1584,6 +1591,7 @@
> info->callback = callback;
> info->user_data = user_data;
> info->query = query;
> + info->refresh = refresh;
>
> /* thread reference */
> g_object_ref (info->self);
> @@ -1604,8 +1612,222 @@
> return;
> }
>
> +static void
> +tny_camel_store_account_store_refresh (TnyFolderStore *self, GError
> **err)
> +{
> + TnyCamelAccountPriv *apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE
> (self);
> + TnyCamelStoreAccountPriv *priv =
> TNY_CAMEL_STORE_ACCOUNT_GET_PRIVATE (self);
> + CamelException ex = CAMEL_EXCEPTION_INITIALISER;
> + CamelFolderInfo *iter=NULL; guint32 flags; CamelStore *store;
>
> + g_assert (CAMEL_IS_SESSION (apriv->session));
> +
> + if (!_tny_session_check_operation (apriv->session, TNY_ACCOUNT
> (self), err,
> + TNY_ERROR_DOMAIN, TNY_SERVICE_ERROR_GET_FOLDERS))
> + return;
> +
> + if (apriv->service == NULL || !CAMEL_IS_SERVICE (apriv->service))
> + {
> + g_set_error (err, TNY_ERROR_DOMAIN,
> + TNY_SERVICE_ERROR_GET_FOLDERS,
> + _("Account not ready for this operation. "
> + "This problem indicates a bug in the software."));
> + _tny_session_stop_operation (apriv->session);
> + return;
> + }
> +
> + store = CAMEL_STORE (apriv->service);
> +
> + if (camel_exception_is_set (&ex))
> + {
> + _tny_camel_exception_to_tny_error (&ex, err);
> + camel_exception_clear (&ex);
> + _tny_session_stop_operation (apriv->session);
> + return;
> + }
> +
> + g_assert (CAMEL_IS_STORE (store));
> +
> + flags = CAMEL_STORE_FOLDER_INFO_FAST |
> CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL |
> + CAMEL_STORE_FOLDER_INFO_RECURSIVE;
> +
> + if (!camel_session_is_online ((CamelSession*) apriv->session))
> + flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
> +
> +
> + priv->iter = camel_store_get_folder_info (store, "", flags, &ex);
> +
> + if (camel_exception_is_set (&ex))
> + {
> + _tny_camel_exception_to_tny_error (&ex, err);
> + camel_exception_clear (&ex);
> +
> + _tny_session_stop_operation (apriv->session);
> +
> + return;
> + }
> +
> + priv->cant_reuse_iter = FALSE;
> +
> + camel_object_ref (CAMEL_OBJECT (store));
> + priv->iter_store = store;
> +
> + iter = priv->iter;
> +
> + if (iter)
> + {
> + iter = iter->child;
> + while (iter)
> + {
> + /* Also take a look at camel-maildir-store.c:525 */
> + if (!(iter->flags & CAMEL_FOLDER_VIRTUAL))
> + {
> + gboolean was_new = FALSE;
> + TnyCamelFolder *folder = (TnyCamelFolder *)
> tny_camel_store_account_factor_folder (
> + TNY_CAMEL_STORE_ACCOUNT (self),
> + iter->full_name, &was_new);
> + if (was_new) {
> + TnyFolderStoreChange *change;
> + _tny_camel_folder_set_folder_info (self, folder,
> iter);
> + change = tny_folder_store_change_new
> (TNY_FOLDER_STORE(self));
> + tny_folder_store_change_add_created_folder (change,
> TNY_FOLDER(folder));
> + notify_folder_store_observers_about_in_idle (self,
> + change);
> + g_object_unref(change);
> + }
> + g_object_unref (folder);
> + }
> + iter = iter->next;
> + }
> + }
> +
> +
> + _tny_session_stop_operation (apriv->session);
> +
> + return;
> +}
> +
> +
> +typedef struct
> +{
> + TnyCamelQueueable parent;
> +
> + GError *err;
> + TnyFolderStore *self;
> + TnyFolderStoreCallback callback;
> + gpointer user_data;
> + TnySessionCamel *session;
> + gboolean cancelled;
> +
> +} StoreRefreshInfo;
> +
> +
> static void
> +tny_camel_store_account_store_refresh_async_destroyer (gpointer
> thr_user_data)
> +{
> + StoreRefreshInfo *info = thr_user_data;
> +
> + /* gidle reference */
> + g_object_unref (info->self);
> +
> + if (info->err)
> + g_error_free (info->err);
> +
> + camel_object_unref (info->session);
> +
> + return;
> +}
> +
> +static gboolean
> +tny_camel_store_account_store_refresh_async_callback (gpointer
> thr_user_data)
> +{
> + StoreRefreshInfo *info = thr_user_data;
> + if (info->callback) {
> + tny_lockable_lock (info->session->priv->ui_lock);
> + info->callback (info->self, info->cancelled, info->err,
> info->user_data);
> + tny_lockable_unlock (info->session->priv->ui_lock);
> + }
> + return FALSE;
> +}
> +
> +
> +static gpointer
> +tny_camel_store_account_store_refresh_async_thread (gpointer
> thr_user_data)
> +{
> + StoreRefreshInfo *info = (StoreRefreshInfo*) thr_user_data;
> +
> + tny_camel_store_account_store_refresh (TNY_FOLDER_STORE
> (info->self), &info->err);
> +
> + info->cancelled = FALSE;
> + if (info->err != NULL) {
> + if (camel_strstrcase (info->err->message, "cancel") != NULL)
> + info->cancelled = TRUE;
> + }
> +
> + return NULL;
> +}
> +
> +static void
> +tny_camel_store_account_store_refresh_async_cancelled_destroyer
> (gpointer thr_user_data)
> +{
> + StoreRefreshInfo *info = thr_user_data;
> + /* gidle references */
> + g_object_unref (info->self);
> + if (info->err)
> + g_error_free (info->err);
> +
> + camel_object_unref (info->session);
> +
> + return;
> +}
> +
> +static gboolean
> +tny_camel_store_account_store_refresh_async_cancelled_callback
> (gpointer thr_user_data)
> +{
> + StoreRefreshInfo *info = thr_user_data;
> + if (info->callback) {
> + tny_lockable_lock (info->session->priv->ui_lock);
> + info->callback (info->self, TRUE, info->err,
> info->user_data);
> + tny_lockable_unlock (info->session->priv->ui_lock);
> + }
> + return FALSE;
> +}
> +
> +static void
> +tny_camel_store_account_store_refresh_async (TnyFolderStore *self,
> TnyFolderStoreCallback callback, TnyStatusCallback status_callback,
> gpointer user_data)
> +{
> + StoreRefreshInfo *info;
> + TnyCamelAccountPriv *apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE
> (self);
> + TnyCamelStoreAccountPriv *priv =
> TNY_CAMEL_STORE_ACCOUNT_GET_PRIVATE (self);
> +
> + /* Idle info for the callbacks */
> + info = g_slice_new0 (StoreRefreshInfo);
> + info->session = apriv->session;
> + camel_object_ref (info->session);
> +
> + info->err = NULL;
> + info->self = self;
> + info->callback = callback;
> + info->user_data = user_data;
> +
> + /* thread reference */
> + g_object_ref (info->self);
> +
> + _tny_camel_queue_launch_wflags (priv->queue,
> + tny_camel_store_account_store_refresh_async_thread,
> + tny_camel_store_account_store_refresh_async_callback,
> + tny_camel_store_account_store_refresh_async_destroyer,
> +
> tny_camel_store_account_store_refresh_async_cancelled_callback,
> +
> tny_camel_store_account_store_refresh_async_cancelled_destroyer,
> + &info->cancelled, info, sizeof (StoreRefreshInfo),
> + TNY_CAMEL_QUEUE_NORMAL_ITEM|TNY_CAMEL_QUEUE_PRIORITY_ITEM,
> + __FUNCTION__);
> +
> + return;
> +}
> +
> +
> +static void
> tny_camel_store_account_add_observer (TnyFolderStore *self,
> TnyFolderStoreObserver *observer)
> {
> TNY_CAMEL_STORE_ACCOUNT_GET_CLASS (self)->add_observer(self,
> observer);
> @@ -2072,6 +2294,7 @@
> klass->get_folders_async=
> tny_camel_store_account_get_folders_async;
> klass->add_observer= tny_camel_store_account_add_observer;
> klass->remove_observer= tny_camel_store_account_remove_observer;
> + klass->refresh_async =
> tny_camel_store_account_store_refresh_async;
>
> return;
> }
> Index: libtinymail-camel/tny-camel-store-account.h
> ===================================================================
> --- libtinymail-camel/tny-camel-store-account.h (révision 70)
> +++ libtinymail-camel/tny-camel-store-account.h (copie de travail)
> @@ -49,8 +49,8 @@
> TnyCamelAccountClass parent;
>
> /* virtual methods */
> - void (*get_folders_async) (TnyFolderStore *self, TnyList *list,
> TnyFolderStoreQuery *query, TnyGetFoldersCallback callback,
> TnyStatusCallback status_callback, gpointer user_data);
> - void (*get_folders) (TnyFolderStore *self, TnyList *list,
> TnyFolderStoreQuery *query, GError **err);
> + void (*get_folders_async) (TnyFolderStore *self, TnyList *list,
> TnyFolderStoreQuery *query, gboolean refresh, TnyGetFoldersCallback
> callback, TnyStatusCallback status_callback, gpointer user_data);
> + void (*get_folders) (TnyFolderStore *self, TnyList *list,
> TnyFolderStoreQuery *query, gboolean refresh, GError **err);
> void (*remove_folder) (TnyFolderStore *self, TnyFolder *folder,
> GError **err);
> TnyFolder* (*create_folder) (TnyFolderStore *self, const gchar
> *name, GError **err);
> void (*create_folder_async) (TnyFolderStore *self, const gchar
> *name, TnyCreateFolderCallback callback, TnyStatusCallback
> status_callback, gpointer user_data);
> Index: libtinymailui-gtk/tny-gtk-folder-store-tree-model.c
> ===================================================================
> --- libtinymailui-gtk/tny-gtk-folder-store-tree-model.c (révision
> 70)
> +++ libtinymailui-gtk/tny-gtk-folder-store-tree-model.c (copie de
> travail)
> @@ -115,7 +115,7 @@
> TnyList *folders = tny_simple_list_new ();
>
> /* TODO add error checking and reporting here */
> - tny_folder_store_get_folders (store, folders, self->query, NULL);
> + tny_folder_store_get_folders (store, folders, self->query, TRUE,
> NULL);
> iter = tny_list_create_iterator (folders);
>
> while (!tny_iterator_is_done (iter))
> @@ -343,7 +343,7 @@
>
> list = tny_simple_list_new ();
> tny_folder_store_get_folders_async (TNY_FOLDER_STORE (account),
> - list, self->query, get_folders_cb, NULL, g_object_ref
> (self));
> + list, self->query, TRUE, get_folders_cb, NULL, g_object_ref
> (self));
>
> return;
> }
> @@ -522,7 +522,7 @@
> * before this one) */
>
> tny_folder_store_get_folders_async (TNY_FOLDER_STORE
> (folder_store),
> - folders, self->query, get_folders_cb, NULL, g_object_ref
> (self));
> + folders, self->query, TRUE, get_folders_cb, NULL,
> g_object_ref (self));
>
> /* recurse_folders_sync (self, TNY_FOLDER_STORE (folder_store),
> &name_iter); */
>
> Index: tests/functional/folder-lister-async.c
> ===================================================================
> --- tests/functional/folder-lister-async.c (révision 70)
> +++ tests/functional/folder-lister-async.c (copie de travail)
> @@ -58,7 +58,7 @@
> TnyList *folders = tny_simple_list_new ();
> g_print ("%s\n", tny_folder_get_name (TNY_FOLDER (folder)));
> tny_folder_store_get_folders_async (folder,
> - folders, NULL, callback, NULL, NULL);
> + folders, NULL, TRUE, callback, NULL, NULL);
> g_object_unref (G_OBJECT (folder));
> tny_iterator_next (iter);
> }
> @@ -82,7 +82,7 @@
>
> folders = tny_simple_list_new ();
> tny_folder_store_get_folders_async (TNY_FOLDER_STORE
> (account),
> - folders, NULL, callback, NULL, NULL);
> + folders, NULL, TRUE, callback, NULL, NULL);
>
> return FALSE;
> }
> Index: tests/functional/folder-remove.c
> ===================================================================
> --- tests/functional/folder-remove.c (révision 70)
> +++ tests/functional/folder-remove.c (copie de travail)
> @@ -56,7 +56,7 @@
> TnyIterator *iter;
> TnyList *folders = tny_simple_list_new ();
>
> - tny_folder_store_get_folders (store, folders, query, NULL);
> + tny_folder_store_get_folders (store, folders, query, TRUE, NULL);
> iter = tny_list_create_iterator (folders);
>
> while (!tny_iterator_is_done (iter))
> Index: tests/functional/account-refresh.c
> ===================================================================
> --- tests/functional/account-refresh.c (révision 70)
> +++ tests/functional/account-refresh.c (copie de travail)
> @@ -42,7 +42,7 @@
> TnyIterator *iter;
> TnyList *folders = tny_simple_list_new ();
>
> - tny_folder_store_get_folders (store, folders, query, NULL);
> + tny_folder_store_get_folders (store, folders, query, TRUE, NULL);
> iter = tny_list_create_iterator (folders);
>
> while (!tny_iterator_is_done (iter)) {
> @@ -89,6 +89,7 @@
> tny_folder_store_get_folders (TNY_FOLDER_STORE (account),
> all_folders,
> NULL,
> + TRUE,
> &error);
> if (error)
> goto out;
> Index: tests/functional/msg-transfer.c
> ===================================================================
> --- tests/functional/msg-transfer.c (révision 70)
> +++ tests/functional/msg-transfer.c (copie de travail)
> @@ -49,7 +49,7 @@
> return;
>
> folders = tny_simple_list_new ();
> - tny_folder_store_get_folders (store, folders, query, NULL);
> + tny_folder_store_get_folders (store, folders, query, TRUE, NULL);
> iter = tny_list_create_iterator (folders);
>
> while (!tny_iterator_is_done (iter) && (!*folder_src || !
> *folder_dst))
> Index: tests/functional/folder-lister.c
> ===================================================================
> --- tests/functional/folder-lister.c (révision 70)
> +++ tests/functional/folder-lister.c (copie de travail)
> @@ -42,7 +42,7 @@
> TnyIterator *iter;
> TnyList *folders = tny_simple_list_new ();
>
> - tny_folder_store_get_folders (store, folders, query, NULL);
> + tny_folder_store_get_folders (store, folders, query, TRUE, NULL);
> iter = tny_list_create_iterator (folders);
>
> while (!tny_iterator_is_done (iter))
> Index: tests/functional/folder-transfer.c
> ===================================================================
> --- tests/functional/folder-transfer.c (révision 70)
> +++ tests/functional/folder-transfer.c (copie de travail)
> @@ -62,7 +62,7 @@
> TnyIterator *iter;
> TnyList *folders = tny_simple_list_new ();
>
> - tny_folder_store_get_folders (store, folders, query, NULL);
> + tny_folder_store_get_folders (store, folders, query, TRUE, NULL);
> iter = tny_list_create_iterator (folders);
>
> while (!tny_iterator_is_done (iter))
> Index: tests/c-demo/tny-demoui-summary-view.c
> ===================================================================
> --- tests/c-demo/tny-demoui-summary-view.c (révision 70)
> +++ tests/c-demo/tny-demoui-summary-view.c (copie de travail)
> @@ -399,7 +399,7 @@
> TnyList *folders = tny_simple_list_new ();
> TnyIterator *f_iter;
>
> - tny_folder_store_get_folders (TNY_FOLDER_STORE (f_store),
> folders, NULL, NULL);
> + tny_folder_store_get_folders (TNY_FOLDER_STORE (f_store),
> folders, NULL, TRUE, NULL);
> f_iter = tny_list_create_iterator (folders);
> while (!tny_iterator_is_done (f_iter))
> {
> @@ -1178,7 +1178,7 @@
> tny_folder_store_query_add_item (query, folder_name,
> TNY_FOLDER_STORE_QUERY_OPTION_MATCH_ON_NAME);
> g_free (folder_name);
> list = tny_simple_list_new ();
> - tny_folder_store_get_folders (origin_store, list, query,
> NULL);
> + tny_folder_store_get_folders (origin_store, list, query,
> TRUE, NULL);
> g_object_unref (query);
> if (tny_list_get_length (list) == 1) {
> TnyIterator *iter;
> Index: tests/memory/memory-test.c
> ===================================================================
> --- tests/memory/memory-test.c (révision 70)
> +++ tests/memory/memory-test.c (copie de travail)
> @@ -127,11 +127,11 @@
> topfolders = tny_simple_list_new ();
> folders = tny_simple_list_new ();
>
> - tny_folder_store_get_folders (TNY_FOLDER_STORE (account),
> topfolders, NULL, NULL);
> + tny_folder_store_get_folders (TNY_FOLDER_STORE (account),
> topfolders, NULL, TRUE, NULL);
> topiter = tny_list_create_iterator (topfolders);
> inbox = TNY_FOLDER (tny_iterator_get_current (topiter));
>
> - tny_folder_store_get_folders (TNY_FOLDER_STORE (inbox), folders,
> NULL, NULL);
> + tny_folder_store_get_folders (TNY_FOLDER_STORE (inbox), folders,
> NULL, TRUE, NULL);
>
> if (iter)
> g_object_unref (iter);
> Index: ChangeLog
> ===================================================================
> --- ChangeLog (révision 70)
> +++ ChangeLog (copie de travail)
> @@ -1,3 +1,10 @@
> +2008-10-24 Rob Taylor <rob taylor codethink co uk>
> +2008-10-24 Martin Bonnin <martinbonnin gmail com>
> +
> + * Re-submission for the
> add-a-refresh-parameter-to-tny_folder_store_get_folder():
> + makes the patch atomic by adapting to the new api where needed
> + also honour the camel folders flags (caused some critical camel
> warnings else)
> +
> 2008-10-16 Philip Van Hoof <philip codeminded be>
>
> * Reverted `svn diff -r 3774:3775`, the behaviour of the folders
> was
> Index: libtinymail/tny-shared.h
> ===================================================================
> --- libtinymail/tny-shared.h (révision 70)
> +++ libtinymail/tny-shared.h (copie de travail)
> @@ -137,6 +137,7 @@
>
> typedef TnyStream* (*TnyStreamCacheOpenStreamFetcher) (TnyStreamCache
> *self, gint64 *expected_size, gpointer userdata);
> typedef gboolean (*TnyStreamCacheRemoveFilter) (TnyStreamCache *self,
> const gchar *id, gpointer userdata);
> +typedef void (*TnyFolderStoreCallback) (TnyFolderStore *self,
> gboolean cancelled, GError *err, gpointer user_data);
>
> /**
> * TnyGetMsgCallback:
> Index: libtinymail/tny-combined-account.c
> ===================================================================
> --- libtinymail/tny-combined-account.c (révision 70)
> +++ libtinymail/tny-combined-account.c (copie de travail)
> @@ -299,22 +299,30 @@
> }
>
> static void
> -tny_combined_account_get_folders (TnyFolderStore *self, TnyList
> *list, TnyFolderStoreQuery *query, GError **err)
> +tny_combined_account_get_folders (TnyFolderStore *self, TnyList
> *list, TnyFolderStoreQuery *query, gboolean refresh, GError **err)
> {
> TnyCombinedAccountPriv *priv = TNY_COMBINED_ACCOUNT_GET_PRIVATE
> (self);
>
> - tny_folder_store_get_folders (TNY_FOLDER_STORE
> (priv->store_account), list, query, err);
> + tny_folder_store_get_folders (TNY_FOLDER_STORE
> (priv->store_account), list, query, refresh, err);
> }
>
> static void
> -tny_combined_account_get_folders_async (TnyFolderStore *self, TnyList
> *list, TnyFolderStoreQuery *query, TnyGetFoldersCallback callback,
> TnyStatusCallback status_callback, gpointer user_data)
> +tny_combined_account_get_folders_async (TnyFolderStore *self, TnyList
> *list, TnyFolderStoreQuery *query, gboolean refresh,
> TnyGetFoldersCallback callback, TnyStatusCallback status_callback,
> gpointer user_data)
> {
> TnyCombinedAccountPriv *priv = TNY_COMBINED_ACCOUNT_GET_PRIVATE
> (self);
>
> - tny_folder_store_get_folders_async (TNY_FOLDER_STORE
> (priv->store_account), list, query, callback, status_callback,
> user_data);
> + tny_folder_store_get_folders_async (TNY_FOLDER_STORE
> (priv->store_account), list, query, refresh, callback,
> status_callback, user_data);
> }
>
> static void
> +tny_combined_account_refresh_async (TnyFolderStore *self,
> TnyFolderStoreCallback callback, TnyStatusCallback status_callback,
> gpointer user_data)
> +{
> + TnyCombinedAccountPriv *priv = TNY_COMBINED_ACCOUNT_GET_PRIVATE
> (self);
> +
> + tny_folder_store_refresh_async (TNY_FOLDER_STORE
> (priv->store_account), callback, status_callback, user_data);
> +}
> +
> +static void
> tny_combined_account_add_observer (TnyFolderStore *self,
> TnyFolderStoreObserver *observer)
> {
> TnyCombinedAccountPriv *priv = TNY_COMBINED_ACCOUNT_GET_PRIVATE
> (self);
> @@ -540,6 +548,7 @@
> klass->get_folders_async= tny_combined_account_get_folders_async;
> klass->add_observer= tny_combined_account_add_observer;
> klass->remove_observer= tny_combined_account_remove_observer;
> + klass->refresh_async = tny_combined_account_refresh_async;
> }
>
> static void
> Index: libtinymail/tny-folder-store.c
> ===================================================================
> --- libtinymail/tny-folder-store.c (révision 70)
> +++ libtinymail/tny-folder-store.c (copie de travail)
> @@ -266,6 +266,7 @@
> * @self: a #TnyFolderStore
> * @list: a #TnyList to to which the folders will be prepended
> * @query: (null-ok): a #TnyFolderStoreQuery or NULL
> + * @refresh: synchronize with the service first
> * @err: (null-ok): a #GError or NULL
> *
> * Get a list of child folders from @self. You can use @query to
> limit the list
> @@ -277,7 +278,7 @@
> * TnyFolderStore *store = ...
> * TnyIterator *iter; TnyFolderStoreQuery *query = ...
> * TnyList *folders = tny_simple_list_new ();
> - * tny_folder_store_get_folders (store, folders, query, NULL);
> + * tny_folder_store_get_folders (store, folders, query, TRUE, NULL);
> * iter = tny_list_create_iterator (folders);
> * while (!tny_iterator_is_done (iter))
> * {
> @@ -295,7 +296,7 @@
> * audience: application-developer
> **/
> void
> -tny_folder_store_get_folders (TnyFolderStore *self, TnyList *list,
> TnyFolderStoreQuery *query, GError **err)
> +tny_folder_store_get_folders (TnyFolderStore *self, TnyList *list,
> TnyFolderStoreQuery *query, gboolean refresh, GError **err)
> {
> #ifdef DBC /* require */
> g_assert (TNY_IS_FOLDER_STORE (self));
> @@ -306,7 +307,7 @@
> g_assert (TNY_FOLDER_STORE_GET_IFACE (self)->get_folders!= NULL);
> #endif
>
> - TNY_FOLDER_STORE_GET_IFACE (self)->get_folders(self, list, query,
> err);
> + TNY_FOLDER_STORE_GET_IFACE (self)->get_folders(self, list, query,
> refresh, err);
>
> #ifdef DBC /* ensure */
> #endif
> @@ -343,6 +344,7 @@
> * @self: a #TnyFolderStore
> * @list: a #TnyList to to which the folders will be prepended
> * @query: (null-ok): A #TnyFolderStoreQuery object
> + * @refresh: synchronize with the service first
> * @callback: (null-ok): a #TnyGetFoldersCallback or NULL
> * @status_callback: (null-ok): a #TnyStatusCallback or NULL
> * @user_data: (null-ok): user data that will be passed to the
> callbacks
> @@ -363,7 +365,7 @@
> * TnyList *folders = tny_simple_list_new ();
> * g_print ("%s\n", tny_folder_get_name (TNY_FOLDER
> (folder)));
> * tny_folder_store_get_folders_async (folder,
> - * folders, NULL, callback, NULL, NULL);
> + * folders, NULL, true, callback, NULL, NULL);
> * g_object_unref (folder);
> * tny_iterator_next (iter);
> * }
> @@ -375,7 +377,7 @@
> * TnyList *folders;
> * folders = tny_simple_list_new ();
> * tny_folder_store_get_folders_async (TNY_FOLDER_STORE
> (account),
> - * folders, NULL, callback, NULL, NULL);
> + * folders, NULL, TRUE, callback, NULL, NULL);
> * g_object_unref (folders);
> * }
> * </programlisting></informalexample>
> @@ -388,7 +390,7 @@
> * audience: application-developer
> **/
> void
> -tny_folder_store_get_folders_async (TnyFolderStore *self, TnyList
> *list, TnyFolderStoreQuery *query, TnyGetFoldersCallback callback,
> TnyStatusCallback status_callback, gpointer user_data)
> +tny_folder_store_get_folders_async (TnyFolderStore *self, TnyList
> *list, TnyFolderStoreQuery *query, gboolean refresh,
> TnyGetFoldersCallback callback, TnyStatusCallback status_callback,
> gpointer user_data)
> {
> #ifdef DBC /* require */
> g_assert (TNY_IS_FOLDER_STORE (self));
> @@ -399,7 +401,7 @@
> g_assert (TNY_FOLDER_STORE_GET_IFACE (self)->get_folders_async!=
> NULL);
> #endif
>
> - TNY_FOLDER_STORE_GET_IFACE (self)->get_folders_async(self, list,
> query, callback, status_callback, user_data);
> + TNY_FOLDER_STORE_GET_IFACE (self)->get_folders_async(self, list,
> query, refresh, callback, status_callback, user_data);
>
> #ifdef DBC /* ensure */
> #endif
> @@ -408,7 +410,21 @@
> }
>
>
> +void tny_folder_store_refresh_async (TnyFolderStore *self,
> TnyFolderStoreCallback callback, TnyStatusCallback status_callback,
> gpointer user_data)
> +{
> +#ifdef DBC /* require */
> + g_assert (TNY_IS_FOLDER_STORE (self));
> + g_assert (TNY_FOLDER_STORE_GET_IFACE (self)->refresh_async !=
> NULL);
> +#endif
>
> + TNY_FOLDER_STORE_GET_IFACE (self)->refresh_async(self, callback,
> status_callback, user_data);
> +
> +#ifdef DBC /* ensure */
> +#endif
> +
> + return;
> +}
> +
> static void
> tny_folder_store_base_init (gpointer g_class)
> {
> Index: libtinymail/tny-folder-store.h
> ===================================================================
> --- libtinymail/tny-folder-store.h (révision 70)
> +++ libtinymail/tny-folder-store.h (copie de travail)
> @@ -48,10 +48,11 @@
> void (*remove_folder) (TnyFolderStore *self, TnyFolder *folder,
> GError **err);
> TnyFolder* (*create_folder) (TnyFolderStore *self, const gchar
> *name, GError **err);
> void (*create_folder_async) (TnyFolderStore *self, const gchar
> *name, TnyCreateFolderCallback callback, TnyStatusCallback
> status_callback, gpointer user_data);
> - void (*get_folders) (TnyFolderStore *self, TnyList *list,
> TnyFolderStoreQuery *query, GError **err);
> - void (*get_folders_async) (TnyFolderStore *self, TnyList *list,
> TnyFolderStoreQuery *query, TnyGetFoldersCallback callback,
> TnyStatusCallback status_callback, gpointer user_data);
> + void (*get_folders) (TnyFolderStore *self, TnyList *list,
> TnyFolderStoreQuery *query, gboolean refresh, GError **err);
> + void (*get_folders_async) (TnyFolderStore *self, TnyList *list,
> TnyFolderStoreQuery *query, gboolean refresh, TnyGetFoldersCallback
> callback, TnyStatusCallback status_callback, gpointer user_data);
> void (*add_observer) (TnyFolderStore *self,
> TnyFolderStoreObserver *observer);
> void (*remove_observer) (TnyFolderStore *self,
> TnyFolderStoreObserver *observer);
> + void (*refresh_async) (TnyFolderStore *self,
> TnyFolderStoreCallback callback, TnyStatusCallback status_callback,
> gpointer user_data);
>
> };
>
> @@ -59,12 +60,13 @@
>
> void tny_folder_store_remove_folder (TnyFolderStore *self, TnyFolder
> *folder, GError **err);
> void tny_folder_store_create_folder_async (TnyFolderStore *self,
> const gchar *name, TnyCreateFolderCallback callback, TnyStatusCallback
> status_callback, gpointer user_data);
> -void tny_folder_store_get_folders_async (TnyFolderStore *self,
> TnyList *list, TnyFolderStoreQuery *query, TnyGetFoldersCallback
> callback, TnyStatusCallback status_callback, gpointer user_data);
> +void tny_folder_store_get_folders_async (TnyFolderStore *self,
> TnyList *list, TnyFolderStoreQuery *query, gboolean refresh,
> TnyGetFoldersCallback callback, TnyStatusCallback status_callback,
> gpointer user_data);
> void tny_folder_store_add_observer (TnyFolderStore *self,
> TnyFolderStoreObserver *observer);
> void tny_folder_store_remove_observer (TnyFolderStore *self,
> TnyFolderStoreObserver *observer);
> +void tny_folder_store_refresh_async (TnyFolderStore *self,
> TnyFolderStoreCallback callback, TnyStatusCallback status_callback,
> gpointer user_data);
>
> #ifndef TNY_DISABLE_DEPRECATED
> -void tny_folder_store_get_folders (TnyFolderStore *self, TnyList
> *list, TnyFolderStoreQuery *query, GError **err);
> +void tny_folder_store_get_folders (TnyFolderStore *self, TnyList
> *list, TnyFolderStoreQuery *query, gboolean refresh, GError **err);
> TnyFolder *tny_folder_store_create_folder (TnyFolderStore *self,
> const gchar *name, GError **err);
> #endif
>
>
> _______________________________________________
> tinymail-devel-list mailing list
> tinymail-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/tinymail-devel-list
--
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
http://pvanhoof.be/blog
http://codeminded.be
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]