summaryrefslogtreecommitdiff
path: root/telepathy-glib
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2014-02-25 14:35:42 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2014-02-25 14:35:42 +0100
commitbc7cdedbf761fc78ab176f77c8e31376527cc9fe (patch)
tree7d7ed86480d06272fc3eed346d512a372719273a /telepathy-glib
parent6d1aed685b8860d2e0cc4d12b251d19616617819 (diff)
downloadtelepathy-glib-bc7cdedbf761fc78ab176f77c8e31376527cc9fe.tar.gz
add tp_account_channel_request_set_sms_channel()
Diffstat (limited to 'telepathy-glib')
-rw-r--r--telepathy-glib/account-channel-request.c25
-rw-r--r--telepathy-glib/account-channel-request.h4
2 files changed, 29 insertions, 0 deletions
diff --git a/telepathy-glib/account-channel-request.c b/telepathy-glib/account-channel-request.c
index a96fee931..b2908c5af 100644
--- a/telepathy-glib/account-channel-request.c
+++ b/telepathy-glib/account-channel-request.c
@@ -2524,3 +2524,28 @@ tp_account_channel_request_new_dbus_tube (TpAccount *account,
g_hash_table_unref (request);
return self;
}
+
+/**
+ * tp_account_channel_request_set_sms_channel:
+ * @self: a #TpAccountChannelRequest
+ * @is_sms_channel: #TRUE if the channel should use SMS
+ *
+ * If @is_sms_channel is set to #TRUE, messages sent and received on the
+ * requested channel will be transmitted via SMS.
+ *
+ * This function can't be called once @self has been used to request a
+ * channel.
+ *
+ * Since: UNRELEASED
+ */
+void
+tp_account_channel_request_set_sms_channel (TpAccountChannelRequest *self,
+ gboolean is_sms_channel)
+{
+ g_return_if_fail (TP_IS_ACCOUNT_CHANNEL_REQUEST (self));
+ g_return_if_fail (!self->priv->requested);
+
+ g_hash_table_insert (self->priv->request,
+ g_strdup (TP_PROP_CHANNEL_INTERFACE_SMS_SMS_CHANNEL),
+ tp_g_value_slice_new_boolean (is_sms_channel));
+}
diff --git a/telepathy-glib/account-channel-request.h b/telepathy-glib/account-channel-request.h
index 2c8043089..2077ff7fe 100644
--- a/telepathy-glib/account-channel-request.h
+++ b/telepathy-glib/account-channel-request.h
@@ -114,6 +114,10 @@ TpAccountChannelRequest *tp_account_channel_request_new_text (
TpAccount *account,
gint64 user_action_time) G_GNUC_WARN_UNUSED_RESULT;
+_TP_AVAILABLE_IN_0_24
+void tp_account_channel_request_set_sms_channel (TpAccountChannelRequest *self,
+ gboolean is_sms_channel);
+
/* Calls */
_TP_AVAILABLE_IN_0_20