summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-09-17 15:09:43 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-09-18 08:08:43 +0200
commitc4f0fadc905734ac1a3a0cef62eb7352f26360fe (patch)
tree28daf47c635d89ac51fef4f1e38c50c1c397faf3
parent213e1f382a148ab6d99520303bf99939a1b730d7 (diff)
factor out add_always_present_connection_interfaces()
https://bugs.freedesktop.org/show_bug.cgi?id=69466
-rw-r--r--src/connection.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/connection.c b/src/connection.c
index 2030500..e7f1994 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -113,18 +113,25 @@ haze_connection_get_implemented_interfaces (void)
return implemented_interfaces;
}
+static void
+add_always_present_connection_interfaces (GPtrArray *interfaces)
+{
+ const gchar **iter;
+
+ for (iter = implemented_interfaces + HAZE_NUM_CONDITIONAL_INTERFACES;
+ *iter != NULL; iter++)
+ g_ptr_array_add (interfaces, (gchar *) *iter);
+}
+
static GPtrArray *
haze_connection_get_interfaces_always_present (TpBaseConnection *base)
{
GPtrArray *interfaces;
- const gchar **iter;
interfaces = TP_BASE_CONNECTION_CLASS (
haze_connection_parent_class)->get_interfaces_always_present (base);
- for (iter = implemented_interfaces + HAZE_NUM_CONDITIONAL_INTERFACES;
- *iter != NULL; iter++)
- g_ptr_array_add (interfaces, (gchar *) *iter);
+ add_always_present_connection_interfaces (interfaces);
return interfaces;
}