[Telepathy-commits] [telepathy-glib/master] echo example CMs: add connection prefix to manager.[ch]

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Jan 7 07:52:15 PST 2009


---
 examples/cm/echo-message-parts/Makefile.am         |    6 +-
 .../cm/echo-message-parts/connection-manager.c     |   96 ++++++++++++++++++++
 .../cm/echo-message-parts/connection-manager.h     |   60 ++++++++++++
 examples/cm/echo-message-parts/main.c              |    2 +-
 examples/cm/echo-message-parts/manager.c           |   96 --------------------
 examples/cm/echo-message-parts/manager.h           |   60 ------------
 examples/cm/echo/Makefile.am                       |    6 +-
 examples/cm/echo/connection-manager.c              |   95 +++++++++++++++++++
 examples/cm/echo/connection-manager.h              |   53 +++++++++++
 examples/cm/echo/main.c                            |    2 +-
 examples/cm/echo/manager.c                         |   95 -------------------
 examples/cm/echo/manager.h                         |   53 -----------
 12 files changed, 312 insertions(+), 312 deletions(-)
 create mode 100644 examples/cm/echo-message-parts/connection-manager.c
 create mode 100644 examples/cm/echo-message-parts/connection-manager.h
 delete mode 100644 examples/cm/echo-message-parts/manager.c
 delete mode 100644 examples/cm/echo-message-parts/manager.h
 create mode 100644 examples/cm/echo/connection-manager.c
 create mode 100644 examples/cm/echo/connection-manager.h
 delete mode 100644 examples/cm/echo/manager.c
 delete mode 100644 examples/cm/echo/manager.h

diff --git a/examples/cm/echo-message-parts/Makefile.am b/examples/cm/echo-message-parts/Makefile.am
index 8ee16ce..4f61b15 100644
--- a/examples/cm/echo-message-parts/Makefile.am
+++ b/examples/cm/echo-message-parts/Makefile.am
@@ -6,10 +6,10 @@ libexample_cm_echo_2_la_SOURCES = \
     chan.h \
     conn.c \
     conn.h \
+    connection-manager.c \
+    connection-manager.h \
     factory.c \
-    factory.h \
-    manager.c \
-    manager.h
+    factory.h
 
 # In an external project you'd use $(TP_GLIB_LIBS) (obtained from
 # pkg-config via autoconf) instead of the .la path
diff --git a/examples/cm/echo-message-parts/connection-manager.c b/examples/cm/echo-message-parts/connection-manager.c
new file mode 100644
index 0000000..8601217
--- /dev/null
+++ b/examples/cm/echo-message-parts/connection-manager.c
@@ -0,0 +1,96 @@
+/*
+ * manager.c - an example connection manager
+ *
+ * Copyright (C) 2007 Collabora Ltd.
+ *
+ * Copying and distribution of this file, with or without modification,
+ * are permitted in any medium without royalty provided the copyright
+ * notice and this notice are preserved.
+ */
+
+#include "connection-manager.h"
+
+#include <dbus/dbus-protocol.h>
+#include <dbus/dbus-glib.h>
+
+#include <telepathy-glib/dbus.h>
+#include <telepathy-glib/errors.h>
+
+#include "conn.h"
+
+G_DEFINE_TYPE (ExampleEcho2ConnectionManager,
+    example_echo_2_connection_manager,
+    TP_TYPE_BASE_CONNECTION_MANAGER)
+
+/* type definition stuff */
+
+static void
+example_echo_2_connection_manager_init (
+    ExampleEcho2ConnectionManager *self)
+{
+}
+
+/* private data */
+
+typedef struct {
+    gchar *account;
+} ExampleParams;
+
+static const TpCMParamSpec example_params[] = {
+  { "account", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING,
+    TP_CONN_MGR_PARAM_FLAG_REQUIRED | TP_CONN_MGR_PARAM_FLAG_REGISTER, NULL,
+    G_STRUCT_OFFSET (ExampleParams, account),
+    tp_cm_param_filter_string_nonempty, NULL },
+
+  { NULL }
+};
+
+static gpointer
+alloc_params (void)
+{
+  return g_slice_new0 (ExampleParams);
+}
+
+static void
+free_params (gpointer p)
+{
+  ExampleParams *params = p;
+
+  g_free (params->account);
+
+  g_slice_free (ExampleParams, params);
+}
+
+static const TpCMProtocolSpec example_protocols[] = {
+  { "example", example_params, alloc_params, free_params },
+  { NULL, NULL }
+};
+
+static TpBaseConnection *
+new_connection (TpBaseConnectionManager *self,
+                const gchar *proto,
+                TpIntSet *params_present,
+                gpointer parsed_params,
+                GError **error)
+{
+  ExampleParams *params = parsed_params;
+  ExampleEcho2Connection *conn =
+      EXAMPLE_ECHO_2_CONNECTION (g_object_new (EXAMPLE_TYPE_ECHO_2_CONNECTION,
+            "account", params->account,
+            "protocol", proto,
+            NULL));
+
+  return (TpBaseConnection *) conn;
+}
+
+static void
+example_echo_2_connection_manager_class_init (
+    ExampleEcho2ConnectionManagerClass *klass)
+{
+  TpBaseConnectionManagerClass *base_class =
+      (TpBaseConnectionManagerClass *) klass;
+
+  base_class->new_connection = new_connection;
+  base_class->cm_dbus_name = "example_echo_2";
+  base_class->protocol_params = example_protocols;
+}
diff --git a/examples/cm/echo-message-parts/connection-manager.h b/examples/cm/echo-message-parts/connection-manager.h
new file mode 100644
index 0000000..8fcd360
--- /dev/null
+++ b/examples/cm/echo-message-parts/connection-manager.h
@@ -0,0 +1,60 @@
+/*
+ * manager.h - header for an example connection manager
+ * Copyright (C) 2007 Collabora Ltd.
+ *
+ * Copying and distribution of this file, with or without modification,
+ * are permitted in any medium without royalty provided the copyright
+ * notice and this notice are preserved.
+ */
+
+#ifndef EXAMPLE_ECHO_MESSAGE_PARTS_MANAGER_H
+#define EXAMPLE_ECHO_MESSAGE_PARTS_MANAGER_H
+
+#include <glib-object.h>
+#include <telepathy-glib/base-connection-manager.h>
+
+G_BEGIN_DECLS
+
+typedef struct _ExampleEcho2ConnectionManager
+    ExampleEcho2ConnectionManager;
+typedef struct _ExampleEcho2ConnectionManagerClass
+    ExampleEcho2ConnectionManagerClass;
+
+struct _ExampleEcho2ConnectionManagerClass {
+    TpBaseConnectionManagerClass parent_class;
+
+    gpointer priv;
+};
+
+struct _ExampleEcho2ConnectionManager {
+    TpBaseConnectionManager parent;
+
+    gpointer priv;
+};
+
+GType example_echo_2_connection_manager_get_type (void);
+
+#define EXAMPLE_TYPE_ECHO_2_CONNECTION_MANAGER \
+    (example_echo_2_connection_manager_get_type ())
+#define EXAMPLE_ECHO_2_CONNECTION_MANAGER(obj) \
+    (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+        EXAMPLE_TYPE_ECHO_2_CONNECTION_MANAGER, \
+        ExampleEcho2ConnectionManager))
+#define EXAMPLE_ECHO_2_CONNECTION_MANAGER_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_CAST ((klass), \
+        EXAMPLE_TYPE_ECHO_2_CONNECTION_MANAGER, \
+        ExampleEcho2ConnectionManagerClass))
+#define EXAMPLE_IS_ECHO_2_CONNECTION_MANAGER(obj) \
+    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
+        EXAMPLE_TYPE_ECHO_2_CONNECTION_MANAGER))
+#define EXAMPLE_IS_ECHO_2_CONNECTION_MANAGER_CLASS(klass) \
+    (G_TYPE_CHECK_CLASS_TYPE ((klass), \
+        EXAMPLE_TYPE_ECHO_2_CONNECTION_MANAGER))
+#define EXAMPLE_ECHO_2_CONNECTION_MANAGER_GET_CLASS(obj) \
+    (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+        EXAMPLE_TYPE_ECHO_2_CONNECTION_MANAGER, \
+        ExampleEcho2ConnectionManagerClass))
+
+G_END_DECLS
+
+#endif
diff --git a/examples/cm/echo-message-parts/main.c b/examples/cm/echo-message-parts/main.c
index 1c9f88e..7a927cd 100644
--- a/examples/cm/echo-message-parts/main.c
+++ b/examples/cm/echo-message-parts/main.c
@@ -13,7 +13,7 @@
 
 #include <telepathy-glib/debug.h>
 #include <telepathy-glib/run.h>
-#include "manager.h"
+#include "connection-manager.h"
 
 static TpBaseConnectionManager *
 construct_cm (void)
diff --git a/examples/cm/echo-message-parts/manager.c b/examples/cm/echo-message-parts/manager.c
deleted file mode 100644
index 5c467d4..0000000
--- a/examples/cm/echo-message-parts/manager.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * manager.c - an example connection manager
- *
- * Copyright (C) 2007 Collabora Ltd.
- *
- * Copying and distribution of this file, with or without modification,
- * are permitted in any medium without royalty provided the copyright
- * notice and this notice are preserved.
- */
-
-#include "manager.h"
-
-#include <dbus/dbus-protocol.h>
-#include <dbus/dbus-glib.h>
-
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
-
-#include "conn.h"
-
-G_DEFINE_TYPE (ExampleEcho2ConnectionManager,
-    example_echo_2_connection_manager,
-    TP_TYPE_BASE_CONNECTION_MANAGER)
-
-/* type definition stuff */
-
-static void
-example_echo_2_connection_manager_init (
-    ExampleEcho2ConnectionManager *self)
-{
-}
-
-/* private data */
-
-typedef struct {
-    gchar *account;
-} ExampleParams;
-
-static const TpCMParamSpec example_params[] = {
-  { "account", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING,
-    TP_CONN_MGR_PARAM_FLAG_REQUIRED | TP_CONN_MGR_PARAM_FLAG_REGISTER, NULL,
-    G_STRUCT_OFFSET (ExampleParams, account),
-    tp_cm_param_filter_string_nonempty, NULL },
-
-  { NULL }
-};
-
-static gpointer
-alloc_params (void)
-{
-  return g_slice_new0 (ExampleParams);
-}
-
-static void
-free_params (gpointer p)
-{
-  ExampleParams *params = p;
-
-  g_free (params->account);
-
-  g_slice_free (ExampleParams, params);
-}
-
-static const TpCMProtocolSpec example_protocols[] = {
-  { "example", example_params, alloc_params, free_params },
-  { NULL, NULL }
-};
-
-static TpBaseConnection *
-new_connection (TpBaseConnectionManager *self,
-                const gchar *proto,
-                TpIntSet *params_present,
-                gpointer parsed_params,
-                GError **error)
-{
-  ExampleParams *params = parsed_params;
-  ExampleEcho2Connection *conn =
-      EXAMPLE_ECHO_2_CONNECTION (g_object_new (EXAMPLE_TYPE_ECHO_2_CONNECTION,
-            "account", params->account,
-            "protocol", proto,
-            NULL));
-
-  return (TpBaseConnection *) conn;
-}
-
-static void
-example_echo_2_connection_manager_class_init (
-    ExampleEcho2ConnectionManagerClass *klass)
-{
-  TpBaseConnectionManagerClass *base_class =
-      (TpBaseConnectionManagerClass *) klass;
-
-  base_class->new_connection = new_connection;
-  base_class->cm_dbus_name = "example_echo_2";
-  base_class->protocol_params = example_protocols;
-}
diff --git a/examples/cm/echo-message-parts/manager.h b/examples/cm/echo-message-parts/manager.h
deleted file mode 100644
index 8fcd360..0000000
--- a/examples/cm/echo-message-parts/manager.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * manager.h - header for an example connection manager
- * Copyright (C) 2007 Collabora Ltd.
- *
- * Copying and distribution of this file, with or without modification,
- * are permitted in any medium without royalty provided the copyright
- * notice and this notice are preserved.
- */
-
-#ifndef EXAMPLE_ECHO_MESSAGE_PARTS_MANAGER_H
-#define EXAMPLE_ECHO_MESSAGE_PARTS_MANAGER_H
-
-#include <glib-object.h>
-#include <telepathy-glib/base-connection-manager.h>
-
-G_BEGIN_DECLS
-
-typedef struct _ExampleEcho2ConnectionManager
-    ExampleEcho2ConnectionManager;
-typedef struct _ExampleEcho2ConnectionManagerClass
-    ExampleEcho2ConnectionManagerClass;
-
-struct _ExampleEcho2ConnectionManagerClass {
-    TpBaseConnectionManagerClass parent_class;
-
-    gpointer priv;
-};
-
-struct _ExampleEcho2ConnectionManager {
-    TpBaseConnectionManager parent;
-
-    gpointer priv;
-};
-
-GType example_echo_2_connection_manager_get_type (void);
-
-#define EXAMPLE_TYPE_ECHO_2_CONNECTION_MANAGER \
-    (example_echo_2_connection_manager_get_type ())
-#define EXAMPLE_ECHO_2_CONNECTION_MANAGER(obj) \
-    (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
-        EXAMPLE_TYPE_ECHO_2_CONNECTION_MANAGER, \
-        ExampleEcho2ConnectionManager))
-#define EXAMPLE_ECHO_2_CONNECTION_MANAGER_CLASS(klass) \
-    (G_TYPE_CHECK_CLASS_CAST ((klass), \
-        EXAMPLE_TYPE_ECHO_2_CONNECTION_MANAGER, \
-        ExampleEcho2ConnectionManagerClass))
-#define EXAMPLE_IS_ECHO_2_CONNECTION_MANAGER(obj) \
-    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
-        EXAMPLE_TYPE_ECHO_2_CONNECTION_MANAGER))
-#define EXAMPLE_IS_ECHO_2_CONNECTION_MANAGER_CLASS(klass) \
-    (G_TYPE_CHECK_CLASS_TYPE ((klass), \
-        EXAMPLE_TYPE_ECHO_2_CONNECTION_MANAGER))
-#define EXAMPLE_ECHO_2_CONNECTION_MANAGER_GET_CLASS(obj) \
-    (G_TYPE_INSTANCE_GET_CLASS ((obj), \
-        EXAMPLE_TYPE_ECHO_2_CONNECTION_MANAGER, \
-        ExampleEcho2ConnectionManagerClass))
-
-G_END_DECLS
-
-#endif
diff --git a/examples/cm/echo/Makefile.am b/examples/cm/echo/Makefile.am
index 353f0df..2988773 100644
--- a/examples/cm/echo/Makefile.am
+++ b/examples/cm/echo/Makefile.am
@@ -6,10 +6,10 @@ libexample_cm_echo_la_SOURCES = \
     chan.h \
     conn.c \
     conn.h \
+    connection-manager.c \
+    connection-manager.h \
     factory.c \
-    factory.h \
-    manager.c \
-    manager.h
+    factory.h
 
 # In an external project you'd use $(TP_GLIB_LIBS) (obtained from
 # pkg-config via autoconf) instead of the .la path
diff --git a/examples/cm/echo/connection-manager.c b/examples/cm/echo/connection-manager.c
new file mode 100644
index 0000000..9eb72ad
--- /dev/null
+++ b/examples/cm/echo/connection-manager.c
@@ -0,0 +1,95 @@
+/*
+ * manager.c - an example connection manager
+ *
+ * Copyright (C) 2007 Collabora Ltd.
+ *
+ * Copying and distribution of this file, with or without modification,
+ * are permitted in any medium without royalty provided the copyright
+ * notice and this notice are preserved.
+ */
+
+#include "connection-manager.h"
+
+#include <dbus/dbus-protocol.h>
+#include <dbus/dbus-glib.h>
+
+#include <telepathy-glib/dbus.h>
+#include <telepathy-glib/errors.h>
+
+#include "conn.h"
+
+G_DEFINE_TYPE (ExampleEchoConnectionManager,
+    example_echo_connection_manager,
+    TP_TYPE_BASE_CONNECTION_MANAGER)
+
+/* type definition stuff */
+
+static void
+example_echo_connection_manager_init (ExampleEchoConnectionManager *self)
+{
+}
+
+/* private data */
+
+typedef struct {
+    gchar *account;
+} ExampleParams;
+
+static const TpCMParamSpec example_params[] = {
+  { "account", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING,
+    TP_CONN_MGR_PARAM_FLAG_REQUIRED | TP_CONN_MGR_PARAM_FLAG_REGISTER, NULL,
+    G_STRUCT_OFFSET (ExampleParams, account),
+    tp_cm_param_filter_string_nonempty, NULL },
+
+  { NULL }
+};
+
+static gpointer
+alloc_params (void)
+{
+  return g_slice_new0 (ExampleParams);
+}
+
+static void
+free_params (gpointer p)
+{
+  ExampleParams *params = p;
+
+  g_free (params->account);
+
+  g_slice_free (ExampleParams, params);
+}
+
+static const TpCMProtocolSpec example_protocols[] = {
+  { "example", example_params, alloc_params, free_params },
+  { NULL, NULL }
+};
+
+static TpBaseConnection *
+new_connection (TpBaseConnectionManager *self,
+                const gchar *proto,
+                TpIntSet *params_present,
+                gpointer parsed_params,
+                GError **error)
+{
+  ExampleParams *params = parsed_params;
+  ExampleEchoConnection *conn = EXAMPLE_ECHO_CONNECTION
+      (g_object_new (EXAMPLE_TYPE_ECHO_CONNECTION,
+          "account", params->account,
+          "protocol", proto,
+          NULL));
+
+  return (TpBaseConnection *) conn;
+}
+
+static void
+example_echo_connection_manager_class_init (
+    ExampleEchoConnectionManagerClass *klass)
+{
+  TpBaseConnectionManagerClass *base_class =
+      (TpBaseConnectionManagerClass *) klass;
+
+  base_class->new_connection = new_connection;
+  base_class->cm_dbus_name = "example_echo";
+  base_class->protocol_params = example_protocols;
+}
diff --git a/examples/cm/echo/connection-manager.h b/examples/cm/echo/connection-manager.h
new file mode 100644
index 0000000..7cbf615
--- /dev/null
+++ b/examples/cm/echo/connection-manager.h
@@ -0,0 +1,53 @@
+/*
+ * manager.h - header for an example connection manager
+ * Copyright (C) 2007 Collabora Ltd.
+ *
+ * Copying and distribution of this file, with or without modification,
+ * are permitted in any medium without royalty provided the copyright
+ * notice and this notice are preserved.
+ */
+
+#ifndef __EXAMPLE_ECHO_CONNECTION_MANAGER_H__
+#define __EXAMPLE_ECHO_CONNECTION_MANAGER_H__
+
+#include <glib-object.h>
+#include <telepathy-glib/base-connection-manager.h>
+
+G_BEGIN_DECLS
+
+typedef struct _ExampleEchoConnectionManager ExampleEchoConnectionManager;
+typedef struct _ExampleEchoConnectionManagerClass
+    ExampleEchoConnectionManagerClass;
+
+struct _ExampleEchoConnectionManagerClass {
+    TpBaseConnectionManagerClass parent_class;
+};
+
+struct _ExampleEchoConnectionManager {
+    TpBaseConnectionManager parent;
+
+    gpointer priv;
+};
+
+GType example_echo_connection_manager_get_type (void);
+
+/* TYPE MACROS */
+#define EXAMPLE_TYPE_ECHO_CONNECTION_MANAGER \
+  (example_echo_connection_manager_get_type ())
+#define EXAMPLE_ECHO_CONNECTION_MANAGER(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj), EXAMPLE_TYPE_ECHO_CONNECTION_MANAGER, \
+                              ExampleEchoConnectionManager))
+#define EXAMPLE_ECHO_CONNECTION_MANAGER_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass), EXAMPLE_TYPE_ECHO_CONNECTION_MANAGER, \
+                           ExampleEchoConnectionManagerClass))
+#define EXAMPLE_IS_ECHO_CONNECTION_MANAGER(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj), EXAMPLE_TYPE_ECHO_CONNECTION_MANAGER))
+#define EXAMPLE_IS_ECHO_CONNECTION_MANAGER_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass), EXAMPLE_TYPE_ECHO_CONNECTION_MANAGER))
+#define EXAMPLE_ECHO_CONNECTION_MANAGER_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), EXAMPLE_TYPE_ECHO_CONNECTION_MANAGER, \
+                              ExampleEchoConnectionManagerClass))
+
+G_END_DECLS
+
+#endif
diff --git a/examples/cm/echo/main.c b/examples/cm/echo/main.c
index aeae196..f86d3c4 100644
--- a/examples/cm/echo/main.c
+++ b/examples/cm/echo/main.c
@@ -13,7 +13,7 @@
 
 #include <telepathy-glib/debug.h>
 #include <telepathy-glib/run.h>
-#include "manager.h"
+#include "connection-manager.h"
 
 static TpBaseConnectionManager *
 construct_cm (void)
diff --git a/examples/cm/echo/manager.c b/examples/cm/echo/manager.c
deleted file mode 100644
index 62c16c4..0000000
--- a/examples/cm/echo/manager.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * manager.c - an example connection manager
- *
- * Copyright (C) 2007 Collabora Ltd.
- *
- * Copying and distribution of this file, with or without modification,
- * are permitted in any medium without royalty provided the copyright
- * notice and this notice are preserved.
- */
-
-#include "manager.h"
-
-#include <dbus/dbus-protocol.h>
-#include <dbus/dbus-glib.h>
-
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
-
-#include "conn.h"
-
-G_DEFINE_TYPE (ExampleEchoConnectionManager,
-    example_echo_connection_manager,
-    TP_TYPE_BASE_CONNECTION_MANAGER)
-
-/* type definition stuff */
-
-static void
-example_echo_connection_manager_init (ExampleEchoConnectionManager *self)
-{
-}
-
-/* private data */
-
-typedef struct {
-    gchar *account;
-} ExampleParams;
-
-static const TpCMParamSpec example_params[] = {
-  { "account", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING,
-    TP_CONN_MGR_PARAM_FLAG_REQUIRED | TP_CONN_MGR_PARAM_FLAG_REGISTER, NULL,
-    G_STRUCT_OFFSET (ExampleParams, account),
-    tp_cm_param_filter_string_nonempty, NULL },
-
-  { NULL }
-};
-
-static gpointer
-alloc_params (void)
-{
-  return g_slice_new0 (ExampleParams);
-}
-
-static void
-free_params (gpointer p)
-{
-  ExampleParams *params = p;
-
-  g_free (params->account);
-
-  g_slice_free (ExampleParams, params);
-}
-
-static const TpCMProtocolSpec example_protocols[] = {
-  { "example", example_params, alloc_params, free_params },
-  { NULL, NULL }
-};
-
-static TpBaseConnection *
-new_connection (TpBaseConnectionManager *self,
-                const gchar *proto,
-                TpIntSet *params_present,
-                gpointer parsed_params,
-                GError **error)
-{
-  ExampleParams *params = parsed_params;
-  ExampleEchoConnection *conn = EXAMPLE_ECHO_CONNECTION
-      (g_object_new (EXAMPLE_TYPE_ECHO_CONNECTION,
-          "account", params->account,
-          "protocol", proto,
-          NULL));
-
-  return (TpBaseConnection *) conn;
-}
-
-static void
-example_echo_connection_manager_class_init (
-    ExampleEchoConnectionManagerClass *klass)
-{
-  TpBaseConnectionManagerClass *base_class =
-      (TpBaseConnectionManagerClass *) klass;
-
-  base_class->new_connection = new_connection;
-  base_class->cm_dbus_name = "example_echo";
-  base_class->protocol_params = example_protocols;
-}
diff --git a/examples/cm/echo/manager.h b/examples/cm/echo/manager.h
deleted file mode 100644
index 7cbf615..0000000
--- a/examples/cm/echo/manager.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * manager.h - header for an example connection manager
- * Copyright (C) 2007 Collabora Ltd.
- *
- * Copying and distribution of this file, with or without modification,
- * are permitted in any medium without royalty provided the copyright
- * notice and this notice are preserved.
- */
-
-#ifndef __EXAMPLE_ECHO_CONNECTION_MANAGER_H__
-#define __EXAMPLE_ECHO_CONNECTION_MANAGER_H__
-
-#include <glib-object.h>
-#include <telepathy-glib/base-connection-manager.h>
-
-G_BEGIN_DECLS
-
-typedef struct _ExampleEchoConnectionManager ExampleEchoConnectionManager;
-typedef struct _ExampleEchoConnectionManagerClass
-    ExampleEchoConnectionManagerClass;
-
-struct _ExampleEchoConnectionManagerClass {
-    TpBaseConnectionManagerClass parent_class;
-};
-
-struct _ExampleEchoConnectionManager {
-    TpBaseConnectionManager parent;
-
-    gpointer priv;
-};
-
-GType example_echo_connection_manager_get_type (void);
-
-/* TYPE MACROS */
-#define EXAMPLE_TYPE_ECHO_CONNECTION_MANAGER \
-  (example_echo_connection_manager_get_type ())
-#define EXAMPLE_ECHO_CONNECTION_MANAGER(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST((obj), EXAMPLE_TYPE_ECHO_CONNECTION_MANAGER, \
-                              ExampleEchoConnectionManager))
-#define EXAMPLE_ECHO_CONNECTION_MANAGER_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST((klass), EXAMPLE_TYPE_ECHO_CONNECTION_MANAGER, \
-                           ExampleEchoConnectionManagerClass))
-#define EXAMPLE_IS_ECHO_CONNECTION_MANAGER(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE((obj), EXAMPLE_TYPE_ECHO_CONNECTION_MANAGER))
-#define EXAMPLE_IS_ECHO_CONNECTION_MANAGER_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE((klass), EXAMPLE_TYPE_ECHO_CONNECTION_MANAGER))
-#define EXAMPLE_ECHO_CONNECTION_MANAGER_GET_CLASS(obj) \
-  (G_TYPE_INSTANCE_GET_CLASS ((obj), EXAMPLE_TYPE_ECHO_CONNECTION_MANAGER, \
-                              ExampleEchoConnectionManagerClass))
-
-G_END_DECLS
-
-#endif
-- 
1.5.6.5




More information about the Telepathy-commits mailing list