configure.ac: removed dependency with camel-1.2.
authorSergio Villar Senin <svillar@igalia.com>
Tue, 31 Oct 2006 16:36:33 +0000 (16:36 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Tue, 31 Oct 2006 16:36:33 +0000 (16:36 +0000)
modest-tny-store-actions.h (modest_tny_store_actions_update_folders): replaced TnyStoreAccountIface by TnyStoreAccount in the method signature.
modest-tny-store-actions.c (modest_tny_store_actions_update_folders): replaced TnyStoreAccountIface by TnyStoreAccount in the method signature. Updated the method code in order to support the new Tinymail API.

pmo-trunk-r478

configure.ac
src/modest-tny-store-actions.c
src/modest-tny-store-actions.h

index 3d2e0c5..0671d98 100644 (file)
@@ -24,7 +24,7 @@ AC_CHECK_PROG([perl])
 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)
 
index 562f044..1903a13 100644 (file)
@@ -28,8 +28,9 @@
  */
 
 #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);
-*/}
+}
 
index 16d618f..4751bca 100644 (file)
@@ -38,7 +38,7 @@
 
 G_BEGIN_DECLS
 
-void    modest_tny_store_actions_update_folders (TnyStoreAccountIface *storage_account);
+void    modest_tny_store_actions_update_folders (TnyStoreAccount *storage_account);
 
 G_END_DECLS