diff options
author | Olli Salli <ollisal@gmail.com> | 2011-08-10 19:19:36 +0300 |
---|---|---|
committer | Olli Salli <ollisal@gmail.com> | 2011-08-10 19:19:36 +0300 |
commit | fb81504e14cbd02ae051f06bf39ed7b9f2e85280 (patch) | |
tree | 39317f61492351c8a323bf17af1b97f70e7e5e65 | |
parent | c44f4f1c601b2f71d08567c94f349f8c719a1a36 (diff) |
private-tubes-factory.c: Use TP_PROP constants
-rw-r--r-- | src/private-tubes-factory.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/private-tubes-factory.c b/src/private-tubes-factory.c index 7573a1ea..2f4e6bef 100644 --- a/src/private-tubes-factory.c +++ b/src/private-tubes-factory.c @@ -92,14 +92,14 @@ struct _GabblePrivateTubesFactoryPrivate #define GABBLE_PRIVATE_TUBES_FACTORY_GET_PRIVATE(obj) ((obj)->priv) static const gchar * const tubes_channel_fixed_properties[] = { - TP_IFACE_CHANNEL ".ChannelType", - TP_IFACE_CHANNEL ".TargetHandleType", + TP_PROP_CHANNEL_CHANNEL_TYPE, + TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL }; static const gchar * const old_tubes_channel_allowed_properties[] = { - TP_IFACE_CHANNEL ".TargetHandle", - TP_IFACE_CHANNEL ".TargetID", + TP_PROP_CHANNEL_TARGET_HANDLE, + TP_PROP_CHANNEL_TARGET_ID, NULL }; @@ -388,8 +388,8 @@ add_service_to_array (const gchar *service, GValue *target_handle_type_value; gchar *tube_allowed_properties[] = { - TP_IFACE_CHANNEL ".TargetHandle", - TP_IFACE_CHANNEL ".TargetID", + TP_PROP_CHANNEL_TARGET_HANDLE, + TP_PROP_CHANNEL_TARGET_ID, NULL }; @@ -410,23 +410,23 @@ add_service_to_array (const gchar *service, else g_value_set_static_string (channel_type_value, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE); - g_hash_table_insert (fixed_properties, TP_IFACE_CHANNEL ".ChannelType", + g_hash_table_insert (fixed_properties, TP_PROP_CHANNEL_CHANNEL_TYPE, channel_type_value); target_handle_type_value = tp_g_value_slice_new (G_TYPE_UINT); g_value_set_uint (target_handle_type_value, TP_HANDLE_TYPE_CONTACT); g_hash_table_insert (fixed_properties, - TP_IFACE_CHANNEL ".TargetHandleType", target_handle_type_value); + TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, target_handle_type_value); target_handle_type_value = tp_g_value_slice_new (G_TYPE_STRING); g_value_set_string (target_handle_type_value, service); if (type == TP_TUBE_TYPE_STREAM) g_hash_table_insert (fixed_properties, - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service", + TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE, target_handle_type_value); else g_hash_table_insert (fixed_properties, - TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName", + TP_PROP_CHANNEL_TYPE_DBUS_TUBE_SERVICE_NAME, target_handle_type_value); dbus_g_type_struct_set (&monster, @@ -460,13 +460,13 @@ add_generic_tube_caps (GPtrArray *arr) g_value_set_static_string (channel_type_value, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE); - g_hash_table_insert (fixed_properties, TP_IFACE_CHANNEL ".ChannelType", + g_hash_table_insert (fixed_properties, TP_PROP_CHANNEL_CHANNEL_TYPE, channel_type_value); target_handle_type_value = tp_g_value_slice_new (G_TYPE_UINT); g_value_set_uint (target_handle_type_value, TP_HANDLE_TYPE_CONTACT); g_hash_table_insert (fixed_properties, - TP_IFACE_CHANNEL ".TargetHandleType", target_handle_type_value); + TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, target_handle_type_value); dbus_g_type_struct_set (&monster1, 0, fixed_properties, @@ -489,13 +489,13 @@ add_generic_tube_caps (GPtrArray *arr) g_value_set_static_string (channel_type_value, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE); - g_hash_table_insert (fixed_properties, TP_IFACE_CHANNEL ".ChannelType", + g_hash_table_insert (fixed_properties, TP_PROP_CHANNEL_CHANNEL_TYPE, channel_type_value); target_handle_type_value = tp_g_value_slice_new (G_TYPE_UINT); g_value_set_uint (target_handle_type_value, TP_HANDLE_TYPE_CONTACT); g_hash_table_insert (fixed_properties, - TP_IFACE_CHANNEL ".TargetHandleType", target_handle_type_value); + TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, target_handle_type_value); dbus_g_type_struct_set (&monster2, 0, fixed_properties, @@ -565,11 +565,11 @@ gabble_private_tubes_factory_add_cap (GabbleCapsChannelManager *manager, /* capabilities mean being able to RECEIVE said kinds of tubes. hence, * skip Requested=true (locally initiated) channel classes */ - if (tp_asv_get_boolean (cap, TP_IFACE_CHANNEL ".Requested", FALSE) == TRUE) + if (tp_asv_get_boolean (cap, TP_PROP_CHANNEL_REQUESTED, FALSE) == TRUE) return; channel_type = tp_asv_get_string (cap, - TP_IFACE_CHANNEL ".ChannelType"); + TP_PROP_CHANNEL_CHANNEL_TYPE); /* this channel is not for this factory */ if (tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TUBES) && @@ -578,13 +578,13 @@ gabble_private_tubes_factory_add_cap (GabbleCapsChannelManager *manager, return; if (tp_asv_get_uint32 (cap, - TP_IFACE_CHANNEL ".TargetHandleType", NULL) != TP_HANDLE_TYPE_CONTACT) + TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL) != TP_HANDLE_TYPE_CONTACT) return; if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE)) { service = tp_asv_get_string (cap, - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service"); + TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE); if (service != NULL) ns = g_strconcat (STREAM_CAP_PREFIX, service, NULL); @@ -592,7 +592,7 @@ gabble_private_tubes_factory_add_cap (GabbleCapsChannelManager *manager, else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE)) { service = tp_asv_get_string (cap, - TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName"); + TP_PROP_CHANNEL_TYPE_DBUS_TUBE_SERVICE_NAME); if (service != NULL) ns = g_strconcat (DBUS_CAP_PREFIX, service, NULL); @@ -810,12 +810,12 @@ gabble_private_tubes_factory_type_foreach_channel_class (GType type, value = tp_g_value_slice_new (G_TYPE_STRING); g_value_set_static_string (value, TP_IFACE_CHANNEL_TYPE_TUBES); - g_hash_table_insert (table, TP_IFACE_CHANNEL ".ChannelType", + g_hash_table_insert (table, TP_PROP_CHANNEL_CHANNEL_TYPE, value); value = tp_g_value_slice_new (G_TYPE_UINT); g_value_set_uint (value, TP_HANDLE_TYPE_CONTACT); - g_hash_table_insert (table, TP_IFACE_CHANNEL ".TargetHandleType", + g_hash_table_insert (table, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, value); func (type, table, old_tubes_channel_allowed_properties, user_data); @@ -828,12 +828,12 @@ gabble_private_tubes_factory_type_foreach_channel_class (GType type, value = tp_g_value_slice_new (G_TYPE_STRING); g_value_set_static_string (value, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE); - g_hash_table_insert (table, TP_IFACE_CHANNEL ".ChannelType", + g_hash_table_insert (table, TP_PROP_CHANNEL_CHANNEL_TYPE, value); value = tp_g_value_slice_new (G_TYPE_UINT); g_value_set_uint (value, TP_HANDLE_TYPE_CONTACT); - g_hash_table_insert (table, TP_IFACE_CHANNEL ".TargetHandleType", + g_hash_table_insert (table, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, value); func (type, table, gabble_tube_stream_channel_get_allowed_properties (), @@ -847,12 +847,12 @@ gabble_private_tubes_factory_type_foreach_channel_class (GType type, value = tp_g_value_slice_new (G_TYPE_STRING); g_value_set_static_string (value, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE); - g_hash_table_insert (table, TP_IFACE_CHANNEL ".ChannelType", + g_hash_table_insert (table, TP_PROP_CHANNEL_CHANNEL_TYPE, value); value = tp_g_value_slice_new (G_TYPE_UINT); g_value_set_uint (value, TP_HANDLE_TYPE_CONTACT); - g_hash_table_insert (table, TP_IFACE_CHANNEL ".TargetHandleType", + g_hash_table_insert (table, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, value); func (type, table, gabble_tube_dbus_channel_get_allowed_properties (), @@ -875,11 +875,11 @@ gabble_private_tubes_factory_requestotron (GabblePrivateTubesFactory *self, GabbleTubesChannel *channel; if (tp_asv_get_uint32 (request_properties, - TP_IFACE_CHANNEL ".TargetHandleType", NULL) != TP_HANDLE_TYPE_CONTACT) + TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL) != TP_HANDLE_TYPE_CONTACT) return FALSE; channel_type = tp_asv_get_string (request_properties, - TP_IFACE_CHANNEL ".ChannelType"); + TP_PROP_CHANNEL_CHANNEL_TYPE); if (tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TUBES) && tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE) && @@ -906,12 +906,12 @@ gabble_private_tubes_factory_requestotron (GabblePrivateTubesFactory *self, /* "Service" is a mandatory, not-fixed property */ service = tp_asv_get_string (request_properties, - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service"); + TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE); if (service == NULL) { g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, "Request does not contain the mandatory property '%s'", - TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service"); + TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE); goto error; } } @@ -928,12 +928,12 @@ gabble_private_tubes_factory_requestotron (GabblePrivateTubesFactory *self, /* "ServiceName" is a mandatory, not-fixed property */ service = tp_asv_get_string (request_properties, - TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName"); + TP_PROP_CHANNEL_TYPE_DBUS_TUBE_SERVICE_NAME); if (service == NULL) { g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, "Request does not contain the mandatory property '%s'", - TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName"); + TP_PROP_CHANNEL_TYPE_DBUS_TUBE_SERVICE_NAME); goto error; } @@ -949,7 +949,7 @@ gabble_private_tubes_factory_requestotron (GabblePrivateTubesFactory *self, /* validity already checked by TpBaseConnection */ handle = tp_asv_get_uint32 (request_properties, - TP_IFACE_CHANNEL ".TargetHandle", NULL); + TP_PROP_CHANNEL_TARGET_HANDLE, NULL); g_assert (handle != 0); /* Don't support opening a channel to our self handle */ |