X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=tests%2Fcheck_update-account.c;h=3039e912e0e89499339df11d2e6b7eb4a2607486;hp=31a60d9f10493b71bbde2c6481fe1eadbd5d939e;hb=7c966d893beecfa2f2d5ed4b8fe4ad5a0ae4247e;hpb=3b6a17e70f502ccdd48e31a1b13ec753f2c90713 diff --git a/tests/check_update-account.c b/tests/check_update-account.c index 31a60d9..3039e91 100644 --- a/tests/check_update-account.c +++ b/tests/check_update-account.c @@ -39,7 +39,7 @@ #include #include -#include "modest-tny-platform-factory.h" +#include #include "modest-account-mgr.h" #include "modest-mail-operation.h" #include "modest-mail-operation-queue.h" @@ -67,21 +67,18 @@ func (gpointer_data) { TnyStoreAccount *account; TnyIterator *iter; - TnyPlatformFactory *fact = NULL; ModestAccountMgr *acc_mgr = NULL; ModestMailOperation *mail_op = NULL; ModestMailOperationQueue *queue = NULL; - TnyAccountStore *account_store = NULL; + ModestTnyAccountStore *account_store = NULL; TnyList *accounts; - fact = TNY_PLATFORM_FACTORY (modest_tny_platform_factory_get_instance ()); - acc_mgr = MODEST_ACCOUNT_MGR (modest_tny_platform_factory_get_account_mgr_instance (MODEST_TNY_PLATFORM_FACTORY (fact))); - account_store = tny_platform_factory_new_account_store (fact); + acc_mgr = modest_runtime_get_account_mgr(); + account_store = modest_runtime_get_account_store(); /* Get accounts */ accounts = tny_simple_list_new (); - - tny_account_store_get_accounts (account_store, accounts, + tny_account_store_get_accounts (TNY_ACCOUNT_STORE(account_store), accounts, TNY_ACCOUNT_STORE_STORE_ACCOUNTS); iter = tny_list_create_iterator (accounts); @@ -90,7 +87,7 @@ func (gpointer_data) g_object_unref (G_OBJECT (iter)); g_object_unref (G_OBJECT (accounts)); - queue = modest_tny_platform_factory_get_mail_operation_queue_instance (MODEST_TNY_PLATFORM_FACTORY (fact)); + queue = modest_runtime_get_mail_operation_queue (); mail_op = modest_mail_operation_new (); g_signal_connect (G_OBJECT (mail_op), "progress_changed", @@ -100,6 +97,9 @@ func (gpointer_data) modest_mail_operation_queue_add (queue, mail_op); g_object_unref (G_OBJECT (mail_op)); + + if (account) + g_object_unref (account); return FALSE; }