summaryrefslogtreecommitdiff
path: root/telepathy-glib/protocol.c
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2010-12-07 15:48:16 +0000
committerJonny Lamb <jonny.lamb@collabora.co.uk>2010-12-07 15:48:16 +0000
commit9c9d77f1870bdfc65000b0bdf3fdf38da79c10b0 (patch)
treeff2b96d3f26f5dd2dd6b7e7aa6d5b00b7694fa79 /telepathy-glib/protocol.c
parent132c8ad4ced2a575dbb920d8dffcbf65f03b2f00 (diff)
downloadtelepathy-glib-9c9d77f1870bdfc65000b0bdf3fdf38da79c10b0.tar.gz
protocol: add tp_protocol_get_authentication_types
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'telepathy-glib/protocol.c')
-rw-r--r--telepathy-glib/protocol.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/telepathy-glib/protocol.c b/telepathy-glib/protocol.c
index 1ded906da..b06212ba9 100644
--- a/telepathy-glib/protocol.c
+++ b/telepathy-glib/protocol.c
@@ -140,6 +140,7 @@ struct _TpProtocolPrivate
gchar *vcard_field;
gchar *english_name;
gchar *icon_name;
+ const gchar * const *authentication_types;
TpCapabilities *capabilities;
};
@@ -152,6 +153,7 @@ enum
PROP_ICON_NAME,
PROP_CAPABILITIES,
PROP_PARAM_NAMES,
+ PROP_AUTHENTICATION_TYPES,
N_PROPS
};
@@ -274,6 +276,10 @@ tp_protocol_get_property (GObject *object,
g_value_take_boxed (value, tp_protocol_dup_param_names (self));
break;
+ case PROP_AUTHENTICATION_TYPES:
+ g_value_set_boxed (value, tp_protocol_get_authentication_types (self));
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -476,6 +482,10 @@ tp_protocol_constructed (GObject *object)
if (rccs != NULL)
self->priv->capabilities = _tp_capabilities_new (rccs, FALSE);
+ self->priv->authentication_types = tp_asv_get_boxed (
+ self->priv->protocol_properties,
+ TP_PROP_PROTOCOL_AUTHENTICATION_TYPES, G_TYPE_STRV);
+
/* become ready immediately */
_tp_proxy_set_feature_prepared (proxy, TP_PROTOCOL_FEATURE_PARAMETERS,
had_immutables);
@@ -643,6 +653,22 @@ tp_protocol_class_init (TpProtocolClass *klass)
"A list of parameter names",
G_TYPE_STRV, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+ /**
+ * TpProtocol:authentication-types:
+ *
+ * A #GStrv of interfaces interfaces which provide information as to
+ * what kind of authentication channels can possibly appear before
+ * the connection reaches the CONNECTED state, or %NULL if
+ * %TP_PROTOCOL_FEATURE_CORE has not been prepared.
+ *
+ * Since: 0.13.UNRELEASED
+ */
+ g_object_class_install_property (object_class, PROP_AUTHENTICATION_TYPES,
+ g_param_spec_boxed ("authentication-types",
+ "AuthenticationTypes",
+ "A list of authentication types",
+ G_TYPE_STRV, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
proxy_class->list_features = tp_protocol_list_features;
proxy_class->must_have_unique_name = FALSE;
proxy_class->interface = TP_IFACE_QUARK_PROTOCOL;
@@ -894,6 +920,24 @@ tp_protocol_get_icon_name (TpProtocol *self)
}
/**
+ * tp_protocol_get_authentication_types
+ * @self: a protocol object
+ *
+ *
+ <!-- -->
+ *
+ * Returns: the value of #TpProtocol:authentication-types
+ *
+ * Since: 0.13.UNRELEASED
+ */
+const gchar * const *
+tp_protocol_get_authentication_types (TpProtocol *self)
+{
+ g_return_val_if_fail (TP_IS_PROTOCOL (self), NULL);
+ return self->priv->authentication_types;
+}
+
+/**
* tp_protocol_get_capabilities:
* @self: a protocol object
*