aboutsummaryrefslogtreecommitdiffstats
path: root/ubuntu-online-accounts
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-07-13 18:32:36 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-07-24 22:20:03 +0800
commitbc953560bc9db4818874cddd855c5d06241994df (patch)
tree6fe65b56e41a304a53f49ff44556fd6688f0037b /ubuntu-online-accounts
parente0edcddf9c31b788844b294aa94b7cd181c6662f (diff)
downloadgsoc2013-empathy-bc953560bc9db4818874cddd855c5d06241994df.tar
gsoc2013-empathy-bc953560bc9db4818874cddd855c5d06241994df.tar.gz
gsoc2013-empathy-bc953560bc9db4818874cddd855c5d06241994df.tar.bz2
gsoc2013-empathy-bc953560bc9db4818874cddd855c5d06241994df.tar.lz
gsoc2013-empathy-bc953560bc9db4818874cddd855c5d06241994df.tar.xz
gsoc2013-empathy-bc953560bc9db4818874cddd855c5d06241994df.tar.zst
gsoc2013-empathy-bc953560bc9db4818874cddd855c5d06241994df.zip
add empathy-account-plugin
https://bugzilla.gnome.org/show_bug.cgi?id=680448
Diffstat (limited to 'ubuntu-online-accounts')
-rw-r--r--ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.c69
-rw-r--r--ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.h71
2 files changed, 140 insertions, 0 deletions
diff --git a/ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.c b/ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.c
new file mode 100644
index 000000000..517ba5272
--- /dev/null
+++ b/ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.c
@@ -0,0 +1,69 @@
+/*
+ * empathy-accounts-plugin.c
+ *
+ * Copyright (C) 2012 Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+
+#include "empathy-accounts-plugin.h"
+
+#include "empathy-accounts-plugin-widget.h"
+
+G_DEFINE_TYPE (EmpathyAccountsPlugin, empathy_accounts_plugin, AP_TYPE_PLUGIN)
+
+static GtkWidget *
+empathy_accounts_plugin_build_widget (ApPlugin *plugin)
+{
+ return empathy_accounts_plugin_widget_new (ap_plugin_get_account (plugin));
+}
+
+static void
+empathy_accounts_plugin_delete_account (ApPlugin *plugin,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ /* TODO */
+}
+
+static void
+empathy_accounts_plugin_act_headless (ApPlugin *plugin)
+{
+ /* TODO */
+}
+
+static void
+empathy_accounts_plugin_class_init (
+ EmpathyAccountsPluginClass *klass)
+{
+ ApPluginClass *pclass = AP_PLUGIN_CLASS (klass);
+
+ pclass->build_widget = empathy_accounts_plugin_build_widget;
+ pclass->delete_account = empathy_accounts_plugin_delete_account;
+ pclass->act_headless = empathy_accounts_plugin_act_headless;
+}
+
+static void
+empathy_accounts_plugin_init (EmpathyAccountsPlugin *self)
+{
+}
+
+GType
+ap_module_get_object_type (void)
+{
+ return EMPATHY_TYPE_ACCOUNTS_PLUGIN;
+}
diff --git a/ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.h b/ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.h
new file mode 100644
index 000000000..8f3102596
--- /dev/null
+++ b/ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.h
@@ -0,0 +1,71 @@
+/*
+ * empathy-accounts-plugin.h
+ *
+ * Copyright (C) 2012 Collabora Ltd. <http://www.collabora.co.uk/>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __EMPATHY_ACCOUNTS_PLUGIN_H__
+#define __EMPATHY_ACCOUNTS_PLUGIN_H__
+
+#include <libaccount-plugin/plugin.h>
+
+G_BEGIN_DECLS
+
+typedef struct _EmpathyAccountsPlugin EmpathyAccountsPlugin;
+typedef struct _EmpathyAccountsPluginClass EmpathyAccountsPluginClass;
+
+struct _EmpathyAccountsPluginClass
+{
+ /*<private>*/
+ ApPluginClass parent_class;
+};
+
+struct _EmpathyAccountsPlugin
+{
+ /*<private>*/
+ ApPlugin parent;
+};
+
+GType empathy_accounts_plugin_get_type (void);
+
+/* TYPE MACROS */
+#define EMPATHY_TYPE_ACCOUNTS_PLUGIN \
+ (empathy_accounts_plugin_get_type ())
+#define EMPATHY_ACCOUNTS_PLUGIN(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), \
+ EMPATHY_TYPE_ACCOUNTS_PLUGIN, \
+ EmpathyAccountsPlugin))
+#define EMPATHY_ACCOUNTS_PLUGIN_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), \
+ EMPATHY_TYPE_ACCOUNTS_PLUGIN, \
+ EmpathyAccountsPluginClass))
+#define EMPATHY_IS_ACCOUNTS_PLUGIN(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
+ EMPATHY_TYPE_ACCOUNTS_PLUGIN))
+#define EMPATHY_IS_ACCOUNTS_PLUGIN_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass), \
+ EMPATHY_TYPE_ACCOUNTS_PLUGIN))
+#define EMPATHY_ACCOUNTS_PLUGIN_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+ EMPATHY_TYPE_ACCOUNTS_PLUGIN, \
+ EmpathyAccountsPluginClass))
+
+GType ap_module_get_object_type (void);
+
+G_END_DECLS
+
+#endif /* #ifndef __EMPATHY_ACCOUNTS_PLUGIN_H__*/