summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-07 14:04:23 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-07 14:04:23 +0100
commit2e37894d1e9631d16ae8bafcf9bd493ef5e18b82 (patch)
tree680628c708dcb82f231160d0380ad61356fdbdda
parent417146e38388f98a3db9143f71544c6b9d8b30f5 (diff)
Swap terminology from "handle type" to "entity type"next-handle-type
-rw-r--r--extensions/all.xml2
-rw-r--r--src/bytestream-factory.c6
-rw-r--r--src/bytestream-ibb.c8
-rw-r--r--src/bytestream-iface.c4
-rw-r--r--src/bytestream-muc.c10
-rw-r--r--src/bytestream-multiple.c8
-rw-r--r--src/bytestream-socks5.c8
-rw-r--r--src/media-factory.c2
-rw-r--r--src/muc-channel.c44
-rw-r--r--src/muc-factory.c18
-rw-r--r--src/private-tubes-factory.c8
-rw-r--r--src/tube-dbus.c6
-rw-r--r--src/tube-dbus.h2
-rw-r--r--src/tube-stream.c8
-rw-r--r--src/tube-stream.h2
-rw-r--r--src/write-mgr-file.c14
-rw-r--r--tests/test-handles.c4
-rw-r--r--tests/twisted/constants.py2
18 files changed, 79 insertions, 77 deletions
diff --git a/extensions/all.xml b/extensions/all.xml
index 300b2d08e..f114e531e 100644
--- a/extensions/all.xml
+++ b/extensions/all.xml
@@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA</p>
<tp:generic-types>
<tp:external-type name="Room_Handle" type="u"
from="Telepathy specification"/>
- <tp:external-type name="Handle_Type" type="u"
+ <tp:external-type name="Entity_Type" type="u"
from="Telepathy specification"/>
<tp:external-type name="Contact_Handle" type="u"
from="Telepathy specification"/>
diff --git a/src/bytestream-factory.c b/src/bytestream-factory.c
index 44aa621fc..41401a416 100644
--- a/src/bytestream-factory.c
+++ b/src/bytestream-factory.c
@@ -802,16 +802,16 @@ remove_bytestream (GabbleBytestreamFactory *self,
GabbleBytestreamFactoryPrivate *priv = GABBLE_BYTESTREAM_FACTORY_GET_PRIVATE
(self);
BytestreamIdentifier bsid = { NULL, NULL };
- guint handle_type;
+ guint entity_type;
GHashTable *table = NULL;
g_object_get (bytestream,
"stream-id", &(bsid.stream),
"peer-jid", &(bsid.jid),
- "peer-handle-type", &handle_type,
+ "peer-entity-type", &entity_type,
NULL);
- if (handle_type == TP_ENTITY_TYPE_ROOM)
+ if (entity_type == TP_ENTITY_TYPE_ROOM)
{
table = priv->muc_bytestreams;
}
diff --git a/src/bytestream-ibb.c b/src/bytestream-ibb.c
index 4ec83c5ca..9da5e944f 100644
--- a/src/bytestream-ibb.c
+++ b/src/bytestream-ibb.c
@@ -51,7 +51,7 @@ enum
{
PROP_CONNECTION = 1,
PROP_PEER_HANDLE,
- PROP_PEER_HANDLE_TYPE,
+ PROP_PEER_ENTITY_TYPE,
PROP_STREAM_ID,
PROP_STREAM_INIT_ID,
PROP_PEER_JID,
@@ -184,7 +184,7 @@ gabble_bytestream_ibb_get_property (GObject *object,
case PROP_PEER_HANDLE:
g_value_set_uint (value, priv->peer_handle);
break;
- case PROP_PEER_HANDLE_TYPE:
+ case PROP_PEER_ENTITY_TYPE:
g_value_set_uint (value, TP_ENTITY_TYPE_CONTACT);
break;
case PROP_STREAM_ID:
@@ -312,8 +312,8 @@ gabble_bytestream_ibb_class_init (
"connection");
g_object_class_override_property (object_class, PROP_PEER_HANDLE,
"peer-handle");
- g_object_class_override_property (object_class, PROP_PEER_HANDLE_TYPE,
- "peer-handle-type");
+ g_object_class_override_property (object_class, PROP_PEER_ENTITY_TYPE,
+ "peer-entity-type");
g_object_class_override_property (object_class, PROP_STREAM_ID,
"stream-id");
g_object_class_override_property (object_class, PROP_PEER_JID,
diff --git a/src/bytestream-iface.c b/src/bytestream-iface.c
index 4b35dcbd3..c7f9223fa 100644
--- a/src/bytestream-iface.c
+++ b/src/bytestream-iface.c
@@ -91,8 +91,8 @@ gabble_bytestream_iface_base_init (gpointer klass)
g_object_interface_install_property (klass, param_spec);
param_spec = g_param_spec_uint (
- "peer-handle-type",
- "Peer handle type",
+ "peer-entity-type",
+ "Peer entity type",
"The TpEntityType of the remote peer's associated handle",
0, G_MAXUINT32, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
diff --git a/src/bytestream-muc.c b/src/bytestream-muc.c
index edf5d3fd1..fe693283d 100644
--- a/src/bytestream-muc.c
+++ b/src/bytestream-muc.c
@@ -54,7 +54,7 @@ enum
{
PROP_CONNECTION = 1,
PROP_PEER_HANDLE,
- PROP_PEER_HANDLE_TYPE,
+ PROP_PEER_ENTITY_TYPE,
PROP_STREAM_ID,
PROP_PEER_JID,
PROP_STATE,
@@ -66,7 +66,7 @@ struct _GabbleBytestreamMucPrivate
{
GabbleConnection *conn;
TpHandle peer_handle;
- TpEntityType peer_handle_type;
+ TpEntityType peer_entity_type;
gchar *stream_id;
GabbleBytestreamState state;
const gchar *peer_jid;
@@ -148,7 +148,7 @@ gabble_bytestream_muc_get_property (GObject *object,
case PROP_PEER_HANDLE:
g_value_set_uint (value, priv->peer_handle);
break;
- case PROP_PEER_HANDLE_TYPE:
+ case PROP_PEER_ENTITY_TYPE:
g_value_set_uint (value, TP_ENTITY_TYPE_ROOM);
break;
case PROP_STREAM_ID:
@@ -250,8 +250,8 @@ gabble_bytestream_muc_class_init (
"connection");
g_object_class_override_property (object_class, PROP_PEER_HANDLE,
"peer-handle");
- g_object_class_override_property (object_class, PROP_PEER_HANDLE_TYPE,
- "peer-handle-type");
+ g_object_class_override_property (object_class, PROP_PEER_ENTITY_TYPE,
+ "peer-entity-type");
g_object_class_override_property (object_class, PROP_STREAM_ID,
"stream-id");
g_object_class_override_property (object_class, PROP_PEER_JID,
diff --git a/src/bytestream-multiple.c b/src/bytestream-multiple.c
index 97ea44d46..9b35fbce2 100644
--- a/src/bytestream-multiple.c
+++ b/src/bytestream-multiple.c
@@ -50,7 +50,7 @@ enum
{
PROP_CONNECTION = 1,
PROP_PEER_HANDLE,
- PROP_PEER_HANDLE_TYPE,
+ PROP_PEER_ENTITY_TYPE,
PROP_STREAM_ID,
PROP_STREAM_INIT_ID,
PROP_PEER_JID,
@@ -154,7 +154,7 @@ gabble_bytestream_multiple_get_property (GObject *object,
case PROP_PEER_HANDLE:
g_value_set_uint (value, priv->peer_handle);
break;
- case PROP_PEER_HANDLE_TYPE:
+ case PROP_PEER_ENTITY_TYPE:
g_value_set_uint (value, TP_ENTITY_TYPE_CONTACT);
break;
case PROP_STREAM_ID:
@@ -294,8 +294,8 @@ gabble_bytestream_multiple_class_init (
"connection");
g_object_class_override_property (object_class, PROP_PEER_HANDLE,
"peer-handle");
- g_object_class_override_property (object_class, PROP_PEER_HANDLE_TYPE,
- "peer-handle-type");
+ g_object_class_override_property (object_class, PROP_PEER_ENTITY_TYPE,
+ "peer-entity-type");
g_object_class_override_property (object_class, PROP_STREAM_ID,
"stream-id");
g_object_class_override_property (object_class, PROP_PEER_JID,
diff --git a/src/bytestream-socks5.c b/src/bytestream-socks5.c
index 25df58434..717c9ed42 100644
--- a/src/bytestream-socks5.c
+++ b/src/bytestream-socks5.c
@@ -77,7 +77,7 @@ enum
{
PROP_CONNECTION = 1,
PROP_PEER_HANDLE,
- PROP_PEER_HANDLE_TYPE,
+ PROP_PEER_ENTITY_TYPE,
PROP_STREAM_ID,
PROP_STREAM_INIT_ID,
PROP_PEER_JID,
@@ -291,7 +291,7 @@ gabble_bytestream_socks5_get_property (GObject *object,
case PROP_PEER_HANDLE:
g_value_set_uint (value, priv->peer_handle);
break;
- case PROP_PEER_HANDLE_TYPE:
+ case PROP_PEER_ENTITY_TYPE:
g_value_set_uint (value, TP_ENTITY_TYPE_CONTACT);
break;
case PROP_STREAM_ID:
@@ -433,8 +433,8 @@ gabble_bytestream_socks5_class_init (
"connection");
g_object_class_override_property (object_class, PROP_PEER_HANDLE,
"peer-handle");
- g_object_class_override_property (object_class, PROP_PEER_HANDLE_TYPE,
- "peer-handle-type");
+ g_object_class_override_property (object_class, PROP_PEER_ENTITY_TYPE,
+ "peer-entity-type");
g_object_class_override_property (object_class, PROP_STREAM_ID,
"stream-id");
g_object_class_override_property (object_class, PROP_PEER_JID,
diff --git a/src/media-factory.c b/src/media-factory.c
index 512f9a588..dad3a410c 100644
--- a/src/media-factory.c
+++ b/src/media-factory.c
@@ -895,7 +895,7 @@ gabble_media_factory_represent_client (GabbleCapsChannelManager *manager,
{
/* not interesting to this channel manager: we only care about
* Jingle calls involving contacts (or about clients that support
- * all Jingle calls regardless of handle type) */
+ * all Jingle calls regardless of entity type) */
continue;
}
diff --git a/src/muc-channel.c b/src/muc-channel.c
index ab2f66c06..7ccef6e80 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,
- TpEntityType handle_type,
+ TpEntityType entity_type,
TpHandle sender, GDateTime *datetime, const gchar *subject,
WockyStanza *msg, const GError *error);
static void _gabble_muc_channel_receive (GabbleMucChannel *chan,
- TpChannelTextMessageType msg_type, TpEntityType handle_type,
+ TpChannelTextMessageType msg_type, TpEntityType entity_type,
TpHandle sender, GDateTime *datetime, const gchar *id, const gchar *text,
WockyStanza *msg,
const GError *send_error,
@@ -2796,13 +2796,13 @@ handle_message (GObject *source,
TpChannelTextMessageType msg_type;
TpHandleRepoIface *repo;
- TpEntityType handle_type;
+ TpEntityType entity_type;
TpHandle from;
if (from_member)
{
- handle_type = TP_ENTITY_TYPE_CONTACT;
- repo = tp_base_connection_get_handles (conn, handle_type);
+ entity_type = TP_ENTITY_TYPE_CONTACT;
+ repo = tp_base_connection_get_handles (conn, entity_type);
from = tp_handle_ensure (repo, who->from,
GUINT_TO_POINTER (GABBLE_JID_ROOM_MEMBER), NULL);
@@ -2814,8 +2814,8 @@ handle_message (GObject *source,
}
else /* directly from MUC itself */
{
- handle_type = TP_ENTITY_TYPE_ROOM;
- repo = tp_base_connection_get_handles (conn, handle_type);
+ entity_type = TP_ENTITY_TYPE_ROOM;
+ repo = tp_base_connection_get_handles (conn, entity_type);
from = tp_base_channel_get_target_handle (base);
}
@@ -2833,7 +2833,7 @@ handle_message (GObject *source,
if (text != NULL)
_gabble_muc_channel_receive (gmuc,
- msg_type, handle_type, from, datetime, xmpp_id, text, stanza,
+ msg_type, entity_type, from, datetime, xmpp_id, text, stanza,
NULL,
TP_DELIVERY_STATUS_DELIVERED);
@@ -2862,7 +2862,7 @@ handle_message (GObject *source,
}
if (subject != NULL)
- _gabble_muc_channel_handle_subject (gmuc, handle_type, from,
+ _gabble_muc_channel_handle_subject (gmuc, entity_type, from,
datetime, subject, stanza, NULL);
}
@@ -2885,14 +2885,14 @@ handle_errmsg (GObject *source,
gboolean from_member = (who != NULL);
TpDeliveryStatus ds = TP_DELIVERY_STATUS_DELIVERED;
TpHandleRepoIface *repo = NULL;
- TpEntityType handle_type;
+ TpEntityType entity_type;
TpHandle from = 0;
const gchar *subject;
if (from_member)
{
- handle_type = TP_ENTITY_TYPE_CONTACT;
- repo = tp_base_connection_get_handles (conn, handle_type);
+ entity_type = TP_ENTITY_TYPE_CONTACT;
+ repo = tp_base_connection_get_handles (conn, entity_type);
from = tp_handle_ensure (repo, who->from,
GUINT_TO_POINTER (GABBLE_JID_ROOM_MEMBER), NULL);
@@ -2904,8 +2904,8 @@ handle_errmsg (GObject *source,
}
else /* directly from MUC itself */
{
- handle_type = TP_ENTITY_TYPE_ROOM;
- repo = tp_base_connection_get_handles (conn, handle_type);
+ entity_type = TP_ENTITY_TYPE_ROOM;
+ repo = tp_base_connection_get_handles (conn, entity_type);
from = tp_base_channel_get_target_handle (base);
}
@@ -2932,7 +2932,7 @@ handle_errmsg (GObject *source,
if (text != NULL)
_gabble_muc_channel_receive (gmuc, TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE,
- handle_type, from, datetime, xmpp_id, text, stanza, error, ds);
+ entity_type, from, datetime, xmpp_id, text, stanza, error, ds);
/* FIXME: this is stupid. WockyMuc gives us the subject for non-errors, but
* doesn't bother for errors.
@@ -2948,7 +2948,7 @@ handle_errmsg (GObject *source,
(priv->set_subject_stanza_id != NULL &&
!tp_strdiff (xmpp_id, priv->set_subject_stanza_id)))
_gabble_muc_channel_handle_subject (gmuc,
- handle_type, from, datetime, subject, stanza, error);
+ entity_type, from, datetime, subject, stanza, error);
}
/* ************************************************************************* */
@@ -2957,7 +2957,7 @@ handle_errmsg (GObject *source,
*/
void
_gabble_muc_channel_handle_subject (GabbleMucChannel *chan,
- TpEntityType handle_type,
+ TpEntityType entity_type,
TpHandle sender,
GDateTime *datetime,
const gchar *subject,
@@ -2995,11 +2995,11 @@ _gabble_muc_channel_handle_subject (GabbleMucChannel *chan,
/* Channel.Interface.Subject properties */
- if (handle_type == TP_ENTITY_TYPE_CONTACT)
+ if (entity_type == TP_ENTITY_TYPE_CONTACT)
{
TpHandleRepoIface *contact_handles = tp_base_connection_get_handles (
tp_base_channel_get_connection (TP_BASE_CHANNEL (chan)),
- handle_type);
+ entity_type);
actor = tp_handle_inspect (contact_handles, sender);
}
@@ -3030,7 +3030,7 @@ _gabble_muc_channel_handle_subject (GabbleMucChannel *chan,
static void
_gabble_muc_channel_receive (GabbleMucChannel *chan,
TpChannelTextMessageType msg_type,
- TpEntityType sender_handle_type,
+ TpEntityType sender_entity_type,
TpHandle sender,
GDateTime *datetime,
const gchar *id,
@@ -3080,7 +3080,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_ENTITY_TYPE_ROOM)
+ if (!is_echo && !is_error && sender_entity_type == TP_ENTITY_TYPE_ROOM)
{
STANZA_DEBUG (msg, "ignoring message from muc");
@@ -3169,7 +3169,7 @@ _gabble_muc_channel_receive (GabbleMucChannel *chan,
else
{
/* Messages from the MUC itself should have no sender. */
- if (sender_handle_type == TP_ENTITY_TYPE_CONTACT)
+ if (sender_entity_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 bce98d577..ce82c8e3e 100644
--- a/src/muc-factory.c
+++ b/src/muc-factory.c
@@ -1141,17 +1141,17 @@ gabble_muc_factory_type_foreach_channel_class (GType type,
{
GHashTable *table = g_hash_table_new_full (g_str_hash, g_str_equal,
NULL, (GDestroyNotify) tp_g_value_slice_free);
- GValue *channel_type_value, *handle_type_value;
+ GValue *channel_type_value, *entity_type_value;
channel_type_value = tp_g_value_slice_new (G_TYPE_STRING);
/* no string value yet - we'll change it for each channel class */
g_hash_table_insert (table, TP_PROP_CHANNEL_CHANNEL_TYPE,
channel_type_value);
- handle_type_value = tp_g_value_slice_new (G_TYPE_UINT);
- g_value_set_uint (handle_type_value, TP_ENTITY_TYPE_ROOM);
+ entity_type_value = tp_g_value_slice_new (G_TYPE_UINT);
+ g_value_set_uint (entity_type_value, TP_ENTITY_TYPE_ROOM);
g_hash_table_insert (table, TP_PROP_CHANNEL_TARGET_ENTITY_TYPE,
- handle_type_value);
+ entity_type_value);
/* Channel.Type.Text */
g_value_set_static_string (channel_type_value, TP_IFACE_CHANNEL_TYPE_TEXT);
@@ -1771,19 +1771,19 @@ gabble_muc_factory_request (GabbleMucFactory *self,
gboolean require_new)
{
GError *error = NULL;
- TpEntityType handle_type;
+ TpEntityType entity_type;
TpHandle handle;
gboolean conference, room;
const gchar *channel_type;
ChannelTypeHandler *h;
- handle_type = tp_asv_get_uint32 (request_properties,
+ entity_type = tp_asv_get_uint32 (request_properties,
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_ENTITY_TYPE_NONE &&
+ conference = (entity_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) ||
@@ -1792,13 +1792,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_ENTITY_TYPE_NONE
+ room = (entity_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_ENTITY_TYPE_ROOM && !conference && !room)
+ if (entity_type != TP_ENTITY_TYPE_ROOM && !conference && !room)
return FALSE;
/* validity already checked by TpBaseConnection */
diff --git a/src/private-tubes-factory.c b/src/private-tubes-factory.c
index 72d6bf087..7d62c027f 100644
--- a/src/private-tubes-factory.c
+++ b/src/private-tubes-factory.c
@@ -1008,14 +1008,14 @@ new_channel_from_request (GabblePrivateTubesFactory *self,
TpHandle handle;
const gchar *ctype, *service;
- TpEntityType handle_type;
+ TpEntityType entity_type;
GHashTable *parameters;
guint64 tube_id;
ctype = tp_asv_get_string (request, TP_PROP_CHANNEL_CHANNEL_TYPE);
handle = tp_asv_get_uint32 (request, TP_PROP_CHANNEL_TARGET_HANDLE,
NULL);
- handle_type = tp_asv_get_uint32 (request,
+ entity_type = tp_asv_get_uint32 (request,
TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, NULL);
tube_id = generate_tube_id (self);
@@ -1030,7 +1030,7 @@ new_channel_from_request (GabblePrivateTubesFactory *self,
TP_PROP_CHANNEL_TYPE_STREAM_TUBE1_SERVICE);
tube = GABBLE_TUBE_IFACE (gabble_tube_stream_new (self->priv->conn,
- handle, handle_type,
+ handle, entity_type,
tp_base_connection_get_self_handle (base_conn),
tp_base_connection_get_self_handle (base_conn),
service, parameters, tube_id, NULL, TRUE));
@@ -1043,7 +1043,7 @@ new_channel_from_request (GabblePrivateTubesFactory *self,
stream_id = gabble_bytestream_factory_generate_stream_id ();
tube = GABBLE_TUBE_IFACE (gabble_tube_dbus_new (self->priv->conn,
- handle, handle_type,
+ handle, entity_type,
tp_base_connection_get_self_handle (base_conn),
tp_base_connection_get_self_handle (base_conn),
service, parameters, stream_id, tube_id, NULL, NULL, TRUE));
diff --git a/src/tube-dbus.c b/src/tube-dbus.c
index ecd69311a..e54cfcdf1 100644
--- a/src/tube-dbus.c
+++ b/src/tube-dbus.c
@@ -949,7 +949,7 @@ gabble_tube_dbus_class_init (GabbleTubeDBusClass *gabble_tube_dbus_class)
param_spec = g_param_spec_object ("muc", "GabbleMucChannel object",
"Gabble text MUC channel corresponding to this Tube channel object, "
- "if the handle type is ROOM.",
+ "if the entity type is ROOM.",
GABBLE_TYPE_MUC_CHANNEL,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -1333,7 +1333,7 @@ data_received_cb (GabbleBytestreamIface *stream,
GabbleTubeDBus *
gabble_tube_dbus_new (GabbleConnection *conn,
TpHandle handle,
- TpEntityType handle_type,
+ TpEntityType entity_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_ENTITY_TYPE_ROOM)
+ if (entity_type == TP_ENTITY_TYPE_ROOM)
gtype = GABBLE_TYPE_MUC_TUBE_DBUS;
tube = g_object_new (gtype,
diff --git a/src/tube-dbus.h b/src/tube-dbus.h
index ba3fd49ab..1a4afb158 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,
- TpEntityType handle_type, TpHandle self_handle, TpHandle initiator,
+ TpEntityType entity_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-stream.c b/src/tube-stream.c
index acf67c083..14adbda2c 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -1527,7 +1527,7 @@ gabble_tube_stream_class_init (GabbleTubeStreamClass *gabble_tube_stream_class)
"muc",
"GabbleMucChannel object",
"Gabble text MUC channel corresponding to this Tube channel object, "
- "if the handle type is ROOM.",
+ "if the entity type is ROOM.",
GABBLE_TYPE_MUC_CHANNEL,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_MUC, param_spec);
@@ -1617,7 +1617,7 @@ data_received_cb (GabbleBytestreamIface *bytestream,
GabbleTubeStream *
gabble_tube_stream_new (GabbleConnection *conn,
TpHandle handle,
- TpEntityType handle_type,
+ TpEntityType entity_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_ENTITY_TYPE_ROOM)
+ if (entity_type == TP_ENTITY_TYPE_ROOM)
gtype = GABBLE_TYPE_MUC_TUBE_STREAM;
obj = g_object_new (gtype,
@@ -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_ENTITY_TYPE_ROOM)
+ if (priv->entity_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 1a7ee9b38..7ccb35c78 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, TpEntityType handle_type, TpHandle self_handle,
+ TpHandle handle, TpEntityType entity_type, TpHandle self_handle,
TpHandle initiator, const gchar *service, GHashTable *parameters,
guint64 id, GabbleMucChannel *muc, gboolean requested);
diff --git a/src/write-mgr-file.c b/src/write-mgr-file.c
index ff63a2966..a947a5347 100644
--- a/src/write-mgr-file.c
+++ b/src/write-mgr-file.c
@@ -196,8 +196,8 @@ generate_group_name (GHashTable *props)
gchar *chan_type = g_ascii_strdown (tp_asv_get_string (props,
TP_PROP_CHANNEL_CHANNEL_TYPE), -1);
gchar *chan_type_suffix;
- gchar *handle_type_name;
- guint handle_type = tp_asv_get_uint32 (props,
+ gchar *entity_type_name;
+ guint entity_type = tp_asv_get_uint32 (props,
TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, NULL);
g_assert (chan_type != NULL);
@@ -205,21 +205,21 @@ generate_group_name (GHashTable *props)
g_assert (chan_type_suffix != NULL);
chan_type_suffix++;
- switch (handle_type)
+ switch (entity_type)
{
case TP_ENTITY_TYPE_CONTACT:
- handle_type_name = "-1on1";
+ entity_type_name = "-1on1";
break;
case TP_ENTITY_TYPE_ROOM:
- handle_type_name = "-multi";
+ entity_type_name = "-multi";
break;
default:
- handle_type_name = "";
+ entity_type_name = "";
}
- retval = g_strdup_printf ("%s%s-%d", chan_type_suffix, handle_type_name,
+ retval = g_strdup_printf ("%s%s-%d", chan_type_suffix, entity_type_name,
++counter);
g_free (chan_type);
diff --git a/tests/test-handles.c b/tests/test-handles.c
index 6522a749c..2a873d5f5 100644
--- a/tests/test-handles.c
+++ b/tests/test-handles.c
@@ -10,7 +10,7 @@
#include "src/connection.h"
static void
-test_handles (guint handle_type)
+test_handles (guint entity_type)
{
TpHandleRepoIface *repos[TP_NUM_ENTITY_TYPES];
TpHandleRepoIface *tp_repo = NULL;
@@ -26,7 +26,7 @@ test_handles (guint handle_type)
repos[i] = NULL;
}
_gabble_connection_create_handle_repos (NULL, repos);
- tp_repo = repos[handle_type];
+ tp_repo = repos[entity_type];
g_assert (tp_repo != NULL);
/* Handle zero is never valid */
diff --git a/tests/twisted/constants.py b/tests/twisted/constants.py
index 1a2678f40..fe81dedbc 100644
--- a/tests/twisted/constants.py
+++ b/tests/twisted/constants.py
@@ -62,6 +62,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'