summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-07 14:00:19 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-07 14:00:19 +0100
commit5e2ce191914f618f1e05b63c6d22e69cb2c7ae0f (patch)
tree0c990704fb9f033f2f6032e23d7808ee43e6ac15
parente5583059d8dc49e8f5e91e01d0edacf61435f824 (diff)
Swap "handle type" terminology to "entity type"next-handle-type
-rw-r--r--src/muc-manager.c8
-rw-r--r--src/roomlist-manager.c8
-rw-r--r--src/text-helper.c6
-rw-r--r--src/tube-dbus.c6
-rw-r--r--src/tube-dbus.h2
-rw-r--r--src/tube-iface.c4
-rw-r--r--src/tube-stream.c4
-rw-r--r--src/tube-stream.h2
-rw-r--r--src/write-mgr-file.c14
-rw-r--r--tests/twisted/constants.py2
10 files changed, 29 insertions, 27 deletions
diff --git a/src/muc-manager.c b/src/muc-manager.c
index 3ed1f9d8..f9d5846b 100644
--- a/src/muc-manager.c
+++ b/src/muc-manager.c
@@ -348,17 +348,17 @@ salut_muc_manager_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_IFACE_CHANNEL ".ChannelType",
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_IFACE_CHANNEL ".TargetEntityType",
- handle_type_value);
+ entity_type_value);
/* im.telepathy.v1.Channel.Type.Text */
g_value_set_static_string (channel_type_value, TP_IFACE_CHANNEL_TYPE_TEXT);
diff --git a/src/roomlist-manager.c b/src/roomlist-manager.c
index b3b52544..dd8a69dd 100644
--- a/src/roomlist-manager.c
+++ b/src/roomlist-manager.c
@@ -297,7 +297,7 @@ salut_roomlist_manager_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);
g_value_set_static_string (channel_type_value,
@@ -305,10 +305,10 @@ salut_roomlist_manager_type_foreach_channel_class (GType type,
g_hash_table_insert (table, TP_IFACE_CHANNEL ".ChannelType",
channel_type_value);
- handle_type_value = tp_g_value_slice_new (G_TYPE_UINT);
- g_value_set_uint (handle_type_value, TP_ENTITY_TYPE_NONE);
+ entity_type_value = tp_g_value_slice_new (G_TYPE_UINT);
+ g_value_set_uint (entity_type_value, TP_ENTITY_TYPE_NONE);
g_hash_table_insert (table, TP_IFACE_CHANNEL ".TargetEntityType",
- handle_type_value);
+ entity_type_value);
func (type, table, roomlist_channel_allowed_properties,
user_data);
diff --git a/src/text-helper.c b/src/text-helper.c
index 68455f76..7a00d3df 100644
--- a/src/text-helper.c
+++ b/src/text-helper.c
@@ -305,14 +305,14 @@ text_helper_report_delivery_error (TpSvcChannel *self,
{
TpBaseConnection *base_conn;
TpHandle handle;
- guint handle_type;
+ guint entity_type;
TpMessage *message;
TpMessage *delivery_echo;
g_object_get (self,
"connection", &base_conn,
"handle", &handle,
- "handle-type", &handle_type,
+ "entity-type", &entity_type,
NULL);
delivery_echo = tp_cm_message_new (base_conn, 2);
@@ -325,7 +325,7 @@ text_helper_report_delivery_error (TpSvcChannel *self,
message = tp_cm_message_new (base_conn, 1);
- if (handle_type == TP_ENTITY_TYPE_CONTACT)
+ if (entity_type == TP_ENTITY_TYPE_CONTACT)
tp_cm_message_set_sender (message, handle);
tp_message_set_uint32 (message, 0, "message-type",
diff --git a/src/tube-dbus.c b/src/tube-dbus.c
index 85522f48..ec6f2374 100644
--- a/src/tube-dbus.c
+++ b/src/tube-dbus.c
@@ -948,7 +948,7 @@ salut_tube_dbus_class_init (SalutTubeDBusClass *salut_tube_dbus_class)
"muc-connection",
"GibberMucConnection object",
"Gibber MUC connection object used to carry messages for this "
- "tube if it has a HANDLE_TYPE_ROOM handle",
+ "tube if it has a TP_ENTITY_TYPE_ROOM handle",
GIBBER_TYPE_MUC_CONNECTION,
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -1303,7 +1303,7 @@ data_received_cb (GibberBytestreamIface *stream,
SalutTubeDBus *
salut_tube_dbus_new (SalutConnection *conn,
TpHandle handle,
- TpEntityType handle_type,
+ TpEntityType entity_type,
TpHandle self_handle,
GibberMucConnection *muc_connection,
TpHandle initiator,
@@ -1315,7 +1315,7 @@ salut_tube_dbus_new (SalutConnection *conn,
SalutTubeDBus *tube;
GType gtype = SALUT_TYPE_TUBE_DBUS;
- if (handle_type == TP_ENTITY_TYPE_ROOM)
+ if (entity_type == TP_ENTITY_TYPE_ROOM)
gtype = SALUT_TYPE_MUC_TUBE_DBUS;
tube = g_object_new (gtype,
diff --git a/src/tube-dbus.h b/src/tube-dbus.h
index 7d68634b..7dba7123 100644
--- a/src/tube-dbus.h
+++ b/src/tube-dbus.h
@@ -65,7 +65,7 @@ GType salut_tube_dbus_get_type (void);
SalutTubeDBus *
salut_tube_dbus_new (SalutConnection *conn,
- TpHandle handle, TpEntityType handle_type, TpHandle self_handle,
+ TpHandle handle, TpEntityType entity_type, TpHandle self_handle,
GibberMucConnection *muc_connection, TpHandle initiator,
const gchar *service, GHashTable *parameters, guint64 id,
gboolean requested);
diff --git a/src/tube-iface.c b/src/tube-iface.c
index b4610a40..1a9959f4 100644
--- a/src/tube-iface.c
+++ b/src/tube-iface.c
@@ -113,8 +113,8 @@ salut_tube_iface_base_init (gpointer klass)
g_object_interface_install_property (klass, param_spec);
param_spec = g_param_spec_uint (
- "handle-type",
- "Handle type",
+ "entity-type",
+ "Entity type",
"The TpEntityType of the handle associated with the tubes channel"
"that owns this D-Bus tube object.",
0, G_MAXUINT32, 0,
diff --git a/src/tube-stream.c b/src/tube-stream.c
index 682cfc03..e648cbc6 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -1509,7 +1509,7 @@ data_received_cb (GibberBytestreamIface *bytestream,
SalutTubeStream *
salut_tube_stream_new (SalutConnection *conn,
TpHandle handle,
- TpEntityType handle_type,
+ TpEntityType entity_type,
TpHandle self_handle,
TpHandle initiator,
gboolean offered,
@@ -1523,7 +1523,7 @@ salut_tube_stream_new (SalutConnection *conn,
SalutTubeStream *obj;
GType gtype = SALUT_TYPE_TUBE_STREAM;
- if (handle_type == TP_ENTITY_TYPE_ROOM)
+ if (entity_type == TP_ENTITY_TYPE_ROOM)
gtype = SALUT_TYPE_MUC_TUBE_STREAM;
obj = g_object_new (gtype,
diff --git a/src/tube-stream.h b/src/tube-stream.h
index 1808e6d6..39dd8f65 100644
--- a/src/tube-stream.h
+++ b/src/tube-stream.h
@@ -64,7 +64,7 @@ GType salut_tube_stream_get_type (void);
SalutTubeStream *salut_tube_stream_new (SalutConnection *conn,
TpHandle handle,
- TpEntityType handle_type, TpHandle self_handle, TpHandle initiator,
+ TpEntityType entity_type, TpHandle self_handle, TpHandle initiator,
gboolean offered, const gchar *service,
GHashTable *parameters, guint64 id, guint portnum,
WockyStanza *iq_req, gboolean requested);
diff --git a/src/write-mgr-file.c b/src/write-mgr-file.c
index 780d66d8..52c32da6 100644
--- a/src/write-mgr-file.c
+++ b/src/write-mgr-file.c
@@ -187,8 +187,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);
@@ -196,21 +196,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/twisted/constants.py b/tests/twisted/constants.py
index 1a2678f4..fe81dedb 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'