From 6baa6fadf67a50048b5c9bdcc0dc8d84227e2693 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 4 Oct 2013 14:45:22 +0200 Subject: [PATCH 3/4] s/NUM_TP/TP_NUM --- src/connection.c | 2 +- src/connection.h | 2 +- src/ft-channel.c | 4 ++-- src/ft-manager.c | 2 +- src/message-util.c | 2 +- src/server-sasl-channel.c | 2 +- src/tls-certificate.c | 2 +- src/tube-stream.c | 4 ++-- tests/test-handles.c | 6 +++--- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/connection.c b/src/connection.c index 2917bc2..4f1078b 100644 --- a/src/connection.c +++ b/src/connection.c @@ -852,7 +852,7 @@ gabble_connection_get_unique_name (TpBaseConnection *self) */ void _gabble_connection_create_handle_repos (TpBaseConnection *conn, - TpHandleRepoIface *repos[NUM_TP_HANDLE_TYPES]) + TpHandleRepoIface *repos[TP_NUM_HANDLE_TYPES]) { repos[TP_HANDLE_TYPE_CONTACT] = tp_dynamic_handle_repo_new (TP_HANDLE_TYPE_CONTACT, diff --git a/src/connection.h b/src/connection.h index 653ec6a..c925155 100644 --- a/src/connection.h +++ b/src/connection.h @@ -310,7 +310,7 @@ const gchar **gabble_connection_get_guaranteed_interfaces (void); /* extern only for the benefit of the unit tests */ void _gabble_connection_create_handle_repos (TpBaseConnection *conn, - TpHandleRepoIface *repos[NUM_TP_HANDLE_TYPES]); + TpHandleRepoIface *repos[TP_NUM_HANDLE_TYPES]); /* For unit tests only */ void gabble_connection_set_disco_reply_timeout (guint timeout); diff --git a/src/ft-channel.c b/src/ft-channel.c index fd82405..91af493 100644 --- a/src/ft-channel.c +++ b/src/ft-channel.c @@ -633,7 +633,7 @@ gabble_file_transfer_channel_class_init ( "TpFileTransferState state", "State of the file transfer in this channel", 0, - NUM_TP_FILE_TRANSFER_STATES, + TP_NUM_FILE_TRANSFER_STATES, TP_FILE_TRANSFER_STATE_NONE, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); @@ -674,7 +674,7 @@ gabble_file_transfer_channel_class_init ( "TpFileHashType content-hash-type", "Hash type", 0, - NUM_TP_FILE_HASH_TYPES, + TP_NUM_FILE_HASH_TYPES, TP_FILE_HASH_TYPE_NONE, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); diff --git a/src/ft-manager.c b/src/ft-manager.c index 675992a..cca26d4 100644 --- a/src/ft-manager.c +++ b/src/ft-manager.c @@ -521,7 +521,7 @@ gabble_ft_manager_handle_request (TpChannelManager *manager, } else { - if (content_hash_type >= NUM_TP_FILE_HASH_TYPES) + if (content_hash_type >= TP_NUM_FILE_HASH_TYPES) { g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "%u is not a valid ContentHashType", content_hash_type); diff --git a/src/message-util.c b/src/message-util.c index 01bb717..6b80708 100644 --- a/src/message-util.c +++ b/src/message-util.c @@ -118,7 +118,7 @@ gabble_message_util_build_stanza (TpMessage *message, if (!result) RETURN_INVALID_ARGUMENT ("message-type must be a 32-bit unsigned integer"); - if (type >= NUM_TP_CHANNEL_TEXT_MESSAGE_TYPES) + if (type >= TP_NUM_CHANNEL_TEXT_MESSAGE_TYPES) RETURN_INVALID_ARGUMENT ("invalid message type: %u", type); n_parts = tp_message_count_parts (message); diff --git a/src/server-sasl-channel.c b/src/server-sasl-channel.c index 3eb4f66..9ff8505 100644 --- a/src/server-sasl-channel.c +++ b/src/server-sasl-channel.c @@ -382,7 +382,7 @@ gabble_server_sasl_channel_class_init (GabbleServerSaslChannelClass *klass) param_spec = g_param_spec_uint ("sasl-status", "SASLStatus", "Status of this channel", - 0, NUM_TP_SASL_STATUSES, 0, + 0, TP_NUM_SASL_STATUSES, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_SASL_STATUS, param_spec); diff --git a/src/tls-certificate.c b/src/tls-certificate.c index 303b706..c00bac7 100644 --- a/src/tls-certificate.c +++ b/src/tls-certificate.c @@ -216,7 +216,7 @@ gabble_tls_certificate_class_init (GabbleTLSCertificateClass *klass) pspec = g_param_spec_uint ("state", "State of this certificate", "The state of this TLS certificate.", - 0, NUM_TP_TLS_CERTIFICATE_STATES - 1, + 0, TP_NUM_TLS_CERTIFICATE_STATES - 1, TP_TLS_CERTIFICATE_STATE_PENDING, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); g_object_class_install_property (oclass, PROP_STATE, pspec); diff --git a/src/tube-stream.c b/src/tube-stream.c index e1d2289..8bce156 100644 --- a/src/tube-stream.c +++ b/src/tube-stream.c @@ -1483,7 +1483,7 @@ gabble_tube_stream_class_init (GabbleTubeStreamClass *gabble_tube_stream_class) "address type", "a TpSocketAddressType representing the type of the listening" "address of the local service", - 0, NUM_TP_SOCKET_ADDRESS_TYPES - 1, + 0, TP_NUM_SOCKET_ADDRESS_TYPES - 1, TP_SOCKET_ADDRESS_TYPE_UNIX, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_ADDRESS_TYPE, @@ -1502,7 +1502,7 @@ gabble_tube_stream_class_init (GabbleTubeStreamClass *gabble_tube_stream_class) "access control", "a TpSocketAccessControl representing the access control " "the local service applies to the local socket", - 0, NUM_TP_SOCKET_ACCESS_CONTROLS - 1, + 0, TP_NUM_SOCKET_ACCESS_CONTROLS - 1, TP_SOCKET_ACCESS_CONTROL_LOCALHOST, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_ACCESS_CONTROL, diff --git a/tests/test-handles.c b/tests/test-handles.c index a0d60be..ebc4c39 100644 --- a/tests/test-handles.c +++ b/tests/test-handles.c @@ -12,7 +12,7 @@ static void test_handles (guint handle_type) { - TpHandleRepoIface *repos[NUM_TP_HANDLE_TYPES]; + TpHandleRepoIface *repos[TP_NUM_HANDLE_TYPES]; TpHandleRepoIface *tp_repo = NULL; GError *error = NULL; guint i; @@ -21,7 +21,7 @@ test_handles (guint handle_type) const gchar *jid = "handle.test@foobar"; const gchar *return_jid; - for (i = 0; i < NUM_TP_HANDLE_TYPES; i++) + for (i = 0; i < TP_NUM_HANDLE_TYPES; i++) { repos[i] = NULL; } @@ -64,7 +64,7 @@ test_handles (guint handle_type) return_jid = tp_handle_inspect (tp_repo, handle); g_assert (!strcmp (return_jid, jid)); - for (i = 0; i < NUM_TP_HANDLE_TYPES; i++) + for (i = 0; i < TP_NUM_HANDLE_TYPES; i++) { if (repos[i]) g_object_unref ((GObject *) repos[i]); -- 1.8.3.1