summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2012-07-05 15:05:34 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2012-07-05 15:05:34 +0100
commitaaea3147323cd1ad1b67e17c06504a5a6d6517cc (patch)
tree964bca32bd9a094ee6ae3d55154244b7ce9a59b7 /examples
parentbcde9c87323454f946be989825b2dc74f61d16f7 (diff)
example & test connections: update to use new get_interfaces… vfunc
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'examples')
-rw-r--r--examples/cm/call/conn.c17
-rw-r--r--examples/cm/channelspecific/conn.c17
-rw-r--r--examples/cm/contactlist/conn.c18
-rw-r--r--examples/cm/echo-message-parts/conn.c17
-rw-r--r--examples/cm/extended/conn.c17
5 files changed, 81 insertions, 5 deletions
diff --git a/examples/cm/call/conn.c b/examples/cm/call/conn.c
index 720cbf13f..187e34b08 100644
--- a/examples/cm/call/conn.c
+++ b/examples/cm/call/conn.c
@@ -377,6 +377,21 @@ example_call_connection_get_possible_interfaces (void)
return interfaces_always_present;
}
+static GPtrArray *
+get_interfaces_always_present (TpBaseConnection *base)
+{
+ GPtrArray *interfaces;
+ guint i;
+
+ interfaces = TP_BASE_CONNECTION_CLASS (
+ example_call_connection_parent_class)->get_interfaces_always_present (base);
+
+ for (i = 0; interfaces_always_present[i] != NULL; i++)
+ g_ptr_array_add (interfaces, (gchar *) interfaces_always_present[i]);
+
+ return interfaces;
+}
+
static void
example_call_connection_class_init (
ExampleCallConnectionClass *klass)
@@ -397,7 +412,7 @@ example_call_connection_class_init (
base_class->create_channel_managers = create_channel_managers;
base_class->start_connecting = start_connecting;
base_class->shut_down = shut_down;
- base_class->interfaces_always_present = interfaces_always_present;
+ base_class->get_interfaces_always_present = get_interfaces_always_present;
param_spec = g_param_spec_string ("account", "Account name",
"The username of this user", NULL,
diff --git a/examples/cm/channelspecific/conn.c b/examples/cm/channelspecific/conn.c
index 59dba2707..c14b368fb 100644
--- a/examples/cm/channelspecific/conn.c
+++ b/examples/cm/channelspecific/conn.c
@@ -246,6 +246,21 @@ example_csh_connection_get_possible_interfaces (void)
return interfaces_always_present;
}
+static GPtrArray *
+get_interfaces_always_present (TpBaseConnection *base)
+{
+ GPtrArray *interfaces;
+ guint i;
+
+ interfaces = TP_BASE_CONNECTION_CLASS (
+ example_csh_connection_parent_class)->get_interfaces_always_present (base);
+
+ for (i = 0; interfaces_always_present[i] != NULL; i++)
+ g_ptr_array_add (interfaces, (gchar *) interfaces_always_present[i]);
+
+ return interfaces;
+}
+
static void
example_csh_connection_class_init (ExampleCSHConnectionClass *klass)
{
@@ -265,7 +280,7 @@ example_csh_connection_class_init (ExampleCSHConnectionClass *klass)
base_class->create_channel_managers = create_channel_managers;
base_class->start_connecting = start_connecting;
base_class->shut_down = shut_down;
- base_class->interfaces_always_present = interfaces_always_present;
+ base_class->get_interfaces_always_present = get_interfaces_always_present;
param_spec = g_param_spec_string ("account", "Account name",
"The username of this user", NULL,
diff --git a/examples/cm/contactlist/conn.c b/examples/cm/contactlist/conn.c
index ab4507740..a28ae8547 100644
--- a/examples/cm/contactlist/conn.c
+++ b/examples/cm/contactlist/conn.c
@@ -410,6 +410,22 @@ example_contact_list_connection_get_possible_interfaces (void)
return interfaces_always_present;
}
+static GPtrArray *
+get_interfaces_always_present (TpBaseConnection *base)
+{
+ GPtrArray *interfaces;
+ guint i;
+
+ interfaces = TP_BASE_CONNECTION_CLASS (
+ example_contact_list_connection_parent_class)->get_interfaces_always_present (
+ base);
+
+ for (i = 0; interfaces_always_present[i] != NULL; i++)
+ g_ptr_array_add (interfaces, (gchar *) interfaces_always_present[i]);
+
+ return interfaces;
+}
+
static void
example_contact_list_connection_class_init (
ExampleContactListConnectionClass *klass)
@@ -430,7 +446,7 @@ example_contact_list_connection_class_init (
base_class->create_channel_managers = create_channel_managers;
base_class->start_connecting = start_connecting;
base_class->shut_down = shut_down;
- base_class->interfaces_always_present = interfaces_always_present;
+ base_class->get_interfaces_always_present = get_interfaces_always_present;
param_spec = g_param_spec_string ("account", "Account name",
"The username of this user", NULL,
diff --git a/examples/cm/echo-message-parts/conn.c b/examples/cm/echo-message-parts/conn.c
index d93229f15..115622bd1 100644
--- a/examples/cm/echo-message-parts/conn.c
+++ b/examples/cm/echo-message-parts/conn.c
@@ -172,6 +172,21 @@ example_echo_2_connection_get_possible_interfaces (void)
return interfaces_always_present;
}
+static GPtrArray *
+get_interfaces_always_present (TpBaseConnection *base)
+{
+ GPtrArray *interfaces;
+ guint i;
+
+ interfaces = TP_BASE_CONNECTION_CLASS (
+ example_echo_2_connection_parent_class)->get_interfaces_always_present (base);
+
+ for (i = 0; interfaces_always_present[i] != NULL; i++)
+ g_ptr_array_add (interfaces, (gchar *) interfaces_always_present[i]);
+
+ return interfaces;
+}
+
static void
constructed (GObject *object)
{
@@ -206,7 +221,7 @@ example_echo_2_connection_class_init (ExampleEcho2ConnectionClass *klass)
base_class->create_channel_managers = create_channel_managers;
base_class->start_connecting = start_connecting;
base_class->shut_down = shut_down;
- base_class->interfaces_always_present = interfaces_always_present;
+ base_class->get_interfaces_always_present = get_interfaces_always_present;
param_spec = g_param_spec_string ("account", "Account name",
"The username of this user", NULL,
diff --git a/examples/cm/extended/conn.c b/examples/cm/extended/conn.c
index 8b2560564..873fcf2b0 100644
--- a/examples/cm/extended/conn.c
+++ b/examples/cm/extended/conn.c
@@ -203,6 +203,21 @@ example_extended_connection_get_possible_interfaces (void)
return interfaces_always_present;
}
+static GPtrArray *
+get_interfaces_always_present (TpBaseConnection *base)
+{
+ GPtrArray *interfaces;
+ guint i;
+
+ interfaces = TP_BASE_CONNECTION_CLASS (
+ example_extended_connection_parent_class)->get_interfaces_always_present (base);
+
+ for (i = 0; interfaces_always_present[i] != NULL; i++)
+ g_ptr_array_add (interfaces, (gchar *) interfaces_always_present[i]);
+
+ return interfaces;
+}
+
static void
example_extended_connection_class_init (ExampleExtendedConnectionClass *klass)
{
@@ -223,7 +238,7 @@ example_extended_connection_class_init (ExampleExtendedConnectionClass *klass)
base_class->start_connecting = start_connecting;
base_class->shut_down = shut_down;
- base_class->interfaces_always_present = interfaces_always_present;
+ base_class->get_interfaces_always_present = get_interfaces_always_present;
param_spec = g_param_spec_string ("account", "Account name",
"The username of this user", NULL,