summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-07 18:28:47 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-08 19:53:53 +0100
commit1a92e5376193b5501089b810b0ea8982b292371c (patch)
tree28af71aa6c82a1d87597a2d8f5557c84eed04bbe
parent614b2fa28ef759fce970951893697ed67931c1c7 (diff)
Rename all mentions of handle types to entity types
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77139 Reviewed-by: Xavier Claessens
-rw-r--r--docs/reference/telepathy-glib/telepathy-glib-sections.txt10
-rw-r--r--examples/client/inspect-channel.c6
-rw-r--r--telepathy-glib/account-channel-request.c20
-rw-r--r--telepathy-glib/account-channel-request.h2
-rw-r--r--telepathy-glib/base-channel.c12
-rw-r--r--telepathy-glib/base-connection-internal.h2
-rw-r--r--telepathy-glib/base-connection.c28
-rw-r--r--telepathy-glib/base-connection.h2
-rw-r--r--telepathy-glib/capabilities.c90
-rw-r--r--telepathy-glib/capabilities.h8
-rw-r--r--telepathy-glib/channel-filter.c2
-rw-r--r--telepathy-glib/channel-iface.c16
-rw-r--r--telepathy-glib/channel-internal.h2
-rw-r--r--telepathy-glib/channel-manager-request-internal.h4
-rw-r--r--telepathy-glib/channel-manager-request.c18
-rw-r--r--telepathy-glib/channel.c56
-rw-r--r--telepathy-glib/channel.h2
-rw-r--r--telepathy-glib/errors.c20
-rw-r--r--telepathy-glib/errors.h4
-rw-r--r--telepathy-glib/handle-repo-dynamic.c30
-rw-r--r--telepathy-glib/handle-repo-dynamic.h6
-rw-r--r--telepathy-glib/handle-repo-static.c26
-rw-r--r--telepathy-glib/handle-repo-static.h10
-rw-r--r--telepathy-glib/handle-repo.c2
-rw-r--r--telepathy-glib/handle-repo.h20
-rw-r--r--telepathy-glib/handle.c14
-rw-r--r--telepathy-glib/handle.h28
-rw-r--r--telepathy-glib/stream-tube-channel.c12
-rw-r--r--telepathy-glib/versions/main-1.0.abi6
-rw-r--r--telepathy-logger/call-channel.c6
-rw-r--r--tests/capabilities.c36
-rw-r--r--tests/channel-filter.c24
-rw-r--r--tests/dbus/account-channel-request.c6
-rw-r--r--tests/dbus/channel-introspect.c6
-rw-r--r--tests/dbus/cli-group.c6
-rw-r--r--tests/dbus/contacts.c4
-rw-r--r--tests/dbus/group-mixin.c2
-rw-r--r--tests/dbus/handle-repo.c2
-rw-r--r--tests/dbus/handle-set.c2
-rw-r--r--tests/lib/util.c6
-rw-r--r--tests/lib/util.h2
41 files changed, 280 insertions, 280 deletions
diff --git a/docs/reference/telepathy-glib/telepathy-glib-sections.txt b/docs/reference/telepathy-glib/telepathy-glib-sections.txt
index e5f9c8313..4fd8d9eb1 100644
--- a/docs/reference/telepathy-glib/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib/telepathy-glib-sections.txt
@@ -1762,9 +1762,9 @@ tp_debug_timestamped_log_handler
<TITLE>handle</TITLE>
TpHandle
TP_TYPE_HANDLE
-TP_UNKNOWN_HANDLE_TYPE
-tp_handle_type_is_valid
-tp_handle_type_to_string
+TP_UNKNOWN_ENTITY_TYPE
+tp_entity_type_is_valid
+tp_entity_type_to_string
</SECTION>
<SECTION>
@@ -1985,8 +1985,8 @@ TP_ERROR_PREFIX
TP_ERROR
TP_TYPE_ERROR
TpError
-tp_g_set_error_invalid_handle_type
-tp_g_set_error_unsupported_handle_type
+tp_g_set_error_invalid_entity_type
+tp_g_set_error_unsupported_entity_type
tp_error_get_dbus_name
TP_ERROR_STR_NETWORK_ERROR
TP_ERROR_STR_NOT_IMPLEMENTED
diff --git a/examples/client/inspect-channel.c b/examples/client/inspect-channel.c
index 79c148598..12322e016 100644
--- a/examples/client/inspect-channel.c
+++ b/examples/client/inspect-channel.c
@@ -29,7 +29,7 @@ channel_ready_cb (GObject *source,
{
TpChannel *channel = TP_CHANNEL (source);
InspectChannelData *data = user_data;
- guint handle_type, handle;
+ guint entity_type, handle;
gchar *channel_type;
gchar **interfaces, **iter;
GError *error = NULL;
@@ -45,13 +45,13 @@ channel_ready_cb (GObject *source,
g_object_get (channel,
"channel-type", &channel_type,
- "handle-type", &handle_type,
+ "entity-type", &entity_type,
"handle", &handle,
"interfaces", &interfaces,
NULL);
printf ("Type: %s\n", channel_type);
- printf ("Handle: of type %u, #%u\n", handle_type, handle);
+ printf ("Handle: of type %u, #%u\n", entity_type, handle);
puts ("Interfaces:");
for (iter = interfaces; iter != NULL && *iter != NULL; iter++)
diff --git a/telepathy-glib/account-channel-request.c b/telepathy-glib/account-channel-request.c
index c0f9a7593..c5b564968 100644
--- a/telepathy-glib/account-channel-request.c
+++ b/telepathy-glib/account-channel-request.c
@@ -1536,13 +1536,13 @@ tp_account_channel_request_set_target_contact (
/**
* tp_account_channel_request_set_target_id:
* @self: a #TpAccountChannelRequest
- * @handle_type: the type of @identifier, typically %TP_ENTITY_TYPE_CONTACT
+ * @entity_type: the type of @identifier, typically %TP_ENTITY_TYPE_CONTACT
* or %TP_ENTITY_TYPE_ROOM
* @identifier: the unique identifier of the contact, room etc. to be
* contacted
*
* Configure this request to create a channel with @identifier,
- * an identifier of type @handle_type.
+ * an identifier of type @entity_type.
*
* This function can't be called once @self has been used to request a
* channel.
@@ -1552,18 +1552,18 @@ tp_account_channel_request_set_target_contact (
void
tp_account_channel_request_set_target_id (
TpAccountChannelRequest *self,
- TpEntityType handle_type,
+ TpEntityType entity_type,
const gchar *identifier)
{
g_return_if_fail (TP_IS_ACCOUNT_CHANNEL_REQUEST (self));
g_return_if_fail (identifier != NULL);
- g_return_if_fail (handle_type != TP_ENTITY_TYPE_NONE);
+ g_return_if_fail (entity_type != TP_ENTITY_TYPE_NONE);
g_return_if_fail (!self->priv->requested);
/* Do not use tp_asv_set_uint32 or similar - the key is dup'd */
g_hash_table_insert (self->priv->request,
g_strdup (TP_PROP_CHANNEL_TARGET_ENTITY_TYPE),
- tp_g_value_slice_new_uint (handle_type));
+ tp_g_value_slice_new_uint (entity_type));
g_hash_table_insert (self->priv->request,
g_strdup (TP_PROP_CHANNEL_TARGET_ID),
tp_g_value_slice_new_string (identifier));
@@ -1684,23 +1684,23 @@ tp_account_channel_request_set_request_property (
*
* To call a contact, either use
* tp_account_channel_request_set_target_contact() or one of the generic
- * methods that takes a handle type argument. To check whether this
+ * methods that takes a entity type argument. To check whether this
* is possible, use tp_capabilities_supports_audio_call() with
- * @handle_type set to %TP_ENTITY_TYPE_CONTACT.
+ * @entity_type set to %TP_ENTITY_TYPE_CONTACT.
*
* <!-- reinstate this when we have CMs that actually allow it:
* In some protocols it is possible to create a conference call which
* takes place in a named chatroom, by calling
- * tp_account_channel_request_set_target_id() with @handle_type
+ * tp_account_channel_request_set_target_id() with @entity_type
* set to %TP_ENTITY_TYPE_ROOM. To test whether this is possible, use
- * tp_capabilities_supports_audio_call() with @handle_type set to
+ * tp_capabilities_supports_audio_call() with @entity_type set to
* %TP_ENTITY_TYPE_ROOM.
* -->
*
* In some protocols, it is possible to create a Call channel without
* setting a target at all, which will result in a new, empty
* conference call. To test whether this is possible, use
- * tp_capabilities_supports_audio_call() with @handle_type set to
+ * tp_capabilities_supports_audio_call() with @entity_type set to
* %TP_ENTITY_TYPE_NONE.
*
* Returns: a new #TpAccountChannelRequest object
diff --git a/telepathy-glib/account-channel-request.h b/telepathy-glib/account-channel-request.h
index 0f2fde5a3..086b9ba09 100644
--- a/telepathy-glib/account-channel-request.h
+++ b/telepathy-glib/account-channel-request.h
@@ -187,7 +187,7 @@ void tp_account_channel_request_set_target_contact (
TpContact *contact);
_TP_AVAILABLE_IN_0_20
void tp_account_channel_request_set_target_id (TpAccountChannelRequest *self,
- TpEntityType handle_type,
+ TpEntityType entity_type,
const gchar *identifier);
/* Generic low-level */
diff --git a/telepathy-glib/base-channel.c b/telepathy-glib/base-channel.c
index 1435d4818..0e0d26c96 100644
--- a/telepathy-glib/base-channel.c
+++ b/telepathy-glib/base-channel.c
@@ -322,7 +322,7 @@ enum
{
PROP_OBJECT_PATH = 1,
PROP_CHANNEL_TYPE,
- PROP_HANDLE_TYPE,
+ PROP_ENTITY_TYPE,
PROP_HANDLE,
PROP_INITIATOR_HANDLE,
PROP_INITIATOR_ID,
@@ -821,7 +821,7 @@ tp_base_channel_get_property (GObject *object,
case PROP_CHANNEL_TYPE:
g_value_set_static_string (value, klass->channel_type);
break;
- case PROP_HANDLE_TYPE:
+ case PROP_ENTITY_TYPE:
g_value_set_uint (value, klass->target_entity_type);
break;
case PROP_HANDLE:
@@ -919,7 +919,7 @@ tp_base_channel_set_property (GObject *object,
/* similarly we can't ref this yet */
chan->priv->initiator = g_value_get_uint (value);
break;
- case PROP_HANDLE_TYPE:
+ case PROP_ENTITY_TYPE:
case PROP_CHANNEL_TYPE:
/* these properties are writable in the interface, but not actually
* meaningfully changeable on this channel, so we do nothing */
@@ -972,7 +972,7 @@ static void
tp_base_channel_class_init (TpBaseChannelClass *tp_base_channel_class)
{
static TpDBusPropertiesMixinPropImpl channel_props[] = {
- { "TargetEntityType", "handle-type", NULL },
+ { "TargetEntityType", "entity-type", NULL },
{ "TargetHandle", "handle", NULL },
{ "TargetID", "target-id", NULL },
{ "ChannelType", "channel-type", NULL },
@@ -1008,8 +1008,8 @@ tp_base_channel_class_init (TpBaseChannelClass *tp_base_channel_class)
"object-path");
g_object_class_override_property (object_class, PROP_CHANNEL_TYPE,
"channel-type");
- g_object_class_override_property (object_class, PROP_HANDLE_TYPE,
- "handle-type");
+ g_object_class_override_property (object_class, PROP_ENTITY_TYPE,
+ "entity-type");
g_object_class_override_property (object_class, PROP_HANDLE, "handle");
g_object_class_override_property (object_class, PROP_CHANNEL_DESTROYED,
"channel-destroyed");
diff --git a/telepathy-glib/base-connection-internal.h b/telepathy-glib/base-connection-internal.h
index 12c2402e3..30685bc89 100644
--- a/telepathy-glib/base-connection-internal.h
+++ b/telepathy-glib/base-connection-internal.h
@@ -27,7 +27,7 @@
G_BEGIN_DECLS
void _tp_base_connection_set_handle_repo (TpBaseConnection *self,
- TpEntityType handle_type,
+ TpEntityType entity_type,
TpHandleRepoIface *handle_repo);
gpointer _tp_base_connection_find_channel_manager (TpBaseConnection *self,
diff --git a/telepathy-glib/base-connection.c b/telepathy-glib/base-connection.c
index 41231903f..6ba632ae9 100644
--- a/telepathy-glib/base-connection.c
+++ b/telepathy-glib/base-connection.c
@@ -145,7 +145,7 @@
* TpBaseConnectionClass:
* @parent_class: The superclass' structure
* @create_handle_repos: Fill in suitable handle repositories in the
- * given array for all those handle types this Connection supports.
+ * given array for all those entity types this Connection supports.
* Must be set by subclasses to a non-%NULL value; the function must create
* at least a CONTACT handle repository (failing to do so will cause a crash).
* @get_unique_connection_name: Construct a unique name for this connection
@@ -753,24 +753,24 @@ manager_channel_closed_cb (TpChannelManager *manager,
}
/*
- * Set the @handle_type'th handle repository, which must be %NULL, to
+ * Set the @entity_type'th handle repository, which must be %NULL, to
* @handle_repo. This method can only be called from code run during the
* constructor(), after handle repository instantiation (in practice, this
* means it can only be called from the @create_channel_managers callback).
*/
void
_tp_base_connection_set_handle_repo (TpBaseConnection *self,
- TpEntityType handle_type,
+ TpEntityType entity_type,
TpHandleRepoIface *handle_repo)
{
g_return_if_fail (TP_IS_BASE_CONNECTION (self));
g_return_if_fail (!self->priv->been_constructed);
- g_return_if_fail (tp_handle_type_is_valid (handle_type, NULL));
+ g_return_if_fail (tp_entity_type_is_valid (entity_type, NULL));
g_return_if_fail (self->priv->handles[TP_ENTITY_TYPE_CONTACT] != NULL);
- g_return_if_fail (self->priv->handles[handle_type] == NULL);
+ g_return_if_fail (self->priv->handles[entity_type] == NULL);
g_return_if_fail (TP_IS_HANDLE_REPO_IFACE (handle_repo));
- self->priv->handles[handle_type] = g_object_ref (handle_repo);
+ self->priv->handles[entity_type] = g_object_ref (handle_repo);
}
static void
@@ -1647,23 +1647,23 @@ tp_base_connection_check_connected (TpBaseConnection *self,
/**
* tp_base_connection_get_handles:
* @self: A connection
- * @handle_type: The handle type
+ * @entity_type: The entity type
*
* <!---->
*
* Returns: (transfer none): the handle repository corresponding to the given
- * handle type, or #NULL if it's unsupported or invalid.
+ * entity type, or #NULL if it's unsupported or invalid.
*/
TpHandleRepoIface *
tp_base_connection_get_handles (TpBaseConnection *self,
- TpEntityType handle_type)
+ TpEntityType entity_type)
{
g_return_val_if_fail (TP_IS_BASE_CONNECTION (self), NULL);
- if (handle_type >= TP_NUM_ENTITY_TYPES)
+ if (entity_type >= TP_NUM_ENTITY_TYPES)
return NULL;
- return self->priv->handles[handle_type];
+ return self->priv->handles[entity_type];
}
@@ -2423,12 +2423,12 @@ conn_requests_requestotron_validate_handle (TpBaseConnection *self,
GValue *target_handle_value = NULL;
GValue *target_id_value = NULL;
- /* Handle type 0 cannot have a handle */
+ /* entity type 0 cannot have a handle */
if (target_entity_type == TP_ENTITY_TYPE_NONE && target_handle != 0)
RETURN_INVALID_ARGUMENT (
"When TargetEntityType is NONE, TargetHandle must be omitted");
- /* Handle type 0 cannot have a target id */
+ /* entity type 0 cannot have a target id */
if (target_entity_type == TP_ENTITY_TYPE_NONE && target_id != NULL)
RETURN_INVALID_ARGUMENT (
"When TargetEntityType is NONE, TargetID must be omitted");
@@ -2450,7 +2450,7 @@ conn_requests_requestotron_validate_handle (TpBaseConnection *self,
if (handles == NULL)
{
GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
- "Handle type not supported by this connection manager" };
+ "entity type not supported by this connection manager" };
g_dbus_method_invocation_return_gerror (context, &e);
return;
diff --git a/telepathy-glib/base-connection.h b/telepathy-glib/base-connection.h
index 076b7a172..d97203250 100644
--- a/telepathy-glib/base-connection.h
+++ b/telepathy-glib/base-connection.h
@@ -126,7 +126,7 @@ gboolean tp_base_connection_check_connected (TpBaseConnection *self,
GError **error);
TpHandleRepoIface *tp_base_connection_get_handles (TpBaseConnection *self,
- TpEntityType handle_type);
+ TpEntityType entity_type);
gboolean tp_base_connection_register (TpBaseConnection *self,
const gchar *cm_name, gchar **bus_name, gchar **object_path,
diff --git a/telepathy-glib/capabilities.c b/telepathy-glib/capabilities.c
index 60ff7e426..1181b473f 100644
--- a/telepathy-glib/capabilities.c
+++ b/telepathy-glib/capabilities.c
@@ -261,7 +261,7 @@ _tp_capabilities_new (GVariant *classes,
static gboolean
supports_simple_channel (TpCapabilities *self,
const gchar *expected_chan_type,
- TpEntityType expected_handle_type)
+ TpEntityType expected_entity_type)
{
GVariantIter iter;
GVariant *fixed;
@@ -273,21 +273,21 @@ supports_simple_channel (TpCapabilities *self,
while (g_variant_iter_loop (&iter, "(@a{sv}@as)", &fixed, NULL))
{
const gchar *chan_type;
- TpEntityType handle_type;
+ TpEntityType entity_type;
gboolean valid;
if (g_variant_n_children (fixed) != 2)
continue;
chan_type = tp_vardict_get_string (fixed, TP_PROP_CHANNEL_CHANNEL_TYPE);
- handle_type = tp_vardict_get_uint32 (fixed,
+ entity_type = tp_vardict_get_uint32 (fixed,
TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid);
if (!valid)
continue;
if (!tp_strdiff (chan_type, expected_chan_type) &&
- handle_type == expected_handle_type)
+ entity_type == expected_entity_type)
{
g_variant_unref (fixed);
return TRUE;
@@ -387,17 +387,17 @@ tp_capabilities_supports_sms (TpCapabilities *self)
while (g_variant_iter_loop (&iter, "(@a{sv}^a&s)", &fixed, &allowed))
{
const gchar *chan_type;
- TpEntityType handle_type;
+ TpEntityType entity_type;
gboolean valid;
guint nb_fixed_props;
- handle_type = tp_vardict_get_uint32 (fixed,
+ entity_type = tp_vardict_get_uint32 (fixed,
TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid);
if (!valid)
continue;
- if (handle_type != TP_ENTITY_TYPE_CONTACT)
+ if (entity_type != TP_ENTITY_TYPE_CONTACT)
continue;
chan_type = tp_vardict_get_string (fixed, TP_PROP_CHANNEL_CHANNEL_TYPE);
@@ -436,7 +436,7 @@ tp_capabilities_supports_sms (TpCapabilities *self)
static gboolean
supports_call_full (TpCapabilities *self,
- TpEntityType expected_handle_type,
+ TpEntityType expected_entity_type,
gboolean expected_initial_audio,
gboolean expected_initial_video)
{
@@ -451,7 +451,7 @@ supports_call_full (TpCapabilities *self,
while (g_variant_iter_loop (&iter, "(@a{sv}^a&s)", &fixed, &allowed_prop))
{
const gchar *chan_type;
- TpEntityType handle_type;
+ TpEntityType entity_type;
gboolean valid;
guint nb_fixed_props = 2;
@@ -459,9 +459,9 @@ supports_call_full (TpCapabilities *self,
if (tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_CALL1))
continue;
- handle_type = tp_vardict_get_uint32 (fixed,
+ entity_type = tp_vardict_get_uint32 (fixed,
TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid);
- if (!valid || handle_type != expected_handle_type)
+ if (!valid || entity_type != expected_entity_type)
continue;
if (expected_initial_audio)
@@ -509,48 +509,48 @@ supports_call_full (TpCapabilities *self,
/**
* tp_capabilities_supports_audio_call:
* @self: a #TpCapabilities object
- * @handle_type: the handle type of the call; #TP_ENTITY_TYPE_CONTACT for
+ * @entity_type: the entity type of the call; #TP_ENTITY_TYPE_CONTACT for
* private, #TP_ENTITY_TYPE_ROOM or #TP_ENTITY_TYPE_NONE for conference
* (depending on the protocol)
*
* Return whether audio calls can be established, for instance by calling
* tp_account_channel_request_new_audio_call(), followed by
- * tp_account_channel_request_set_target_id() with @handle_type.
+ * tp_account_channel_request_set_target_id() with @entity_type.
*
* To check whether requests using
* tp_account_channel_request_set_target_contact() would work, set
- * @handle_type to %TP_ENTITY_TYPE_CONTACT.
+ * @entity_type to %TP_ENTITY_TYPE_CONTACT.
*
* Returns: %TRUE if a channel request containing Call as ChannelType,
- * @handle_type as TargetEntityType, a True value for InitialAudio and an
+ * @entity_type as TargetEntityType, a True value for InitialAudio and an
* identifier of the appropriate type can be expected to work, %FALSE otherwise.
*
* Since: 0.17.6
*/
gboolean
tp_capabilities_supports_audio_call (TpCapabilities *self,
- TpEntityType handle_type)
+ TpEntityType entity_type)
{
- return supports_call_full (self, handle_type, TRUE, FALSE);
+ return supports_call_full (self, entity_type, TRUE, FALSE);
}
/**
* tp_capabilities_supports_audio_video_call:
* @self: a #TpCapabilities object
- * @handle_type: the handle type of the call; #TP_ENTITY_TYPE_CONTACT for
+ * @entity_type: the entity type of the call; #TP_ENTITY_TYPE_CONTACT for
* private, #TP_ENTITY_TYPE_ROOM or #TP_ENTITY_TYPE_NONE for conference
* (depending on the protocol)
*
* Return whether audio/video calls can be established, for instance by calling
* tp_account_channel_request_new_audio_video_call(), followed by
- * tp_account_channel_request_set_target_id() with @handle_type.
+ * tp_account_channel_request_set_target_id() with @entity_type.
*
* To check whether requests using
* tp_account_channel_request_set_target_contact() would work, set
- * @handle_type to %TP_ENTITY_TYPE_CONTACT.
+ * @entity_type to %TP_ENTITY_TYPE_CONTACT.
*
* Returns: %TRUE if a channel request containing Call as ChannelType,
- * @handle_type as TargetEntityType, a True value for
+ * @entity_type as TargetEntityType, a True value for
* InitialAudio/InitialVideo and an identifier of the appropriate type can be
* expected to work,
* %FALSE otherwise.
@@ -559,9 +559,9 @@ tp_capabilities_supports_audio_call (TpCapabilities *self,
*/
gboolean
tp_capabilities_supports_audio_video_call (TpCapabilities *self,
- TpEntityType handle_type)
+ TpEntityType entity_type)
{
- return supports_call_full (self, handle_type, TRUE, TRUE);
+ return supports_call_full (self, entity_type, TRUE, TRUE);
}
typedef enum {
@@ -587,7 +587,7 @@ supports_file_transfer (TpCapabilities *self,
while (g_variant_iter_loop (&iter, "(@a{sv}^a&s)", &fixed, &allowed))
{
const gchar *chan_type;
- TpEntityType handle_type;
+ TpEntityType entity_type;
gboolean valid;
guint n_fixed = 2;
@@ -596,13 +596,13 @@ supports_file_transfer (TpCapabilities *self,
if (tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1))
continue;
- handle_type = tp_vardict_get_uint32 (fixed,
+ entity_type = tp_vardict_get_uint32 (fixed,
TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid);
if (!valid)
continue;
- if (handle_type != TP_ENTITY_TYPE_CONTACT)
+ if (entity_type != TP_ENTITY_TYPE_CONTACT)
continue;
/* ContentType, Filename, Size are mandatory. In principle we could check
@@ -750,7 +750,7 @@ tp_capabilities_supports_file_transfer_timestamp (TpCapabilities *self)
static gboolean
tp_capabilities_supports_tubes_common (TpCapabilities *self,
const gchar *expected_channel_type,
- TpEntityType expected_handle_type,
+ TpEntityType expected_entity_type,
const gchar *service_prop,
const gchar *expected_service)
{
@@ -759,15 +759,15 @@ tp_capabilities_supports_tubes_common (TpCapabilities *self,
const gchar **allowed;
g_return_val_if_fail (TP_IS_CAPABILITIES (self), FALSE);
- g_return_val_if_fail (expected_handle_type == TP_ENTITY_TYPE_CONTACT ||
- expected_handle_type == TP_ENTITY_TYPE_ROOM, FALSE);
+ g_return_val_if_fail (expected_entity_type == TP_ENTITY_TYPE_CONTACT ||
+ expected_entity_type == TP_ENTITY_TYPE_ROOM, FALSE);
g_variant_iter_init (&iter, self->priv->classes_variant);
while (g_variant_iter_loop (&iter, "(@a{sv}^a&s)", &fixed, &allowed))
{
const gchar *chan_type;
- TpEntityType handle_type;
+ TpEntityType entity_type;
gboolean valid;
guint nb_fixed_props = 2;
@@ -775,9 +775,9 @@ tp_capabilities_supports_tubes_common (TpCapabilities *self,
if (tp_strdiff (chan_type, expected_channel_type))
continue;
- handle_type = tp_vardict_get_uint32 (fixed,
+ entity_type = tp_vardict_get_uint32 (fixed,
TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid);
- if (!valid || handle_type != expected_handle_type)
+ if (!valid || entity_type != expected_entity_type)
continue;
if (expected_service != NULL && self->priv->contact_specific)
@@ -804,19 +804,19 @@ tp_capabilities_supports_tubes_common (TpCapabilities *self,
/**
* tp_capabilities_supports_stream_tubes:
* @self: a #TpCapabilities object
- * @handle_type: the handle type of the tube (either #TP_ENTITY_TYPE_CONTACT
+ * @entity_type: the entity type of the tube (either #TP_ENTITY_TYPE_CONTACT
* or #TP_ENTITY_TYPE_ROOM)
* @service: the service of the tube, or %NULL
*
* If the #TpCapabilities:contact-specific property is %TRUE, this function
* checks if the contact associated with this #TpCapabilities supports
- * stream tubes with @handle_type as TargetEntityType.
+ * stream tubes with @entity_type as TargetEntityType.
* If @service is not %NULL, it also checks if it supports stream tubes
* with @service as #TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE.
*
* If the #TpCapabilities:contact-specific property is %FALSE, this function
* checks if the connection supports requesting stream tube channels with
- * @handle_type as ChannelType. The @service argument is unused in this case.
+ * @entity_type as ChannelType. The @service argument is unused in this case.
*
* Returns: %TRUE if the contact or connection supports this type of stream
* tubes.
@@ -825,30 +825,30 @@ tp_capabilities_supports_tubes_common (TpCapabilities *self,
*/
gboolean
tp_capabilities_supports_stream_tubes (TpCapabilities *self,
- TpEntityType handle_type,
+ TpEntityType entity_type,
const gchar *service)
{
return tp_capabilities_supports_tubes_common (self,
- TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1, handle_type,
+ TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1, entity_type,
TP_PROP_CHANNEL_TYPE_STREAM_TUBE1_SERVICE, service);
}
/**
* tp_capabilities_supports_dbus_tubes:
* @self: a #TpCapabilities object
- * @handle_type: the handle type of the tube (either #TP_ENTITY_TYPE_CONTACT
+ * @entity_type: the entity type of the tube (either #TP_ENTITY_TYPE_CONTACT
* or #TP_ENTITY_TYPE_ROOM)
* @service_name: the service name of the tube, or %NULL
*
* If the #TpCapabilities:contact-specific property is %TRUE, this function
* checks if the contact associated with this #TpCapabilities supports
- * D-Bus tubes with @handle_type as TargetEntityType.
+ * D-Bus tubes with @entity_type as TargetEntityType.
* If @service_name is not %NULL, it also checks if it supports stream tubes
* with @service as #TP_PROP_CHANNEL_TYPE_DBUS_TUBE_SERVICE_NAME.
*
* If the #TpCapabilities:contact-specific property is %FALSE, this function
* checks if the connection supports requesting D-Bus tube channels with
- * @handle_type as ChannelType. The @service_name argument is unused in
+ * @entity_type as ChannelType. The @service_name argument is unused in
* this case.
*
* Returns: %TRUE if the contact or connection supports this type of D-Bus
@@ -858,11 +858,11 @@ tp_capabilities_supports_stream_tubes (TpCapabilities *self,
*/
gboolean
tp_capabilities_supports_dbus_tubes (TpCapabilities *self,
- TpEntityType handle_type,
+ TpEntityType entity_type,
const gchar *service_name)
{
return tp_capabilities_supports_tubes_common (self,
- TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1, handle_type,
+ TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1, entity_type,
TP_PROP_CHANNEL_TYPE_DBUS_TUBE1_SERVICE_NAME, service_name);
}
@@ -1009,7 +1009,7 @@ tp_capabilities_supports_room_list (TpCapabilities *self,
&allowed_properties))
{
const gchar *chan_type;
- TpEntityType handle_type;
+ TpEntityType entity_type;
gboolean valid;
if (g_variant_n_children (fixed) != 2)
@@ -1019,9 +1019,9 @@ tp_capabilities_supports_room_list (TpCapabilities *self,
if (tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_ROOM_LIST1))
continue;
- handle_type = tp_vardict_get_uint32 (fixed,
+ entity_type = tp_vardict_get_uint32 (fixed,
TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid);
- if (!valid || handle_type != TP_ENTITY_TYPE_NONE)
+ if (!valid || entity_type != TP_ENTITY_TYPE_NONE)
continue;
result = TRUE;
diff --git a/telepathy-glib/capabilities.h b/telepathy-glib/capabilities.h
index f7f2ebc40..16efa44fa 100644
--- a/telepathy-glib/capabilities.h
+++ b/telepathy-glib/capabilities.h
@@ -65,10 +65,10 @@ gboolean tp_capabilities_supports_sms (TpCapabilities *self);
_TP_AVAILABLE_IN_0_18
gboolean tp_capabilities_supports_audio_call (TpCapabilities *self,
- TpEntityType handle_type);
+ TpEntityType entity_type);
_TP_AVAILABLE_IN_0_18
gboolean tp_capabilities_supports_audio_video_call (TpCapabilities *self,
- TpEntityType handle_type);
+ TpEntityType entity_type);
_TP_AVAILABLE_IN_0_18
gboolean tp_capabilities_supports_file_transfer (TpCapabilities *self);
_TP_AVAILABLE_IN_0_20
@@ -84,11 +84,11 @@ gboolean tp_capabilities_supports_file_transfer_initial_offset (
TpCapabilities *self);
gboolean tp_capabilities_supports_stream_tubes (TpCapabilities *self,
- TpEntityType handle_type,
+ TpEntityType entity_type,
const gchar *service);
gboolean tp_capabilities_supports_dbus_tubes (TpCapabilities *self,
- TpEntityType handle_type,
+ TpEntityType entity_type,
const gchar *service_name);
gboolean tp_capabilities_supports_contact_search (TpCapabilities *self,
diff --git a/telepathy-glib/channel-filter.c b/telepathy-glib/channel-filter.c
index 88a3be9e0..b112d7531 100644
--- a/telepathy-glib/channel-filter.c
+++ b/telepathy-glib/channel-filter.c
@@ -512,7 +512,7 @@ tp_channel_filter_require_locally_requested (TpChannelFilter *self,
*
* |[
* tp_channel_filter_require_property (filter,
- * TP_PROP_CHANNEL_TARGET_HANDLE_TYPE,
+ * TP_PROP_CHANNEL_TARGET_ENTITY_TYPE,
* g_variant_new_uint32 (TP_ENTITY_TYPE_CONTACT));
* ]|
*
diff --git a/telepathy-glib/channel-iface.c b/telepathy-glib/channel-iface.c
index 57576def9..f793741ed 100644
--- a/telepathy-glib/channel-iface.c
+++ b/telepathy-glib/channel-iface.c
@@ -79,14 +79,14 @@ tp_channel_iface_base_init (gpointer klass)
g_object_interface_install_property (klass, param_spec);
/**
- * TpChannelIface:handle-type:
+ * TpChannelIface:entity-type:
*
* The #TpEntityType of this channel's associated handle, or
* %TP_ENTITY_TYPE_NONE (which is numerically 0) if no handle.
*
- * In #TpChannel, if this is TP_UNKNOWN_HANDLE_TYPE
+ * In #TpChannel, if this is TP_UNKNOWN_ENTITY_TYPE
* during construction, we ask the remote D-Bus object what its
- * handle type is; reading this property will yield TP_UNKNOWN_HANDLE_TYPE
+ * entity type is; reading this property will yield TP_UNKNOWN_ENTITY_TYPE
* until we get the reply. This is not guaranteed to be have happened
* until tp_proxy_prepare_async() has finished preparing
* %TP_CHANNEL_FEATURE_CORE.
@@ -94,9 +94,9 @@ tp_channel_iface_base_init (gpointer klass)
* In connection manager implementations, attempts to set this during
* construction might also be ignored.
*/
- param_spec = g_param_spec_uint ("handle-type", "Handle type",
+ param_spec = g_param_spec_uint ("entity-type", "Entity type",
"The TpEntityType of this channel's associated handle.",
- 0, G_MAXUINT32, TP_UNKNOWN_HANDLE_TYPE,
+ 0, G_MAXUINT32, TP_UNKNOWN_ENTITY_TYPE,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_interface_install_property (klass, param_spec);
@@ -107,8 +107,8 @@ tp_channel_iface_base_init (gpointer klass)
* Read-only except during construction.
*
* In #TpChannel, if this is 0
- * during construction, and handle-type is not TP_ENTITY_TYPE_NONE (== 0),
- * we ask the remote D-Bus object what its handle type is; reading this
+ * during construction, and entity-type is not TP_ENTITY_TYPE_NONE (== 0),
+ * we ask the remote D-Bus object what its entity type is; reading this
* property will yield 0 until we get the reply, or if GetHandle()
* fails. This is not guaranteed to be set until tp_proxy_prepare_async()
* has finished preparing %TP_CHANNEL_FEATURE_CORE.
@@ -118,7 +118,7 @@ tp_channel_iface_base_init (gpointer klass)
*/
param_spec = g_param_spec_uint ("handle", "Handle",
"The TpHandle representing the contact, group, etc. with which "
- "this channel communicates, whose type is given by the handle-type "
+ "this channel communicates, whose type is given by the entity-type "
"property.",
0, G_MAXUINT32, 0,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
diff --git a/telepathy-glib/channel-internal.h b/telepathy-glib/channel-internal.h
index 830154a49..066cf51a0 100644
--- a/telepathy-glib/channel-internal.h
+++ b/telepathy-glib/channel-internal.h
@@ -46,7 +46,7 @@ struct _TpChannelPrivate {
GQueue *introspect_needed;
GQuark channel_type;
- TpEntityType handle_type;
+ TpEntityType entity_type;
TpHandle handle;
gchar *identifier;
/* owned string (iface + "." + prop) => slice-allocated GValue */
diff --git a/telepathy-glib/channel-manager-request-internal.h b/telepathy-glib/channel-manager-request-internal.h
index e6836fbef..36154161a 100644
--- a/telepathy-glib/channel-manager-request-internal.h
+++ b/telepathy-glib/channel-manager-request-internal.h
@@ -49,7 +49,7 @@ struct _TpChannelManagerRequest
TpChannelManagerRequestMethod method;
gchar *channel_type;
- TpEntityType handle_type;
+ TpEntityType entity_type;
TpHandle handle;
/* only meaningful for METHOD_ENSURE_CHANNEL; only true if this is the first
@@ -87,7 +87,7 @@ TpChannelManagerRequest * _tp_channel_manager_request_new (
GDBusMethodInvocation *context,
TpChannelManagerRequestMethod method,
const char *channel_type,
- TpEntityType handle_type,
+ TpEntityType entity_type,
TpHandle handle);
void _tp_channel_manager_request_cancel (TpChannelManagerRequest *self);
diff --git a/telepathy-glib/channel-manager-request.c b/telepathy-glib/channel-manager-request.c
index e49d78734..e2ece2e30 100644
--- a/telepathy-glib/channel-manager-request.c
+++ b/telepathy-glib/channel-manager-request.c
@@ -71,7 +71,7 @@ tp_channel_manager_request_finalize (GObject *object)
g_assert (self->context == NULL);
DEBUG("Freeing channel request at %p: ctype=%s htype=%d handle=%d",
- self, self->channel_type, self->handle_type,
+ self, self->channel_type, self->entity_type,
self->handle);
g_free (self->channel_type);
@@ -98,7 +98,7 @@ _tp_channel_manager_request_new (
GDBusMethodInvocation *context,
TpChannelManagerRequestMethod method,
const char *channel_type,
- TpEntityType handle_type,
+ TpEntityType entity_type,
TpHandle handle)
{
TpChannelManagerRequest *result;
@@ -113,12 +113,12 @@ _tp_channel_manager_request_new (
result->context = context;
result->method = method;
result->channel_type = g_strdup (channel_type);
- result->handle_type = handle_type;
+ result->entity_type = entity_type;
result->handle = handle;
result->yours = FALSE;
DEBUG ("New channel request at %p: ctype=%s htype=%d handle=%d",
- result, channel_type, handle_type, handle);
+ result, channel_type, entity_type, handle);
return result;
}
@@ -132,7 +132,7 @@ _tp_channel_manager_request_cancel (TpChannelManagerRequest *self)
g_return_if_fail (self->context != NULL);
DEBUG ("cancelling request at %p for %s/%u/%u", self,
- self->channel_type, self->handle_type, self->handle);
+ self->channel_type, self->entity_type, self->handle);
g_dbus_method_invocation_return_gerror (self->context, &error);
self->context = NULL;
@@ -149,8 +149,8 @@ _tp_channel_manager_request_satisfy (TpChannelManagerRequest *self,
g_return_if_fail (self->context != NULL);
DEBUG ("completing queued request %p with success, "
- "channel_type=%s, handle_type=%u, "
- "handle=%u", self, self->channel_type, self->handle_type, self->handle);
+ "channel_type=%s, entity_type=%u, "
+ "handle=%u", self, self->channel_type, self->entity_type, self->handle);
g_object_get (channel,
"object-path", &object_path,
@@ -186,8 +186,8 @@ _tp_channel_manager_request_fail (TpChannelManagerRequest *self,
g_return_if_fail (self->context != NULL);
DEBUG ("completing queued request %p with error, channel_type=%s, "
- "handle_type=%u, handle=%u",
- self, self->channel_type, self->handle_type, self->handle);
+ "entity_type=%u, handle=%u",
+ self, self->channel_type, self->entity_type, self->handle);
g_dbus_method_invocation_return_gerror (self->context, error);
self->context = NULL;
diff --git a/telepathy-glib/channel.c b/telepathy-glib/channel.c
index 9faaf5d55..2637a1026 100644
--- a/telepathy-glib/channel.c
+++ b/telepathy-glib/channel.c
@@ -94,7 +94,7 @@ enum
{
PROP_CONNECTION = 1,
PROP_CHANNEL_TYPE,
- PROP_HANDLE_TYPE,
+ PROP_ENTITY_TYPE,
PROP_HANDLE,
PROP_IDENTIFIER,
PROP_CHANNEL_PROPERTIES,
@@ -130,7 +130,7 @@ G_DEFINE_TYPE (TpChannel, tp_channel, TP_TYPE_PROXY)
* Specifically, this implies that:
*
* - #TpChannelIface:channel-type is set
- * - #TpChannelIface:handle-type and #TpChannelIface:handle are set
+ * - #TpChannelIface:entity-type and #TpChannelIface:handle are set
* - any extra interfaces will have been set up in TpProxy (i.e.
* #TpProxy:interfaces contains at least all extra Channel interfaces)
*
@@ -231,7 +231,7 @@ tp_channel_get_channel_type_id (TpChannel *self)
/**
* tp_channel_get_handle:
* @self: a channel
- * @handle_type: (out): if not %NULL, used to return the type of this handle
+ * @entity_type: (out): if not %NULL, used to return the type of this handle
*
* Get the handle representing the contact, chatroom, etc. with which this
* channel communicates for its whole lifetime, or 0 if there is no such
@@ -241,24 +241,24 @@ tp_channel_get_channel_type_id (TpChannel *self)
* guaranteed to have its final value until the %TP_CHANNEL_FEATURE_CORE
* feature is ready.
*
- * If @handle_type is not %NULL, the type of handle is written into it.
- * This will be %TP_UNKNOWN_HANDLE_TYPE if the handle has not yet been
+ * If @entity_type is not %NULL, the type of handle is written into it.
+ * This will be %TP_UNKNOWN_ENTITY_TYPE if the handle has not yet been
* discovered, or %TP_ENTITY_TYPE_NONE if there is no handle with which this
* channel will always communicate. This is the same as the
- * #TpChannelIface:handle-type property.
+ * #TpChannelIface:entity-type property.
*
* Returns: the handle
* Since: 0.7.12
*/
TpHandle
tp_channel_get_handle (TpChannel *self,
- TpEntityType *handle_type)
+ TpEntityType *entity_type)
{
g_return_val_if_fail (TP_IS_CHANNEL (self), 0);
- if (handle_type != NULL)
+ if (entity_type != NULL)
{
- *handle_type = self->priv->handle_type;
+ *entity_type = self->priv->entity_type;
}
return self->priv->handle;
@@ -401,8 +401,8 @@ tp_channel_get_property (GObject *object,
g_value_set_static_string (value,
g_quark_to_string (self->priv->channel_type));
break;
- case PROP_HANDLE_TYPE:
- g_value_set_uint (value, self->priv->handle_type);
+ case PROP_ENTITY_TYPE:
+ g_value_set_uint (value, self->priv->entity_type);
break;
case PROP_HANDLE:
g_value_set_uint (value, self->priv->handle);
@@ -481,16 +481,16 @@ _tp_channel_maybe_set_handle (TpChannel *self,
static void
-_tp_channel_maybe_set_handle_type (TpChannel *self,
- TpEntityType handle_type,
+_tp_channel_maybe_set_entity_type (TpChannel *self,
+ TpEntityType entity_type,
gboolean valid)
{
if (valid)
{
- self->priv->handle_type = handle_type;
+ self->priv->entity_type = entity_type;
g_hash_table_insert (self->priv->channel_properties,
g_strdup (TP_PROP_CHANNEL_TARGET_ENTITY_TYPE),
- tp_g_value_slice_new_uint (handle_type));
+ tp_g_value_slice_new_uint (entity_type));
}
}
@@ -564,7 +564,7 @@ tp_channel_set_property (GObject *object,
u = tp_asv_get_uint32 (self->priv->channel_properties,
TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid);
- _tp_channel_maybe_set_handle_type (self, u, valid);
+ _tp_channel_maybe_set_entity_type (self, u, valid);
u = tp_asv_get_uint32 (self->priv->channel_properties,
TP_PROP_CHANNEL_TARGET_HANDLE, &valid);
@@ -678,7 +678,7 @@ _tp_channel_got_properties (TpProxy *proxy,
tp_asv_get_boxed (asv, "Interfaces", G_TYPE_STRV));
u = tp_asv_get_uint32 (asv, "TargetEntityType", &valid);
- _tp_channel_maybe_set_handle_type (self, u, valid);
+ _tp_channel_maybe_set_entity_type (self, u, valid);
u = tp_asv_get_uint32 (asv, "TargetHandle", &valid);
_tp_channel_maybe_set_handle (self, u, valid);
@@ -715,7 +715,7 @@ _tp_channel_got_properties (TpProxy *proxy,
g_object_notify ((GObject *) self, "channel-type");
g_object_notify ((GObject *) self, "interfaces");
- g_object_notify ((GObject *) self, "handle-type");
+ g_object_notify ((GObject *) self, "entity-type");
g_object_notify ((GObject *) self, "handle");
g_object_notify ((GObject *) self, "identifier");
@@ -801,7 +801,7 @@ _tp_channel_create_contacts (TpChannel *self)
contacts = g_ptr_array_new ();
/* Create target contact */
- if (self->priv->handle_type == TP_ENTITY_TYPE_CONTACT)
+ if (self->priv->entity_type == TP_ENTITY_TYPE_CONTACT)
{
if (self->priv->handle == 0 || self->priv->identifier == NULL)
{
@@ -942,7 +942,7 @@ tp_channel_constructed (GObject *object)
(self->priv->channel_type != 0)
? g_quark_to_string (self->priv->channel_type)
: "(null)",
- self->priv->handle, self->priv->handle_type);
+ self->priv->handle, self->priv->entity_type);
self->priv->introspect_needed = g_queue_new ();
@@ -969,7 +969,7 @@ tp_channel_init (TpChannel *self)
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, TP_TYPE_CHANNEL,
TpChannelPrivate);
self->priv->channel_type = 0;
- self->priv->handle_type = TP_UNKNOWN_HANDLE_TYPE;
+ self->priv->entity_type = TP_UNKNOWN_ENTITY_TYPE;
self->priv->handle = 0;
self->priv->channel_properties = g_hash_table_new_full (g_str_hash,
g_str_equal, g_free, (GDestroyNotify) tp_g_value_slice_free);
@@ -1164,19 +1164,19 @@ tp_channel_class_init (TpChannelClass *klass)
g_object_class_install_property (object_class, PROP_CHANNEL_TYPE, param_spec);
/**
- * TpChannel:handle-type:
+ * TpChannel:entity-type:
*
* The #TpEntityType of this channel's associated handle, or
* %TP_ENTITY_TYPE_NONE (which is numerically 0) if no handle,
- * or %TP_UNKNOWN_HANDLE_TYPE if this property is not available yet.
+ * or %TP_UNKNOWN_ENTITY_TYPE if this property is not available yet.
* This is not guaranteed to be available until tp_proxy_prepare_async()
* has finished preparing %TP_CHANNEL_FEATURE_CORE.
*/
- param_spec = g_param_spec_uint ("handle-type", "Telepathy entity type",
+ param_spec = g_param_spec_uint ("entity-type", "Telepathy entity type",
"The TpEntityType of this channel's associated handle",
- 0, G_MAXUINT32, TP_UNKNOWN_HANDLE_TYPE,
+ 0, G_MAXUINT32, TP_UNKNOWN_ENTITY_TYPE,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_HANDLE_TYPE, param_spec);
+ g_object_class_install_property (object_class, PROP_ENTITY_TYPE, param_spec);
/**
* TpChannel:handle:
@@ -1195,7 +1195,7 @@ tp_channel_class_init (TpChannelClass *klass)
* TpChannel:identifier:
*
* This channel's associated identifier, or the empty string if it has
- * handle type %TP_ENTITY_TYPE_NONE.
+ * entity type %TP_ENTITY_TYPE_NONE.
*
* For channels where #TpChannelIface:handle is non-zero, this is the result
* of inspecting #TpChannelIface:handle.
@@ -1340,7 +1340,7 @@ tp_channel_class_init (TpChannelClass *klass)
* TpChannel:target-contact:
*
* If this channel is for communication with a single contact (that is,
- * #TpChannelIface:handle-type is %TP_ENTITY_TYPE_CONTACT), then a #TpContact
+ * #TpChannelIface:entity-type is %TP_ENTITY_TYPE_CONTACT), then a #TpContact
* representing the remote contact. For chat rooms, contact search channels and
* other channels without a single remote contact, %NULL.
*
diff --git a/telepathy-glib/channel.h b/telepathy-glib/channel.h
index d8d6a88e2..154673b40 100644
--- a/telepathy-glib/channel.h
+++ b/telepathy-glib/channel.h
@@ -119,7 +119,7 @@ GQuark tp_channel_get_feature_quark_core (void) G_GNUC_CONST;
const gchar *tp_channel_get_channel_type (TpChannel *self);
GQuark tp_channel_get_channel_type_id (TpChannel *self);
-TpHandle tp_channel_get_handle (TpChannel *self, TpEntityType *handle_type);
+TpHandle tp_channel_get_handle (TpChannel *self, TpEntityType *entity_type);
const gchar *tp_channel_get_identifier (TpChannel *self);
_TP_AVAILABLE_IN_0_16
diff --git a/telepathy-glib/errors.c b/telepathy-glib/errors.c
index 09becca40..104f4ba2e 100644
--- a/telepathy-glib/errors.c
+++ b/telepathy-glib/errors.c
@@ -255,39 +255,39 @@
*/
/**
- * tp_g_set_error_invalid_handle_type: (skip)
- * @type: An invalid handle type
+ * tp_g_set_error_invalid_entity_type: (skip)
+ * @type: An invalid entity type
* @error: Either %NULL, or used to return an error (as for g_set_error)
*
- * Set the error NotImplemented for an invalid handle type,
+ * Set the error NotImplemented for an invalid entity type,
* with an appropriate message.
*
* Changed in version 0.7.23: previously, the error was
* InvalidArgument.
*/
void
-tp_g_set_error_invalid_handle_type (guint type, GError **error)
+tp_g_set_error_invalid_entity_type (guint type, GError **error)
{
g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
- "unsupported handle type %u", type);
+ "unsupported entity type %u", type);
}
/**
- * tp_g_set_error_unsupported_handle_type: (skip)
- * @type: An unsupported handle type
+ * tp_g_set_error_unsupported_entity_type: (skip)
+ * @type: An unsupported entity type
* @error: Either %NULL, or used to return an error (as for g_set_error)
*
- * Set the error NotImplemented for a handle type which is valid but is not
+ * Set the error NotImplemented for a entity type which is valid but is not
* supported by this connection manager, with an appropriate message.
*
* Changed in version 0.7.23: previously, the error was
* InvalidArgument.
*/
void
-tp_g_set_error_unsupported_handle_type (guint type, GError **error)
+tp_g_set_error_unsupported_entity_type (guint type, GError **error)
{
g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
- "unsupported handle type %u", type);
+ "unsupported entity type %u", type);
}
/**
diff --git a/telepathy-glib/errors.h b/telepathy-glib/errors.h
index 01f5d460b..339be28f0 100644
--- a/telepathy-glib/errors.h
+++ b/telepathy-glib/errors.h
@@ -40,8 +40,8 @@ GQuark tp_error_quark (void);
#define TP_ERROR (tp_error_quark ())
-void tp_g_set_error_invalid_handle_type (guint type, GError **error);
-void tp_g_set_error_unsupported_handle_type (guint type, GError **error);
+void tp_g_set_error_invalid_entity_type (guint type, GError **error);
+void tp_g_set_error_unsupported_entity_type (guint type, GError **error);
typedef enum {
TP_ERROR_NETWORK_ERROR, /*< nick=NetworkError >*/
diff --git a/telepathy-glib/handle-repo-dynamic.c b/telepathy-glib/handle-repo-dynamic.c
index eb56746ba..28c5d3ee8 100644
--- a/telepathy-glib/handle-repo-dynamic.c
+++ b/telepathy-glib/handle-repo-dynamic.c
@@ -31,11 +31,11 @@
* A dynamic handle repository will accept arbitrary handles, which can
* be created and destroyed at runtime.
*
- * The #TpHandleRepoIface:handle-type property must be set at construction
+ * The #TpHandleRepoIface:entity-type property must be set at construction
* time; the #TpDynamicHandleRepo:normalize-function property may be set to
* perform validation and normalization on handle ID strings.
*
- * Most connection managers will use this for all supported handle types
+ * Most connection managers will use this for all supported entity types
* except %TP_ENTITY_TYPE_LIST.
*
* Changed in 0.13.8: handles are no longer reference-counted, and
@@ -103,7 +103,7 @@
/**
* tp_dynamic_handle_repo_new:
- * @handle_type: The handle type
+ * @entity_type: The entity type
* @normalize_func: The function to be used to normalize and validate handles,
* or %NULL to accept all handles as-is
* @default_normalize_context: The context pointer to be passed to the
@@ -145,7 +145,7 @@ handle_priv_free_contents (TpHandlePriv *priv)
enum
{
- PROP_HANDLE_TYPE = 1,
+ PROP_ENTITY_TYPE = 1,
PROP_NORMALIZE_FUNCTION,
PROP_DEFAULT_NORMALIZE_CONTEXT,
};
@@ -170,7 +170,7 @@ struct _TpDynamicHandleRepoClass {
struct _TpDynamicHandleRepo {
GObject parent;
- TpEntityType handle_type;
+ TpEntityType entity_type;
/* Array of TpHandlePriv keyed by handle; 0th element is unused */
GArray *handle_to_priv;
@@ -262,8 +262,8 @@ dynamic_get_property (GObject *object,
switch (property_id)
{
- case PROP_HANDLE_TYPE:
- g_value_set_uint (value, self->handle_type);
+ case PROP_ENTITY_TYPE:
+ g_value_set_uint (value, self->entity_type);
break;
case PROP_NORMALIZE_FUNCTION:
g_value_set_pointer (value, self->normalize_function);
@@ -287,8 +287,8 @@ dynamic_set_property (GObject *object,
switch (property_id)
{
- case PROP_HANDLE_TYPE:
- self->handle_type = g_value_get_uint (value);
+ case PROP_ENTITY_TYPE:
+ self->entity_type = g_value_get_uint (value);
break;
case PROP_NORMALIZE_FUNCTION:
self->normalize_function = g_value_get_pointer (value);
@@ -314,8 +314,8 @@ tp_dynamic_handle_repo_class_init (TpDynamicHandleRepoClass *klass)
object_class->get_property = dynamic_get_property;
object_class->set_property = dynamic_set_property;
- g_object_class_override_property (object_class, PROP_HANDLE_TYPE,
- "handle-type");
+ g_object_class_override_property (object_class, PROP_ENTITY_TYPE,
+ "entity-type");
/**
* TpDynamicHandleRepo:normalize-function:
@@ -361,8 +361,8 @@ dynamic_handle_is_valid (TpHandleRepoIface *irepo,
{
g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"handle %u is not currently a valid %s handle (type %u)",
- handle, tp_handle_type_to_string (self->handle_type),
- self->handle_type);
+ handle, tp_entity_type_to_string (self->entity_type),
+ self->entity_type);
return FALSE;
}
else
@@ -491,8 +491,8 @@ dynamic_lookup_handle (TpHandleRepoIface *irepo,
{
g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
"no %s handle (type %u) currently exists for ID \"%s\"",
- tp_handle_type_to_string (self->handle_type),
- self->handle_type, id);
+ tp_entity_type_to_string (self->entity_type),
+ self->entity_type, id);
}
g_free (normal_id);
diff --git a/telepathy-glib/handle-repo-dynamic.h b/telepathy-glib/handle-repo-dynamic.h
index 6002e3d56..db0416278 100644
--- a/telepathy-glib/handle-repo-dynamic.h
+++ b/telepathy-glib/handle-repo-dynamic.h
@@ -70,17 +70,17 @@ TpHandle tp_dynamic_handle_repo_lookup_exact (TpHandleRepoIface *irepo,
static inline
/* spacer so gtkdoc documents this function as though not static */
-TpHandleRepoIface *tp_dynamic_handle_repo_new (TpEntityType handle_type,
+TpHandleRepoIface *tp_dynamic_handle_repo_new (TpEntityType entity_type,
TpDynamicHandleRepoNormalizeFunc normalize_func,
gpointer default_normalize_context);
static inline TpHandleRepoIface *
-tp_dynamic_handle_repo_new (TpEntityType handle_type,
+tp_dynamic_handle_repo_new (TpEntityType entity_type,
TpDynamicHandleRepoNormalizeFunc normalize_func,
gpointer default_normalize_context)
{
return (TpHandleRepoIface *) g_object_new (TP_TYPE_DYNAMIC_HANDLE_REPO,
- "handle-type", (guint)handle_type,
+ "entity-type", (guint)entity_type,
"normalize-function", (gpointer)normalize_func,
"default-normalize-context", default_normalize_context,
NULL);
diff --git a/telepathy-glib/handle-repo-static.c b/telepathy-glib/handle-repo-static.c
index e5d94eb2e..8c279c3fd 100644
--- a/telepathy-glib/handle-repo-static.c
+++ b/telepathy-glib/handle-repo-static.c
@@ -1,6 +1,6 @@
/*
* handle-repo-static.c - mechanism to store and retrieve handles on a
- * connection (implementation for handle types with a fixed list of possible
+ * connection (implementation for entity types with a fixed list of possible
* handles)
*
* Copyright (C) 2007 Collabora Ltd. <http://www.collabora.co.uk/>
@@ -32,7 +32,7 @@
* these handles can never be destroyed, and no more can be created, so
* no reference counting is performed.
*
- * The #TpHandleRepoIface:handle-type property must be set at construction
+ * The #TpHandleRepoIface:entity-type property must be set at construction
* time.
*
* Most connection managers will use this for handles of type
@@ -50,7 +50,7 @@
enum
{
- PROP_HANDLE_TYPE = 1,
+ PROP_ENTITY_TYPE = 1,
PROP_HANDLE_NAMES,
};
@@ -60,7 +60,7 @@ struct _TpStaticHandleRepoClass {
struct _TpStaticHandleRepo {
GObject parent;
- TpEntityType handle_type;
+ TpEntityType entity_type;
TpHandle last_handle;
gchar **handle_names;
GData **datalists;
@@ -76,7 +76,7 @@ G_DEFINE_TYPE_WITH_CODE (TpStaticHandleRepo, tp_static_handle_repo,
static void
tp_static_handle_repo_init (TpStaticHandleRepo *self)
{
- self->handle_type = 0;
+ self->entity_type = 0;
self->last_handle = 0;
self->handle_names = NULL;
self->datalists = NULL;
@@ -111,8 +111,8 @@ static_get_property (GObject *object,
switch (property_id)
{
- case PROP_HANDLE_TYPE:
- g_value_set_uint (value, self->handle_type);
+ case PROP_ENTITY_TYPE:
+ g_value_set_uint (value, self->entity_type);
break;
case PROP_HANDLE_NAMES:
g_value_set_boxed (value, g_strdupv (self->handle_names));
@@ -134,8 +134,8 @@ static_set_property (GObject *object,
switch (property_id)
{
- case PROP_HANDLE_TYPE:
- self->handle_type = g_value_get_uint (value);
+ case PROP_ENTITY_TYPE:
+ self->entity_type = g_value_get_uint (value);
break;
case PROP_HANDLE_NAMES:
@@ -178,8 +178,8 @@ tp_static_handle_repo_class_init (TpStaticHandleRepoClass *klass)
object_class->set_property = static_set_property;
object_class->finalize = static_finalize;
- g_object_class_override_property (object_class, PROP_HANDLE_TYPE,
- "handle-type");
+ g_object_class_override_property (object_class, PROP_ENTITY_TYPE,
+ "entity-type");
param_spec = g_param_spec_boxed ("handle-names", "Handle names",
"The static set of handle names supported by this repo.",
G_TYPE_STRV,
@@ -199,8 +199,8 @@ static_handle_is_valid (TpHandleRepoIface *irepo,
{
g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
"handle %u is not a valid %s handle (type %u)",
- handle, tp_handle_type_to_string (self->handle_type),
- self->handle_type);
+ handle, tp_entity_type_to_string (self->entity_type),
+ self->entity_type);
return FALSE;
}
else
diff --git a/telepathy-glib/handle-repo-static.h b/telepathy-glib/handle-repo-static.h
index 7e2e202fc..ad8638633 100644
--- a/telepathy-glib/handle-repo-static.h
+++ b/telepathy-glib/handle-repo-static.h
@@ -38,7 +38,7 @@ G_BEGIN_DECLS
*
* A static handle repository contains a fixed set of handles.
*
- * As well as setting the #TpHandleRepoIface:handle-type property, code
+ * As well as setting the #TpHandleRepoIface:entity-type property, code
* which creates a static handle repository must set the
* #TpStaticHandleRepo:handle-names construction property to a strv of
* valid handle names. All of these are preallocated; no more may be
@@ -87,7 +87,7 @@ GType tp_static_handle_repo_get_type (void);
/**
* tp_static_handle_repo_new:
- * @handle_type: The type of handle to store in the
+ * @entity_type: The type of handle to store in the
* new repository
* @handle_names: Same as #TpStaticHandleRepo:handle-names
*
@@ -97,15 +97,15 @@ GType tp_static_handle_repo_get_type (void);
*/
static inline
/* spacer so gtkdoc documents this function as though not static */
-TpHandleRepoIface *tp_static_handle_repo_new (TpEntityType handle_type,
+TpHandleRepoIface *tp_static_handle_repo_new (TpEntityType entity_type,
const gchar **handle_names);
static inline TpHandleRepoIface *
-tp_static_handle_repo_new (TpEntityType handle_type,
+tp_static_handle_repo_new (TpEntityType entity_type,
const gchar **handle_names)
{
return (TpHandleRepoIface *) g_object_new (TP_TYPE_STATIC_HANDLE_REPO,
- "handle-type", (guint)handle_type,
+ "entity-type", (guint)entity_type,
"handle-names", handle_names,
NULL);
}
diff --git a/telepathy-glib/handle-repo.c b/telepathy-glib/handle-repo.c
index b054bd8d9..be4c128d3 100644
--- a/telepathy-glib/handle-repo.c
+++ b/telepathy-glib/handle-repo.c
@@ -263,7 +263,7 @@ tp_handle_repo_iface_default_init (TpHandleRepoIfaceInterface *iface)
iface->ensure_handle_async = default_ensure_handle_async;
iface->ensure_handle_finish = default_ensure_handle_finish;
- param_spec = g_param_spec_uint ("handle-type", "Handle type",
+ param_spec = g_param_spec_uint ("entity-type", "Entity type",
"The TpEntityType held in this handle repository.",
0, G_MAXUINT32, 0,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
diff --git a/telepathy-glib/handle-repo.h b/telepathy-glib/handle-repo.h
index 18188cbeb..47ca9120f 100644
--- a/telepathy-glib/handle-repo.h
+++ b/telepathy-glib/handle-repo.h
@@ -154,18 +154,18 @@ gchar *tp_handle_set_dump (const TpHandleSet *self) G_GNUC_WARN_UNUSED_RESULT;
/**
* tp_handles_supported_and_valid: (skip)
* @repos: An array of possibly null pointers to handle repositories, indexed
- * by handle type, where a null pointer means an unsupported handle
+ * by entity type, where a null pointer means an unsupported handle
* type
- * @handle_type: The handle type
+ * @entity_type: The entity type
* @handles: A GArray of guint representing handles of the given type
* @allow_zero: If %TRUE, zero is treated like a valid handle
* @error: Used to return an error if %FALSE is returned
*
- * Return %TRUE if the given handle type is supported (i.e. repos[handle_type]
+ * Return %TRUE if the given entity type is supported (i.e. repos[entity_type]
* is not %NULL) and the given handles are all valid in that repository.
* If not, set @error and return %FALSE.
*
- * Returns: %TRUE if the handle type is supported and the handles are all
+ * Returns: %TRUE if the entity type is supported and the handles are all
* valid.
*/
@@ -173,25 +173,25 @@ static inline
/* spacer so gtkdoc documents this function as though not static */
gboolean tp_handles_supported_and_valid (
TpHandleRepoIface *repos[TP_NUM_ENTITY_TYPES],
- TpEntityType handle_type, const GArray *handles, gboolean allow_zero,
+ TpEntityType entity_type, const GArray *handles, gboolean allow_zero,
GError **error);
static inline gboolean
tp_handles_supported_and_valid (TpHandleRepoIface *repos[TP_NUM_ENTITY_TYPES],
- TpEntityType handle_type,
+ TpEntityType entity_type,
const GArray *handles,
gboolean allow_zero,
GError **error)
{
- if (!tp_handle_type_is_valid (handle_type, error))
+ if (!tp_entity_type_is_valid (entity_type, error))
return FALSE;
- if (!repos[handle_type])
+ if (!repos[entity_type])
{
- tp_g_set_error_unsupported_handle_type (handle_type, error);
+ tp_g_set_error_unsupported_entity_type (entity_type, error);
return FALSE;
}
- return tp_handles_are_valid (repos[handle_type], handles, allow_zero, error);
+ return tp_handles_are_valid (repos[entity_type], handles, allow_zero, error);
}
G_END_DECLS
diff --git a/telepathy-glib/handle.c b/telepathy-glib/handle.c
index 3f8f5964e..01ae6f09d 100644
--- a/telepathy-glib/handle.c
+++ b/telepathy-glib/handle.c
@@ -24,17 +24,17 @@
#include <telepathy-glib/handle.h>
/**
- * tp_handle_type_to_string:
- * @type: A handle type, which need not be valid
+ * tp_entity_type_to_string:
+ * @type: A entity type, which need not be valid
*
* <!---->
*
- * Returns: a human-readable string describing the handle type, e.g. "contact".
- * For invalid handle types, returns "(no handle)" for 0 or
- * "(invalid handle type)" for others.
+ * Returns: a human-readable string describing the entity type, e.g. "contact".
+ * For invalid entity types, returns "(no handle)" for 0 or
+ * "(invalid entity type)" for others.
*/
const gchar *
-tp_handle_type_to_string (TpEntityType type)
+tp_entity_type_to_string (TpEntityType type)
{
switch (type)
{
@@ -48,5 +48,5 @@ tp_handle_type_to_string (TpEntityType type)
return "self";
}
- return "(invalid handle type)";
+ return "(invalid entity type)";
}
diff --git a/telepathy-glib/handle.h b/telepathy-glib/handle.h
index 8ee4332fe..aaff539c0 100644
--- a/telepathy-glib/handle.h
+++ b/telepathy-glib/handle.h
@@ -53,46 +53,46 @@ typedef guint TpHandle;
#define TP_TYPE_HANDLE G_TYPE_UINT
/**
- * TP_UNKNOWN_HANDLE_TYPE:
+ * TP_UNKNOWN_ENTITY_TYPE:
*
- * An invalid handle type (-1 cast to TpEntityType) used to represent an
- * unknown handle type.
+ * An invalid entity type (-1 cast to TpEntityType) used to represent an
+ * unknown entity type.
*
* Since: 0.7.0
*/
-#define TP_UNKNOWN_HANDLE_TYPE ((TpEntityType) -1)
+#define TP_UNKNOWN_ENTITY_TYPE ((TpEntityType) -1)
/**
- * tp_handle_type_is_valid:
- * @type: A handle type, valid or not, to be checked
- * @error: Set if the handle type is invalid
+ * tp_entity_type_is_valid:
+ * @type: A entity type, valid or not, to be checked
+ * @error: Set if the entity type is invalid
*
- * If the given handle type is valid, return %TRUE. If not, set @error
+ * If the given entity type is valid, return %TRUE. If not, set @error
* and return %FALSE.
*
- * Returns: %TRUE if the handle type is valid.
+ * Returns: %TRUE if the entity type is valid.
*/
static inline
/* spacer so gtkdoc documents this function as though not static */
-gboolean tp_handle_type_is_valid (TpEntityType type, GError **error);
+gboolean tp_entity_type_is_valid (TpEntityType type, GError **error);
/* Must be static inline because it references TP_NUM_ENTITY_TYPES -
* if it wasn't inlined, a newer libtelepathy-glib with a larger number
- * of handle types might accept handle types that won't fit in the
+ * of entity types might accept entity types that won't fit in the
* connection manager's array of length TP_NUM_ENTITY_TYPES
*/
static inline gboolean
-tp_handle_type_is_valid (TpEntityType type, GError **error)
+tp_entity_type_is_valid (TpEntityType type, GError **error)
{
if (type > TP_ENTITY_TYPE_NONE && type < TP_NUM_ENTITY_TYPES)
return TRUE;
- tp_g_set_error_invalid_handle_type (type, error);
+ tp_g_set_error_invalid_entity_type (type, error);
return FALSE;
}
-const gchar *tp_handle_type_to_string (TpEntityType type);
+const gchar *tp_entity_type_to_string (TpEntityType type);
G_END_DECLS
diff --git a/telepathy-glib/stream-tube-channel.c b/telepathy-glib/stream-tube-channel.c
index 0e7b5ce41..fd6b428d3 100644
--- a/telepathy-glib/stream-tube-channel.c
+++ b/telepathy-glib/stream-tube-channel.c
@@ -972,13 +972,13 @@ sig_match_conn (TpStreamTubeChannel *self,
static gboolean
can_identify_contact (TpStreamTubeChannel *self)
{
- TpEntityType handle_type;
+ TpEntityType entity_type;
- tp_channel_get_handle (TP_CHANNEL (self), &handle_type);
+ tp_channel_get_handle (TP_CHANNEL (self), &entity_type);
/* With contact stream tube, it's always the same contact connecting to the
* tube */
- if (handle_type == TP_ENTITY_TYPE_CONTACT)
+ if (entity_type == TP_ENTITY_TYPE_CONTACT)
return TRUE;
/* Room stream tube, we need either the Credentials or Port access control
@@ -1074,11 +1074,11 @@ _new_remote_connection (TpChannel *channel,
ConnWaitingSig *found_conn = NULL;
SigWaitingConn *sig;
TpHandle chan_handle;
- TpEntityType handle_type;
+ TpEntityType entity_type;
gboolean rejected = FALSE;
- chan_handle = tp_channel_get_handle (channel, &handle_type);
- if (handle_type == TP_ENTITY_TYPE_CONTACT &&
+ chan_handle = tp_channel_get_handle (channel, &entity_type);
+ if (entity_type == TP_ENTITY_TYPE_CONTACT &&
handle != chan_handle)
{
DEBUG ("CM claimed that handle %u connected to the stream tube, "
diff --git a/telepathy-glib/versions/main-1.0.abi b/telepathy-glib/versions/main-1.0.abi
index 387bb7962..c9ef456ef 100644
--- a/telepathy-glib/versions/main-1.0.abi
+++ b/telepathy-glib/versions/main-1.0.abi
@@ -822,6 +822,7 @@ tp_dtmf_player_play
tp_dynamic_handle_repo_get_type
tp_dynamic_handle_repo_lookup_exact
tp_dynamic_handle_repo_set_normalize_async
+tp_entity_type_to_string
tp_error_get_dbus_name
tp_error_get_type
tp_error_quark
@@ -852,8 +853,8 @@ tp_file_transfer_channel_provide_file_finish
tp_g_hash_table_update
tp_g_ptr_array_contains
tp_g_ptr_array_extend
-tp_g_set_error_invalid_handle_type
-tp_g_set_error_unsupported_handle_type
+tp_g_set_error_invalid_entity_type
+tp_g_set_error_unsupported_entity_type
tp_g_signal_connect_object
tp_group_mixin_add_handle_owner
tp_group_mixin_add_handle_owners
@@ -913,7 +914,6 @@ tp_handle_set_size
tp_handle_set_to_array
tp_handle_set_to_identifier_map
tp_handle_set_update
-tp_handle_type_to_string
tp_handles_are_valid
tp_heap_add
tp_heap_clear
diff --git a/telepathy-logger/call-channel.c b/telepathy-logger/call-channel.c
index 3ea50f89f..8105371af 100644
--- a/telepathy-logger/call-channel.c
+++ b/telepathy-logger/call-channel.c
@@ -64,7 +64,7 @@ get_contacts (TplCallChannel *self,
GHashTable *members;
GHashTableIter iter;
TpHandle handle;
- TpEntityType handle_type;
+ TpEntityType entity_type;
gboolean is_room;
TpContact *contact;
TplEntity *entity;
@@ -81,8 +81,8 @@ get_contacts (TplCallChannel *self,
}
/* Identify target */
- handle = tp_channel_get_handle (chan, &handle_type);
- is_room = (handle_type == TP_ENTITY_TYPE_ROOM);
+ handle = tp_channel_get_handle (chan, &entity_type);
+ is_room = (entity_type == TP_ENTITY_TYPE_ROOM);
if (is_room)
{
diff --git a/tests/capabilities.c b/tests/capabilities.c
index d3d83cd6e..2ed44c191 100644
--- a/tests/capabilities.c
+++ b/tests/capabilities.c
@@ -29,11 +29,11 @@ setup (Test *test,
}
static GVariant *
-text_chat_class (TpEntityType handle_type)
+text_chat_class (TpEntityType entity_type)
{
return g_variant_new_parsed ("({%s: <%s>, %s: <%u>}, @as [])",
TP_PROP_CHANNEL_CHANNEL_TYPE, TP_IFACE_CHANNEL_TYPE_TEXT,
- TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, (guint32) handle_type);
+ TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, (guint32) entity_type);
}
static GVariant *
@@ -62,7 +62,7 @@ test_basics (Test *test,
GVariant *fixed;
const gchar **allowed;
const gchar *chan_type;
- TpEntityType handle_type;
+ TpEntityType entity_type;
gboolean valid;
caps = tp_tests_object_new_static_class (TP_TYPE_CAPABILITIES,
@@ -85,10 +85,10 @@ test_basics (Test *test,
chan_type = tp_vardict_get_string (fixed, TP_PROP_CHANNEL_CHANNEL_TYPE);
g_assert_cmpstr (chan_type, ==, TP_IFACE_CHANNEL_TYPE_TEXT);
- handle_type = tp_vardict_get_uint32 (fixed,
+ entity_type = tp_vardict_get_uint32 (fixed,
TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid);
g_assert (valid);
- g_assert_cmpuint (handle_type, ==, TP_ENTITY_TYPE_CONTACT);
+ g_assert_cmpuint (entity_type, ==, TP_ENTITY_TYPE_CONTACT);
g_assert_cmpuint (g_strv_length ((GStrv) allowed), ==, 0);
@@ -103,10 +103,10 @@ test_basics (Test *test,
chan_type = tp_vardict_get_string (fixed, TP_PROP_CHANNEL_CHANNEL_TYPE);
g_assert_cmpstr (chan_type, ==, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1);
- handle_type = tp_vardict_get_uint32 (fixed,
+ entity_type = tp_vardict_get_uint32 (fixed,
TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid);
g_assert (valid);
- g_assert_cmpuint (handle_type, ==, TP_ENTITY_TYPE_CONTACT);
+ g_assert_cmpuint (entity_type, ==, TP_ENTITY_TYPE_CONTACT);
g_assert_cmpuint (g_strv_length ((GStrv) allowed), ==, 2);
g_assert (tp_strv_contains ((const gchar * const * ) allowed,
@@ -190,7 +190,7 @@ test_supports (Test *test,
}
static GVariant *
-stream_tube_class (TpEntityType handle_type,
+stream_tube_class (TpEntityType entity_type,
const gchar *service)
{
GVariantBuilder fixed;
@@ -199,7 +199,7 @@ stream_tube_class (TpEntityType handle_type,
g_variant_builder_add (&fixed, "{sv}", TP_PROP_CHANNEL_CHANNEL_TYPE,
g_variant_new_string (TP_IFACE_CHANNEL_TYPE_STREAM_TUBE1));
g_variant_builder_add (&fixed, "{sv}", TP_PROP_CHANNEL_TARGET_ENTITY_TYPE,
- g_variant_new_uint32 (handle_type));
+ g_variant_new_uint32 (entity_type));
if (service != NULL)
{
@@ -213,7 +213,7 @@ stream_tube_class (TpEntityType handle_type,
}
static GVariant *
-dbus_tube_class (TpEntityType handle_type,
+dbus_tube_class (TpEntityType entity_type,
const gchar *service_name,
gboolean add_extra_fixed)
{
@@ -223,7 +223,7 @@ dbus_tube_class (TpEntityType handle_type,
g_variant_builder_add (&fixed, "{sv}", TP_PROP_CHANNEL_CHANNEL_TYPE,
g_variant_new_string (TP_IFACE_CHANNEL_TYPE_DBUS_TUBE1));
g_variant_builder_add (&fixed, "{sv}", TP_PROP_CHANNEL_TARGET_ENTITY_TYPE,
- g_variant_new_uint32 (handle_type));
+ g_variant_new_uint32 (entity_type));
if (service_name != NULL)
{
@@ -651,7 +651,7 @@ test_supports_sms (Test *test,
}
static GVariant *
-call_class (TpEntityType handle_type,
+call_class (TpEntityType entity_type,
gboolean initial_audio,
gboolean initial_video,
gboolean use_allowed,
@@ -665,7 +665,7 @@ call_class (TpEntityType handle_type,
g_variant_builder_add (&fixed, "{sv}", TP_PROP_CHANNEL_CHANNEL_TYPE,
g_variant_new_string (TP_IFACE_CHANNEL_TYPE_CALL1));
g_variant_builder_add (&fixed, "{sv}", TP_PROP_CHANNEL_TARGET_ENTITY_TYPE,
- g_variant_new_uint32 (handle_type));
+ g_variant_new_uint32 (entity_type));
allowed = g_ptr_array_new ();
@@ -890,7 +890,7 @@ test_classes_variant (Test *test,
TpCapabilities *caps;
GVariant *v, *v2, *class, *fixed, *allowed;
const gchar *chan_type;
- guint32 handle_type;
+ guint32 entity_type;
const gchar **strv;
/* TpCapabilities containing the text chats and ft caps */
@@ -923,8 +923,8 @@ test_classes_variant (Test *test,
g_assert_cmpstr (chan_type, ==, TP_IFACE_CHANNEL_TYPE_TEXT);
g_assert (g_variant_lookup (fixed,
- TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, "u", &handle_type));
- g_assert_cmpuint (handle_type, ==, TP_ENTITY_TYPE_CONTACT);
+ TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, "u", &entity_type));
+ g_assert_cmpuint (entity_type, ==, TP_ENTITY_TYPE_CONTACT);
g_assert_cmpuint (g_variant_n_children (allowed), ==, 0);
@@ -947,8 +947,8 @@ test_classes_variant (Test *test,
g_assert_cmpstr (chan_type, ==, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER1);
g_assert (g_variant_lookup (fixed,
- TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, "u", &handle_type));
- g_assert_cmpuint (handle_type, ==, TP_ENTITY_TYPE_CONTACT);
+ TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, "u", &entity_type));
+ g_assert_cmpuint (entity_type, ==, TP_ENTITY_TYPE_CONTACT);
g_assert_cmpuint (g_variant_n_children (allowed), ==, 2);
strv = g_variant_get_strv (allowed, NULL);
diff --git a/tests/channel-filter.c b/tests/channel-filter.c
index 3ca4b2d55..87574d342 100644
--- a/tests/channel-filter.c
+++ b/tests/channel-filter.c
@@ -41,7 +41,7 @@ test_basics (Fixture *f,
g_assert_cmpstr (tp_asv_get_string (asv,
TP_PROP_CHANNEL_CHANNEL_TYPE), ==, TP_IFACE_CHANNEL_TYPE_TEXT);
g_assert_cmpuint (tp_asv_get_uint32 (asv,
- TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, &valid),
+ TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid),
==, TP_ENTITY_TYPE_CONTACT);
g_assert (valid);
g_clear_object (&f->filter);
@@ -52,21 +52,21 @@ test_basics (Fixture *f,
g_assert_cmpstr (tp_asv_get_string (asv,
TP_PROP_CHANNEL_CHANNEL_TYPE), ==, TP_IFACE_CHANNEL_TYPE_TEXT);
g_assert_cmpuint (tp_asv_get_uint32 (asv,
- TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, &valid),
+ TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid),
==, TP_ENTITY_TYPE_ROOM);
g_assert (valid);
g_clear_object (&f->filter);
- for (i = 0; i < G_N_ELEMENTS (call_handle_types); i++)
+ for (i = 0; i < G_N_ELEMENTS (call_entity_types); i++)
{
- f->filter = tp_channel_filter_new_for_calls (call_handle_types[i]);
+ f->filter = tp_channel_filter_new_for_calls (call_entity_types[i]);
asv = _tp_channel_filter_use (f->filter);
g_assert_cmpuint (tp_asv_size (asv), ==, 2);
g_assert_cmpstr (tp_asv_get_string (asv,
TP_PROP_CHANNEL_CHANNEL_TYPE), ==, TP_IFACE_CHANNEL_TYPE_CALL);
g_assert_cmpuint (tp_asv_get_uint32 (asv,
- TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, &valid),
- ==, call_handle_types[i]);
+ TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid),
+ ==, call_entity_types[i]);
g_assert (valid);
g_clear_object (&f->filter);
}
@@ -95,7 +95,7 @@ test_basics (Fixture *f,
g_assert_cmpstr (tp_asv_get_string (asv,
TP_PROP_CHANNEL_CHANNEL_TYPE), ==, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER);
g_assert_cmpuint (tp_asv_get_uint32 (asv,
- TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, &valid),
+ TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid),
==, TP_ENTITY_TYPE_CONTACT);
g_assert (valid);
g_clear_object (&f->filter);
@@ -110,7 +110,7 @@ test_basics (Fixture *f,
TP_PROP_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA_SERVICE_NAME), ==,
"com.example.AbiWord");
g_assert_cmpuint (tp_asv_get_uint32 (asv,
- TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, &valid),
+ TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid),
==, TP_ENTITY_TYPE_CONTACT);
g_assert (valid);
g_clear_object (&f->filter);
@@ -120,7 +120,7 @@ test_basics (Fixture *f,
asv = _tp_channel_filter_use (f->filter);
g_assert_cmpuint (tp_asv_size (asv), ==, 1);
g_assert_cmpuint (tp_asv_get_uint32 (asv,
- TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, &valid),
+ TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid),
==, TP_ENTITY_TYPE_CONTACT);
g_assert (valid);
g_clear_object (&f->filter);
@@ -130,7 +130,7 @@ test_basics (Fixture *f,
asv = _tp_channel_filter_use (f->filter);
g_assert_cmpuint (tp_asv_size (asv), ==, 1);
g_assert_cmpuint (tp_asv_get_uint32 (asv,
- TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, &valid),
+ TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid),
==, TP_ENTITY_TYPE_ROOM);
g_assert (valid);
g_clear_object (&f->filter);
@@ -140,7 +140,7 @@ test_basics (Fixture *f,
asv = _tp_channel_filter_use (f->filter);
g_assert_cmpuint (tp_asv_size (asv), ==, 1);
g_assert_cmpuint (tp_asv_get_uint32 (asv,
- TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, &valid),
+ TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid),
==, TP_ENTITY_TYPE_NONE);
g_assert (valid);
g_clear_object (&f->filter);
@@ -150,7 +150,7 @@ test_basics (Fixture *f,
asv = _tp_channel_filter_use (f->filter);
g_assert_cmpuint (tp_asv_size (asv), ==, 1);
g_assert_cmpuint (tp_asv_get_uint32 (asv,
- TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, &valid),
+ TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, &valid),
==, TP_ENTITY_TYPE_ROOM);
g_assert (valid);
g_clear_object (&f->filter);
diff --git a/tests/dbus/account-channel-request.c b/tests/dbus/account-channel-request.c
index 953500328..5034ee8d1 100644
--- a/tests/dbus/account-channel-request.c
+++ b/tests/dbus/account-channel-request.c
@@ -1086,7 +1086,7 @@ test_observe_cancel_after_create (Test *test,
/* Check if TargetHandleType: TP_ENTITY_TYPE_NONE is automatically added if no
* target has been specified by the user. */
static void
-test_no_handle_type (Test *test,
+test_no_entity_type (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
TpAccountChannelRequest *req;
@@ -1253,8 +1253,8 @@ main (int argc,
setup, test_stream_tube_props, teardown);
g_test_add ("/account-channels/test-dbus-tube-props", Test, NULL,
setup, test_dbus_tube_props, teardown);
- g_test_add ("/account-channels/test-no-handle-type", Test, NULL,
- setup, test_no_handle_type, teardown);
+ g_test_add ("/account-channels/test-no-entity-type", Test, NULL,
+ setup, test_no_entity_type, teardown);
g_test_add ("/account-channels/test-initial-invitees", Test, NULL,
setup, test_initial_invitees, teardown);
diff --git a/tests/dbus/channel-introspect.c b/tests/dbus/channel-introspect.c
index 1cda337d0..72d3652d7 100644
--- a/tests/dbus/channel-introspect.c
+++ b/tests/dbus/channel-introspect.c
@@ -184,7 +184,7 @@ main (int argc,
tp_tests_proxy_run_until_dbus_queue_processed (conn);
chan = tp_tests_channel_new (conn, props_chan_path, NULL,
- TP_UNKNOWN_HANDLE_TYPE, 0, &error);
+ TP_UNKNOWN_ENTITY_TYPE, 0, &error);
g_assert_no_error (error);
prepare_result = NULL;
@@ -307,7 +307,7 @@ main (int argc,
bad_chan_path = g_strdup_printf ("%s/Does/Not/Actually/Exist",
tp_proxy_get_object_path (conn));
chan = tp_tests_channel_new (conn, bad_chan_path, NULL,
- TP_UNKNOWN_HANDLE_TYPE, 0, &error);
+ TP_UNKNOWN_ENTITY_TYPE, 0, &error);
g_assert_no_error (error);
tp_tests_proxy_run_until_prepared_or_failed (chan, NULL, &error);
@@ -374,7 +374,7 @@ main (int argc,
g_message ("Channel already dead");
chan = tp_tests_channel_new (conn, props_chan_path, NULL,
- TP_UNKNOWN_HANDLE_TYPE, 0, &error);
+ TP_UNKNOWN_ENTITY_TYPE, 0, &error);
g_assert_no_error (error);
prepare_result = NULL;
diff --git a/tests/dbus/cli-group.c b/tests/dbus/cli-group.c
index 4a199e26c..2c4b89ed5 100644
--- a/tests/dbus/cli-group.c
+++ b/tests/dbus/cli-group.c
@@ -171,7 +171,7 @@ run_membership_test (void)
"connection", service_conn,
"object-path", chan_path,
NULL));
- chan = tp_tests_channel_new (conn, chan_path, NULL, TP_UNKNOWN_HANDLE_TYPE, 0,
+ chan = tp_tests_channel_new (conn, chan_path, NULL, TP_UNKNOWN_ENTITY_TYPE, 0,
&error);
g_assert_no_error (error);
@@ -256,7 +256,7 @@ check_removed_unknown_error_in_invalidated (void)
"connection", service_conn,
"object-path", chan_path,
NULL));
- chan = tp_tests_channel_new (conn, chan_path, NULL, TP_UNKNOWN_HANDLE_TYPE, 0,
+ chan = tp_tests_channel_new (conn, chan_path, NULL, TP_UNKNOWN_ENTITY_TYPE, 0,
&error);
g_assert_no_error (error);
@@ -348,7 +348,7 @@ check_removed_known_error_in_invalidated (void)
"connection", service_conn,
"object-path", chan_path,
NULL));
- chan = tp_tests_channel_new (conn, chan_path, NULL, TP_UNKNOWN_HANDLE_TYPE, 0,
+ chan = tp_tests_channel_new (conn, chan_path, NULL, TP_UNKNOWN_ENTITY_TYPE, 0,
&error);
g_assert_no_error (error);
diff --git a/tests/dbus/contacts.c b/tests/dbus/contacts.c
index 716e43e1b..ab48cd291 100644
--- a/tests/dbus/contacts.c
+++ b/tests/dbus/contacts.c
@@ -804,7 +804,7 @@ free_rcc_list (GPtrArray *rccs)
static void
add_text_chat_class (GPtrArray *classes,
- TpEntityType handle_type)
+ TpEntityType entity_type)
{
GHashTable *fixed;
const gchar * const allowed[] = { NULL };
@@ -814,7 +814,7 @@ add_text_chat_class (GPtrArray *classes,
TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
TP_IFACE_CHANNEL_TYPE_TEXT,
TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, G_TYPE_UINT,
- handle_type,
+ entity_type,
NULL);
arr = tp_value_array_build (2,
diff --git a/tests/dbus/group-mixin.c b/tests/dbus/group-mixin.c
index 9c110816d..77c064338 100644
--- a/tests/dbus/group-mixin.c
+++ b/tests/dbus/group-mixin.c
@@ -561,7 +561,7 @@ test (Fixture *f,
MYASSERT (tp_cli_connection_run_connect (conn, -1, &error, NULL), "");
g_assert_no_error (error);
- chan = tp_tests_channel_new (conn, chan_path, NULL, TP_UNKNOWN_HANDLE_TYPE, 0,
+ chan = tp_tests_channel_new (conn, chan_path, NULL, TP_UNKNOWN_ENTITY_TYPE, 0,
&error);
g_assert_no_error (error);
diff --git a/tests/dbus/handle-repo.c b/tests/dbus/handle-repo.c
index 19e38715c..8789a6092 100644
--- a/tests/dbus/handle-repo.c
+++ b/tests/dbus/handle-repo.c
@@ -28,7 +28,7 @@ test_handles (Fixture *f,
const gchar *return_jid;
tp_repo = tp_tests_object_new_static_class (TP_TYPE_DYNAMIC_HANDLE_REPO,
- "handle-type", TP_ENTITY_TYPE_CONTACT,
+ "entity-type", TP_ENTITY_TYPE_CONTACT,
NULL);
g_assert (tp_repo != NULL);
diff --git a/tests/dbus/handle-set.c b/tests/dbus/handle-set.c
index 4aa98c807..b2d4c6d97 100644
--- a/tests/dbus/handle-set.c
+++ b/tests/dbus/handle-set.c
@@ -44,7 +44,7 @@ test (Fixture *f,
g_test_dbus_up (test_dbus);
repo = tp_tests_object_new_static_class (TP_TYPE_DYNAMIC_HANDLE_REPO,
- "handle-type", TP_ENTITY_TYPE_CONTACT,
+ "entity-type", TP_ENTITY_TYPE_CONTACT,
NULL);
MYASSERT (repo != NULL, "");
diff --git a/tests/lib/util.c b/tests/lib/util.c
index a0d2ee4cc..1acf12251 100644
--- a/tests/lib/util.c
+++ b/tests/lib/util.c
@@ -663,7 +663,7 @@ TpChannel *
tp_tests_channel_new (TpConnection *conn,
const gchar *object_path,
const gchar *optional_channel_type,
- TpEntityType optional_handle_type,
+ TpEntityType optional_entity_type,
TpHandle optional_handle,
GError **error)
{
@@ -677,10 +677,10 @@ tp_tests_channel_new (TpConnection *conn,
tp_asv_set_string (asv,
TP_PROP_CHANNEL_CHANNEL_TYPE, optional_channel_type);
}
- if (optional_handle_type != TP_ENTITY_TYPE_NONE)
+ if (optional_entity_type != TP_ENTITY_TYPE_NONE)
{
tp_asv_set_uint32 (asv,
- TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, optional_handle_type);
+ TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, optional_entity_type);
}
if (optional_handle != 0)
{
diff --git a/tests/lib/util.h b/tests/lib/util.h
index d523e703b..725a59e6d 100644
--- a/tests/lib/util.h
+++ b/tests/lib/util.h
@@ -97,7 +97,7 @@ TpAccount *tp_tests_account_new (GDBusConnection *dbus,
TpChannel *tp_tests_channel_new (TpConnection *conn,
const gchar *object_path,
const gchar *optional_channel_type,
- TpEntityType optional_handle_type,
+ TpEntityType optional_entity_type,
TpHandle optional_handle,
GError **error);