From bc953560bc9db4818874cddd855c5d06241994df Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 13 Jul 2012 12:32:36 +0200 Subject: add empathy-account-plugin https://bugzilla.gnome.org/show_bug.cgi?id=680448 --- .../cc-plugins/empathy-accounts-plugin.c | 69 +++++++++++++++++++++ .../cc-plugins/empathy-accounts-plugin.h | 71 ++++++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.c create mode 100644 ubuntu-online-accounts/cc-plugins/empathy-accounts-plugin.h (limited to 'ubuntu-online-accounts') 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. + * + * 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. + * + * 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 + +G_BEGIN_DECLS + +typedef struct _EmpathyAccountsPlugin EmpathyAccountsPlugin; +typedef struct _EmpathyAccountsPluginClass EmpathyAccountsPluginClass; + +struct _EmpathyAccountsPluginClass +{ + /**/ + ApPluginClass parent_class; +}; + +struct _EmpathyAccountsPlugin +{ + /**/ + 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__*/ -- cgit v1.2.3