* Danielle Madeley <danielle.madeley@collabora.co.uk>
*/
+#include "config.h"
+
#include <glib/gi18n.h>
#include <telepathy-glib/util.h>
#define PLUGIN_NAME "goa"
#define PLUGIN_PRIORITY (MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_KEYRING + 10)
#define PLUGIN_DESCRIPTION "Provide Telepathy Accounts from GOA"
-#define PLUGIN_PROVIDER "org.gnome.OnlineAccounts"
+#define PLUGIN_PROVIDER EMPATHY_GOA_PROVIDER
#define INITIAL_COMMENT "Parameters of GOA Telepathy accounts"
{
McpAccountManagerGoaPrivate *priv = GET_PRIVATE (self);
- g_hash_table_destroy (priv->accounts);
+ g_hash_table_unref (priv->accounts);
g_key_file_free (priv->store);
g_free (priv->filename);
PARAM ("param-extra-certificate-identities", "talk.google.com");
PARAM ("param-require-encryption", "true");
}
+ else if (!tp_strdiff (type, "facebook"))
+ {
+ PARAM ("manager", "gabble");
+ PARAM ("protocol", "jabber");
+ PARAM ("Icon", "im-facebook");
+ PARAM ("Service", "facebook");
+
+ PARAM ("param-account", "chat.facebook.com");
+ PARAM ("param-require-encryption", "true");
+ }
+ else if (!tp_strdiff (type, "windows_live"))
+ {
+ PARAM ("manager", "gabble");
+ PARAM ("protocol", "jabber");
+ PARAM ("Icon", "im-msn");
+ PARAM ("Service", "windows-live");
+
+ PARAM ("param-account", "messenger.live.com");
+ PARAM ("param-require-encryption", "true");
+ }
else
{
- /* unknown account type */
- g_hash_table_destroy (params);
+ DEBUG ("Unknown account type %s", type);
+ g_hash_table_unref (params);
return NULL;
}
- /* TODO: add Facebook support */
-
/* generic properties */
PARAM ("DisplayName", goa_account_get_presentation_identity (account));
- PARAM ("ConnectAutomatically", "true");
#undef PARAM
(char *) g_hash_table_lookup (params, "protocol"),
type, id);
- g_hash_table_destroy (params);
+ g_hash_table_unref (params);
return name;
}
while (g_hash_table_iter_next (&iter, &key, &value))
mcp_account_manager_set_value (am, acct, key, value);
- g_hash_table_destroy (params);
+ g_hash_table_unref (params);
/* Stored properties */
keys = g_key_file_get_keys (priv->store, acct, &nkeys, NULL);
mcp_account_manager_set_value (am, acct, key, value);
- g_hash_table_destroy (params);
+ g_hash_table_unref (params);
g_free (value);
}