aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-ft-handler.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimo.cecchi@collabora.co.uk>2009-05-16 00:21:37 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-06-01 23:53:17 +0800
commit4fcc11053a0a2eef7271431997eb5ff629199290 (patch)
treea993f895e4d462f277834aa6c332a43bfb668fe1 /libempathy/empathy-ft-handler.c
parent62f32581a28b6b9083efd4bd419cfb217770f19e (diff)
downloadgsoc2013-empathy-4fcc11053a0a2eef7271431997eb5ff629199290.tar
gsoc2013-empathy-4fcc11053a0a2eef7271431997eb5ff629199290.tar.gz
gsoc2013-empathy-4fcc11053a0a2eef7271431997eb5ff629199290.tar.bz2
gsoc2013-empathy-4fcc11053a0a2eef7271431997eb5ff629199290.tar.lz
gsoc2013-empathy-4fcc11053a0a2eef7271431997eb5ff629199290.tar.xz
gsoc2013-empathy-4fcc11053a0a2eef7271431997eb5ff629199290.tar.zst
gsoc2013-empathy-4fcc11053a0a2eef7271431997eb5ff629199290.zip
Use tp_g_value_slice_new_* where possible
Diffstat (limited to 'libempathy/empathy-ft-handler.c')
-rw-r--r--libempathy/empathy-ft-handler.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c
index 65165f2e3..f9b4a8734 100644
--- a/libempathy/empathy-ft-handler.c
+++ b/libempathy/empathy-ft-handler.c
@@ -594,41 +594,34 @@ ft_handler_populate_outgoing_request (EmpathyFTHandler *handler)
contact_handle = empathy_contact_get_handle (priv->contact);
/* org.freedesktop.Telepathy.Channel.ChannelType */
- value = tp_g_value_slice_new (G_TYPE_STRING);
- g_value_set_string (value, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER);
+ value = tp_g_value_slice_new_string (TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER);
g_hash_table_insert (request, TP_IFACE_CHANNEL ".ChannelType", value);
/* org.freedesktop.Telepathy.Channel.TargetHandleType */
- value = tp_g_value_slice_new (G_TYPE_UINT);
- g_value_set_uint (value, TP_HANDLE_TYPE_CONTACT);
+ value = tp_g_value_slice_new_uint (TP_HANDLE_TYPE_CONTACT);
g_hash_table_insert (request, TP_IFACE_CHANNEL ".TargetHandleType", value);
/* org.freedesktop.Telepathy.Channel.TargetHandle */
- value = tp_g_value_slice_new (G_TYPE_UINT);
- g_value_set_uint (value, contact_handle);
+ value = tp_g_value_slice_new_uint (contact_handle);
g_hash_table_insert (request, TP_IFACE_CHANNEL ".TargetHandle", value);
/* org.freedesktop.Telepathy.Channel.Type.FileTransfer.ContentType */
- value = tp_g_value_slice_new (G_TYPE_STRING);
- g_value_set_string (value, priv->content_type);
+ value = tp_g_value_slice_new_string (priv->content_type);
g_hash_table_insert (request,
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".ContentType", value);
/* org.freedesktop.Telepathy.Channel.Type.FileTransfer.Filename */
- value = tp_g_value_slice_new (G_TYPE_STRING);
- g_value_set_string (value, priv->filename);
+ value = tp_g_value_slice_new_string (priv->filename);
g_hash_table_insert (request,
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Filename", value);
/* org.freedesktop.Telepathy.Channel.Type.FileTransfer.Size */
- value = tp_g_value_slice_new (G_TYPE_UINT64);
- g_value_set_uint64 (value, (guint64) priv->total_bytes);
+ value = tp_g_value_slice_new_uint64 (priv->total_bytes);
g_hash_table_insert (request,
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Size", value);
/* org.freedesktop.Telepathy.Channel.Type.FileTransfer.Date */
- value = tp_g_value_slice_new (G_TYPE_UINT64);
- g_value_set_uint64 (value, (guint64) priv->mtime);
+ value = tp_g_value_slice_new_uint64 ((guint64) priv->mtime);
g_hash_table_insert (request,
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Date", value);
}
@@ -681,8 +674,8 @@ hash_job_done (gpointer user_data)
/* set the checksum in the request...
* org.freedesktop.Telepathy.Channel.Type.FileTransfer.ContentHash
*/
- value = tp_g_value_slice_new (G_TYPE_STRING);
- g_value_set_string (value, g_checksum_get_string (hash_data->checksum));
+ value = tp_g_value_slice_new_string
+ (g_checksum_get_string (hash_data->checksum));
g_hash_table_insert (priv->request,
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".ContentHash", value);
}
@@ -829,8 +822,7 @@ ft_handler_read_async_cb (GObject *source,
hash_data->checksum = g_checksum_new (G_CHECKSUM_MD5);
/* org.freedesktop.Telepathy.Channel.Type.FileTransfer.ContentHashType */
- value = tp_g_value_slice_new (G_TYPE_UINT);
- g_value_set_uint (value, TP_FILE_HASH_TYPE_MD5);
+ value = tp_g_value_slice_new_uint (TP_FILE_HASH_TYPE_MD5);
g_hash_table_insert (priv->request,
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".ContentHashType", value);