]> git.0d.be Git - empathy.git/commitdiff
add empathy-webcredentials-monitor
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 5 Sep 2012 07:44:45 +0000 (09:44 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 7 Sep 2012 07:14:12 +0000 (09:14 +0200)
Just the skeleton so far.

https://bugzilla.gnome.org/show_bug.cgi?id=683409

ubuntu-online-accounts/mc-plugin/Makefile.am
ubuntu-online-accounts/mc-plugin/empathy-webcredentials-monitor.c [new file with mode: 0644]
ubuntu-online-accounts/mc-plugin/empathy-webcredentials-monitor.h [new file with mode: 0644]

index 2123e526d02de41118f9dd3fbad2738b34cd1aed..ead47423758171b10d48f7e8879b01c328d54c4b 100644 (file)
@@ -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 (file)
index 0000000..e8911bc
--- /dev/null
@@ -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 (file)
index 0000000..540a2be
--- /dev/null
@@ -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__*/