diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-04-07 13:49:20 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-04-08 20:11:13 +0100 |
commit | 629a54cf2c70066d5c755f7017eacaf335260c97 (patch) | |
tree | be83bab3bd47dce2cc228d9130864a279ea8daa7 | |
parent | 8a432b3e4f07eaa0599ef86b2cd81e3cf26be628 (diff) | |
download | telepathy-mission-control-629a54cf2c70066d5c755f7017eacaf335260c97.tar.gz |
change terminology from "handle type" to "entity type"
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77139
-rw-r--r-- | mission-control-plugins/dispatch-operation.c | 8 | ||||
-rw-r--r-- | mission-control-plugins/dispatch-operation.h | 2 | ||||
-rw-r--r-- | src/mcd-channel.c | 12 | ||||
-rw-r--r-- | src/mcd-channel.h | 2 | ||||
-rw-r--r-- | tests/twisted/constants.py | 2 | ||||
-rw-r--r-- | tests/twisted/dispatcher/cdo-claim.py | 2 | ||||
-rw-r--r-- | tests/twisted/dispatcher/redispatch-channels.py | 4 | ||||
-rw-r--r-- | tests/twisted/mctest.py | 4 |
8 files changed, 19 insertions, 17 deletions
diff --git a/mission-control-plugins/dispatch-operation.c b/mission-control-plugins/dispatch-operation.c index 23764609..489686ee 100644 --- a/mission-control-plugins/dispatch-operation.c +++ b/mission-control-plugins/dispatch-operation.c @@ -336,7 +336,7 @@ mcp_dispatch_operation_destroy_channels (McpDispatchOperation *self, * language bindings using gobject-introspection, this must not be %NULL. * In C, this may be %NULL, but only if @ret_ref_channel is also %NULL. * @start_from: index at which to start searching, usually 0 - * @handle_type: the handle type to match + * @entity_type: the entity type to match * @channel_type: the channel type to match * @ret_index: if not %NULL, used to return the index of the first matching * channel, suitable for use with @@ -351,7 +351,7 @@ mcp_dispatch_operation_destroy_channels (McpDispatchOperation *self, * guaranteed to be ready immediately, and must be released with * g_object_unref() * - * Attempt to find a channel matching the given handle type and channel type + * Attempt to find a channel matching the given entity type and channel type * in the bundle. This is an easy way to test whether the bundle contains any * channels of interest to a particular plugin. * @@ -363,7 +363,7 @@ gboolean mcp_dispatch_operation_find_channel_by_type (McpDispatchOperation *self, TpClientFactory *client_factory, guint start_from, - TpEntityType handle_type, + TpEntityType entity_type, GQuark channel_type, guint *ret_index, gchar **ret_dup_path, @@ -392,7 +392,7 @@ mcp_dispatch_operation_find_channel_by_type (McpDispatchOperation *self, TP_IFACE_CHANNEL ".ChannelType"), channel_type_str) && tp_asv_get_uint32 (properties, TP_IFACE_CHANNEL ".TargetEntityType", - &valid) == handle_type && + &valid) == entity_type && valid) { if (ret_index != NULL) diff --git a/mission-control-plugins/dispatch-operation.h b/mission-control-plugins/dispatch-operation.h index 46c1193c..dc23d9c2 100644 --- a/mission-control-plugins/dispatch-operation.h +++ b/mission-control-plugins/dispatch-operation.h @@ -54,7 +54,7 @@ GType mcp_dispatch_operation_get_type (void) G_GNUC_CONST; gboolean mcp_dispatch_operation_find_channel_by_type ( McpDispatchOperation *self, TpClientFactory *client_factory, - guint start_from, TpEntityType handle_type, GQuark channel_type, + guint start_from, TpEntityType entity_type, GQuark channel_type, guint *ret_index, gchar **ret_dup_path, GHashTable **ret_ref_immutable_properties, TpChannel **ret_ref_channel); diff --git a/src/mcd-channel.c b/src/mcd-channel.c index 7ae468cd..c537c5c4 100644 --- a/src/mcd-channel.c +++ b/src/mcd-channel.c @@ -623,7 +623,7 @@ mcd_channel_new_from_properties (TpConnection *connection, * @object_path: the D-Bus object path of an existing channel. * @type: the channel type. * @handle: the channel handle. - * @handle_type: the #TpEntityType. + * @entity_type: the #TpEntityType. * * Creates a #McdChannel with an associated #TpChannel proxy for the channel * located at @object_path. @@ -634,12 +634,12 @@ mcd_channel_new_from_properties (TpConnection *connection, McdChannel * mcd_channel_new_from_path (TpConnection *connection, const gchar *object_path, const gchar *type, guint handle, - TpEntityType handle_type) + TpEntityType entity_type) { GHashTable *props; GValue v_type = G_VALUE_INIT; GValue v_handle = G_VALUE_INIT; - GValue v_handle_type = G_VALUE_INIT; + GValue v_entity_type = G_VALUE_INIT; McdChannel *channel; props = g_hash_table_new (g_str_hash, g_str_equal); @@ -652,10 +652,10 @@ mcd_channel_new_from_path (TpConnection *connection, const gchar *object_path, g_value_set_uint (&v_handle, handle); g_hash_table_insert (props, TP_IFACE_CHANNEL ".TargetHandle", &v_handle); - g_value_init (&v_handle_type, G_TYPE_UINT); - g_value_set_uint (&v_handle_type, handle_type); + g_value_init (&v_entity_type, G_TYPE_UINT); + g_value_set_uint (&v_entity_type, entity_type); g_hash_table_insert (props, TP_IFACE_CHANNEL ".TargetEntityType", - &v_handle_type); + &v_entity_type); channel = mcd_channel_new_from_properties (connection, object_path, props); diff --git a/src/mcd-channel.h b/src/mcd-channel.h index 8bdf94ed..baa6d375 100644 --- a/src/mcd-channel.h +++ b/src/mcd-channel.h @@ -90,7 +90,7 @@ mcd_channel_new_from_properties (TpConnection *connection, McdChannel *mcd_channel_new_from_path (TpConnection *connection, const gchar *object_path, const gchar *type, guint handle, - TpEntityType handle_type); + TpEntityType entity_type); McdChannelStatus mcd_channel_get_status (McdChannel * channel); const gchar* mcd_channel_get_object_path (McdChannel *channel); diff --git a/tests/twisted/constants.py b/tests/twisted/constants.py index aa21e077..8272a67d 100644 --- a/tests/twisted/constants.py +++ b/tests/twisted/constants.py @@ -63,6 +63,8 @@ CHANNEL_TYPE_SERVER_TLS_CONNECTION = \ CHANNEL + ".Type.ServerTLSConnection1" CHANNEL_TYPE = CHANNEL + '.ChannelType' +TARGET_ENTITY_TYPE = CHANNEL + '.TargetEntityType' +# let's leave this as a synonym to reduce tests' diff churn in CMs TARGET_HANDLE_TYPE = CHANNEL + '.TargetEntityType' TARGET_HANDLE = CHANNEL + '.TargetHandle' TARGET_ID = CHANNEL + '.TargetID' diff --git a/tests/twisted/dispatcher/cdo-claim.py b/tests/twisted/dispatcher/cdo-claim.py index 9d109b0b..60572ed9 100644 --- a/tests/twisted/dispatcher/cdo-claim.py +++ b/tests/twisted/dispatcher/cdo-claim.py @@ -34,7 +34,7 @@ def test(q, bus, mc): conn = enable_fakecm_account(q, bus, mc, account, params) text_fixed_properties = dbus.Dictionary({ - cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT, + cs.TARGET_ENTITY_TYPE: cs.HT_CONTACT, cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_TEXT, }, signature='sv') diff --git a/tests/twisted/dispatcher/redispatch-channels.py b/tests/twisted/dispatcher/redispatch-channels.py index 28d4a9b7..2ab4066c 100644 --- a/tests/twisted/dispatcher/redispatch-channels.py +++ b/tests/twisted/dispatcher/redispatch-channels.py @@ -31,7 +31,7 @@ import constants as cs REQUEST = dbus.Dictionary({ cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_TEXT, - cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT, + cs.TARGET_ENTITY_TYPE: cs.HT_CONTACT, cs.TARGET_ID: 'juliet', }, signature='sv') @@ -190,7 +190,7 @@ def test(q, bus, mc): conn = enable_fakecm_account(q, bus, mc, account, params) text_fixed_properties = dbus.Dictionary({ - cs.TARGET_HANDLE_TYPE: cs.HT_CONTACT, + cs.TARGET_ENTITY_TYPE: cs.HT_CONTACT, cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_TEXT, }, signature='sv') diff --git a/tests/twisted/mctest.py b/tests/twisted/mctest.py index 56e37257..8f47ce54 100644 --- a/tests/twisted/mctest.py +++ b/tests/twisted/mctest.py @@ -589,12 +589,12 @@ class SimulatedChannel(object): self.object_path = conn.object_path + ('/_%x' % id(self)) self.immutable = immutable.copy() - if self.immutable[cs.TARGET_HANDLE_TYPE] != cs.HT_NONE: + if self.immutable[cs.TARGET_ENTITY_TYPE] != cs.HT_NONE: if (cs.TARGET_ID in self.immutable) != ( cs.TARGET_HANDLE in self.immutable): if cs.TARGET_ID in self.immutable: self.immutable[cs.TARGET_HANDLE] = conn.ensure_handle( - self.immutable[cs.TARGET_HANDLE_TYPE], + self.immutable[cs.TARGET_ENTITY_TYPE], self.immutable[cs.TARGET_ID]) else: self.immutable[cs.TARGET_ID] = conn.inspect_handles( |