summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-05-03 15:29:50 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-05-03 15:29:50 +0100
commitbbb1e365bf8c2c79f1bd9dc4ef972e938502abf3 (patch)
tree15fdda7e8fe4eac11b4dfb8ecebeab8dc76dee16
parent3375a1c2fd5fb72935f4576c532f73f698dbbedc (diff)
parentaf9588a71c845d529d5285682240e69fdbd6c9dd (diff)
Merge branch 'next-remove-deprecated' into next
Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
-rw-r--r--docs/reference/telepathy-glib-sections.txt11
-rw-r--r--telepathy-glib/account-manager.c58
-rw-r--r--telepathy-glib/account-manager.h6
-rw-r--r--telepathy-glib/channel-dispatch-operation.c88
-rw-r--r--telepathy-glib/channel-dispatch-operation.h10
-rw-r--r--telepathy-glib/channel-group.c7
-rw-r--r--telepathy-glib/connection.c59
-rw-r--r--telepathy-glib/connection.h5
-rw-r--r--telepathy-glib/errors.h1
-rw-r--r--telepathy-glib/intset.c169
-rw-r--r--telepathy-glib/intset.h36
-rw-r--r--tests/dbus/account-manager.c19
-rw-r--r--tests/dbus/call-channel.c3
-rw-r--r--tests/dbus/channel-dispatch-operation.c35
-rw-r--r--tests/dbus/connection.c4
-rw-r--r--tests/dbus/contacts.c5
-rw-r--r--tests/dbus/message-mixin.c6
-rw-r--r--tests/dbus/self-handle.c36
-rw-r--r--tests/dbus/simple-approver.c7
-rw-r--r--tests/intset.c24
20 files changed, 44 insertions, 545 deletions
diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index fbc478c2e..e3de0530a 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -1840,11 +1840,6 @@ tp_intset_dump
TpIntsetFastIter
tp_intset_fast_iter_init
tp_intset_fast_iter_next
-TP_INTSET_ITER_INIT
-TpIntsetIter
-tp_intset_iter_init
-tp_intset_iter_next
-tp_intset_iter_reset
<SUBSECTION Standard>
tp_intset_get_type
<SUBSECTION Private>
@@ -2036,8 +2031,6 @@ TP_ERROR_STR_CAPTCHA_NOT_SUPPORTED
<SUBSECTION Standard>
tp_error_get_type
tp_error_quark
-<SUBSECTION Private>
-TP_ERRORS
</SECTION>
<SECTION>
@@ -3275,7 +3268,6 @@ tp_connection_get_status
tp_connection_get_connection_manager_name
tp_connection_get_protocol_name
tp_connection_get_self_contact
-tp_connection_get_self_handle
TpConnectionRequestHandlesCb
tp_connection_request_handles
tp_connection_init_known_interfaces
@@ -4097,7 +4089,6 @@ tp_account_manager_set_default
tp_account_manager_dup
tp_account_manager_create_account_async
tp_account_manager_create_account_finish
-tp_account_manager_ensure_account
tp_account_manager_get_usable_accounts
tp_account_manager_get_most_available_presence
tp_account_manager_set_all_requested_presences
@@ -4268,8 +4259,6 @@ tp_channel_dispatch_operation_handle_with_async
tp_channel_dispatch_operation_handle_with_finish
tp_channel_dispatch_operation_handle_with_time_async
tp_channel_dispatch_operation_handle_with_time_finish
-tp_channel_dispatch_operation_claim_async
-tp_channel_dispatch_operation_claim_finish
tp_channel_dispatch_operation_claim_with_async
tp_channel_dispatch_operation_claim_with_finish
tp_channel_dispatch_operation_close_channels_async
diff --git a/telepathy-glib/account-manager.c b/telepathy-glib/account-manager.c
index c1cc87ae9..a2c3899bc 100644
--- a/telepathy-glib/account-manager.c
+++ b/telepathy-glib/account-manager.c
@@ -1006,64 +1006,6 @@ insert_account (TpAccountManager *self,
}
/**
- * tp_account_manager_ensure_account:
- * @manager: a #TpAccountManager
- * @path: the object path for an account
- *
- * Lookup an account in the account manager @manager. If the desired account
- * has already been ensured then the same object will be returned, otherwise
- * it will create a new #TpAccount and add it to @manager. As a result, if
- * @manager thinks that the account doesn't exist, this will still add it to
- * @manager to avoid races. Note that the returned #TpAccount is not guaranteed
- * to be ready on return.
- *
- * The caller must keep a ref to the returned object using g_object_ref() if
- * it is to be kept.
- *
- * Returns: (transfer none): a new #TpAccount at @path, or %NULL if @path is
- * not a valid account path.
- *
- * Since: 0.9.0
- * Deprecated: New code should use tp_client_factory_ensure_account()
- * instead.
- */
-TpAccount *
-tp_account_manager_ensure_account (TpAccountManager *self,
- const gchar *path)
-{
- TpAccount *account;
- GError *error = NULL;
-
- g_return_val_if_fail (TP_IS_ACCOUNT_MANAGER (self), NULL);
- g_return_val_if_fail (path != NULL, NULL);
-
- account = g_hash_table_lookup (self->priv->legacy_accounts, path);
- if (account != NULL)
- return account;
-
- account = tp_client_factory_ensure_account (
- tp_proxy_get_factory (self), path, NULL, &error);
- if (account == NULL)
- {
- DEBUG ("failed to create account: %s", error->message);
- g_clear_error (&error);
- return NULL;
- }
-
- /* We don't want to insert in self->priv->accounts random accounts we
- * don't even know if they are usable. For compatibility we can't return a ref,
- * so keep them into a legacy table */
- g_hash_table_insert (self->priv->legacy_accounts, g_strdup (path),
- account);
- tp_g_signal_connect_object (account, "invalidated",
- G_CALLBACK (legacy_account_invalidated_cb), self, 0);
-
- tp_proxy_prepare_async (account, NULL, NULL, NULL);
-
- return account;
-}
-
-/**
* tp_account_manager_get_usable_accounts:
* @manager: a #TpAccountManager
*
diff --git a/telepathy-glib/account-manager.h b/telepathy-glib/account-manager.h
index 1b5b83030..4c43de946 100644
--- a/telepathy-glib/account-manager.h
+++ b/telepathy-glib/account-manager.h
@@ -82,12 +82,6 @@ TpAccountManager *tp_account_manager_dup (void) G_GNUC_WARN_UNUSED_RESULT;
void tp_account_manager_init_known_interfaces (void);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_16_FOR (tp_client_factory_ensure_account)
-TpAccount *tp_account_manager_ensure_account (TpAccountManager *manager,
- const gchar *path);
-#endif
-
GList *tp_account_manager_get_usable_accounts (TpAccountManager *manager)
G_GNUC_WARN_UNUSED_RESULT;
diff --git a/telepathy-glib/channel-dispatch-operation.c b/telepathy-glib/channel-dispatch-operation.c
index e261c2462..1d6799c3a 100644
--- a/telepathy-glib/channel-dispatch-operation.c
+++ b/telepathy-glib/channel-dispatch-operation.c
@@ -71,7 +71,7 @@
*
* If the user wishes to reject the communication channels, or if the user
* accepts the channels and the approver will handle them itself, the approver
- * should call tp_cli_channel_dispatch_operation_call_claim(). If this method
+ * should call tp_channel_dispatch_operation_claim_with_async(). If this method
* succeeds, the approver immediately has control over the channels as their
* primary handler, and may do anything with them (in particular, it may close
* them in whatever way seems most appropriate).
@@ -1104,7 +1104,7 @@ handle_with_cb (TpChannelDispatchOperation *self,
* invoked as the handler.
*
* Approvers which are also channel handlers SHOULD use
- * tp_channel_dispatch_operation_claim_async() instead
+ * tp_channel_dispatch_operation_claim_with_async() instead
* of tp_channel_dispatch_operation_handle_with_async() to request
* that they can handle a channel bundle themselves.
*
@@ -1151,87 +1151,6 @@ tp_channel_dispatch_operation_handle_with_finish (
tp_channel_dispatch_operation_handle_with_async);
}
-static void
-claim_cb (TpChannelDispatchOperation *self,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- GSimpleAsyncResult *result = user_data;
-
- if (error != NULL)
- {
- DEBUG ("Claim failed: %s", error->message);
- g_simple_async_result_set_from_error (result, error);
- }
-
- g_simple_async_result_complete (result);
- g_object_unref (result);
-}
-
-/**
- * tp_channel_dispatch_operation_claim_async:
- * @self: a #TpChannelDispatchOperation
- * @callback: a callback to call when the call returns
- * @user_data: data to pass to @callback
- *
- * Called by an approver to claim channels for handling internally.
- * If this method is called successfully, the process calling this
- * method becomes the handler for the channel.
- *
- * If successful, this method will cause the #TpProxy::invalidated signal
- * to be emitted, in the same way as for
- * tp_channel_dispatch_operation_handle_with_async().
- *
- * This method may fail because the dispatch operation has already
- * been completed. Again, see tp_channel_dispatch_operation_handle_with_async()
- * for more details. The approver MUST NOT attempt to interact with
- * the channels further in this case.
- *
- * Since: 0.11.5
- * Deprecated: since 0.15.0. Use
- * tp_channel_dispatch_operation_claim_with_async()
- */
-void
-tp_channel_dispatch_operation_claim_async (
- TpChannelDispatchOperation *self,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- GSimpleAsyncResult *result;
-
- g_return_if_fail (TP_IS_CHANNEL_DISPATCH_OPERATION (self));
-
- result = g_simple_async_result_new (G_OBJECT (self),
- callback, user_data, tp_channel_dispatch_operation_claim_async);
-
- tp_cli_channel_dispatch_operation_call_claim (self, -1,
- claim_cb, result, NULL, G_OBJECT (self));
-}
-
-/**
- * tp_channel_dispatch_operation_claim_finish:
- * @self: a #TpChannelDispatchOperation
- * @result: a #GAsyncResult
- * @error: a #GError to fill
- *
- * Finishes an async call to Claim().
- *
- * Returns: %TRUE if the Claim() call was successful, otherwise %FALSE
- *
- * Since: 0.11.5
- * Deprecated: since 0.15.0. Use
- * tp_channel_dispatch_operation_claim_with_finish()
- */
-gboolean
-tp_channel_dispatch_operation_claim_finish (
- TpChannelDispatchOperation *self,
- GAsyncResult *result,
- GError **error)
-{
- _tp_implement_finish_void (self, tp_channel_dispatch_operation_claim_async);
-}
-
/* FIXME: This is temporary solution to share TpChannel objects until
* TpClientFactory can be used for that */
void
@@ -1361,9 +1280,6 @@ claim_with_cb (TpChannelDispatchOperation *self,
* for more details. The approver MUST NOT attempt to interact with
* the channels further in this case.
*
- * This is an improved version of tp_channel_dispatch_operation_claim_async()
- * as it tells @client about the new channels being handled.
- *
* %TP_CHANNEL_DISPATCH_OPERATION_FEATURE_CORE feature must be prepared before
* calling this function.
*
diff --git a/telepathy-glib/channel-dispatch-operation.h b/telepathy-glib/channel-dispatch-operation.h
index 2ccf8dfaa..fe8c38d37 100644
--- a/telepathy-glib/channel-dispatch-operation.h
+++ b/telepathy-glib/channel-dispatch-operation.h
@@ -109,16 +109,6 @@ gboolean tp_channel_dispatch_operation_handle_with_finish (
GAsyncResult *result,
GError **error);
-void tp_channel_dispatch_operation_claim_async (
- TpChannelDispatchOperation *self,
- GAsyncReadyCallback callback,
- gpointer user_data);
-
-gboolean tp_channel_dispatch_operation_claim_finish (
- TpChannelDispatchOperation *self,
- GAsyncResult *result,
- GError **error);
-
void tp_channel_dispatch_operation_handle_with_time_async (
TpChannelDispatchOperation *self,
const gchar *handler,
diff --git a/telepathy-glib/channel-group.c b/telepathy-glib/channel-group.c
index b9d703727..5264d2ef7 100644
--- a/telepathy-glib/channel-group.c
+++ b/telepathy-glib/channel-group.c
@@ -25,6 +25,7 @@
#include <telepathy-glib/cli-channel.h>
#include <telepathy-glib/cli-misc.h>
+#include <telepathy-glib/contact.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
@@ -635,7 +636,8 @@ _tp_channel_group_improve_remove_error (TpChannel *self,
{
case TP_CHANNEL_GROUP_CHANGE_REASON_NONE:
if (actor == self->priv->group_self_handle ||
- actor == tp_connection_get_self_handle (self->priv->connection))
+ actor == tp_contact_get_handle (
+ tp_connection_get_self_contact (self->priv->connection)))
{
error->code = TP_ERROR_CANCELLED;
}
@@ -825,7 +827,8 @@ handle_members_changed (TpChannel *self,
tp_intset_remove (self->priv->group_remote_pending, handle);
if (handle == self->priv->group_self_handle ||
- handle == tp_connection_get_self_handle (self->priv->connection))
+ handle == tp_contact_get_handle (tp_connection_get_self_contact (
+ self->priv->connection)))
{
const gchar *error_detail = tp_asv_get_string (details, "error");
const gchar *debug_message = tp_asv_get_string (details,
diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c
index a13d9a097..73beab8ab 100644
--- a/telepathy-glib/connection.c
+++ b/telepathy-glib/connection.c
@@ -128,7 +128,6 @@ tp_connection_get_feature_quark_core (void)
* <itemizedlist>
* <listitem>#TpConnection:status is
* %TP_CONNECTION_STATUS_CONNECTED</listitem>
- * <listitem>#TpConnection:self-handle is valid and non-zero</listitem>
* <listitem>#TpConnection:self-contact is non-%NULL</listitem>
* <listitem>all interfaces have been added to the set of
* #TpProxy:interfaces, and that set will not change again</listitem>
@@ -268,7 +267,6 @@ enum
PROP_CONNECTION_MANAGER_NAME,
PROP_PROTOCOL_NAME,
PROP_SELF_CONTACT,
- PROP_SELF_HANDLE,
PROP_CAPABILITIES,
PROP_BALANCE,
PROP_BALANCE_SCALE,
@@ -329,9 +327,6 @@ tp_connection_get_property (GObject *object,
case PROP_SELF_CONTACT:
g_value_set_object (value, tp_connection_get_self_contact (self));
break;
- case PROP_SELF_HANDLE:
- g_value_set_uint (value, tp_connection_get_self_handle (self));
- break;
case PROP_CAPABILITIES:
g_value_set_object (value, self->priv->capabilities);
break;
@@ -788,7 +783,6 @@ tp_connection_set_self_contact (TpConnection *self,
self->priv->self_contact = g_object_ref (contact);
tp_clear_object (&tmp);
g_object_notify ((GObject *) self, "self-contact");
- g_object_notify ((GObject *) self, "self-handle");
}
if (self->priv->introspecting_self_contact)
@@ -1635,29 +1629,6 @@ tp_connection_class_init (TpConnectionClass *klass)
G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
/**
- * TpConnection:self-handle:
- *
- * The %TP_HANDLE_TYPE_CONTACT handle of the local user on this connection,
- * or 0 if we don't know yet or if the connection has become invalid.
- *
- * This may change if the local user's unique identifier changes (for
- * instance by using /nick on IRC), in which case #GObject::notify will be
- * emitted.
- *
- * To wait for a valid self-handle (and other properties), call
- * tp_proxy_prepare_async() with the feature
- * %TP_CONNECTION_FEATURE_CONNECTED.
- *
- * Deprecated: Use #TpConnection:self-contact instead.
- */
- param_spec = g_param_spec_uint ("self-handle", "Self handle",
- "The local user's Contact handle on this connection", 0, G_MAXUINT32,
- 0,
- G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_SELF_HANDLE,
- param_spec);
-
- /**
* TpConnection:self-contact:
*
* A #TpContact representing the local user on this connection,
@@ -2280,36 +2251,6 @@ _tp_connection_set_account (TpConnection *self,
}
/**
- * tp_connection_get_self_handle:
- * @self: a connection
- *
- * Return the %TP_HANDLE_TYPE_CONTACT handle of the local user on this
- * connection, or 0 if the self-handle is not known yet or the connection
- * has become invalid (the TpProxy::invalidated signal).
- *
- * The returned handle is not necessarily valid forever (the
- * notify::self-handle signal will be emitted if it changes, which can happen
- * on protocols such as IRC). Construct a #TpContact object if you want to
- * track the local user's identifier in the protocol, or other information
- * like their presence status, over time.
- *
- * Returns: the value of the TpConnection:self-handle property
- *
- * Since: 0.7.26
- * Deprecated: Use tp_connection_get_self_handle() instead.
- */
-TpHandle
-tp_connection_get_self_handle (TpConnection *self)
-{
- g_return_val_if_fail (TP_IS_CONNECTION (self), 0);
-
- if (self->priv->self_contact == NULL)
- return 0;
-
- return tp_contact_get_handle (self->priv->self_contact);
-}
-
-/**
* tp_connection_get_status:
* @self: a connection
* @reason: (out): a TpConnectionStatusReason, or %NULL
diff --git a/telepathy-glib/connection.h b/telepathy-glib/connection.h
index 3570a1291..18195d77b 100644
--- a/telepathy-glib/connection.h
+++ b/telepathy-glib/connection.h
@@ -141,11 +141,6 @@ const gchar *tp_connection_get_connection_manager_name (TpConnection *self);
const gchar *tp_connection_get_protocol_name (TpConnection *self);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_20_FOR (tp_connection_get_self_contact)
-TpHandle tp_connection_get_self_handle (TpConnection *self);
-#endif
-
TpContact *tp_connection_get_self_contact (TpConnection *self);
TpCapabilities * tp_connection_get_capabilities (TpConnection *self);
diff --git a/telepathy-glib/errors.h b/telepathy-glib/errors.h
index 61da6e73c..126c81b39 100644
--- a/telepathy-glib/errors.h
+++ b/telepathy-glib/errors.h
@@ -34,7 +34,6 @@ GQuark tp_error_quark (void);
#define TP_ERROR_PREFIX "im.telepathy1.Error"
-#define TP_ERRORS TP_ERROR
#define TP_ERROR (tp_error_quark ())
void tp_g_set_error_invalid_handle_type (guint type, GError **error);
diff --git a/telepathy-glib/intset.c b/telepathy-glib/intset.c
index f5da30c28..363cc0ee0 100644
--- a/telepathy-glib/intset.c
+++ b/telepathy-glib/intset.c
@@ -66,25 +66,7 @@ G_STATIC_ASSERT (sizeof (gpointer) >= sizeof (gsize));
* Since: 0.11.3
*/
-GType
-tp_intset_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- {
- /* The "TpIntSet" type has to be registered for backwards compatibility.
- * The canonical name of the type is now "TpIntset"; see fdo#30134. */
- g_boxed_type_register_static (g_intern_static_string ("TpIntSet"),
- (GBoxedCopyFunc) tp_intset_copy,
- (GBoxedFreeFunc) tp_intset_destroy);
- type = g_boxed_type_register_static (g_intern_static_string ("TpIntset"),
- (GBoxedCopyFunc) tp_intset_copy,
- (GBoxedFreeFunc) tp_intset_destroy);
- }
-
- return type;
-}
+G_DEFINE_BOXED_TYPE (TpIntset, tp_intset, tp_intset_copy, tp_intset_destroy)
/**
* TpIntFunc:
@@ -96,96 +78,9 @@ tp_intset_get_type (void)
/* (typedef, see header) */
/**
- * TpIntSetIter: (skip)
- *
- * Before 0.11.16, this was the name for <type>TpIntsetIter</type>, but
- * it's now just a backwards compatibility typedef.
- *
- * Deprecated: since 0.UNRELEASED. Use #TpIntsetFastIter instead
- */
-
-/**
- * TpIntsetIter:
- * @set: The set iterated over.
- * @element: Must be (guint)(-1) before iteration starts. Set to the next
- * element in the set by tp_intset_iter_next(); undefined after
- * tp_intset_iter_next() returns %FALSE.
- *
- * A structure representing iteration over a set of integers. Must be
- * initialized with either TP_INTSET_ITER_INIT() or tp_intset_iter_init().
- *
- * Since 0.11.6, consider using #TpIntsetFastIter if iteration in
- * numerical order is not required.
- *
- * Before 0.11.16, this type was called <type>TpIntSetIter</type>,
- * which is now a backwards compatibility typedef.
- *
- * Deprecated: since 0.UNRELEASED. Use #TpIntsetFastIter instead
- */
-/* (public, see header) */
-
-/**
- * TP_INTSET_ITER_INIT:
- * @set: A set of integers
- *
- * A suitable static initializer for a #TpIntsetIter, to be used as follows:
- *
- * <informalexample><programlisting>
- * void
- * do_something (const TpIntset *intset)
- * {
- * TpIntsetIter iter = TP_INTSET_ITER_INIT (intset);
- * /<!-- -->* ... do something with iter ... *<!-- -->/
- * }
- * </programlisting></informalexample>
- *
- * Deprecated: since 0.UNRELEASED. Use #TpIntsetFastIter instead
- */
-/* (macro, see header) */
-
-/**
- * tp_intset_iter_init:
- * @iter: An integer set iterator to be initialized.
- * @set: An integer set to be used by that iterator
- *
- * Reset the iterator @iter to the beginning and make it iterate over @set.
- *
- * Deprecated: since 0.UNRELEASED. Use #TpIntsetFastIter instead
- */
-void
-tp_intset_iter_init (
- TpIntsetIter *iter,
- const TpIntset *set)
-{
- g_return_if_fail (iter != NULL);
- iter->set = set;
- iter->element = (guint)(-1);
-}
-
-/**
- * tp_intset_iter_reset:
- * @iter: An integer set iterator to be reset.
- *
- * Reset the iterator @iter to the beginning. It must already be associated
- * with a set.
- *
- * Deprecated: since 0.UNRELEASED. Use #TpIntsetFastIter instead
- */
-void
-tp_intset_iter_reset (TpIntsetIter *iter)
-{
- g_return_if_fail (iter != NULL);
- g_return_if_fail (iter->set != NULL);
- iter->element = (guint)(-1);
-}
-
-/**
* TpIntset:
*
* Opaque type representing a set of unsigned integers.
- *
- * Before 0.11.16, this type was called <type>TpIntSet</type>, which is
- * now a backwards compatibility typedef.
*/
struct _TpIntset
@@ -836,73 +731,11 @@ tp_intset_dump (const TpIntset *set)
}
/**
- * tp_intset_iter_next:
- * @iter: An iterator originally initialized with TP_INTSET_INIT(set)
- *
- * If there are integers in (@iter->set) higher than (@iter->element), set
- * (iter->element) to the next one and return %TRUE. Otherwise return %FALSE.
- *
- * Usage:
- *
- * <informalexample><programlisting>
- * TpIntsetIter iter = TP_INTSET_INIT (intset);
- * while (tp_intset_iter_next (&amp;iter))
- * {
- * printf ("%u is in the intset\n", iter.element);
- * }
- * </programlisting></informalexample>
- *
- * Since 0.11.6, consider using #TpIntsetFastIter if iteration in
- * numerical order is not required.
- *
- * Returns: %TRUE if (@iter->element) has been advanced
- */
-gboolean
-tp_intset_iter_next (TpIntsetIter *iter)
-{
- g_return_val_if_fail (iter != NULL, FALSE);
- g_return_val_if_fail (iter->set != NULL, FALSE);
-
- do
- {
- if (iter->element == (guint)(-1))
- {
- /* only just started */
- iter->element = 0;
- }
- else
- {
- ++iter->element;
- }
-
- if (_tp_intset_is_member (iter->set, iter->element))
- {
- return TRUE;
- }
- }
- while (iter->element < iter->set->largest_ever &&
- iter->element != (guint)(-1));
- return FALSE;
-}
-
-/**
- * TpIntSetFastIter: (skip)
- *
- * Before 0.11.16, this was the name for <type>TpIntsetFastIter</type>,
- * but it's now just a backwards compatibility typedef.
- *
- * Deprecated: since 0.UNRELEASED. Use #TpIntsetFastIter instead
- */
-
-/**
* TpIntsetFastIter:
*
* An opaque structure representing iteration in undefined order over a set of
* integers. Must be initialized with tp_intset_fast_iter_init().
*
- * Before 0.11.16, this type was called <type>TpIntSetFastIter</type>,
- * which is now a backwards compatibility typedef.
- *
* Usage is similar to #GHashTableIter:
*
* <informalexample><programlisting>
diff --git a/telepathy-glib/intset.h b/telepathy-glib/intset.h
index e1ac2e824..4fcb77f12 100644
--- a/telepathy-glib/intset.h
+++ b/telepathy-glib/intset.h
@@ -34,18 +34,6 @@ GType tp_intset_get_type (void);
typedef struct _TpIntset TpIntset;
-#ifndef TP_DISABLE_DEPRECATED
-/* See fdo#30134 for the reasoning behind the rename of TpIntSet to TpIntset */
-
-/**
- * TpIntSet: (skip)
- *
- * Before 0.11.16, this was the name for <type>TpIntset</type>, but it's
- * now just a backwards compatibility typedef.
- */
-typedef TpIntset TpIntSet;
-#endif
-
typedef void (*TpIntFunc) (guint i, gpointer userdata);
TpIntset *tp_intset_new (void) G_GNUC_WARN_UNUSED_RESULT;
@@ -82,35 +70,11 @@ TpIntset *tp_intset_symmetric_difference (const TpIntset *left,
gchar *tp_intset_dump (const TpIntset *set) G_GNUC_WARN_UNUSED_RESULT;
-#ifndef TP_DISABLE_DEPRECATED
-typedef struct {
- const TpIntset *set;
- guint element;
-} TpIntsetIter;
-
-typedef TpIntsetIter TpIntSetIter;
-
-#define TP_INTSET_ITER_INIT(set) { (set), (guint)(-1) }
-
-_TP_DEPRECATED_IN_0_20_FOR (tp_intset_fast_iter_init)
-void tp_intset_iter_init (TpIntsetIter *iter, const TpIntset *set);
-
-_TP_DEPRECATED_IN_0_20_FOR (tp_intset_fast_iter_init)
-void tp_intset_iter_reset (TpIntsetIter *iter);
-
-_TP_DEPRECATED_IN_0_20_FOR (tp_intset_fast_iter_next)
-gboolean tp_intset_iter_next (TpIntsetIter *iter);
-#endif
-
typedef struct {
/*<private>*/
gpointer _dummy[16];
} TpIntsetFastIter;
-#ifndef TP_DISABLE_DEPRECATED
-typedef TpIntsetFastIter TpIntSetFastIter;
-#endif
-
void tp_intset_fast_iter_init (TpIntsetFastIter *iter,
const TpIntset *set);
diff --git a/tests/dbus/account-manager.c b/tests/dbus/account-manager.c
index 41cebbfaf..75dc2a1d9 100644
--- a/tests/dbus/account-manager.c
+++ b/tests/dbus/account-manager.c
@@ -216,6 +216,7 @@ teardown_service (Test *test,
g_clear_object (&test->account1);
g_clear_object (&test->account2);
+ g_clear_object (&test->account);
test->service = NULL;
teardown (test, data);
@@ -412,8 +413,10 @@ ensure_action (gpointer script_data,
g_assert (test != NULL);
g_assert (test->am != NULL);
g_assert (tp_proxy_is_prepared (test->am, TP_ACCOUNT_MANAGER_FEATURE_CORE));
- test->account = tp_account_manager_ensure_account (test->am,
- path);
+ test->account = tp_client_factory_ensure_account (
+ tp_proxy_get_factory (test->am), path, NULL, &test->error);
+ g_assert_no_error (test->error);
+ g_assert (TP_IS_ACCOUNT (test->account));
script_continue (script_data);
}
@@ -561,11 +564,15 @@ create_tp_accounts (gpointer script_data,
{
Test *test = (Test *) script_data;
- test->account1 = tp_account_manager_ensure_account (test->am, ACCOUNT1_PATH);
- g_object_ref (test->account1);
+ test->account1 = tp_client_factory_ensure_account (
+ tp_proxy_get_factory (test->am), ACCOUNT1_PATH, NULL, &test->error);
+ g_assert_no_error (test->error);
+ g_assert (TP_IS_ACCOUNT (test->account1));
- test->account2 = tp_account_manager_ensure_account (test->am, ACCOUNT2_PATH);
- g_object_ref (test->account2);
+ test->account2 = tp_client_factory_ensure_account (
+ tp_proxy_get_factory (test->am), ACCOUNT2_PATH, NULL, &test->error);
+ g_assert_no_error (test->error);
+ g_assert (TP_IS_ACCOUNT (test->account2));
script_continue (test);
}
diff --git a/tests/dbus/call-channel.c b/tests/dbus/call-channel.c
index e878564ad..1caacd271 100644
--- a/tests/dbus/call-channel.c
+++ b/tests/dbus/call-channel.c
@@ -121,7 +121,8 @@ setup (Test *test,
tp_cli_connection_call_connect (test->conn, -1, NULL, NULL, NULL, NULL);
tp_tests_proxy_run_until_prepared (test->conn, conn_features);
- test->self_handle = tp_connection_get_self_handle (test->conn);
+ test->self_handle = tp_contact_get_handle (
+ tp_connection_get_self_contact (test->conn));
g_assert (test->self_handle != 0);
test->audio_request = g_array_sized_new (FALSE, FALSE, sizeof (guint), 1);
diff --git a/tests/dbus/channel-dispatch-operation.c b/tests/dbus/channel-dispatch-operation.c
index f30ed7eeb..5a6643746 100644
--- a/tests/dbus/channel-dispatch-operation.c
+++ b/tests/dbus/channel-dispatch-operation.c
@@ -633,36 +633,6 @@ test_handle_with (Test *test,
}
static void
-claim_cb (GObject *source,
- GAsyncResult *result,
- gpointer user_data)
-{
- Test *test = user_data;
-
- tp_channel_dispatch_operation_claim_finish (
- TP_CHANNEL_DISPATCH_OPERATION (source), result, &test->error);
-
- g_main_loop_quit (test->mainloop);
-}
-
-static void
-test_claim (Test *test,
- gconstpointer data G_GNUC_UNUSED)
-{
- test->cdo = tp_channel_dispatch_operation_new (test->dbus,
- "/whatever", NULL, &test->error);
- g_assert_no_error (test->error);
-
- tp_channel_dispatch_operation_claim_async (test->cdo, claim_cb, test);
- g_main_loop_run (test->mainloop);
-
- g_assert_no_error (test->error);
-
- /* tp_channel_dispatch_operation_claim_with_async() is tested in
- * tests/dbus/base-client.c */
-}
-
-static void
test_channel_lost_preparing (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
@@ -931,8 +901,6 @@ main (int argc,
test_channel_lost, teardown_services);
g_test_add ("/cdo/handle-with", Test, NULL, setup_services,
test_handle_with, teardown_services);
- g_test_add ("/cdo/claim", Test, NULL, setup_services,
- test_claim, teardown_services);
g_test_add ("/cdo/channel-lost-preparing", Test, NULL, setup_services,
test_channel_lost_preparing, teardown_services);
g_test_add ("/cdo/finished--preparing", Test, NULL, setup_services,
@@ -946,5 +914,8 @@ main (int argc,
g_test_add ("/cdo/destroy-channels", Test, NULL, setup_services,
test_destroy_channels, teardown_services);
+ /* tp_channel_dispatch_operation_claim_with_async() is tested in
+ * tests/dbus/base-client.c */
+
return g_test_run ();
}
diff --git a/tests/dbus/connection.c b/tests/dbus/connection.c
index 9422d2582..de7575b81 100644
--- a/tests/dbus/connection.c
+++ b/tests/dbus/connection.c
@@ -146,7 +146,7 @@ test_prepare (Test *test,
g_assert (tp_proxy_is_prepared (test->conn, TP_CONNECTION_FEATURE_CORE));
g_assert (!tp_proxy_is_prepared (test->conn,
TP_CONNECTION_FEATURE_CONNECTED));
- g_assert_cmpuint (tp_connection_get_self_handle (test->conn), ==, 0);
+ g_assert (tp_connection_get_self_contact (test->conn) == NULL);
g_assert_cmpint (tp_connection_get_status (test->conn, NULL), ==,
TP_CONNECTION_STATUS_DISCONNECTED);
@@ -190,7 +190,7 @@ test_prepare (Test *test,
TP_CONNECTION_FEATURE_CONNECTED));
g_assert (tp_proxy_is_prepared (test->conn,
TP_CONNECTION_FEATURE_CAPABILITIES));
- g_assert_cmpuint (tp_connection_get_self_handle (test->conn), !=, 0);
+ g_assert (TP_IS_CONTACT (tp_connection_get_self_contact (test->conn)));
g_assert_cmpint (tp_connection_get_status (test->conn, &reason), ==,
TP_CONNECTION_STATUS_CONNECTED);
g_assert_cmpint (reason, ==, TP_CONNECTION_STATUS_REASON_REQUESTED);
diff --git a/tests/dbus/contacts.c b/tests/dbus/contacts.c
index 7546efe09..beb8a1e19 100644
--- a/tests/dbus/contacts.c
+++ b/tests/dbus/contacts.c
@@ -295,6 +295,7 @@ test_contact_info (Fixture *f,
gconstpointer unused G_GNUC_UNUSED)
{
TpTestsContactsConnection *service_conn = f->service_conn;
+ TpBaseConnection *service_conn_base = (TpBaseConnection *) service_conn;
TpConnection *client_conn = f->client_conn;
Result result = { g_main_loop_new (NULL, FALSE), NULL, NULL, NULL };
TpHandleRepoIface *service_repo = tp_base_connection_get_handles (
@@ -334,7 +335,7 @@ test_contact_info (Fixture *f,
/* ... but first, get the SelfHandle contact without any features (regression
* test for a related bug, fd.o #32191) */
- handle = tp_connection_get_self_handle (client_conn);
+ handle = tp_base_connection_get_self_handle (service_conn_base);
tp_connection_get_contacts_by_handle (client_conn,
1, &handle,
NULL,
@@ -350,7 +351,7 @@ test_contact_info (Fixture *f,
g_main_loop_run (result.loop);
g_assert_no_error (result.error);
- handle = tp_connection_get_self_handle (client_conn);
+ handle = tp_base_connection_get_self_handle (service_conn_base);
tp_connection_get_contacts_by_handle (client_conn,
1, &handle,
features,
diff --git a/tests/dbus/message-mixin.c b/tests/dbus/message-mixin.c
index 77bb3e2e8..f989cf8c2 100644
--- a/tests/dbus/message-mixin.c
+++ b/tests/dbus/message-mixin.c
@@ -375,7 +375,7 @@ main (int argc,
MYASSERT (message_sent_count == 1, ": %u != 1", message_sent_count);
MYASSERT (message_received_count == 1, ": %u != 1", message_received_count);
g_assert_cmpuint (last_message_sent_sender, ==,
- tp_connection_get_self_handle (conn));
+ tp_contact_get_handle (tp_connection_get_self_contact (conn)));
g_assert_cmpstr (last_message_sent_sender_id, ==, "me@example.com");
MYASSERT (last_message_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
": %u != NORMAL", last_message_sent_type);
@@ -466,7 +466,7 @@ main (int argc,
MYASSERT (last_message_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
": %u != NORMAL", last_message_sent_type);
g_assert_cmpuint (last_message_sent_sender, ==,
- tp_connection_get_self_handle (conn));
+ tp_contact_get_handle (tp_connection_get_self_contact (conn)));
g_assert_cmpstr (last_message_sent_sender_id, ==, "me@example.com");
MYASSERT (last_message_sent_n_parts == 5,
": %u != 5", last_message_sent_n_parts);
@@ -539,7 +539,7 @@ main (int argc,
MYASSERT (last_message_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
": %u != NORMAL", last_message_sent_type);
g_assert_cmpuint (last_message_sent_sender, ==,
- tp_connection_get_self_handle (conn));
+ tp_contact_get_handle (tp_connection_get_self_contact (conn)));
g_assert_cmpstr (last_message_sent_sender_id, ==, "me@example.com");
MYASSERT (last_message_sent_n_parts == 4,
": %u != 4", last_message_sent_n_parts);
diff --git a/tests/dbus/self-handle.c b/tests/dbus/self-handle.c
index 974976e06..d43b21526 100644
--- a/tests/dbus/self-handle.c
+++ b/tests/dbus/self-handle.c
@@ -91,12 +91,9 @@ static void
test_self_handle (Fixture *f,
gconstpointer unused G_GNUC_UNUSED)
{
- TpHandle handle;
TpContact *before, *after;
- guint handle_times = 0, contact_times = 0;
+ guint contact_times = 0;
- g_signal_connect_swapped (f->client_conn, "notify::self-handle",
- G_CALLBACK (swapped_counter_cb), &handle_times);
g_signal_connect_swapped (f->client_conn, "notify::self-contact",
G_CALLBACK (swapped_counter_cb), &contact_times);
@@ -104,19 +101,13 @@ test_self_handle (Fixture *f,
tp_base_connection_get_self_handle (f->service_conn_as_base)), ==,
"me@example.com");
- g_assert_cmpuint (tp_connection_get_self_handle (f->client_conn), ==,
- tp_base_connection_get_self_handle (f->service_conn_as_base));
-
g_object_get (f->client_conn,
- "self-handle", &handle,
"self-contact", &before,
NULL);
- g_assert_cmpuint (handle, ==,
+ g_assert_cmpuint (tp_contact_get_handle (before), ==,
tp_base_connection_get_self_handle (f->service_conn_as_base));
- g_assert_cmpuint (tp_contact_get_handle (before), ==, handle);
g_assert_cmpstr (tp_contact_get_identifier (before), ==, "me@example.com");
- g_assert_cmpuint (handle_times, ==, 0);
g_assert_cmpuint (contact_times, ==, 0);
/* similar to /nick in IRC */
@@ -124,27 +115,21 @@ test_self_handle (Fixture *f,
"myself@example.org");
tp_tests_proxy_run_until_dbus_queue_processed (f->client_conn);
- while (handle_times < 1 || contact_times < 1)
+ while (contact_times < 1)
g_main_context_iteration (NULL, TRUE);
- g_assert_cmpuint (handle_times, ==, 1);
g_assert_cmpuint (contact_times, ==, 1);
g_assert_cmpstr (tp_handle_inspect (f->contact_repo,
tp_base_connection_get_self_handle (f->service_conn_as_base)), ==,
"myself@example.org");
- g_assert_cmpuint (tp_connection_get_self_handle (f->client_conn), ==,
- tp_base_connection_get_self_handle (f->service_conn_as_base));
-
g_object_get (f->client_conn,
- "self-handle", &handle,
"self-contact", &after,
NULL);
g_assert (before != after);
- g_assert_cmpuint (handle, ==,
+ g_assert_cmpuint (tp_contact_get_handle (after), ==,
tp_base_connection_get_self_handle (f->service_conn_as_base));
- g_assert_cmpuint (tp_contact_get_handle (after), ==, handle);
g_assert_cmpstr (tp_contact_get_identifier (after), ==,
"myself@example.org");
@@ -156,14 +141,11 @@ static void
test_change_early (Fixture *f,
gconstpointer unused G_GNUC_UNUSED)
{
- TpHandle handle;
TpContact *after;
- guint handle_times = 0, contact_times = 0;
+ guint contact_times = 0;
gboolean ok;
GQuark features[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 };
- g_signal_connect_swapped (f->client_conn, "notify::self-handle",
- G_CALLBACK (swapped_counter_cb), &handle_times);
g_signal_connect_swapped (f->client_conn, "notify::self-contact",
G_CALLBACK (swapped_counter_cb), &contact_times);
@@ -198,19 +180,13 @@ test_change_early (Fixture *f,
g_assert (ok);
/* the self-handle and self-contact change once during connection */
- g_assert_cmpuint (handle_times, ==, 1);
g_assert_cmpuint (contact_times, ==, 1);
- g_assert_cmpuint (tp_connection_get_self_handle (f->client_conn), ==,
- tp_base_connection_get_self_handle (f->service_conn_as_base));
-
g_object_get (f->client_conn,
- "self-handle", &handle,
"self-contact", &after,
NULL);
- g_assert_cmpuint (handle, ==,
+ g_assert_cmpuint (tp_contact_get_handle (after), ==,
tp_base_connection_get_self_handle (f->service_conn_as_base));
- g_assert_cmpuint (tp_contact_get_handle (after), ==, handle);
g_assert_cmpstr (tp_contact_get_identifier (after), ==,
"myself@example.org");
diff --git a/tests/dbus/simple-approver.c b/tests/dbus/simple-approver.c
index 5e9e534a8..bd75b558f 100644
--- a/tests/dbus/simple-approver.c
+++ b/tests/dbus/simple-approver.c
@@ -77,10 +77,11 @@ setup (Test *test,
g_assert (test->account_manager != NULL);
/* Create client-side Account object */
- test->account = tp_account_manager_ensure_account (test->account_manager,
- ACCOUNT_PATH);
+ test->account = tp_client_factory_ensure_account (
+ tp_proxy_get_factory (test->account_manager), ACCOUNT_PATH, NULL,
+ &test->error);
+ g_assert_no_error (test->error);
g_assert (test->account != NULL);
- g_object_ref (test->account);
/* Create (service and client sides) connection objects */
tp_tests_create_and_connect_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION,
diff --git a/tests/intset.c b/tests/intset.c
index f92af36a0..3af65712b 100644
--- a/tests/intset.c
+++ b/tests/intset.c
@@ -5,29 +5,6 @@
#include <telepathy-glib/util.h>
static void
-iterate_in_order (TpIntset *set)
-{
- TpIntsetIter iter;
- guint n = 0;
- gint64 prev = (guint) -1;
-
- tp_intset_iter_init (&iter, set);
-
- while (tp_intset_iter_next (&iter))
- {
- g_assert (tp_intset_is_member (set, iter.element));
-
- if (prev != (guint) -1)
- g_assert_cmpuint (iter.element, >, prev);
-
- prev = iter.element;
- n++;
- }
-
- g_assert_cmpuint (n, ==, tp_intset_size (set));
-}
-
-static void
iterate_fast (TpIntset *set)
{
TpIntsetFastIter iter;
@@ -49,7 +26,6 @@ static void
test_iteration (TpIntset *set)
{
iterate_fast (set);
- iterate_in_order (set);
}
int main (int argc, char **argv)