1 /* modest-tny-store-actions.c */
3 /* insert (c)/licensing information) */
6 #include <tny-msg-iface.h>
7 #include <tny-msg-header.h>
8 #include <tny-msg-header-iface.h>
9 #include <tny-account-iface.h>
10 #include <tny-account-store-iface.h>
11 #include <tny-store-account-iface.h>
12 #include <tny-store-account.h>
13 #include <tny-stream-camel.h>
15 #include <camel/camel-folder.h>
16 #include <camel/camel.h>
17 #include <camel/camel-folder-summary.h>
21 #include "modest-tny-store-actions.h"
25 modest_tny_store_actions_update_folders (TnyStoreAccountIface *storage_account)
28 const TnyListIface* folders;
29 TnyIteratorIface* ifolders;
30 const TnyMsgFolderIface *cur_folder;
32 folders = tny_store_account_iface_get_folders (storage_account,
33 TNY_STORE_ACCOUNT_FOLDER_TYPE_SUBSCRIBED);
35 ifolders = tny_list_iface_create_iterator (folders);
37 for (cur_folder = TNY_MSG_FOLDER_IFACE(tny_iterator_iface_first (ifolders));
38 tny_iterator_iface_has_next (ifolders);
39 tny_iterator_iface_next (ifolders)) {
41 cur_folder = TNY_MSG_FOLDER_IFACE(tny_iterator_iface_current (ifolders));
42 tny_msg_folder_iface_refresh (cur_folder);
45 g_object_unref (ifolders);