}
EmpathyAuthFactory *
-empathy_auth_factory_dup_singleton (void)
+empathy_auth_factory_new (TpSimpleClientFactory *factory)
{
- EmpathyAuthFactory *out = NULL;
- TpDBusDaemon *bus;
-
- bus = tp_dbus_daemon_dup (NULL);
- out = g_object_new (EMPATHY_TYPE_AUTH_FACTORY,
- "dbus-daemon", bus,
+ return g_object_new (EMPATHY_TYPE_AUTH_FACTORY,
+ "factory", factory,
"name", "Empathy.Auth",
NULL);
- g_object_unref (bus);
-
- return out;
}
gboolean
(G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_AUTH_FACTORY, \
EmpathyAuthFactoryClass))
-EmpathyAuthFactory * empathy_auth_factory_dup_singleton (void);
+EmpathyAuthFactory * empathy_auth_factory_new (TpSimpleClientFactory *factory);
gboolean empathy_auth_factory_register (EmpathyAuthFactory *self,
GError **error);
GError *error = NULL;
EmpathyAuthFactory *factory;
TpDebugSender *debug_sender;
+ TpSimpleClientFactory *tp_factory;
+ TpDBusDaemon *dbus;
g_thread_init (NULL);
g_log_set_default_handler (tp_debug_sender_log_handler, G_LOG_DOMAIN);
#endif
- factory = empathy_auth_factory_dup_singleton ();
+ dbus = tp_dbus_daemon_dup (NULL);
+ tp_factory = tp_simple_client_factory_new (dbus);
+ tp_simple_client_factory_add_account_features_varargs (tp_factory,
+ TP_ACCOUNT_FEATURE_STORAGE,
+ 0);
+
+ factory = empathy_auth_factory_new (tp_factory);
+ g_object_unref (tp_factory);
+ g_object_unref (dbus);
g_signal_connect (factory, "new-server-tls-handler",
G_CALLBACK (auth_factory_new_tls_handler_cb), NULL);