diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-02-13 11:26:44 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-02-13 11:26:44 +0100 |
commit | c44019947d9b3dacf47a41799f27b944cb706d9a (patch) | |
tree | e67171892006a64f7da418beda3bd88610b73268 | |
parent | a49f383ac9303285abab8de28b49dddda5bc8920 (diff) |
TpHandleType has been renamed to TpEntityType
56 files changed, 286 insertions, 286 deletions
diff --git a/plugins/console/channel-manager.c b/plugins/console/channel-manager.c index bf2a9be05..b36c40541 100644 --- a/plugins/console/channel-manager.c +++ b/plugins/console/channel-manager.c @@ -173,7 +173,7 @@ gabble_console_channel_manager_class_init (GabbleConsoleChannelManagerClass *kla static const gchar * const allowed[] = { TP_PROP_CHANNEL_CHANNEL_TYPE, - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, + TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, NULL }; @@ -184,7 +184,7 @@ gabble_console_channel_manager_type_foreach_channel_class (GType type, { GHashTable *table = tp_asv_new ( TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, GABBLE_IFACE_GABBLE_PLUGIN_CONSOLE, - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_NONE, + TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, G_TYPE_UINT, TP_ENTITY_TYPE_NONE, NULL); func (type, table, NULL, user_data); @@ -228,7 +228,7 @@ gabble_console_channel_manager_create_channel ( return FALSE; if (tp_asv_get_uint32 (request_properties, - TP_IFACE_CHANNEL ".TargetHandleType", NULL) != 0) + TP_IFACE_CHANNEL ".TargetEntityType", NULL) != 0) { g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "Console channels can't have a target handle"); diff --git a/plugins/test.c b/plugins/test.c index 3b68e1b27..01c312dc3 100644 --- a/plugins/test.c +++ b/plugins/test.c @@ -613,7 +613,7 @@ test_channel_manager_type_foreach_channel_class (GType type, { GHashTable *table = tp_asv_new ( TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, "com.jonnylamb.lolbags", - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_NONE, + TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, G_TYPE_UINT, TP_ENTITY_TYPE_NONE, NULL); const gchar * const chock_a_block_full_of_strings[] = { "com.jonnylamb.omg", "com.jonnylamb.brokethebuild", NULL }; diff --git a/src/bytestream-factory.c b/src/bytestream-factory.c index b3d50fc2a..44aa621fc 100644 --- a/src/bytestream-factory.c +++ b/src/bytestream-factory.c @@ -811,7 +811,7 @@ remove_bytestream (GabbleBytestreamFactory *self, "peer-handle-type", &handle_type, NULL); - if (handle_type == TP_HANDLE_TYPE_ROOM) + if (handle_type == TP_ENTITY_TYPE_ROOM) { table = priv->muc_bytestreams; } @@ -1123,9 +1123,9 @@ bytestream_factory_iq_si_cb ( GabbleBytestreamFactoryPrivate *priv = GABBLE_BYTESTREAM_FACTORY_GET_PRIVATE (self); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); TpHandleRepoIface *room_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_ROOM); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_ROOM); WockyNode *si; TpHandle peer_handle = 0, room_handle; GabbleBytestreamIface *bytestream = NULL; @@ -2009,9 +2009,9 @@ streaminit_reply_cb ( WockyNode *si; const gchar *from; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) conn, TP_ENTITY_TYPE_CONTACT); TpHandleRepoIface *room_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) conn, TP_HANDLE_TYPE_ROOM); + (TpBaseConnection *) conn, TP_ENTITY_TYPE_ROOM); TpHandle peer_handle = 0; TpHandle room_handle; gboolean success = FALSE; diff --git a/src/bytestream-ibb.c b/src/bytestream-ibb.c index c413beb6a..4ec83c5ca 100644 --- a/src/bytestream-ibb.c +++ b/src/bytestream-ibb.c @@ -185,7 +185,7 @@ gabble_bytestream_ibb_get_property (GObject *object, g_value_set_uint (value, priv->peer_handle); break; case PROP_PEER_HANDLE_TYPE: - g_value_set_uint (value, TP_HANDLE_TYPE_CONTACT); + g_value_set_uint (value, TP_ENTITY_TYPE_CONTACT); break; case PROP_STREAM_ID: g_value_set_string (value, priv->stream_id); @@ -279,7 +279,7 @@ gabble_bytestream_ibb_constructor (GType type, g_assert (priv->stream_id != NULL); contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); jid = tp_handle_inspect (contact_repo, priv->peer_handle); diff --git a/src/bytestream-iface.c b/src/bytestream-iface.c index 1788dceb7..4b35dcbd3 100644 --- a/src/bytestream-iface.c +++ b/src/bytestream-iface.c @@ -93,7 +93,7 @@ gabble_bytestream_iface_base_init (gpointer klass) param_spec = g_param_spec_uint ( "peer-handle-type", "Peer handle type", - "The TpHandleType of the remote peer's associated handle", + "The TpEntityType of the remote peer's associated handle", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); g_object_interface_install_property (klass, param_spec); diff --git a/src/bytestream-muc.c b/src/bytestream-muc.c index 6c0d28e47..edf5d3fd1 100644 --- a/src/bytestream-muc.c +++ b/src/bytestream-muc.c @@ -66,7 +66,7 @@ struct _GabbleBytestreamMucPrivate { GabbleConnection *conn; TpHandle peer_handle; - TpHandleType peer_handle_type; + TpEntityType peer_handle_type; gchar *stream_id; GabbleBytestreamState state; const gchar *peer_jid; @@ -149,7 +149,7 @@ gabble_bytestream_muc_get_property (GObject *object, g_value_set_uint (value, priv->peer_handle); break; case PROP_PEER_HANDLE_TYPE: - g_value_set_uint (value, TP_HANDLE_TYPE_ROOM); + g_value_set_uint (value, TP_ENTITY_TYPE_ROOM); break; case PROP_STREAM_ID: g_value_set_string (value, priv->stream_id); @@ -222,7 +222,7 @@ gabble_bytestream_muc_constructor (GType type, room_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_ROOM); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_ROOM); priv->peer_jid = tp_handle_inspect (room_repo, priv->peer_handle); @@ -401,7 +401,7 @@ gabble_bytestream_muc_receive (GabbleBytestreamMuc *self, { GabbleBytestreamMucPrivate *priv = GABBLE_BYTESTREAM_MUC_GET_PRIVATE (self); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); const gchar *from; WockyNode *data; GString *str; @@ -575,7 +575,7 @@ gabble_bytestream_muc_send_to (GabbleBytestreamMuc *self, { GabbleBytestreamMucPrivate *priv = GABBLE_BYTESTREAM_MUC_GET_PRIVATE (self); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); const gchar *to; to = tp_handle_inspect (contact_repo, contact); diff --git a/src/bytestream-multiple.c b/src/bytestream-multiple.c index 49bdc5907..97ea44d46 100644 --- a/src/bytestream-multiple.c +++ b/src/bytestream-multiple.c @@ -155,7 +155,7 @@ gabble_bytestream_multiple_get_property (GObject *object, g_value_set_uint (value, priv->peer_handle); break; case PROP_PEER_HANDLE_TYPE: - g_value_set_uint (value, TP_HANDLE_TYPE_CONTACT); + g_value_set_uint (value, TP_ENTITY_TYPE_CONTACT); break; case PROP_STREAM_ID: g_value_set_string (value, priv->stream_id); @@ -258,7 +258,7 @@ gabble_bytestream_multiple_constructor (GType type, g_assert (priv->stream_id != NULL); contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); jid = tp_handle_inspect (contact_repo, priv->peer_handle); diff --git a/src/bytestream-socks5.c b/src/bytestream-socks5.c index 48686d35f..25df58434 100644 --- a/src/bytestream-socks5.c +++ b/src/bytestream-socks5.c @@ -292,7 +292,7 @@ gabble_bytestream_socks5_get_property (GObject *object, g_value_set_uint (value, priv->peer_handle); break; case PROP_PEER_HANDLE_TYPE: - g_value_set_uint (value, TP_HANDLE_TYPE_CONTACT); + g_value_set_uint (value, TP_ENTITY_TYPE_CONTACT); break; case PROP_STREAM_ID: g_value_set_string (value, priv->stream_id); @@ -392,9 +392,9 @@ gabble_bytestream_socks5_constructor (GType type, base_conn = TP_BASE_CONNECTION (priv->conn); contact_repo = tp_base_connection_get_handles (base_conn, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); room_repo = tp_base_connection_get_handles (base_conn, - TP_HANDLE_TYPE_ROOM); + TP_ENTITY_TYPE_ROOM); jid = tp_handle_inspect (contact_repo, priv->peer_handle); diff --git a/src/call-channel.c b/src/call-channel.c index 6e247aa0d..e39d7c555 100644 --- a/src/call-channel.c +++ b/src/call-channel.c @@ -214,7 +214,7 @@ gabble_call_channel_class_init ( object_class->dispose = gabble_call_channel_dispose; object_class->finalize = gabble_call_channel_finalize; - base_channel_class->target_handle_type = TP_HANDLE_TYPE_CONTACT; + base_channel_class->target_entity_type = TP_ENTITY_TYPE_CONTACT; tp_base_call_class->add_content = call_channel_add_content; @@ -403,7 +403,7 @@ contact_is_media_capable (GabbleCallChannel *self, GabblePresence *presence; TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (base_conn, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); gboolean wait = FALSE; presence = gabble_presence_cache_get (conn->presence_cache, handle); diff --git a/src/call-muc-channel.c b/src/call-muc-channel.c index 61a430f8f..cd9a7e80b 100644 --- a/src/call-muc-channel.c +++ b/src/call-muc-channel.c @@ -222,7 +222,7 @@ gabble_call_muc_channel_class_init ( object_class->dispose = gabble_call_muc_channel_dispose; object_class->finalize = gabble_call_muc_channel_finalize; - base_channel_class->target_handle_type = TP_HANDLE_TYPE_ROOM; + base_channel_class->target_entity_type = TP_ENTITY_TYPE_ROOM; base_channel_class->close = call_muc_channel_close; base_call_class->add_content = call_muc_channel_add_content; @@ -707,7 +707,7 @@ call_muc_channel_got_participant_presence (GabbleCallMucChannel *self, GabbleCallMucChannelPrivate *priv = self->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( tp_base_channel_get_connection (TP_BASE_CHANNEL (self)), - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); GabbleCallMember *call_member; TpHandle handle; WockyNode *muji; @@ -796,7 +796,7 @@ call_muc_channel_left_cb (GObject *source, GabbleCallMucChannel *self = GABBLE_CALL_MUC_CHANNEL (user_data); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( tp_base_channel_get_connection (TP_BASE_CHANNEL (self)), - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); TpHandle handle; GabbleCallMember *call_member; @@ -1113,7 +1113,7 @@ gabble_call_muc_channel_incoming_session (GabbleCallMucChannel *self, GabbleCallMember *member; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( tp_base_channel_get_connection (TP_BASE_CHANNEL (self)), - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); const gchar *jid = wocky_jingle_session_get_peer_jid (session); TpHandle peer = tp_handle_ensure (contact_repo, jid, NULL, NULL); diff --git a/src/call-stream.c b/src/call-stream.c index 4653ff626..fc64d5018 100644 --- a/src/call-stream.c +++ b/src/call-stream.c @@ -388,7 +388,7 @@ gabble_call_stream_update_member_states (GabbleCallStream *self) TpSendingState remote_state; TpBaseConnection *conn = tp_base_call_stream_get_connection (base); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - conn, TP_HANDLE_TYPE_CONTACT); + conn, TP_ENTITY_TYPE_CONTACT); TpHandle peer; g_object_get (priv->content, "state", &state, NULL); diff --git a/src/capabilities.c b/src/capabilities.c index 03de7b3a9..d3b0ce48e 100644 --- a/src/capabilities.c +++ b/src/capabilities.c @@ -243,7 +243,7 @@ gabble_capabilities_init (gpointer conn) /* TpDynamicHandleRepo wants a handle type, which isn't relevant here * (we're just using it as a string pool). Use an arbitrary handle type * to shut it up. */ - feature_handles = tp_dynamic_handle_repo_new (TP_HANDLE_TYPE_CONTACT, + feature_handles = tp_dynamic_handle_repo_new (TP_ENTITY_TYPE_CONTACT, NULL, NULL); /* make the pre-cooked bundles */ diff --git a/src/conn-addressing.c b/src/conn-addressing.c index c699ccf17..834446fe6 100644 --- a/src/conn-addressing.c +++ b/src/conn-addressing.c @@ -52,7 +52,7 @@ conn_addressing_fill_contact_attributes (GabbleConnection *self, return FALSE; contact_repo = tp_base_connection_get_handles ((TpBaseConnection *) self, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); uris = gabble_uris_for_handle (contact_repo, contact); addresses = gabble_vcard_addresses_for_handle (contact_repo, contact); @@ -77,7 +77,7 @@ conn_addressing_get_contacts_by_uri (TpSvcConnectionInterfaceAddressing1 *iface, const gchar **uri; TpBaseConnection *base = TP_BASE_CONNECTION (iface); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); GHashTable *attributes; GHashTable *requested = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); GArray *handles = g_array_sized_new (TRUE, TRUE, sizeof (TpHandle), @@ -115,7 +115,7 @@ conn_addressing_get_contacts_by_vcard_field (TpSvcConnectionInterfaceAddressing1 const gchar **address; TpBaseConnection *base = TP_BASE_CONNECTION (iface); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); GHashTable *attributes; GHashTable *requested = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); GArray *handles = g_array_sized_new (TRUE, TRUE, sizeof (TpHandle), diff --git a/src/conn-aliasing.c b/src/conn-aliasing.c index 7ee43db34..3f803f151 100644 --- a/src/conn-aliasing.c +++ b/src/conn-aliasing.c @@ -363,7 +363,7 @@ gabble_connection_request_aliases (TpSvcConnectionInterfaceAliasing1 *iface, GabbleConnection *self = GABBLE_CONNECTION (iface); TpBaseConnection *base = (TpBaseConnection *) self; TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); guint i; AliasesRequest *request; GError *error = NULL; @@ -463,7 +463,7 @@ set_one_alias ( { TpBaseConnection *base = (TpBaseConnection *) conn; TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); gboolean ret = TRUE; g_assert (tp_base_connection_get_status (base) == @@ -604,7 +604,7 @@ _grab_nickname (GabbleConnection *self, { TpBaseConnection *base = (TpBaseConnection *) self; TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); const gchar *old, *nickname; node = wocky_node_get_child_ns (node, "nick", NS_NICK); @@ -650,7 +650,7 @@ pep_nick_node_changed (WockyPepService *pep, GabbleConnection *conn) { TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) conn, TP_ENTITY_TYPE_CONTACT); TpHandle handle; const gchar *jid; @@ -926,7 +926,7 @@ _gabble_connection_get_cached_alias (GabbleConnection *conn, { TpBaseConnection *base = (TpBaseConnection *) conn; TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); const gchar *tmp, *jid; gboolean roster_alias_was_jid = FALSE; GabbleConnectionAliasSource source; @@ -997,7 +997,7 @@ _gabble_connection_get_cached_remote_alias ( { TpBaseConnection *base = (TpBaseConnection *) conn; TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); const gchar *jid = tp_handle_inspect (contact_handles, handle); g_assert (NULL != jid); @@ -1018,7 +1018,7 @@ maybe_request_vcard (GabbleConnection *self, TpHandle handle, if (self->features & GABBLE_CONNECTION_FEATURES_PEP) { TpHandleRepoIface *contact_handles = - tp_base_connection_get_handles (base, TP_HANDLE_TYPE_CONTACT); + tp_base_connection_get_handles (base, TP_ENTITY_TYPE_CONTACT); gabble_do_pep_request (self, handle, contact_handles, aliases_request_basic_pep_cb, GUINT_TO_POINTER (handle)); diff --git a/src/conn-avatars.c b/src/conn-avatars.c index cf128cf5f..2d0cb88f9 100644 --- a/src/conn-avatars.c +++ b/src/conn-avatars.c @@ -174,7 +174,7 @@ gabble_connection_get_known_avatar_tokens (TpSvcConnectionInterfaceAvatars1 *ifa GHashTable *ret; GError *err = NULL; TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (base, invocation); @@ -376,7 +376,7 @@ gabble_connection_request_avatars (TpSvcConnectionInterfaceAvatars1 *iface, GabbleConnection *self = GABBLE_CONNECTION (iface); TpBaseConnection *base = (TpBaseConnection *) self; TpHandleRepoIface *contacts_repo = - tp_base_connection_get_handles (base, TP_HANDLE_TYPE_CONTACT); + tp_base_connection_get_handles (base, TP_ENTITY_TYPE_CONTACT); GError *error = NULL; guint i; diff --git a/src/conn-client-types.c b/src/conn-client-types.c index b4cc1289c..7da31dce0 100644 --- a/src/conn-client-types.c +++ b/src/conn-client-types.c @@ -91,7 +91,7 @@ client_types_request_client_types (TpSvcConnectionInterfaceClientTypes1 *iface, /* Validate contact */ contact_handles = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); if (!tp_handle_is_valid (contact_handles, contact, &error)) { diff --git a/src/conn-contact-info.c b/src/conn-contact-info.c index ca243ee07..5295b0f61 100644 --- a/src/conn-contact-info.c +++ b/src/conn-contact-info.c @@ -487,7 +487,7 @@ gabble_connection_refresh_contact_info (TpSvcConnectionInterfaceContactInfo1 *if GabbleConnection *self = GABBLE_CONNECTION (iface); TpBaseConnection *base = (TpBaseConnection *) self; TpHandleRepoIface *contacts_repo = - tp_base_connection_get_handles (base, TP_HANDLE_TYPE_CONTACT); + tp_base_connection_get_handles (base, TP_ENTITY_TYPE_CONTACT); GError *error = NULL; guint i; @@ -542,7 +542,7 @@ gabble_connection_request_contact_info (TpSvcConnectionInterfaceContactInfo1 *if GabbleConnection *self = GABBLE_CONNECTION (iface); TpBaseConnection *base = (TpBaseConnection *) self; TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); GError *err = NULL; WockyNode *vcard_node; diff --git a/src/conn-location.c b/src/conn-location.c index 42ce18651..54a76d3e7 100644 --- a/src/conn-location.c +++ b/src/conn-location.c @@ -98,7 +98,7 @@ get_cached_location (GabbleConnection *conn, const gchar *jid; TpHandleRepoIface *contact_repo; - contact_repo = tp_base_connection_get_handles (base, TP_HANDLE_TYPE_CONTACT); + contact_repo = tp_base_connection_get_handles (base, TP_ENTITY_TYPE_CONTACT); jid = tp_handle_inspect (contact_repo, handle); location = gabble_presence_cache_get_location (conn->presence_cache, handle); @@ -177,7 +177,7 @@ location_request_location ( GabbleConnection *self = GABBLE_CONNECTION (iface); TpBaseConnection *base = (TpBaseConnection *) self; TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); const gchar *jid; WockyBareContact *contact; YetAnotherContextStruct *ctx; @@ -471,7 +471,7 @@ update_location_from_item ( GHashTable *location = g_hash_table_new_full (g_direct_hash, g_direct_equal, g_free, (GDestroyNotify) tp_g_value_slice_free); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) conn, TP_ENTITY_TYPE_CONTACT); const gchar *from = tp_handle_inspect (contact_repo, contact); WockyNodeIter i; WockyNode *subloc_node; @@ -571,7 +571,7 @@ location_pep_node_changed (WockyPepService *pep, GabbleConnection *conn) { TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) conn, TP_ENTITY_TYPE_CONTACT); TpBaseConnection *base = (TpBaseConnection *) conn; TpHandle handle; const gchar *jid; diff --git a/src/conn-mail-notif.c b/src/conn-mail-notif.c index 31bf1e318..9537fd859 100644 --- a/src/conn-mail-notif.c +++ b/src/conn-mail-notif.c @@ -833,7 +833,7 @@ conn_mail_notif_properties_getter (GObject *object, { TpBaseConnection *base = TP_BASE_CONNECTION (object); TpHandleRepoIface *contact_handles = - tp_base_connection_get_handles (base, TP_HANDLE_TYPE_CONTACT); + tp_base_connection_get_handles (base, TP_ENTITY_TYPE_CONTACT); TpHandle self = tp_base_connection_get_self_handle (base); const gchar *bare_jid = tp_handle_inspect (contact_handles, self); diff --git a/src/conn-presence.c b/src/conn-presence.c index 2fc09d28f..0e02dc7f4 100644 --- a/src/conn-presence.c +++ b/src/conn-presence.c @@ -222,7 +222,7 @@ construct_contact_statuses (GabbleConnection *self, TpHandle handle; GHashTable *contact_statuses; TpHandleRepoIface *handle_repo = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); g_return_val_if_fail (tp_handles_are_valid (handle_repo, contact_handles, FALSE, NULL), NULL); diff --git a/src/conn-util.c b/src/conn-util.c index 00f2e4d15..7fc721be1 100644 --- a/src/conn-util.c +++ b/src/conn-util.c @@ -108,7 +108,7 @@ conn_util_get_bare_self_jid (GabbleConnection *conn) { TpBaseConnection *base = TP_BASE_CONNECTION (conn); TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); TpHandle self = tp_base_connection_get_self_handle (base); return tp_handle_inspect (contact_handles, self); diff --git a/src/connection.c b/src/connection.c index 72a44728a..5207ed611 100644 --- a/src/connection.c +++ b/src/connection.c @@ -818,13 +818,13 @@ gabble_connection_get_unique_name (TpBaseConnection *self) */ void _gabble_connection_create_handle_repos (TpBaseConnection *conn, - TpHandleRepoIface *repos[TP_NUM_HANDLE_TYPES]) + TpHandleRepoIface *repos[TP_NUM_ENTITY_TYPES]) { - repos[TP_HANDLE_TYPE_CONTACT] = - tp_dynamic_handle_repo_new (TP_HANDLE_TYPE_CONTACT, + repos[TP_ENTITY_TYPE_CONTACT] = + tp_dynamic_handle_repo_new (TP_ENTITY_TYPE_CONTACT, gabble_normalize_contact, GUINT_TO_POINTER (GABBLE_JID_ANY)); - repos[TP_HANDLE_TYPE_ROOM] = - tp_dynamic_handle_repo_new (TP_HANDLE_TYPE_ROOM, gabble_normalize_room, + repos[TP_ENTITY_TYPE_ROOM] = + tp_dynamic_handle_repo_new (TP_ENTITY_TYPE_ROOM, gabble_normalize_room, conn); } @@ -1845,7 +1845,7 @@ connector_connected (GabbleConnection *self, GabbleConnectionPrivate *priv = self->priv; TpBaseConnection *base = (TpBaseConnection *) self; TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); /* cleanup the cancellable */ tp_clear_object (&priv->cancellable); @@ -2036,7 +2036,7 @@ connection_iq_last_cb ( if (from != NULL) { TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self, TP_ENTITY_TYPE_CONTACT); TpHandle handle = tp_handle_lookup (contact_repo, from, NULL, NULL); /* If there's no handle for them, they're certainly not on the roster. */ @@ -2363,7 +2363,7 @@ gabble_connection_send_capabilities (GabbleConnection *self, GError **error) { TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self, TP_ENTITY_TYPE_CONTACT); WockyStanza *message; gboolean ret; TpHandle handle; @@ -2929,7 +2929,7 @@ connection_disco_cb (GabbleDisco *disco, if ((conn->features & GABBLE_CONNECTION_FEATURES_WLM_JID_LOOKUP) != 0) { TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); tp_dynamic_handle_repo_set_normalize_async ( (TpDynamicHandleRepo *) contact_repo, @@ -3607,7 +3607,7 @@ gabble_connection_get_jid_for_caps (GabblePluginConnection *plugin_conn, } contact_handles = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); return tp_handle_inspect (contact_handles, handle); } @@ -3630,7 +3630,7 @@ gabble_connection_pick_best_resource_for_caps ( base = (TpBaseConnection *) connection; contact_handles = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); handle = tp_handle_ensure (contact_handles, jid, NULL, NULL); diff --git a/src/connection.h b/src/connection.h index 92dc2a95b..1c68cb0dd 100644 --- a/src/connection.h +++ b/src/connection.h @@ -296,7 +296,7 @@ const gchar **gabble_connection_get_guaranteed_interfaces (void); /* extern only for the benefit of the unit tests */ void _gabble_connection_create_handle_repos (TpBaseConnection *conn, - TpHandleRepoIface *repos[TP_NUM_HANDLE_TYPES]); + TpHandleRepoIface *repos[TP_NUM_ENTITY_TYPES]); /* For unit tests only */ void gabble_connection_set_disco_reply_timeout (guint timeout); diff --git a/src/ft-channel.c b/src/ft-channel.c index 122dc5d73..9afee0074 100644 --- a/src/ft-channel.c +++ b/src/ft-channel.c @@ -387,7 +387,7 @@ gabble_file_transfer_channel_constructed (GObject *obj) TpBaseConnection *base_conn = tp_base_channel_get_connection (base); GabbleConnection *conn = GABBLE_CONNECTION (base_conn); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - base_conn, TP_HANDLE_TYPE_CONTACT); + base_conn, TP_ENTITY_TYPE_CONTACT); GArray *socket_access; TpSocketAccessControl access_control; @@ -607,7 +607,7 @@ gabble_file_transfer_channel_class_init ( object_class->set_property = gabble_file_transfer_channel_set_property; base_class->channel_type = TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1; - base_class->target_handle_type = TP_HANDLE_TYPE_CONTACT; + base_class->target_entity_type = TP_ENTITY_TYPE_CONTACT; base_class->get_interfaces = gabble_file_transfer_channel_get_interfaces; base_class->close = gabble_file_transfer_channel_close; base_class->fill_immutable_properties = @@ -1408,9 +1408,9 @@ gabble_file_transfer_channel_offer_file (GabbleFileTransferChannel *self, } contact_repo = tp_base_connection_get_handles (base_conn, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); room_repo = tp_base_connection_get_handles (base_conn, - TP_HANDLE_TYPE_ROOM); + TP_ENTITY_TYPE_ROOM); jid = tp_handle_inspect (contact_repo, tp_base_channel_get_target_handle (base)); diff --git a/src/ft-manager.c b/src/ft-manager.c index 5575c8b2f..3a366f0eb 100644 --- a/src/ft-manager.c +++ b/src/ft-manager.c @@ -379,7 +379,7 @@ new_jingle_session_cb (GabbleJingleMint *jm, gchar *filename = NULL; TpHandleRepoIface *contacts = tp_base_connection_get_handles ( TP_BASE_CONNECTION (self->priv->connection), - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); TpHandle peer = tp_handle_ensure (contacts, wocky_jingle_session_get_peer_jid (sess), NULL, NULL); @@ -447,7 +447,7 @@ gabble_ft_manager_handle_request (TpChannelManager *manager, GabbleFileTransferChannel *chan; TpBaseConnection *base_conn = TP_BASE_CONNECTION (self->priv->connection); TpHandleRepoIface *contact_repo = - tp_base_connection_get_handles (base_conn, TP_HANDLE_TYPE_CONTACT); + tp_base_connection_get_handles (base_conn, TP_ENTITY_TYPE_CONTACT); TpHandle handle; const gchar *content_type, *filename, *content_hash, *description; const gchar *file_uri, *service_name; @@ -467,7 +467,7 @@ gabble_ft_manager_handle_request (TpChannelManager *manager, /* And only contact handles */ if (tp_asv_get_uint32 (request_properties, - TP_IFACE_CHANNEL ".TargetHandleType", NULL) != TP_HANDLE_TYPE_CONTACT) + TP_IFACE_CHANNEL ".TargetEntityType", NULL) != TP_ENTITY_TYPE_CONTACT) return FALSE; handle = tp_asv_get_uint32 (request_properties, @@ -603,7 +603,7 @@ error: */ static const gchar * const file_transfer_channel_fixed_properties[] = { TP_IFACE_CHANNEL ".ChannelType", - TP_IFACE_CHANNEL ".TargetHandleType", + TP_IFACE_CHANNEL ".TargetEntityType", NULL }; @@ -655,8 +655,8 @@ gabble_ft_manager_type_foreach_channel_class (GType type, g_hash_table_insert (table, TP_IFACE_CHANNEL ".ChannelType" , tp_g_value_slice_new_string (TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1)); - g_hash_table_insert (table, TP_IFACE_CHANNEL ".TargetHandleType", - tp_g_value_slice_new_uint (TP_HANDLE_TYPE_CONTACT)); + g_hash_table_insert (table, TP_IFACE_CHANNEL ".TargetEntityType", + tp_g_value_slice_new_uint (TP_ENTITY_TYPE_CONTACT)); func (type, table, file_transfer_channel_allowed_properties_with_both_metadata_props, user_data); @@ -936,7 +936,7 @@ add_file_transfer_channel_class (GPtrArray *arr, GValue monster = {0, }; GHashTable *fixed_properties; GValue *channel_type_value; - GValue *target_handle_type_value; + GValue *target_entity_type_value; GValue *service_name_value; const gchar * const *allowed_properties; @@ -953,9 +953,9 @@ add_file_transfer_channel_class (GPtrArray *arr, g_hash_table_insert (fixed_properties, TP_IFACE_CHANNEL ".ChannelType", channel_type_value); - target_handle_type_value = tp_g_value_slice_new_uint (TP_HANDLE_TYPE_CONTACT); - g_hash_table_insert (fixed_properties, TP_IFACE_CHANNEL ".TargetHandleType", - target_handle_type_value); + target_entity_type_value = tp_g_value_slice_new_uint (TP_ENTITY_TYPE_CONTACT); + g_hash_table_insert (fixed_properties, TP_IFACE_CHANNEL ".TargetEntityType", + target_entity_type_value); if (service_name_str != NULL) { @@ -1041,8 +1041,8 @@ gabble_ft_manager_represent_client ( continue; if (tp_asv_get_uint32 (channel_class, - TP_IFACE_CHANNEL ".TargetHandleType", NULL) - != TP_HANDLE_TYPE_CONTACT) + TP_IFACE_CHANNEL ".TargetEntityType", NULL) + != TP_ENTITY_TYPE_CONTACT) continue; DEBUG ("client %s supports file transfer", client_name); diff --git a/src/im-channel.c b/src/im-channel.c index 3106e722a..a83dec95e 100644 --- a/src/im-channel.c +++ b/src/im-channel.c @@ -114,7 +114,7 @@ gabble_im_channel_constructed (GObject *obj) TpBaseConnection *base_conn = tp_base_channel_get_connection (base); GabbleConnection *conn = GABBLE_CONNECTION (base_conn); TpHandleRepoIface *contact_handles = - tp_base_connection_get_handles (base_conn, TP_HANDLE_TYPE_CONTACT); + tp_base_connection_get_handles (base_conn, TP_ENTITY_TYPE_CONTACT); TpHandle target = tp_base_channel_get_target_handle (base); TpChannelTextMessageType types[] = { @@ -200,7 +200,7 @@ gabble_im_channel_class_init (GabbleIMChannelClass *gabble_im_channel_class) base_class->channel_type = TP_IFACE_CHANNEL_TYPE_TEXT; base_class->get_interfaces = gabble_im_channel_get_interfaces; - base_class->target_handle_type = TP_HANDLE_TYPE_CONTACT; + base_class->target_entity_type = TP_ENTITY_TYPE_CONTACT; base_class->close = gabble_im_channel_close; base_class->fill_immutable_properties = gabble_im_channel_fill_immutable_properties; diff --git a/src/im-factory.c b/src/im-factory.c index 2e9acf36f..4b581e339 100644 --- a/src/im-factory.c +++ b/src/im-factory.c @@ -431,7 +431,7 @@ get_channel_for_incoming_message ( GabbleImFactoryPrivate *priv = self->priv; TpBaseConnection *conn = (TpBaseConnection *) priv->conn; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (conn, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); TpHandle handle; GabbleIMChannel *chan; @@ -610,7 +610,7 @@ gabble_im_factory_get_contact_caps (GabbleCapsChannelManager *manager, GValue monster = {0, }; GHashTable *fixed_properties; GValue *channel_type_value; - GValue *target_handle_type_value; + GValue *target_entity_type_value; gchar *text_allowed_properties[] = { TP_IFACE_CHANNEL ".TargetHandle", @@ -632,10 +632,10 @@ gabble_im_factory_get_contact_caps (GabbleCapsChannelManager *manager, g_hash_table_insert (fixed_properties, TP_IFACE_CHANNEL ".ChannelType", 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); + target_entity_type_value = tp_g_value_slice_new (G_TYPE_UINT); + g_value_set_uint (target_entity_type_value, TP_ENTITY_TYPE_CONTACT); + g_hash_table_insert (fixed_properties, TP_IFACE_CHANNEL ".TargetEntityType", + target_entity_type_value); dbus_g_type_struct_set (&monster, 0, fixed_properties, @@ -679,7 +679,7 @@ gabble_im_factory_foreach_channel (TpChannelManager *manager, static const gchar * const im_channel_fixed_properties[] = { TP_IFACE_CHANNEL ".ChannelType", - TP_IFACE_CHANNEL ".TargetHandleType", + TP_IFACE_CHANNEL ".TargetEntityType", NULL }; @@ -705,7 +705,7 @@ gabble_im_factory_type_foreach_channel_class (GType type, value); value = tp_g_value_slice_new (G_TYPE_UINT); - g_value_set_uint (value, TP_HANDLE_TYPE_CONTACT); + g_value_set_uint (value, TP_ENTITY_TYPE_CONTACT); g_hash_table_insert (table, (gchar *) im_channel_fixed_properties[1], value); @@ -730,7 +730,7 @@ gabble_im_factory_requestotron (GabbleImFactory *self, return FALSE; if (tp_asv_get_uint32 (request_properties, - TP_IFACE_CHANNEL ".TargetHandleType", NULL) != TP_HANDLE_TYPE_CONTACT) + TP_IFACE_CHANNEL ".TargetEntityType", NULL) != TP_ENTITY_TYPE_CONTACT) return FALSE; /* validity already checked by TpBaseConnection */ diff --git a/src/jingle-mint.c b/src/jingle-mint.c index f41a504ea..03f4b53d5 100644 --- a/src/jingle-mint.c +++ b/src/jingle-mint.c @@ -276,7 +276,7 @@ session_about_to_initiate_cb ( GabbleJingleMintPrivate *priv = self->priv; const gchar *peer_jid = wocky_jingle_session_get_peer_jid (session); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); TpHandle peer = tp_handle_ensure (contact_repo, peer_jid, NULL, NULL); /* send directed presence (including our own caps, avatar etc.) to diff --git a/src/media-factory.c b/src/media-factory.c index 21100052c..512f9a588 100644 --- a/src/media-factory.c +++ b/src/media-factory.c @@ -356,7 +356,7 @@ new_jingle_session_cb (GabbleJingleMint *jm, } contacts = tp_base_connection_get_handles (TP_BASE_CONNECTION (priv->conn), - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); peer = tp_handle_ensure (contacts, wocky_jingle_session_get_peer_jid (sess), NULL, NULL); @@ -419,7 +419,7 @@ gabble_media_factory_foreach_channel (TpChannelManager *manager, static const gchar * const media_channel_fixed_properties[] = { TP_PROP_CHANNEL_CHANNEL_TYPE, - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, + TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, NULL }; @@ -479,8 +479,8 @@ static GHashTable * gabble_media_factory_call_channel_class (void) { GHashTable *table = tp_asv_new ( - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, - TP_HANDLE_TYPE_CONTACT, + TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, G_TYPE_UINT, + TP_ENTITY_TYPE_CONTACT, NULL); tp_asv_set_static_string (table, TP_PROP_CHANNEL_CHANNEL_TYPE, @@ -528,7 +528,7 @@ gabble_media_factory_create_call (TpChannelManager *manager, DEBUG ("Creating a new call channel"); if (tp_asv_get_uint32 (request_properties, - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL) != TP_HANDLE_TYPE_CONTACT) + TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, NULL) != TP_ENTITY_TYPE_CONTACT) return FALSE; if (tp_channel_manager_asv_has_unknown_properties (request_properties, @@ -888,10 +888,10 @@ gabble_media_factory_represent_client (GabbleCapsChannelManager *manager, continue; } - if (tp_asv_lookup (filter, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE) + if (tp_asv_lookup (filter, TP_PROP_CHANNEL_TARGET_ENTITY_TYPE) != NULL && - tp_asv_get_uint32 (filter, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, - NULL) != TP_HANDLE_TYPE_CONTACT) + tp_asv_get_uint32 (filter, TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, + NULL) != TP_ENTITY_TYPE_CONTACT) { /* not interesting to this channel manager: we only care about * Jingle calls involving contacts (or about clients that support diff --git a/src/muc-channel.c b/src/muc-channel.c index 2b4cfc970..69fe9ed81 100644 --- a/src/muc-channel.c +++ b/src/muc-channel.c @@ -336,11 +336,11 @@ static void handle_errmsg (GObject *source, /* Signatures for some other stuff. */ static void _gabble_muc_channel_handle_subject (GabbleMucChannel *chan, - TpHandleType handle_type, + TpEntityType handle_type, TpHandle sender, GDateTime *datetime, const gchar *subject, WockyStanza *msg, const GError *error); static void _gabble_muc_channel_receive (GabbleMucChannel *chan, - TpChannelTextMessageType msg_type, TpHandleType handle_type, + TpChannelTextMessageType msg_type, TpEntityType handle_type, TpHandle sender, GDateTime *datetime, const gchar *id, const gchar *text, WockyStanza *msg, const GError *send_error, @@ -399,9 +399,9 @@ gabble_muc_channel_constructed (GObject *obj) chain_up (obj); room_handles = tp_base_connection_get_handles (base_conn, - TP_HANDLE_TYPE_ROOM); + TP_ENTITY_TYPE_ROOM); contact_handles = tp_base_connection_get_handles (base_conn, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); /* get, and sanity-check, the room's jid */ target = tp_base_channel_get_target_handle (base); @@ -777,7 +777,7 @@ create_room_identity (GabbleMucChannel *chan) gchar *alias = NULL; GabbleConnectionAliasSource source; - contact_repo = tp_base_connection_get_handles (conn, TP_HANDLE_TYPE_CONTACT); + contact_repo = tp_base_connection_get_handles (conn, TP_ENTITY_TYPE_CONTACT); g_assert (priv->self_jid == NULL); @@ -1100,7 +1100,7 @@ gabble_muc_channel_class_init (GabbleMucChannelClass *gabble_muc_channel_class) object_class->finalize = gabble_muc_channel_finalize; base_class->channel_type = TP_IFACE_CHANNEL_TYPE_TEXT; - base_class->target_handle_type = TP_HANDLE_TYPE_ROOM; + base_class->target_entity_type = TP_ENTITY_TYPE_ROOM; base_class->get_interfaces = gabble_muc_channel_get_interfaces; base_class->fill_immutable_properties = gabble_muc_channel_fill_immutable_properties; base_class->close = gabble_muc_channel_close; @@ -1698,7 +1698,7 @@ handle_nick_conflict (GabbleMucChannel *chan, TpBaseChannel *base = TP_BASE_CHANNEL (chan); TpGroupMixin *mixin = TP_GROUP_MIXIN (chan); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - tp_base_channel_get_connection (base), TP_HANDLE_TYPE_CONTACT); + tp_base_channel_get_connection (base), TP_ENTITY_TYPE_CONTACT); TpHandle self_handle; TpIntset *add_rp, *remove_rp; const gchar *from = wocky_stanza_get_from (stanza); @@ -2014,13 +2014,13 @@ create_new_tube (GabbleMucChannel *gmuc, { case TUBE_TYPE_DBUS: tube = GABBLE_TUBE_IFACE (gabble_tube_dbus_new (conn, - handle, TP_HANDLE_TYPE_ROOM, self_handle, initiator, + handle, TP_ENTITY_TYPE_ROOM, self_handle, initiator, service, parameters, stream_id, tube_id, bytestream, gmuc, requested)); break; case TUBE_TYPE_STREAM: tube = GABBLE_TUBE_IFACE (gabble_tube_stream_new (conn, - handle, TP_HANDLE_TYPE_ROOM, self_handle, initiator, + handle, TP_ENTITY_TYPE_ROOM, self_handle, initiator, service, parameters, tube_id, gmuc, requested)); break; default: @@ -2196,7 +2196,7 @@ tubes_presence_update (GabbleMucChannel *gmuc, GabbleMucChannelPrivate *priv = gmuc->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( tp_base_channel_get_connection (TP_BASE_CHANNEL (gmuc)), - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); const gchar *presence_type; WockyNode *tubes_node; GHashTable *old_dbus_tubes; @@ -2395,7 +2395,7 @@ handle_parted (GObject *source, TpChannelGroupChangeReason reason = TP_CHANNEL_GROUP_CHANGE_REASON_NONE; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (tp_base_channel_get_connection (base), - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); TpIntset *handles = NULL; TpHandle member = 0; TpHandle actor = 0; @@ -2465,7 +2465,7 @@ handle_left (GObject *source, TpChannelGroupChangeReason reason = TP_CHANNEL_GROUP_CHANGE_REASON_NONE; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (tp_base_channel_get_connection (base), - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); TpIntset *handles = NULL; TpHandle member = 0; TpHandle actor = 0; @@ -2536,7 +2536,7 @@ handle_fill_presence (WockyMuc *muc, TpBaseConnection *base_conn = tp_base_channel_get_connection (base); GabbleConnection *conn = GABBLE_CONNECTION (base_conn); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (base_conn, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); TpHandle self_handle; self_handle = tp_handle_ensure (contact_repo, priv->self_jid->str, @@ -2574,7 +2574,7 @@ handle_renamed (GObject *source, TpBaseChannel *base = TP_BASE_CHANNEL (gmuc); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (tp_base_channel_get_connection (base), - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); TpIntset *old_self = tp_intset_new (); const gchar *me = wocky_muc_jid (wmuc); const gchar *me2 = wocky_muc_user (wmuc); @@ -2651,7 +2651,7 @@ handle_join (WockyMuc *muc, TpBaseChannel *base = TP_BASE_CHANNEL (gmuc); TpBaseConnection *base_conn = tp_base_channel_get_connection (base); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (base_conn, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); TpHandleSet *members = tp_handle_set_new (contact_repo); TpHandleSet *owners = tp_handle_set_new (contact_repo); GHashTable *omap = g_hash_table_new (g_direct_hash, g_direct_equal); @@ -2719,7 +2719,7 @@ handle_presence (GObject *source, TpBaseConnection *base_conn = tp_base_channel_get_connection (base); GabbleConnection *conn = GABBLE_CONNECTION (base_conn); TpHandleRepoIface *contact_repo = - tp_base_connection_get_handles (base_conn, TP_HANDLE_TYPE_CONTACT); + tp_base_connection_get_handles (base_conn, TP_ENTITY_TYPE_CONTACT); TpHandle owner = 0; TpHandle handle = tp_handle_ensure (contact_repo, who->from, GUINT_TO_POINTER (GABBLE_JID_ROOM_MEMBER), NULL); @@ -2795,12 +2795,12 @@ handle_message (GObject *source, TpChannelTextMessageType msg_type; TpHandleRepoIface *repo; - TpHandleType handle_type; + TpEntityType handle_type; TpHandle from; if (from_member) { - handle_type = TP_HANDLE_TYPE_CONTACT; + handle_type = TP_ENTITY_TYPE_CONTACT; repo = tp_base_connection_get_handles (conn, handle_type); from = tp_handle_ensure (repo, who->from, GUINT_TO_POINTER (GABBLE_JID_ROOM_MEMBER), NULL); @@ -2813,7 +2813,7 @@ handle_message (GObject *source, } else /* directly from MUC itself */ { - handle_type = TP_HANDLE_TYPE_ROOM; + handle_type = TP_ENTITY_TYPE_ROOM; repo = tp_base_connection_get_handles (conn, handle_type); from = tp_base_channel_get_target_handle (base); } @@ -2884,13 +2884,13 @@ handle_errmsg (GObject *source, gboolean from_member = (who != NULL); TpDeliveryStatus ds = TP_DELIVERY_STATUS_DELIVERED; TpHandleRepoIface *repo = NULL; - TpHandleType handle_type; + TpEntityType handle_type; TpHandle from = 0; const gchar *subject; if (from_member) { - handle_type = TP_HANDLE_TYPE_CONTACT; + handle_type = TP_ENTITY_TYPE_CONTACT; repo = tp_base_connection_get_handles (conn, handle_type); from = tp_handle_ensure (repo, who->from, GUINT_TO_POINTER (GABBLE_JID_ROOM_MEMBER), NULL); @@ -2903,7 +2903,7 @@ handle_errmsg (GObject *source, } else /* directly from MUC itself */ { - handle_type = TP_HANDLE_TYPE_ROOM; + handle_type = TP_ENTITY_TYPE_ROOM; repo = tp_base_connection_get_handles (conn, handle_type); from = tp_base_channel_get_target_handle (base); } @@ -2956,7 +2956,7 @@ handle_errmsg (GObject *source, */ void _gabble_muc_channel_handle_subject (GabbleMucChannel *chan, - TpHandleType handle_type, + TpEntityType handle_type, TpHandle sender, GDateTime *datetime, const gchar *subject, @@ -2994,7 +2994,7 @@ _gabble_muc_channel_handle_subject (GabbleMucChannel *chan, /* Channel.Interface.Subject properties */ - if (handle_type == TP_HANDLE_TYPE_CONTACT) + if (handle_type == TP_ENTITY_TYPE_CONTACT) { TpHandleRepoIface *contact_handles = tp_base_connection_get_handles ( tp_base_channel_get_connection (TP_BASE_CHANNEL (chan)), @@ -3029,7 +3029,7 @@ _gabble_muc_channel_handle_subject (GabbleMucChannel *chan, static void _gabble_muc_channel_receive (GabbleMucChannel *chan, TpChannelTextMessageType msg_type, - TpHandleType sender_handle_type, + TpEntityType sender_handle_type, TpHandle sender, GDateTime *datetime, const gchar *id, @@ -3079,7 +3079,7 @@ _gabble_muc_channel_receive (GabbleMucChannel *chan, * messages like "foo has set the subject to: ..." and "This room is not * anonymous". */ - if (!is_echo && !is_error && sender_handle_type == TP_HANDLE_TYPE_ROOM) + if (!is_echo && !is_error && sender_handle_type == TP_ENTITY_TYPE_ROOM) { STANZA_DEBUG (msg, "ignoring message from muc"); @@ -3168,7 +3168,7 @@ _gabble_muc_channel_receive (GabbleMucChannel *chan, else { /* Messages from the MUC itself should have no sender. */ - if (sender_handle_type == TP_HANDLE_TYPE_CONTACT) + if (sender_handle_type == TP_ENTITY_TYPE_CONTACT) tp_cm_message_set_sender (message, sender); if (timestamp != 0) diff --git a/src/muc-factory.c b/src/muc-factory.c index 34ce329b0..2636d8ffa 100644 --- a/src/muc-factory.c +++ b/src/muc-factory.c @@ -524,7 +524,7 @@ do_invite (GabbleMucFactory *fac, { GabbleMucFactoryPrivate *priv = fac->priv; TpHandleRepoIface *room_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_ROOM); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_ROOM); TpHandle room_handle; room_handle = tp_handle_ensure (room_repo, room, NULL, NULL); @@ -616,7 +616,7 @@ process_muc_invite (GabbleMucFactory *fac, GabbleMucFactoryPrivate *priv = fac->priv; TpBaseConnection *conn = (TpBaseConnection *) priv->conn; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (conn, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); WockyNode *x_node, *invite_node, *reason_node; const gchar *invite_from, *reason = NULL; @@ -688,7 +688,7 @@ process_obsolete_invite (GabbleMucFactory *fac, GabbleMucFactoryPrivate *priv = fac->priv; TpBaseConnection *conn = (TpBaseConnection *) priv->conn; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (conn, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); WockyNode *x_node; const gchar *room; @@ -1056,7 +1056,7 @@ gabble_muc_factory_handle_si_stream_request (GabbleMucFactory *self, { GabbleMucFactoryPrivate *priv = self->priv; TpHandleRepoIface *room_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_ROOM); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_ROOM); GabbleMucChannel *gmuc = NULL; WockyStanzaType stanza_type; WockyStanzaSubType sub_type; @@ -1095,7 +1095,7 @@ gabble_muc_factory_find_text_channel (GabbleMucFactory *self, static const gchar * const muc_channel_fixed_properties[] = { TP_PROP_CHANNEL_CHANNEL_TYPE, - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, + TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, NULL }; @@ -1129,8 +1129,8 @@ gabble_muc_factory_type_foreach_channel_class (GType type, channel_type_value); handle_type_value = tp_g_value_slice_new (G_TYPE_UINT); - g_value_set_uint (handle_type_value, TP_HANDLE_TYPE_ROOM); - g_hash_table_insert (table, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, + g_value_set_uint (handle_type_value, TP_ENTITY_TYPE_ROOM); + g_hash_table_insert (table, TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, handle_type_value); /* Channel.Type.Text */ @@ -1179,9 +1179,9 @@ handle_text_channel_request (GabbleMucFactory *self, gboolean ret = TRUE; TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (conn, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); TpHandleRepoIface *room_handles = tp_base_connection_get_handles (conn, - TP_HANDLE_TYPE_ROOM); + TP_ENTITY_TYPE_ROOM); GPtrArray *initial_channels; GHashTable *final_channels; /* used as a set: (char *) -> NULL */ @@ -1308,7 +1308,7 @@ handle_text_channel_request (GabbleMucFactory *self, final_ids[i] = (char *) id; } - /* TargetHandleType=None and TargetHandle=0 */ + /* TargetEntityType=None and TargetHandle=0 */ if (room == 0) { char *uuid, *id, *server = ""; @@ -1760,19 +1760,19 @@ gabble_muc_factory_request (GabbleMucFactory *self, gboolean require_new) { GError *error = NULL; - TpHandleType handle_type; + TpEntityType handle_type; TpHandle handle; gboolean conference, room; const gchar *channel_type; ChannelTypeHandler *h; handle_type = tp_asv_get_uint32 (request_properties, - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL); + TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, NULL); channel_type = tp_asv_get_string (request_properties, TP_PROP_CHANNEL_CHANNEL_TYPE); /* Conference channels can be anonymous (HandleTypeNone) */ - conference = (handle_type == TP_HANDLE_TYPE_NONE && + conference = (handle_type == TP_ENTITY_TYPE_NONE && !tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TEXT) && (g_hash_table_lookup (request_properties, TP_PROP_CHANNEL_INTERFACE_CONFERENCE1_INITIAL_CHANNELS) || @@ -1781,13 +1781,13 @@ gabble_muc_factory_request (GabbleMucFactory *self, g_hash_table_lookup (request_properties, TP_PROP_CHANNEL_INTERFACE_CONFERENCE1_INITIAL_INVITEE_IDS))); - room = (handle_type == TP_HANDLE_TYPE_NONE + room = (handle_type == TP_ENTITY_TYPE_NONE && !tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TEXT) && g_hash_table_lookup (request_properties, TP_PROP_CHANNEL_INTERFACE_ROOM1_ROOM_NAME)); /* the channel must either be a room, or a new conference */ - if (handle_type != TP_HANDLE_TYPE_ROOM && !conference && !room) + if (handle_type != TP_ENTITY_TYPE_ROOM && !conference && !room) return FALSE; /* validity already checked by TpBaseConnection */ @@ -1846,7 +1846,7 @@ gabble_muc_factory_handle_jingle_session (GabbleMucFactory *self, { GabbleMucFactoryPrivate *priv = self->priv; TpHandleRepoIface *room_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_ROOM); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_ROOM); TpHandle room; room = gabble_get_room_handle_from_jid (room_repo, diff --git a/src/muc-tube-dbus.c b/src/muc-tube-dbus.c index 11fcf7134..28e9d9bd8 100644 --- a/src/muc-tube-dbus.c +++ b/src/muc-tube-dbus.c @@ -50,5 +50,5 @@ gabble_muc_tube_dbus_class_init ( gabble_muc_tube_dbus_class); base_class->get_interfaces = gabble_muc_tube_dbus_get_interfaces; - base_class->target_handle_type = TP_HANDLE_TYPE_ROOM; + base_class->target_entity_type = TP_ENTITY_TYPE_ROOM; } diff --git a/src/muc-tube-stream.c b/src/muc-tube-stream.c index 21dad795a..53fd0b5bd 100644 --- a/src/muc-tube-stream.c +++ b/src/muc-tube-stream.c @@ -50,5 +50,5 @@ gabble_muc_tube_stream_class_init ( gabble_muc_tube_stream_class); base_class->get_interfaces = gabble_muc_tube_stream_get_interfaces; - base_class->target_handle_type = TP_HANDLE_TYPE_ROOM; + base_class->target_entity_type = TP_ENTITY_TYPE_ROOM; } diff --git a/src/presence-cache.c b/src/presence-cache.c index 24ec7b45b..8e8834ca5 100644 --- a/src/presence-cache.c +++ b/src/presence-cache.c @@ -569,7 +569,7 @@ gabble_presence_cache_set_property (GObject *object, priv->conn = g_value_get_object (value); contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); priv->presence_handles = tp_handle_set_new (contact_repo); break; @@ -1237,7 +1237,7 @@ _caps_disco_cb (GabbleDisco *disco, priv = cache->priv; base_conn = TP_BASE_CONNECTION (priv->conn); contact_repo = tp_base_connection_get_handles (base_conn, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); if (NULL == node) { @@ -1477,7 +1477,7 @@ _process_caps_uri (GabblePresenceCache *cache, priv = cache->priv; contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); info = capability_info_get (cache, uri); caps_cache = wocky_caps_cache_dup_shared (); @@ -1838,7 +1838,7 @@ _parse_message_message ( GabblePresenceCache *cache = GABBLE_PRESENCE_CACHE (user_data); GabblePresenceCachePrivate *priv = cache->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); const gchar *from = wocky_stanza_get_from (message); TpHandle handle; WockyStanzaSubType sub_type; @@ -1900,7 +1900,7 @@ gabble_presence_cache_presence_cb ( GabblePresenceCache *cache = GABBLE_PRESENCE_CACHE (user_data); GabblePresenceCachePrivate *priv = cache->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); const char *from = wocky_stanza_get_from (message); TpHandle handle; @@ -1934,7 +1934,7 @@ gabble_presence_cache_get (GabblePresenceCache *cache, TpHandle handle) { GabblePresenceCachePrivate *priv = cache->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); g_assert (tp_handle_is_valid (contact_repo, handle, NULL)); @@ -1959,7 +1959,7 @@ gabble_presence_cache_maybe_remove ( { GabblePresenceCachePrivate *priv = cache->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); GabblePresence *presence; presence = gabble_presence_cache_get (cache, handle); @@ -2014,7 +2014,7 @@ gabble_presence_cache_do_update ( if (DEBUGGING) { TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); const gchar *jid = tp_handle_inspect (contact_repo, handle); const gchar *presence_name = wocky_enum_to_nick ( GABBLE_TYPE_PRESENCE_ID, presence_id); @@ -2228,7 +2228,7 @@ gabble_presence_cache_really_remove ( { GabblePresenceCachePrivate *priv = cache->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); const gchar *jid; jid = tp_handle_inspect (contact_repo, handle); diff --git a/src/private-tubes-factory.c b/src/private-tubes-factory.c index db33df8d3..72d6bf087 100644 --- a/src/private-tubes-factory.c +++ b/src/private-tubes-factory.c @@ -91,7 +91,7 @@ struct _GabblePrivateTubesFactoryPrivate static const gchar * const tubes_channel_fixed_properties[] = { TP_PROP_CHANNEL_CHANNEL_TYPE, - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, + TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, NULL }; @@ -388,7 +388,7 @@ add_service_to_array (const gchar *service, GValue monster = {0, }; GHashTable *fixed_properties; GValue *channel_type_value; - GValue *target_handle_type_value; + GValue *target_entity_type_value; gchar *tube_allowed_properties[] = { TP_PROP_CHANNEL_TARGET_HANDLE, @@ -416,21 +416,21 @@ add_service_to_array (const gchar *service, 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); + target_entity_type_value = tp_g_value_slice_new (G_TYPE_UINT); + g_value_set_uint (target_entity_type_value, TP_ENTITY_TYPE_CONTACT); g_hash_table_insert (fixed_properties, - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, target_handle_type_value); + TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, target_entity_type_value); - target_handle_type_value = tp_g_value_slice_new (G_TYPE_STRING); - g_value_set_string (target_handle_type_value, service); + target_entity_type_value = tp_g_value_slice_new (G_TYPE_STRING); + g_value_set_string (target_entity_type_value, service); if (type == TUBE_TYPE_STREAM) g_hash_table_insert (fixed_properties, TP_PROP_CHANNEL_TYPE_STREAM_TUBE1_SERVICE, - target_handle_type_value); + target_entity_type_value); else g_hash_table_insert (fixed_properties, TP_PROP_CHANNEL_TYPE_DBUS_TUBE1_SERVICE_NAME, - target_handle_type_value); + target_entity_type_value); dbus_g_type_struct_set (&monster, 0, fixed_properties, @@ -448,7 +448,7 @@ add_generic_tube_caps (GPtrArray *arr) GValue monster1 = {0,}, monster2 = {0,}; GHashTable *fixed_properties; GValue *channel_type_value; - GValue *target_handle_type_value; + GValue *target_entity_type_value; /* StreamTube */ g_value_init (&monster1, TP_STRUCT_TYPE_REQUESTABLE_CHANNEL_CLASS); @@ -466,10 +466,10 @@ add_generic_tube_caps (GPtrArray *arr) 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); + target_entity_type_value = tp_g_value_slice_new (G_TYPE_UINT); + g_value_set_uint (target_entity_type_value, TP_ENTITY_TYPE_CONTACT); g_hash_table_insert (fixed_properties, - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, target_handle_type_value); + TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, target_entity_type_value); dbus_g_type_struct_set (&monster1, 0, fixed_properties, @@ -495,10 +495,10 @@ add_generic_tube_caps (GPtrArray *arr) 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); + target_entity_type_value = tp_g_value_slice_new (G_TYPE_UINT); + g_value_set_uint (target_entity_type_value, TP_ENTITY_TYPE_CONTACT); g_hash_table_insert (fixed_properties, - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, target_handle_type_value); + TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, target_entity_type_value); dbus_g_type_struct_set (&monster2, 0, fixed_properties, @@ -582,7 +582,7 @@ gabble_private_tubes_factory_add_cap (GabbleCapsChannelManager *manager, return; if (tp_asv_get_uint32 (cap, - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL) != TP_HANDLE_TYPE_CONTACT) + TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, NULL) != TP_ENTITY_TYPE_CONTACT) return; if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1)) @@ -668,7 +668,7 @@ gabble_private_tubes_factory_handle_si_tube_request ( WockyStanza *msg) { TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self->priv->conn, TP_ENTITY_TYPE_CONTACT); WockyNode *si_node, *tube_node; WockyStanzaType stanza_type; WockyStanzaSubType sub_type; @@ -725,7 +725,7 @@ gabble_private_tubes_factory_handle_si_stream_request ( WockyStanza *msg) { TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self->priv->conn, TP_ENTITY_TYPE_CONTACT); const gchar *tmp; guint64 tube_id; WockyNode *si_node, *stream_node; @@ -795,7 +795,7 @@ tube_msg_checks (GabblePrivateTubesFactory *self, guint64 *out_tube_id) { TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self->priv->conn, TP_ENTITY_TYPE_CONTACT); const gchar *from, *tmp; TpHandle handle; guint64 tube_id; @@ -1008,7 +1008,7 @@ new_channel_from_request (GabblePrivateTubesFactory *self, TpHandle handle; const gchar *ctype, *service; - TpHandleType handle_type; + TpEntityType handle_type; GHashTable *parameters; guint64 tube_id; @@ -1016,7 +1016,7 @@ new_channel_from_request (GabblePrivateTubesFactory *self, handle = tp_asv_get_uint32 (request, TP_PROP_CHANNEL_TARGET_HANDLE, NULL); handle_type = tp_asv_get_uint32 (request, - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL); + TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, NULL); tube_id = generate_tube_id (self); @@ -1110,7 +1110,7 @@ new_channel_from_stanza (GabblePrivateTubesFactory *self, GabbleTubeIface *tube; TpBaseConnection *base_conn = TP_BASE_CONNECTION (self->priv->conn); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self->priv->conn, TP_ENTITY_TYPE_CONTACT); TubeType type; TpHandle handle; @@ -1150,7 +1150,7 @@ new_channel_from_stanza (GabblePrivateTubesFactory *self, if (type == TUBE_TYPE_STREAM) { tube = GABBLE_TUBE_IFACE (gabble_tube_stream_new (self->priv->conn, - handle, TP_HANDLE_TYPE_CONTACT, + handle, TP_ENTITY_TYPE_CONTACT, tp_base_connection_get_self_handle (base_conn), handle, service, parameters, tube_id, NULL, FALSE)); } @@ -1167,7 +1167,7 @@ new_channel_from_stanza (GabblePrivateTubesFactory *self, g_return_val_if_fail (stream_id != NULL, NULL); tube = GABBLE_TUBE_IFACE (gabble_tube_dbus_new (self->priv->conn, - handle, TP_HANDLE_TYPE_CONTACT, + handle, TP_ENTITY_TYPE_CONTACT, tp_base_connection_get_self_handle (base_conn), handle, service, parameters, stream_id, tube_id, bytestream, NULL, FALSE)); @@ -1218,8 +1218,8 @@ gabble_private_tubes_factory_type_foreach_channel_class (GType 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_PROP_CHANNEL_TARGET_HANDLE_TYPE, + g_value_set_uint (value, TP_ENTITY_TYPE_CONTACT); + g_hash_table_insert (table, TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, value); func (type, table, gabble_tube_stream_channel_get_allowed_properties (), @@ -1237,8 +1237,8 @@ gabble_private_tubes_factory_type_foreach_channel_class (GType 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_PROP_CHANNEL_TARGET_HANDLE_TYPE, + g_value_set_uint (value, TP_ENTITY_TYPE_CONTACT); + g_hash_table_insert (table, TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, value); func (type, table, gabble_tube_dbus_channel_get_allowed_properties (), @@ -1262,7 +1262,7 @@ gabble_private_tubes_factory_requestotron (GabblePrivateTubesFactory *self, const gchar *service = NULL; if (tp_asv_get_uint32 (request_properties, - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL) != TP_HANDLE_TYPE_CONTACT) + TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, NULL) != TP_ENTITY_TYPE_CONTACT) return FALSE; channel_type = tp_asv_get_string (request_properties, diff --git a/src/roomlist-channel.c b/src/roomlist-channel.c index dfa7ec70f..d56a819cf 100644 --- a/src/roomlist-channel.c +++ b/src/roomlist-channel.c @@ -95,7 +95,7 @@ gabble_roomlist_channel_constructed (GObject *obj) if (parent_class->constructed != NULL) parent_class->constructed (obj); - room_handles = tp_base_connection_get_handles (conn, TP_HANDLE_TYPE_ROOM); + room_handles = tp_base_connection_get_handles (conn, TP_ENTITY_TYPE_ROOM); self->priv->signalled_rooms = tp_handle_set_new (room_handles); tp_base_channel_register (TP_BASE_CHANNEL (obj)); @@ -183,7 +183,7 @@ gabble_roomlist_channel_class_init (GabbleRoomlistChannelClass *klass) object_class->finalize = gabble_roomlist_channel_finalize; base_class->channel_type = TP_IFACE_CHANNEL_TYPE_ROOM_LIST1; - base_class->target_handle_type = TP_HANDLE_TYPE_NONE; + base_class->target_entity_type = TP_ENTITY_TYPE_NONE; base_class->get_object_path_suffix = gabble_roomlist_channel_get_object_path_suffix; base_class->fill_immutable_properties = @@ -319,7 +319,7 @@ room_info_cb (gpointer pipeline, GabbleDiscoItem *item, gpointer user_data) base = TP_BASE_CHANNEL (chan); priv = chan->priv; room_handles = tp_base_connection_get_handles ( - tp_base_channel_get_connection (base), TP_HANDLE_TYPE_ROOM); + tp_base_channel_get_connection (base), TP_ENTITY_TYPE_ROOM); jid = item->jid; name = item->name; diff --git a/src/roomlist-manager.c b/src/roomlist-manager.c index 7876ff089..7776928f8 100644 --- a/src/roomlist-manager.c +++ b/src/roomlist-manager.c @@ -258,7 +258,7 @@ gabble_roomlist_manager_foreach_channel (TpChannelManager *manager, static const gchar * const roomlist_channel_fixed_properties[] = { TP_IFACE_CHANNEL ".ChannelType", - TP_IFACE_CHANNEL ".TargetHandleType", + TP_IFACE_CHANNEL ".TargetEntityType", NULL }; @@ -282,8 +282,8 @@ gabble_roomlist_manager_type_foreach_channel_class (GType type, g_hash_table_insert (table, TP_IFACE_CHANNEL ".ChannelType", value); value = tp_g_value_slice_new (G_TYPE_UINT); - g_value_set_uint (value, TP_HANDLE_TYPE_NONE); - g_hash_table_insert (table, TP_IFACE_CHANNEL ".TargetHandleType", value); + g_value_set_uint (value, TP_ENTITY_TYPE_NONE); + g_hash_table_insert (table, TP_IFACE_CHANNEL ".TargetEntityType", value); func (type, table, roomlist_channel_allowed_properties, user_data); @@ -326,7 +326,7 @@ gabble_roomlist_manager_handle_request (TpChannelManager *manager, return FALSE; if (tp_asv_get_uint32 (request_properties, - TP_IFACE_CHANNEL ".TargetHandleType", NULL) != 0) + TP_IFACE_CHANNEL ".TargetEntityType", NULL) != 0) { g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "RoomList channels can't have a target handle"); diff --git a/src/roster.c b/src/roster.c index 11adfa599..ed4cb118a 100644 --- a/src/roster.c +++ b/src/roster.c @@ -405,7 +405,7 @@ _gabble_roster_item_ensure (GabbleRoster *roster, { GabbleRosterPrivate *priv = roster->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); GabbleRosterItem *item; item = _gabble_roster_item_lookup (roster, handle); @@ -451,7 +451,7 @@ _gabble_roster_item_maybe_remove (GabbleRoster *roster, { GabbleRosterPrivate *priv = roster->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); GabbleRosterItem *item; g_assert (roster != NULL); @@ -588,7 +588,7 @@ _gabble_roster_item_update (GabbleRoster *roster, GHashTable *new_groups, *removed_from, *added_to; TpBaseContactList *base = (TpBaseContactList *) roster; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); g_assert (roster != NULL); g_assert (GABBLE_IS_ROSTER (roster)); @@ -831,7 +831,7 @@ _gabble_roster_item_to_message (GabbleRoster *roster, { GabbleRosterPrivate *priv = roster->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); WockyStanza *message; WockyNode *query_node, *item_node; const gchar *jid; @@ -949,7 +949,7 @@ flicker_prevention_timeout (gpointer ctx_) { TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( (TpBaseConnection *) ctx->roster->priv->conn, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); TpHandleSet *rem = tp_handle_set_new (contact_repo); DEBUG ("removing %u from subscribe", ctx->handle); @@ -1111,7 +1111,7 @@ process_roster ( GabbleRosterPrivate *priv = roster->priv; TpBaseConnection *conn = (TpBaseConnection *) priv->conn; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (conn, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); GArray *updated_nicknames = g_array_new (FALSE, FALSE, sizeof (TpHandle)); /* asymmetry is because we don't get locally pending subscription @@ -1546,7 +1546,7 @@ gabble_roster_presence_cb (WockyPorter *porter, GabbleRosterPrivate *priv = roster->priv; TpBaseConnection *conn = (TpBaseConnection *) priv->conn; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (conn, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); WockyNode *pres_node, *child_node; const char *from; WockyStanzaSubType sub_type; @@ -1879,7 +1879,7 @@ gabble_roster_constructed (GObject *obj) g_assert (GABBLE_IS_CONNECTION (self->priv->conn)); contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self->priv->conn, TP_ENTITY_TYPE_CONTACT); self->priv->status_changed_id = g_signal_connect (self->priv->conn, "status-changed", (GCallback) connection_status_changed_cb, obj); @@ -1958,7 +1958,7 @@ roster_item_cancel_subscriptions ( GError **error) { TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) roster->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) roster->priv->conn, TP_ENTITY_TYPE_CONTACT); const gchar *contact_id = tp_handle_inspect (contact_repo, contact); gboolean ret = TRUE; @@ -2272,7 +2272,7 @@ gabble_roster_handle_set_blocked (GabbleRoster *roster, { GabbleRosterPrivate *priv = roster->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); GabbleRosterItem *item; g_return_if_fail (roster != NULL); @@ -2308,7 +2308,7 @@ gabble_roster_handle_has_entry (GabbleRoster *roster, { GabbleRosterPrivate *priv = roster->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); GabbleRosterItem *item; g_return_val_if_fail (roster != NULL, FALSE); @@ -2327,7 +2327,7 @@ gabble_roster_handle_get_name (GabbleRoster *roster, { GabbleRosterPrivate *priv = roster->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); GabbleRosterItem *item; g_return_val_if_fail (roster != NULL, NULL); @@ -2351,7 +2351,7 @@ gabble_roster_handle_set_name (GabbleRoster *roster, { GabbleRosterPrivate *priv = roster->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); GabbleRosterItem *item; g_return_val_if_fail (roster != NULL, FALSE); @@ -2395,7 +2395,7 @@ gabble_roster_handle_remove (GabbleRoster *roster, GabbleRosterPrivate *priv = roster->priv; TpBaseContactList *base = (TpBaseContactList *) roster; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); GabbleRosterItem *item; g_return_if_fail (roster != NULL); @@ -2453,7 +2453,7 @@ gabble_roster_handle_add (GabbleRoster *roster, { GabbleRosterPrivate *priv = roster->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); GabbleRosterItem *item; gboolean do_add = FALSE; @@ -2500,7 +2500,7 @@ gabble_roster_handle_add_to_group (GabbleRoster *roster, { GabbleRosterPrivate *priv = roster->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); GabbleRosterItem *item; g_return_if_fail (roster != NULL); @@ -2542,7 +2542,7 @@ gabble_roster_handle_remove_from_group (GabbleRoster *roster, { GabbleRosterPrivate *priv = roster->priv; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->conn, TP_ENTITY_TYPE_CONTACT); GabbleRosterItem *item; g_return_if_fail (roster != NULL); @@ -2585,7 +2585,7 @@ gabble_roster_handle_subscribed ( GError **error) { TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) roster->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) roster->priv->conn, TP_ENTITY_TYPE_CONTACT); const gchar *contact_id = tp_handle_inspect (contact_repo, handle); /* send <presence type="subscribed"> */ @@ -2599,7 +2599,7 @@ gabble_roster_dup_contacts (TpBaseContactList *base) GabbleRoster *self = GABBLE_ROSTER (base); TpHandleSet *set; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self->priv->conn, TP_ENTITY_TYPE_CONTACT); GHashTableIter iter; gpointer k, v; @@ -2669,7 +2669,7 @@ gabble_roster_request_subscription_added_cb (GObject *source, { GabbleRoster *self = GABBLE_ROSTER (source); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self->priv->conn, TP_ENTITY_TYPE_CONTACT); SubscribeContext *context = user_data; GError *error = NULL; TpIntsetFastIter iter; @@ -2758,7 +2758,7 @@ gabble_roster_authorize_publication_async (TpBaseContactList *base, TpHandle contact; GError *error = NULL; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self->priv->conn, TP_ENTITY_TYPE_CONTACT); tp_intset_fast_iter_init (&iter, tp_handle_set_peek (contacts)); @@ -2850,7 +2850,7 @@ gabble_roster_unsubscribe_async (TpBaseContactList *base, { GabbleRoster *self = GABBLE_ROSTER (base); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self->priv->conn, TP_ENTITY_TYPE_CONTACT); TpHandleSet *changed = tp_handle_set_new (contact_repo); TpHandleSet *removed = tp_handle_set_new (contact_repo); TpIntsetFastIter iter; @@ -2911,7 +2911,7 @@ gabble_roster_unpublish_async (TpBaseContactList *base, { GabbleRoster *self = GABBLE_ROSTER (base); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self->priv->conn, TP_ENTITY_TYPE_CONTACT); TpHandleSet *changed = tp_handle_set_new (contact_repo); TpHandleSet *removed = tp_handle_set_new (contact_repo); TpIntsetFastIter iter; @@ -3030,7 +3030,7 @@ gabble_roster_dup_blocked_contacts (TpBaseContactList *base) GabbleRoster *self = GABBLE_ROSTER (base); TpHandleSet *set; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self->priv->conn, TP_ENTITY_TYPE_CONTACT); GHashTableIter iter; gpointer k, v; @@ -3169,7 +3169,7 @@ gabble_roster_dup_group_members (TpBaseContactList *base, GabbleRoster *self = GABBLE_ROSTER (base); TpHandleSet *set; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self->priv->conn, TP_ENTITY_TYPE_CONTACT); GHashTableIter iter; gpointer k, v; @@ -3200,7 +3200,7 @@ gabble_roster_set_contact_groups_async (TpBaseContactList *base, GabbleRoster *self = GABBLE_ROSTER (base); GabbleRosterItem *item = _gabble_roster_item_ensure (self, contact); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self->priv->conn, TP_ENTITY_TYPE_CONTACT); GHashTable *groups_set = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); GPtrArray *groups_created = g_ptr_array_new (); @@ -3437,7 +3437,7 @@ gabble_roster_remove_group_async (TpBaseContactList *base, GHashTableIter iter; gpointer k, v; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self->priv->conn, TP_ENTITY_TYPE_CONTACT); GSimpleAsyncResult *result; RemoveGroupContext *context; @@ -3550,7 +3550,7 @@ gabble_roster_handle_sends_presence_to_us (GabbleRoster *self, TpHandle handle) { TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self->priv->conn, TP_ENTITY_TYPE_CONTACT); GabbleRosterItem *item; g_return_val_if_fail (GABBLE_IS_ROSTER (self), FALSE); @@ -3571,7 +3571,7 @@ gabble_roster_handle_gets_presence_from_us (GabbleRoster *self, TpHandle handle) { TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) self->priv->conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) self->priv->conn, TP_ENTITY_TYPE_CONTACT); GabbleRosterItem *item; g_return_val_if_fail (GABBLE_IS_ROSTER (self), FALSE); diff --git a/src/search-channel.c b/src/search-channel.c index ec1ca8342..89ca7b907 100644 --- a/src/search-channel.c +++ b/src/search-channel.c @@ -996,7 +996,7 @@ gabble_search_channel_constructor (GType type, conn = tp_base_channel_get_connection (base); chan->priv->result_handles = tp_handle_set_new ( - tp_base_connection_get_handles (conn, TP_HANDLE_TYPE_CONTACT)); + tp_base_connection_get_handles (conn, TP_ENTITY_TYPE_CONTACT)); chan->priv->tp_to_xmpp = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); @@ -1139,7 +1139,7 @@ gabble_search_channel_class_init (GabbleSearchChannelClass *klass) object_class->set_property = gabble_search_channel_set_property; base_class->channel_type = TP_IFACE_CHANNEL_TYPE_CONTACT_SEARCH1; - base_class->target_handle_type = TP_HANDLE_TYPE_NONE; + base_class->target_entity_type = TP_ENTITY_TYPE_NONE; base_class->fill_immutable_properties = gabble_search_channel_fill_immutable_properties; base_class->get_object_path_suffix = diff --git a/src/server-sasl-channel.c b/src/server-sasl-channel.c index 376de3c42..aae40ee57 100644 --- a/src/server-sasl-channel.c +++ b/src/server-sasl-channel.c @@ -341,7 +341,7 @@ gabble_server_sasl_channel_class_init (GabbleServerSaslChannelClass *klass) channel_class->channel_type = TP_IFACE_CHANNEL_TYPE_SERVER_AUTHENTICATION1; channel_class->get_interfaces = gabble_server_sasl_channel_get_interfaces; - channel_class->target_handle_type = TP_HANDLE_TYPE_NONE; + channel_class->target_entity_type = TP_ENTITY_TYPE_NONE; channel_class->fill_immutable_properties = gabble_server_sasl_channel_fill_immutable_properties; channel_class->get_object_path_suffix = diff --git a/src/server-tls-channel.c b/src/server-tls-channel.c index e8bcee077..7b3c0c658 100644 --- a/src/server-tls-channel.c +++ b/src/server-tls-channel.c @@ -256,7 +256,7 @@ gabble_server_tls_channel_class_init (GabbleServerTLSChannelClass *klass) oclass->constructed = gabble_server_tls_channel_constructed; base_class->channel_type = TP_IFACE_CHANNEL_TYPE_SERVER_TLS_CONNECTION1; - base_class->target_handle_type = TP_HANDLE_TYPE_NONE; + base_class->target_entity_type = TP_ENTITY_TYPE_NONE; base_class->fill_immutable_properties = gabble_server_tls_channel_fill_immutable_properties; base_class->get_object_path_suffix = diff --git a/src/tube-dbus.c b/src/tube-dbus.c index 3db077df4..9e8ac2100 100644 --- a/src/tube-dbus.c +++ b/src/tube-dbus.c @@ -430,7 +430,7 @@ tube_dbus_open (GabbleTubeDBus *self) dbus_server_setup_with_g_main (priv->dbus_srv, NULL); } - if (cls->target_handle_type == TP_HANDLE_TYPE_ROOM) + if (cls->target_entity_type == TP_ENTITY_TYPE_ROOM) { /* add yourself in dbus names */ gabble_tube_dbus_add_name (self, priv->self_handle, @@ -496,7 +496,7 @@ bytestream_state_changed_cb (GabbleBytestreamIface *bytestream, tp_clear_object (&priv->bytestream); g_signal_emit (G_OBJECT (self), signals[CLOSED], 0); - if (cls->target_handle_type == TP_HANDLE_TYPE_ROOM) + if (cls->target_entity_type == TP_ENTITY_TYPE_ROOM) gabble_muc_channel_send_presence (priv->muc); } else if (state == GABBLE_BYTESTREAM_STATE_OPEN) @@ -710,7 +710,7 @@ gabble_tube_dbus_constructed (GObject *obj) TpBaseConnection *base_conn = tp_base_channel_get_connection (base); GabbleConnection *conn = GABBLE_CONNECTION (base_conn); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - base_conn, TP_HANDLE_TYPE_CONTACT); + base_conn, TP_ENTITY_TYPE_CONTACT); guint access_control; void (*chain_up) (GObject *) = @@ -723,7 +723,7 @@ gabble_tube_dbus_constructed (GObject *obj) NULL, g_free); g_assert (priv->self_handle != 0); - if (cls->target_handle_type == TP_HANDLE_TYPE_ROOM) + if (cls->target_entity_type == TP_ENTITY_TYPE_ROOM) { /* We have to create a pseudo-IBB bytestream that will be * used by this MUC tube to communicate. @@ -880,7 +880,7 @@ gabble_tube_dbus_class_init (GabbleTubeDBusClass *gabble_tube_dbus_class) base_class->channel_type = TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1; base_class->get_interfaces = gabble_tube_dbus_get_interfaces; - base_class->target_handle_type = TP_HANDLE_TYPE_CONTACT; + base_class->target_entity_type = TP_ENTITY_TYPE_CONTACT; base_class->close = gabble_tube_dbus_close; base_class->fill_immutable_properties = gabble_tube_dbus_fill_immutable_properties; @@ -1039,10 +1039,10 @@ gabble_tube_dbus_offer (GabbleTubeDBus *tube, return FALSE; } - if (cls->target_handle_type == TP_HANDLE_TYPE_CONTACT) + if (cls->target_entity_type == TP_ENTITY_TYPE_CONTACT) { TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - base_conn, TP_HANDLE_TYPE_CONTACT); + base_conn, TP_ENTITY_TYPE_CONTACT); const gchar *jid, *resource; gchar *full_jid; GabblePresence *presence; @@ -1141,7 +1141,7 @@ message_received (GabbleTubeDBus *tube, return; } - if (cls->target_handle_type == TP_HANDLE_TYPE_ROOM) + if (cls->target_entity_type == TP_ENTITY_TYPE_ROOM) { destination = dbus_message_get_destination (msg); /* If destination is NULL this msg is broadcasted (signals) so we don't @@ -1227,7 +1227,7 @@ data_received_cb (GabbleBytestreamIface *stream, TpBaseChannel *base = TP_BASE_CHANNEL (tube); TpBaseChannelClass *cls = TP_BASE_CHANNEL_GET_CLASS (base); - if (cls->target_handle_type == TP_HANDLE_TYPE_CONTACT) + if (cls->target_entity_type == TP_ENTITY_TYPE_CONTACT) { GString *buf = priv->reassembly_buffer; @@ -1333,7 +1333,7 @@ data_received_cb (GabbleBytestreamIface *stream, GabbleTubeDBus * gabble_tube_dbus_new (GabbleConnection *conn, TpHandle handle, - TpHandleType handle_type, + TpEntityType handle_type, TpHandle self_handle, TpHandle initiator, const gchar *service, @@ -1347,7 +1347,7 @@ gabble_tube_dbus_new (GabbleConnection *conn, GabbleTubeDBus *tube; GType gtype = GABBLE_TYPE_TUBE_DBUS; - if (handle_type == TP_HANDLE_TYPE_ROOM) + if (handle_type == TP_ENTITY_TYPE_ROOM) gtype = GABBLE_TYPE_MUC_TUBE_DBUS; tube = g_object_new (gtype, @@ -1400,7 +1400,7 @@ gabble_tube_dbus_accept (GabbleTubeIface *tube, if (state != GABBLE_BYTESTREAM_STATE_LOCAL_PENDING) return TRUE; - if (cls->target_handle_type == TP_HANDLE_TYPE_CONTACT) + if (cls->target_entity_type == TP_ENTITY_TYPE_CONTACT) { /* Bytestream was created using a SI request so * we have to accept it */ @@ -1461,12 +1461,12 @@ gabble_tube_dbus_add_name (GabbleTubeDBus *self, TpBaseChannelClass *cls = TP_BASE_CHANNEL_GET_CLASS (base); TpBaseConnection *base_conn = tp_base_channel_get_connection (base); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - base_conn, TP_HANDLE_TYPE_CONTACT); + base_conn, TP_ENTITY_TYPE_CONTACT); gchar *name_copy; GHashTable *added; GArray *removed; - g_assert (cls->target_handle_type == TP_HANDLE_TYPE_ROOM); + g_assert (cls->target_entity_type == TP_ENTITY_TYPE_ROOM); g_assert (g_hash_table_size (priv->dbus_names) == g_hash_table_size (priv->dbus_name_to_handle)); @@ -1536,7 +1536,7 @@ gabble_tube_dbus_remove_name (GabbleTubeDBus *self, GHashTable *added; GArray *removed; - g_assert (cls->target_handle_type == TP_HANDLE_TYPE_ROOM); + g_assert (cls->target_entity_type == TP_ENTITY_TYPE_ROOM); name = g_hash_table_lookup (priv->dbus_names, GUINT_TO_POINTER (handle)); if (name == NULL) @@ -1569,7 +1569,7 @@ gabble_tube_dbus_handle_in_names (GabbleTubeDBus *self, GabbleTubeDBusPrivate *priv = GABBLE_TUBE_DBUS_GET_PRIVATE (self); TpBaseChannelClass *cls = TP_BASE_CHANNEL_GET_CLASS (self); - g_assert (cls->target_handle_type == TP_HANDLE_TYPE_ROOM); + g_assert (cls->target_entity_type == TP_ENTITY_TYPE_ROOM); return (g_hash_table_lookup (priv->dbus_names, GUINT_TO_POINTER (handle)) != NULL); diff --git a/src/tube-dbus.h b/src/tube-dbus.h index b3020a9f4..ba3fd49ab 100644 --- a/src/tube-dbus.h +++ b/src/tube-dbus.h @@ -69,7 +69,7 @@ GType gabble_tube_dbus_get_type (void); GabbleTubeDBusClass)) GabbleTubeDBus *gabble_tube_dbus_new (GabbleConnection *conn, TpHandle handle, - TpHandleType handle_type, TpHandle self_handle, TpHandle initiator, + TpEntityType handle_type, TpHandle self_handle, TpHandle initiator, const gchar *service, GHashTable *parameters, const gchar *stream_id, guint64 id, GabbleBytestreamIface *bytestream, GabbleMucChannel *muc, gboolean requested); diff --git a/src/tube-iface.c b/src/tube-iface.c index aef131e09..ea0a18514 100644 --- a/src/tube-iface.c +++ b/src/tube-iface.c @@ -154,7 +154,7 @@ gabble_tube_iface_publish_in_node (GabbleTubeIface *tube, gchar *service, *id_str; guint64 tube_id; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - conn, TP_HANDLE_TYPE_CONTACT); + conn, TP_ENTITY_TYPE_CONTACT); TpHandle initiator_handle; g_object_get (G_OBJECT (tube), diff --git a/src/tube-stream.c b/src/tube-stream.c index 9e9fdd5ea..fb9c4a484 100644 --- a/src/tube-stream.c +++ b/src/tube-stream.c @@ -458,11 +458,11 @@ start_stream_initiation (GabbleTubeStream *self, gchar *full_jid, *stream_id, *id_str; contact_repo = tp_base_connection_get_handles ( - base_conn, TP_HANDLE_TYPE_CONTACT); + base_conn, TP_ENTITY_TYPE_CONTACT); jid = tp_handle_inspect (contact_repo, initiator); - if (cls->target_handle_type == TP_HANDLE_TYPE_CONTACT) + if (cls->target_entity_type == TP_ENTITY_TYPE_CONTACT) { /* Private tube */ GabblePresence *presence; @@ -507,7 +507,7 @@ start_stream_initiation (GabbleTubeStream *self, id_str = g_strdup_printf ("%" G_GUINT64_FORMAT, priv->id); - if (cls->target_handle_type == TP_HANDLE_TYPE_CONTACT) + if (cls->target_entity_type == TP_ENTITY_TYPE_CONTACT) { node = wocky_node_add_child_ns (si_node, "stream", NS_TUBES); } @@ -842,7 +842,7 @@ fire_new_remote_connection (GabbleTubeStream *self, TpBaseChannel *base = TP_BASE_CHANNEL (self); TpBaseConnection *base_conn = tp_base_channel_get_connection (base); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - base_conn, TP_HANDLE_TYPE_CONTACT); + base_conn, TP_ENTITY_TYPE_CONTACT); #ifdef GIBBER_TYPE_UNIX_TRANSPORT if (priv->access_control == TP_SOCKET_ACCESS_CONTROL_CREDENTIALS) @@ -1363,7 +1363,7 @@ gabble_tube_stream_constructed (GObject *obj) conn->bytestream_factory); } - if (cls->target_handle_type == TP_HANDLE_TYPE_CONTACT) + if (cls->target_entity_type == TP_ENTITY_TYPE_CONTACT) { g_assert (priv->muc == NULL); } @@ -1452,7 +1452,7 @@ gabble_tube_stream_class_init (GabbleTubeStreamClass *gabble_tube_stream_class) base_class->channel_type = TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1; base_class->get_interfaces = gabble_tube_stream_get_interfaces; - base_class->target_handle_type = TP_HANDLE_TYPE_CONTACT; + base_class->target_entity_type = TP_ENTITY_TYPE_CONTACT; base_class->close = gabble_tube_stream_close; base_class->fill_immutable_properties = gabble_tube_stream_fill_immutable_properties; @@ -1617,7 +1617,7 @@ data_received_cb (GabbleBytestreamIface *bytestream, GabbleTubeStream * gabble_tube_stream_new (GabbleConnection *conn, TpHandle handle, - TpHandleType handle_type, + TpEntityType handle_type, TpHandle self_handle, TpHandle initiator, const gchar *service, @@ -1629,7 +1629,7 @@ gabble_tube_stream_new (GabbleConnection *conn, GabbleTubeStream *obj; GType gtype = GABBLE_TYPE_TUBE_STREAM; - if (handle_type == TP_HANDLE_TYPE_ROOM) + if (handle_type == TP_ENTITY_TYPE_ROOM) gtype = GABBLE_TYPE_MUC_TUBE_STREAM; obj = g_object_new (gtype, @@ -1717,12 +1717,12 @@ gabble_tube_iface_stream_close (GabbleTubeIface *tube, g_hash_table_foreach_remove (priv->bytestream_to_transport, close_each_extra_bytestream, self); - if (!closed_remotely && cls->target_handle_type == TP_HANDLE_TYPE_CONTACT) + if (!closed_remotely && cls->target_entity_type == TP_ENTITY_TYPE_CONTACT) { WockyStanza *msg; const gchar *jid; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - base_conn, TP_HANDLE_TYPE_CONTACT); + base_conn, TP_ENTITY_TYPE_CONTACT); gchar *id_str; jid = tp_handle_inspect (contact_repo, @@ -1752,7 +1752,7 @@ gabble_tube_iface_stream_close (GabbleTubeIface *tube, * disappear when we finally remove the Tubes channel type.. */ g_object_ref (self); - if (cls->target_handle_type == TP_HANDLE_TYPE_ROOM) + if (cls->target_entity_type == TP_ENTITY_TYPE_ROOM) gabble_muc_channel_send_presence (priv->muc); g_signal_emit (G_OBJECT (self), signals[CLOSED], 0); @@ -2066,10 +2066,10 @@ send_tube_offer (GabbleTubeStream *self, const gchar *resource; gchar *full_jid; - g_assert (cls->target_handle_type == TP_HANDLE_TYPE_CONTACT); + g_assert (cls->target_entity_type == TP_ENTITY_TYPE_CONTACT); contact_repo = tp_base_connection_get_handles (base_conn, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); jid = tp_handle_inspect (contact_repo, tp_base_channel_get_target_handle (base)); @@ -2132,7 +2132,7 @@ gabble_tube_stream_offer (GabbleTubeStream *self, g_assert (priv->state == TP_TUBE_CHANNEL_STATE_NOT_OFFERED); - if (cls->target_handle_type == TP_HANDLE_TYPE_CONTACT) + if (cls->target_entity_type == TP_ENTITY_TYPE_CONTACT) { /* 1-1 tube. Send tube offer message */ if (!send_tube_offer (self, error)) @@ -2279,7 +2279,7 @@ gabble_tube_stream_offer_async (TpSvcChannelTypeStreamTube1 *iface, return; } - if (cls->target_handle_type == TP_HANDLE_TYPE_CONTACT) + if (cls->target_entity_type == TP_ENTITY_TYPE_CONTACT) { tp_svc_channel_interface_tube1_emit_tube_channel_state_changed ( self, TP_TUBE_CHANNEL_STATE_REMOTE_PENDING); @@ -2326,7 +2326,7 @@ gabble_tube_stream_accept_async (TpSvcChannelTypeStreamTube1 *iface, #if 0 /* TODO: add a property "muc" and set it at initialization */ - if (priv->handle_type == TP_HANDLE_TYPE_ROOM) + if (priv->handle_type == TP_ENTITY_TYPE_ROOM) gabble_muc_channel_send_presence (self->muc, NULL); #endif diff --git a/src/tube-stream.h b/src/tube-stream.h index 5b26fcced..1a7ee9b38 100644 --- a/src/tube-stream.h +++ b/src/tube-stream.h @@ -66,7 +66,7 @@ GType gabble_tube_stream_get_type (void); GabbleTubeStreamClass)) GabbleTubeStream *gabble_tube_stream_new (GabbleConnection *conn, - TpHandle handle, TpHandleType handle_type, TpHandle self_handle, + TpHandle handle, TpEntityType handle_type, TpHandle self_handle, TpHandle initiator, const gchar *service, GHashTable *parameters, guint64 id, GabbleMucChannel *muc, gboolean requested); diff --git a/src/util.c b/src/util.c index b36f5745a..dad3859d6 100644 --- a/src/util.c +++ b/src/util.c @@ -152,7 +152,7 @@ lm_message_node_add_own_nick (WockyNode *node, /** * gabble_get_room_handle_from_jid: - * @room_repo: The %TP_HANDLE_TYPE_ROOM handle repository + * @room_repo: The %TP_ENTITY_TYPE_ROOM handle repository * @jid: A JID * * Given a JID seen in the from="" attribute on a stanza, work out whether @@ -277,7 +277,7 @@ gabble_encode_jid ( /* * gabble_normalize_contact - * @repo: The %TP_HANDLE_TYPE_ROOM handle repository or NULL + * @repo: The %TP_ENTITY_TYPE_ROOM handle repository or NULL * @jid: A JID * @context: One of %GabbleNormalizeContactJIDMode casted into gpointer * @error: pointer in which to return a GError in case of failure. @@ -758,7 +758,7 @@ ensure_handle_from_contact ( WockyContact *contact) { TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) conn, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) conn, TP_ENTITY_TYPE_CONTACT); gchar *jid = wocky_contact_dup_jid (contact); GError *error = NULL; TpHandle handle = tp_handle_ensure (contact_repo, jid, NULL, &error); @@ -1053,7 +1053,7 @@ gabble_peer_to_jid (GabbleConnection *conn, const gchar *resource) { TpHandleRepoIface *repo = tp_base_connection_get_handles ( - TP_BASE_CONNECTION (conn), TP_HANDLE_TYPE_CONTACT); + TP_BASE_CONNECTION (conn), TP_ENTITY_TYPE_CONTACT); const gchar *target = tp_handle_inspect (repo, peer); if (resource == NULL) diff --git a/src/vcard-manager.c b/src/vcard-manager.c index 9f40b7523..7eb8d3330 100644 --- a/src/vcard-manager.c +++ b/src/vcard-manager.c @@ -458,7 +458,7 @@ gabble_vcard_manager_invalidate_cache (GabbleVCardManager *manager, GabbleVCardCacheEntry *entry = g_hash_table_lookup (priv->cache, GUINT_TO_POINTER (handle)); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->connection, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->connection, TP_ENTITY_TYPE_CONTACT); g_return_if_fail (tp_handle_is_valid (contact_repo, handle, NULL)); @@ -1261,7 +1261,7 @@ pipeline_reply_cb (GabbleConnection *conn, GabbleVCardManagerPrivate *priv = self->priv; TpBaseConnection *base = (TpBaseConnection *) conn; TpHandleRepoIface *contact_repo = - tp_base_connection_get_handles (base, TP_HANDLE_TYPE_CONTACT); + tp_base_connection_get_handles (base, TP_ENTITY_TYPE_CONTACT); WockyNode *vcard_node = NULL; DEBUG("called for entry %p", entry); @@ -1390,7 +1390,7 @@ request_send (GabbleVCardManagerRequest *request, guint timeout) GabbleConnection *conn = entry->manager->priv->connection; TpBaseConnection *base = (TpBaseConnection *) conn; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); g_assert (request->timer_id == 0); @@ -1465,7 +1465,7 @@ gabble_vcard_manager_request (GabbleVCardManager *self, GabbleVCardManagerPrivate *priv = self->priv; TpBaseConnection *base = (TpBaseConnection *) priv->connection; TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (base, - TP_HANDLE_TYPE_CONTACT); + TP_ENTITY_TYPE_CONTACT); GabbleVCardManagerRequest *request; GabbleVCardCacheEntry *entry = cache_entry_get (self, handle); @@ -1625,7 +1625,7 @@ gabble_vcard_manager_get_cached (GabbleVCardManager *self, GabbleVCardCacheEntry *entry = g_hash_table_lookup (priv->cache, GUINT_TO_POINTER (handle)); TpHandleRepoIface *contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->connection, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->connection, TP_ENTITY_TYPE_CONTACT); g_return_val_if_fail (tp_handle_is_valid (contact_repo, handle, NULL), FALSE); @@ -1654,7 +1654,7 @@ gabble_vcard_manager_get_cached_alias (GabbleVCardManager *self, priv = self->priv; contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->connection, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->connection, TP_ENTITY_TYPE_CONTACT); g_return_val_if_fail (tp_handle_is_valid (contact_repo, handle, NULL), NULL); @@ -1676,7 +1676,7 @@ gabble_vcard_manager_has_cached_alias (GabbleVCardManager *self, priv = self->priv; contact_repo = tp_base_connection_get_handles ( - (TpBaseConnection *) priv->connection, TP_HANDLE_TYPE_CONTACT); + (TpBaseConnection *) priv->connection, TP_ENTITY_TYPE_CONTACT); g_return_val_if_fail (tp_handle_is_valid (contact_repo, handle, NULL), FALSE); diff --git a/src/write-mgr-file.c b/src/write-mgr-file.c index 6537303da..ff63a2966 100644 --- a/src/write-mgr-file.c +++ b/src/write-mgr-file.c @@ -198,7 +198,7 @@ generate_group_name (GHashTable *props) gchar *chan_type_suffix; gchar *handle_type_name; guint handle_type = tp_asv_get_uint32 (props, - TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL); + TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, NULL); g_assert (chan_type != NULL); chan_type_suffix = strrchr (chan_type, '.'); @@ -207,11 +207,11 @@ generate_group_name (GHashTable *props) switch (handle_type) { - case TP_HANDLE_TYPE_CONTACT: + case TP_ENTITY_TYPE_CONTACT: handle_type_name = "-1on1"; break; - case TP_HANDLE_TYPE_ROOM: + case TP_ENTITY_TYPE_ROOM: handle_type_name = "-multi"; break; diff --git a/tests/test-handles.c b/tests/test-handles.c index ebc4c3914..6522a749c 100644 --- a/tests/test-handles.c +++ b/tests/test-handles.c @@ -12,7 +12,7 @@ static void test_handles (guint handle_type) { - TpHandleRepoIface *repos[TP_NUM_HANDLE_TYPES]; + TpHandleRepoIface *repos[TP_NUM_ENTITY_TYPES]; TpHandleRepoIface *tp_repo = NULL; GError *error = NULL; guint i; @@ -21,7 +21,7 @@ test_handles (guint handle_type) const gchar *jid = "handle.test@foobar"; const gchar *return_jid; - for (i = 0; i < TP_NUM_HANDLE_TYPES; i++) + for (i = 0; i < TP_NUM_ENTITY_TYPES; i++) { repos[i] = NULL; } @@ -64,7 +64,7 @@ test_handles (guint handle_type) return_jid = tp_handle_inspect (tp_repo, handle); g_assert (!strcmp (return_jid, jid)); - for (i = 0; i < TP_NUM_HANDLE_TYPES; i++) + for (i = 0; i < TP_NUM_ENTITY_TYPES; i++) { if (repos[i]) g_object_unref ((GObject *) repos[i]); @@ -75,7 +75,7 @@ int main (int argc, char **argv) { g_type_init (); - test_handles (TP_HANDLE_TYPE_CONTACT); - test_handles (TP_HANDLE_TYPE_ROOM); + test_handles (TP_ENTITY_TYPE_CONTACT); + test_handles (TP_ENTITY_TYPE_ROOM); return 0; } diff --git a/tests/twisted/constants.py b/tests/twisted/constants.py index f68e84d9e..1a2678f40 100644 --- a/tests/twisted/constants.py +++ b/tests/twisted/constants.py @@ -62,7 +62,7 @@ CHANNEL_TYPE_SERVER_TLS_CONNECTION = \ CHANNEL + ".Type.ServerTLSConnection1" CHANNEL_TYPE = CHANNEL + '.ChannelType' -TARGET_HANDLE_TYPE = CHANNEL + '.TargetHandleType' +TARGET_HANDLE_TYPE = CHANNEL + '.TargetEntityType' TARGET_HANDLE = CHANNEL + '.TargetHandle' TARGET_ID = CHANNEL + '.TargetID' REQUESTED = CHANNEL + '.Requested' diff --git a/tests/twisted/jingle/stun-server.py b/tests/twisted/jingle/stun-server.py index f140f25d0..011a46140 100644 --- a/tests/twisted/jingle/stun-server.py +++ b/tests/twisted/jingle/stun-server.py @@ -116,7 +116,7 @@ def test_call(jp, q, bus, conn, stream, channel_props = call_chan.GetAll( cs.CHANNEL, dbus_interface=dbus.PROPERTIES_IFACE) assertEquals(remote_handle, channel_props['TargetHandle']) - assertEquals(1, channel_props['TargetHandleType']) + assertEquals(1, channel_props['TargetEntityType']) assertEquals('foo@bar.com', channel_props['TargetID']) assertEquals(False, channel_props['Requested']) assertEquals('foo@bar.com', channel_props['InitiatorID']) diff --git a/tests/twisted/muc/test-muc.py b/tests/twisted/muc/test-muc.py index f54be5790..9dac163eb 100644 --- a/tests/twisted/muc/test-muc.py +++ b/tests/twisted/muc/test-muc.py @@ -24,7 +24,7 @@ def test(q, bus, conn, stream): # Exercise basic Channel Properties from spec 0.17.7 channel_props = chan.Properties.GetAll(cs.CHANNEL) - assertEquals(cs.HT_ROOM, channel_props.get('TargetHandleType')) + assertEquals(cs.HT_ROOM, channel_props.get('TargetEntityType')) assertEquals(cs.CHANNEL_TYPE_TEXT, channel_props.get('ChannelType')) interfaces = channel_props.get('Interfaces') diff --git a/tests/twisted/text/initiate.py b/tests/twisted/text/initiate.py index 92594c6de..be6933067 100644 --- a/tests/twisted/text/initiate.py +++ b/tests/twisted/text/initiate.py @@ -40,8 +40,8 @@ def test(q, bus, conn, stream): cs.CHANNEL, dbus_interface=dbus.PROPERTIES_IFACE) assert channel_props.get('TargetHandle') == foo_handle,\ (channel_props.get('TargetHandle'), foo_handle) - assert channel_props.get('TargetHandleType') == 1,\ - channel_props.get('TargetHandleType') + assert channel_props.get('TargetEntityType') == 1,\ + channel_props.get('TargetEntityType') assert channel_props.get('ChannelType') == \ cs.CHANNEL_TYPE_TEXT,\ channel_props.get('ChannelType') diff --git a/tests/twisted/text/test-text.py b/tests/twisted/text/test-text.py index fc3c42b80..ba67610b8 100644 --- a/tests/twisted/text/test-text.py +++ b/tests/twisted/text/test-text.py @@ -35,7 +35,7 @@ def test(q, bus, conn, stream): # Exercise basic Channel Properties from spec 0.17.7 channel_props = text_chan.Properties.GetAll(cs.CHANNEL) assertEquals(props[cs.TARGET_HANDLE], channel_props.get('TargetHandle')) - assertEquals(cs.HT_CONTACT, channel_props.get('TargetHandleType')) + assertEquals(cs.HT_CONTACT, channel_props.get('TargetEntityType')) assertEquals(cs.CHANNEL_TYPE_TEXT, channel_props.get('ChannelType')) assertContains(cs.CHANNEL_IFACE_CHAT_STATE, channel_props.get('Interfaces')) assertEquals(jid, channel_props['TargetID']) diff --git a/tests/twisted/tubes/tubetestutil.py b/tests/twisted/tubes/tubetestutil.py index 092220df1..f1c5092ac 100644 --- a/tests/twisted/tubes/tubetestutil.py +++ b/tests/twisted/tubes/tubetestutil.py @@ -134,8 +134,8 @@ def check_channel_properties(q, bus, conn, channel, channel_type, channel_props = channel.GetAll(cs.CHANNEL, dbus_interface=cs.PROPERTIES_IFACE) assert channel_props.get('TargetHandle') == contact_handle, \ (channel_props.get('TargetHandle'), contact_handle) - assert channel_props.get('TargetHandleType') == cs.HT_CONTACT, \ - channel_props.get('TargetHandleType') + assert channel_props.get('TargetEntityType') == cs.HT_CONTACT, \ + channel_props.get('TargetEntityType') assert channel_props.get('ChannelType') == channel_type, \ channel_props.get('ChannelType') assert 'Interfaces' in channel_props, channel_props |