GTK_DOC_CHECK([1.0])
dnl # GLib/Gobject/Gtk/Gconf => mandatory
-PKG_CHECK_MODULES(MODEST_GSTUFF,glib-2.0 >= 2.6 gobject-2.0 gtk+-2.0 >= 2.6 gconf-2.0 libgtkhtml-3.8 libglade-2.0 libtinymail-1.0 libtinymail-camel-1.0 libtinymailui-1.0 libtinymailui-gtk-1.0 camel-1.2)
+PKG_CHECK_MODULES(MODEST_GSTUFF,glib-2.0 >= 2.6 gobject-2.0 gtk+-2.0 >= 2.6 gconf-2.0 libgtkhtml-3.8 libglade-2.0 libtinymail-1.0 libtinymail-camel-1.0 libtinymailui-1.0 libtinymailui-gtk-1.0)
AC_SUBST(MODEST_GSTUFF_CFLAGS)
AC_SUBST(MODEST_GSTUFF_LIBS)
*/
#include <tny-msg.h>
-#include <tny-msg.h>
-#include <tny-header.h>
+#include <tny-folder.h>
+#include <tny-folder-store.h>
+#include <tny-folder-store-query.h>
#include <tny-header.h>
#include <tny-account.h>
#include <tny-account-store.h>
void
-modest_tny_store_actions_update_folders (TnyStoreAccountIface *storage_account)
+modest_tny_store_actions_update_folders (TnyStoreAccount *storage_account)
{
// FIXME TODO: This results in failure on folder change.
- /*
- const TnyListIface* folders;
- TnyIteratorIface* ifolders;
- const TnyMsgFolderIface *cur_folder;
- folders = tny_store_account_iface_get_folders (storage_account,
- TNY_STORE_ACCOUNT_FOLDER_TYPE_SUBSCRIBED);
+ TnyList *folders;
+ TnyIterator *ifolders;
+ const TnyFolder *cur_folder;
+ TnyFolderStoreQuery *query;
+
+/* folders = tny_store_account_get_folders (storage_account, */
+/* TNY_STORE_ACCOUNT_FOLDER_TYPE_SUBSCRIBED); */
+ query = tny_folder_store_query_new ();
+ tny_folder_store_query_add_item (query, NULL, TNY_FOLDER_STORE_QUERY_OPTION_SUBSCRIBED);
+ tny_folder_store_get_folders (TNY_FOLDER_STORE (storage_account),
+ folders, NULL);
+ g_object_unref (query);
- ifolders = tny_list_iface_create_iterator (folders);
+ ifolders = tny_list_create_iterator (folders);
- for (cur_folder = TNY_MSG_FOLDER_IFACE(tny_iterator_iface_first (ifolders));
- tny_iterator_iface_has_next (ifolders);
- tny_iterator_iface_next (ifolders)) {
+ for (tny_iterator_first (ifolders);
+ !tny_iterator_is_done (ifolders);
+ tny_iterator_next (ifolders)) {
- cur_folder = TNY_MSG_FOLDER_IFACE(tny_iterator_iface_current (ifolders));
- tny_msg_folder_iface_refresh (cur_folder);
+ cur_folder = TNY_FOLDER(tny_iterator_get_current (ifolders));
+ tny_folder_refresh (cur_folder);
}
g_object_unref (ifolders);
-*/}
+}