X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-runtime.c;h=890b8db74ae31c8226ce05048881829638afbaea;hp=568fb463fc14b82a8581bf02a9bb7814cba16782;hb=b6a6134ec1da8ab60641a6dabb515561521ea23e;hpb=85dbfb5b2586e248ed9cef94d0e43f8e24865caf diff --git a/src/modest-runtime.c b/src/modest-runtime.c index 568fb46..890b8db 100644 --- a/src/modest-runtime.c +++ b/src/modest-runtime.c @@ -69,13 +69,13 @@ modest_runtime_init (void) g_printerr ("modest: modest_runtime_init can only be run once\n"); return FALSE; } - + _singletons = modest_singletons_new (); if (!_singletons) { g_printerr ("modest: failed to create singletons\n"); return FALSE; } - + return TRUE; } @@ -143,9 +143,10 @@ modest_runtime_get_email_clipboard (void) ModestTnyAccountStore* modest_runtime_get_account_store (void) { - // we get the account store here instead of in Singletons - // as it leads to various chicken & problems with initialization - g_return_val_if_fail (_singletons, NULL); + g_return_val_if_fail (_singletons, NULL); + /* we get the account store here instead of in Singletons as + it leads to various chicken & egg problems with + initialization */ if (!_account_store) { _account_store = modest_tny_account_store_new (modest_runtime_get_account_mgr(), modest_runtime_get_device()); @@ -278,6 +279,20 @@ modest_runtime_get_window_mgr (void) return modest_singletons_get_window_mgr (_singletons); } +ModestPluginFactory * +modest_runtime_get_plugin_factory (void) +{ + g_return_val_if_fail (_singletons, NULL); + return modest_singletons_get_plugin_factory (_singletons); +} + +ModestProtocolRegistry * +modest_runtime_get_protocol_registry (void) +{ + g_return_val_if_fail (_singletons, NULL); + return modest_singletons_get_protocol_registry (_singletons); +} + /* http://primates.ximian.com/~federico/news-2006-04.html#memory-debugging-infrastructure*/ ModestRuntimeDebugFlags modest_runtime_get_debug_flags ()