diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-04-07 13:56:58 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-04-07 13:56:58 +0100 |
commit | a618957515c08de87cae0c2768384ba1af4512f7 (patch) | |
tree | c2814ade8b4495d0b0a12110363ecd39bff0e05e | |
parent | 5b29645fb21d640c5fcbd3cdf567d0e6a5cbcfae (diff) |
Use "entity type" instead of "handle type"next-handle-type
-rw-r--r-- | rakia/media-manager.c | 14 | ||||
-rw-r--r-- | rakia/text-channel.c | 4 | ||||
-rw-r--r-- | src/sip-connection.c | 2 | ||||
-rw-r--r-- | src/write-mgr-file.c | 14 | ||||
-rw-r--r-- | tests/twisted/constants.py | 2 |
5 files changed, 19 insertions, 17 deletions
diff --git a/rakia/media-manager.c b/rakia/media-manager.c index 824d815..1616547 100644 --- a/rakia/media-manager.c +++ b/rakia/media-manager.c @@ -536,18 +536,18 @@ rakia_media_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 *value, *handle_type_value; + GValue *value, *entity_type_value; value = tp_g_value_slice_new (G_TYPE_STRING); g_value_set_static_string (value, TP_IFACE_CHANNEL_TYPE_CALL1); g_hash_table_insert (table, TP_PROP_CHANNEL_CHANNEL_TYPE, value); - handle_type_value = tp_g_value_slice_new (G_TYPE_UINT); + entity_type_value = tp_g_value_slice_new (G_TYPE_UINT); /* no uint value yet - we'll change it for each channel class */ g_hash_table_insert (table, TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, - handle_type_value); + entity_type_value); - g_value_set_uint (handle_type_value, TP_ENTITY_TYPE_CONTACT); + g_value_set_uint (entity_type_value, TP_ENTITY_TYPE_CONTACT); g_hash_table_insert (table, TP_PROP_CHANNEL_TYPE_CALL1_INITIAL_AUDIO, tp_g_value_slice_new_boolean (TRUE)); @@ -580,7 +580,7 @@ rakia_media_manager_requestotron (TpChannelManager *manager, RakiaMediaManager *self = RAKIA_MEDIA_MANAGER (manager); RakiaMediaManagerPrivate *priv = RAKIA_MEDIA_MANAGER_GET_PRIVATE (self); TpBaseConnection *conn = (TpBaseConnection *) priv->conn; - TpEntityType handle_type; + TpEntityType entity_type; TpHandle handle; RakiaSipSession *session; RakiaCallChannel *channel = NULL; @@ -621,13 +621,13 @@ rakia_media_manager_requestotron (TpChannelManager *manager, if (!initial_audio && !initial_video) return FALSE; - handle_type = tp_asv_get_uint32 (request_properties, + entity_type = tp_asv_get_uint32 (request_properties, TP_IFACE_CHANNEL ".TargetEntityType", NULL); handle = tp_asv_get_uint32 (request_properties, TP_IFACE_CHANNEL ".TargetHandle", NULL); - if (handle_type != TP_ENTITY_TYPE_CONTACT) + if (entity_type != TP_ENTITY_TYPE_CONTACT) return FALSE; g_assert (handle != 0); diff --git a/rakia/text-channel.c b/rakia/text-channel.c index 1b6f4bf..29d6b9c 100644 --- a/rakia/text-channel.c +++ b/rakia/text-channel.c @@ -67,7 +67,7 @@ enum PROP_CONNECTION = 1, PROP_OBJECT_PATH, PROP_CHANNEL_TYPE, - PROP_HANDLE_TYPE, + PROP_ENTITY_TYPE, PROP_HANDLE, PROP_TARGET_ID, PROP_INITIATOR_HANDLE, @@ -225,7 +225,7 @@ rakia_text_channel_class_init(RakiaTextChannelClass *klass) static TpDBusPropertiesMixinPropImpl channel_props[] = { { "ChannelType", "channel-type", NULL }, { "Interfaces", "interfaces", NULL }, - { "TargetEntityType", "handle-type", NULL }, + { "TargetEntityType", "entity-type", NULL }, { "TargetHandle", "handle", NULL }, { "TargetID", "target-id", NULL }, { "InitiatorHandle", "initiator-handle", NULL }, diff --git a/src/sip-connection.c b/src/sip-connection.c index 1843c27..83fe5b5 100644 --- a/src/sip-connection.c +++ b/src/sip-connection.c @@ -136,7 +136,7 @@ rakia_create_handle_repos (TpBaseConnection *conn, { repos[TP_ENTITY_TYPE_CONTACT] = (TpHandleRepoIface *)g_object_new (TP_TYPE_DYNAMIC_HANDLE_REPO, - "handle-type", TP_ENTITY_TYPE_CONTACT, + "entity-type", TP_ENTITY_TYPE_CONTACT, "normalize-function", rakia_handle_normalize, "default-normalize-context", conn, NULL); diff --git a/src/write-mgr-file.c b/src/write-mgr-file.c index 5dac217..e25e213 100644 --- a/src/write-mgr-file.c +++ b/src/write-mgr-file.c @@ -195,8 +195,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); @@ -204,21 +204,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 ab5c263..27ed0d4 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' |