[telepathy-mission-control/master] McdClientRegistry: new stub class

Simon McVittie simon.mcvittie at collabora.co.uk
Mon Oct 19 07:01:03 PDT 2009


---
 src/Makefile.am       |    2 +
 src/client-registry.c |   42 ++++++++++++++++++++++++++++++++
 src/client-registry.h |   64 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 108 insertions(+), 0 deletions(-)
 create mode 100644 src/client-registry.c
 create mode 100644 src/client-registry.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 2616c6e..91a8036 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -131,6 +131,8 @@ libmcd_convenience_la_SOURCES = \
 	mcd-account-priv.h \
 	mcd-client.c \
 	mcd-client-priv.h \
+	client-registry.c \
+	client-registry.h \
 	mcd-dbusprop.c \
 	mcd-dbusprop.h \
 	mcd-debug.c \
diff --git a/src/client-registry.c b/src/client-registry.c
new file mode 100644
index 0000000..0ce6670
--- /dev/null
+++ b/src/client-registry.c
@@ -0,0 +1,42 @@
+/* Map containing registered Telepathy clients
+ *
+ * Copyright (C) 2007-2009 Nokia Corporation.
+ * Copyright (C) 2009 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
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * 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 "client-registry.h"
+
+G_DEFINE_TYPE (McdClientRegistry, _mcd_client_registry, G_TYPE_OBJECT)
+
+struct _McdClientRegistryPrivate
+{
+  int dummy;
+};
+
+static void
+_mcd_client_registry_init (McdClientRegistry *self)
+{
+  self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, MCD_TYPE_CLIENT_REGISTRY,
+      McdClientRegistryPrivate);
+}
+
+static void
+_mcd_client_registry_class_init (McdClientRegistryClass *cls)
+{
+  g_type_class_add_private (cls, sizeof (McdClientRegistryPrivate));
+}
diff --git a/src/client-registry.h b/src/client-registry.h
new file mode 100644
index 0000000..a5116d4
--- /dev/null
+++ b/src/client-registry.h
@@ -0,0 +1,64 @@
+/* Map containing registered Telepathy clients
+ *
+ * Copyright (C) 2007-2009 Nokia Corporation.
+ * Copyright (C) 2009 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
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * 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 MCD_CLIENT_REGISTRY_H
+#define MCD_CLIENT_REGISTRY_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+typedef struct _McdClientRegistry McdClientRegistry;
+typedef struct _McdClientRegistryClass McdClientRegistryClass;
+typedef struct _McdClientRegistryPrivate McdClientRegistryPrivate;
+
+struct _McdClientRegistry
+{
+  GObject parent;
+  McdClientRegistryPrivate *priv;
+};
+
+struct _McdClientRegistryClass
+{
+  GObjectClass parent;
+};
+
+GType _mcd_client_registry_get_type (void);
+
+#define MCD_TYPE_CLIENT_REGISTRY \
+  (_mcd_client_registry_get_type ())
+#define MCD_CLIENT_REGISTRY(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST ((obj), MCD_TYPE_CLIENT_REGISTRY, \
+                               McdClientRegistry))
+#define MCD_CLIENT_REGISTRY_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST ((klass), MCD_TYPE_CLIENT_REGISTRY, \
+                            McdClientRegistryClass))
+#define MCD_IS_CLIENT_REGISTRY(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MCD_TYPE_CLIENT_REGISTRY))
+#define MCD_IS_CLIENT_REGISTRY_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE ((klass), MCD_TYPE_CLIENT_REGISTRY))
+#define MCD_CLIENT_REGISTRY_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), MCD_TYPE_CLIENT_REGISTRY, \
+                              McdClientRegistryClass))
+
+G_END_DECLS
+
+#endif
-- 
1.5.6.5




More information about the telepathy-commits mailing list