]> git.0d.be Git - empathy.git/commitdiff
add empathy-account-plugin
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 13 Jul 2012 10:32:36 +0000 (12:32 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 24 Jul 2012 14:20:03 +0000 (16:20 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=680448

ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.c [new file with mode: 0644]
ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.h [new file with mode: 0644]

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 (file)
index 0000000..517ba52
--- /dev/null
@@ -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 (file)
index 0000000..8f31025
--- /dev/null
@@ -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__*/