diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-09-05 15:44:45 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-09-07 15:14:12 +0800 |
commit | be4231bfd2bd06d23a2ddf9c5910444eb2541f5d (patch) | |
tree | cc744544e410320271ec53ea61484826f8c4dfd4 /ubuntu-online-accounts/mc-plugin | |
parent | febd3c5c52a1bc275dea77d86b3bab20594ad4ec (diff) | |
download | gsoc2013-empathy-be4231bfd2bd06d23a2ddf9c5910444eb2541f5d.tar gsoc2013-empathy-be4231bfd2bd06d23a2ddf9c5910444eb2541f5d.tar.gz gsoc2013-empathy-be4231bfd2bd06d23a2ddf9c5910444eb2541f5d.tar.bz2 gsoc2013-empathy-be4231bfd2bd06d23a2ddf9c5910444eb2541f5d.tar.lz gsoc2013-empathy-be4231bfd2bd06d23a2ddf9c5910444eb2541f5d.tar.xz gsoc2013-empathy-be4231bfd2bd06d23a2ddf9c5910444eb2541f5d.tar.zst gsoc2013-empathy-be4231bfd2bd06d23a2ddf9c5910444eb2541f5d.zip |
add empathy-webcredentials-monitor
Just the skeleton so far.
https://bugzilla.gnome.org/show_bug.cgi?id=683409
Diffstat (limited to 'ubuntu-online-accounts/mc-plugin')
3 files changed, 170 insertions, 0 deletions
diff --git a/ubuntu-online-accounts/mc-plugin/Makefile.am b/ubuntu-online-accounts/mc-plugin/Makefile.am index 2123e526d..ead474237 100644 --- a/ubuntu-online-accounts/mc-plugin/Makefile.am +++ b/ubuntu-online-accounts/mc-plugin/Makefile.am @@ -9,6 +9,7 @@ plugins_LTLIBRARIES = \ mcp_account_manager_uoa_la_SOURCES = \ mission-control-plugin.c \ mcp-account-manager-uoa.c mcp-account-manager-uoa.h \ + empathy-webcredentials-monitor.c empathy-webcredentials-monitor.h \ $(NULL) mcp_account_manager_uoa_la_LIBADD = \ diff --git a/ubuntu-online-accounts/mc-plugin/empathy-webcredentials-monitor.c b/ubuntu-online-accounts/mc-plugin/empathy-webcredentials-monitor.c new file mode 100644 index 000000000..e8911bc47 --- /dev/null +++ b/ubuntu-online-accounts/mc-plugin/empathy-webcredentials-monitor.c @@ -0,0 +1,116 @@ +#include "config.h" + +#include "empathy-webcredentials-monitor.h" + +G_DEFINE_TYPE (EmpathyWebcredentialsMonitor, empathy_webcredentials_monitor, G_TYPE_OBJECT) + +enum +{ + FIRST_PROP = 1, + N_PROPS +}; + +/* +enum +{ + LAST_SIGNAL +}; + +static guint signals[LAST_SIGNAL]; +*/ + +struct _EmpathyWebcredentialsMonitorPriv +{ + gpointer badger; +}; + +static void +empathy_webcredentials_monitor_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) +{ + //EmpathyWebcredentialsMonitor *self = EMPATHY_WEBCREDENTIALS_MONITOR (object); + + switch (property_id) + { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +empathy_webcredentials_monitor_set_property (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec) +{ + //EmpathyWebcredentialsMonitor *self = EMPATHY_WEBCREDENTIALS_MONITOR (object); + + switch (property_id) + { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + break; + } +} + +static void +empathy_webcredentials_monitor_constructed (GObject *object) +{ + //EmpathyWebcredentialsMonitor *self = EMPATHY_WEBCREDENTIALS_MONITOR (object); + void (*chain_up) (GObject *) = + ((GObjectClass *) empathy_webcredentials_monitor_parent_class)->constructed; + + chain_up (object); +} + +static void +empathy_webcredentials_monitor_dispose (GObject *object) +{ + //EmpathyWebcredentialsMonitor *self = EMPATHY_WEBCREDENTIALS_MONITOR (object); + void (*chain_up) (GObject *) = + ((GObjectClass *) empathy_webcredentials_monitor_parent_class)->dispose; + + chain_up (object); +} + +static void +empathy_webcredentials_monitor_finalize (GObject *object) +{ + //EmpathyWebcredentialsMonitor *self = EMPATHY_WEBCREDENTIALS_MONITOR (object); + void (*chain_up) (GObject *) = + ((GObjectClass *) empathy_webcredentials_monitor_parent_class)->finalize; + + chain_up (object); +} + +static void +empathy_webcredentials_monitor_class_init ( + EmpathyWebcredentialsMonitorClass *klass) +{ + GObjectClass *oclass = G_OBJECT_CLASS (klass); + + oclass->get_property = empathy_webcredentials_monitor_get_property; + oclass->set_property = empathy_webcredentials_monitor_set_property; + oclass->constructed = empathy_webcredentials_monitor_constructed; + oclass->dispose = empathy_webcredentials_monitor_dispose; + oclass->finalize = empathy_webcredentials_monitor_finalize; + + g_type_class_add_private (klass, sizeof (EmpathyWebcredentialsMonitorPriv)); +} + +static void +empathy_webcredentials_monitor_init (EmpathyWebcredentialsMonitor *self) +{ + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, + EMPATHY_TYPE_WEBCREDENTIALS_MONITOR, EmpathyWebcredentialsMonitorPriv); +} + +EmpathyWebcredentialsMonitor * +empathy_webcredentials_monitor_new (void) +{ + return g_object_new (EMPATHY_TYPE_WEBCREDENTIALS_MONITOR, + NULL); +} diff --git a/ubuntu-online-accounts/mc-plugin/empathy-webcredentials-monitor.h b/ubuntu-online-accounts/mc-plugin/empathy-webcredentials-monitor.h new file mode 100644 index 000000000..540a2bea7 --- /dev/null +++ b/ubuntu-online-accounts/mc-plugin/empathy-webcredentials-monitor.h @@ -0,0 +1,53 @@ +#ifndef __EMPATHY_WEBCREDENTIALS_MONITOR_H__ +#define __EMPATHY_WEBCREDENTIALS_MONITOR_H__ + +#include <glib-object.h> + +G_BEGIN_DECLS + +typedef struct _EmpathyWebcredentialsMonitor EmpathyWebcredentialsMonitor; +typedef struct _EmpathyWebcredentialsMonitorClass EmpathyWebcredentialsMonitorClass; +typedef struct _EmpathyWebcredentialsMonitorPriv EmpathyWebcredentialsMonitorPriv; + +struct _EmpathyWebcredentialsMonitorClass +{ + /*<private>*/ + GObjectClass parent_class; +}; + +struct _EmpathyWebcredentialsMonitor +{ + /*<private>*/ + GObject parent; + EmpathyWebcredentialsMonitorPriv *priv; +}; + +GType empathy_webcredentials_monitor_get_type (void); + +/* TYPE MACROS */ +#define EMPATHY_TYPE_WEBCREDENTIALS_MONITOR \ + (empathy_webcredentials_monitor_get_type ()) +#define EMPATHY_WEBCREDENTIALS_MONITOR(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), \ + EMPATHY_TYPE_WEBCREDENTIALS_MONITOR, \ + EmpathyWebcredentialsMonitor)) +#define EMPATHY_WEBCREDENTIALS_MONITOR_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), \ + EMPATHY_TYPE_WEBCREDENTIALS_MONITOR, \ + EmpathyWebcredentialsMonitorClass)) +#define EMPATHY_IS_WEBCREDENTIALS_MONITOR(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ + EMPATHY_TYPE_WEBCREDENTIALS_MONITOR)) +#define EMPATHY_IS_WEBCREDENTIALS_MONITOR_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), \ + EMPATHY_TYPE_WEBCREDENTIALS_MONITOR)) +#define EMPATHY_WEBCREDENTIALS_MONITOR_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), \ + EMPATHY_TYPE_WEBCREDENTIALS_MONITOR, \ + EmpathyWebcredentialsMonitorClass)) + +EmpathyWebcredentialsMonitor * empathy_webcredentials_monitor_new (void); + +G_END_DECLS + +#endif /* #ifndef __EMPATHY_WEBCREDENTIALS_MONITOR_H__*/ |