summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-05-03 20:12:23 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-05-03 20:18:18 +0100
commit34752d004ced4ce4ac75e7ab0c601bf444bed864 (patch)
tree6e5af8464e55868a767c867d413ab65798e40263
parent2f377dab66ef074497ff0630508535716d369cb7 (diff)
Revert "Add tp_contact_is_self()"
This reverts commit aa611fb0084b0c94f5e3b3c9c7e5ae30b8556c67. We shouldn't release this until it's more reliable. Opens: https://bugs.freedesktop.org/show_bug.cgi?id=49443
-rw-r--r--docs/reference/telepathy-glib-sections.txt1
-rw-r--r--telepathy-glib/channel-contacts.c6
-rw-r--r--telepathy-glib/connection.c5
-rw-r--r--telepathy-glib/contact-internal.h3
-rw-r--r--telepathy-glib/contact.c51
-rw-r--r--telepathy-glib/contact.h2
-rw-r--r--tests/dbus/channel.c1
-rw-r--r--tests/dbus/contacts.c1
8 files changed, 1 insertions, 69 deletions
diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index d7d4caee9..ca2a4ec22 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -4945,7 +4945,6 @@ tp_connection_get_contacts_by_id
TpConnectionUpgradeContactsCb
tp_connection_upgrade_contacts
tp_connection_refresh_contact_info
-tp_contact_is_self
tp_contact_get_alias
tp_contact_get_avatar_token
tp_contact_get_avatar_file
diff --git a/telepathy-glib/channel-contacts.c b/telepathy-glib/channel-contacts.c
index bcfcb478c..f21e44d67 100644
--- a/telepathy-glib/channel-contacts.c
+++ b/telepathy-glib/channel-contacts.c
@@ -29,7 +29,6 @@
#define DEBUG_FLAG TP_DEBUG_GROUPS
#include "telepathy-glib/connection-internal.h"
-#include "telepathy-glib/contact-internal.h"
#include "telepathy-glib/debug-internal.h"
#include "telepathy-glib/util-internal.h"
@@ -212,7 +211,6 @@ _tp_channel_contacts_group_init (TpChannel *self,
self->priv->group_self_contact = dup_contact (self,
self->priv->group_self_handle, identifiers);
- _tp_contact_set_is_self (self->priv->group_self_contact, TRUE);
self->priv->group_members_contacts = dup_contacts_table (self,
self->priv->group_members, identifiers);
@@ -753,10 +751,6 @@ self_contact_changed_prepared_cb (GObject *object,
_tp_channel_contacts_queue_prepare_finish (self, result, NULL, NULL);
- if (self->priv->group_self_contact != NULL)
- _tp_contact_set_is_self (self->priv->group_self_contact, FALSE);
- _tp_contact_set_is_self (contact, TRUE);
-
g_clear_object (&self->priv->group_self_contact);
self->priv->group_self_contact = contact;
diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c
index 960ea5402..3ec9e4f48 100644
--- a/telepathy-glib/connection.c
+++ b/telepathy-glib/connection.c
@@ -42,7 +42,6 @@
#include "telepathy-glib/capabilities-internal.h"
#include "telepathy-glib/connection-internal.h"
#include "telepathy-glib/connection-contact-list.h"
-#include "telepathy-glib/contact-internal.h"
#include "telepathy-glib/dbus-internal.h"
#include "telepathy-glib/debug-internal.h"
#include "telepathy-glib/proxy-internal.h"
@@ -788,10 +787,6 @@ tp_connection_set_self_contact (TpConnection *self,
{
TpContact *tmp = self->priv->self_contact;
- if (self->priv->self_contact != NULL)
- _tp_contact_set_is_self (self->priv->self_contact, FALSE);
- _tp_contact_set_is_self (contact, TRUE);
-
self->priv->self_contact = g_object_ref (contact);
tp_clear_object (&tmp);
g_object_notify ((GObject *) self, "self-contact");
diff --git a/telepathy-glib/contact-internal.h b/telepathy-glib/contact-internal.h
index 9e0daadf8..fde16cd19 100644
--- a/telepathy-glib/contact-internal.h
+++ b/telepathy-glib/contact-internal.h
@@ -44,9 +44,6 @@ void _tp_contact_set_subscription_states (TpContact *self,
void _tp_contact_set_is_blocked (TpContact *self,
gboolean is_blocked);
-void _tp_contact_set_is_self (TpContact *self,
- gboolean is_self);
-
G_END_DECLS
#endif
diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c
index ff6843ca0..70912f652 100644
--- a/telepathy-glib/contact.c
+++ b/telepathy-glib/contact.c
@@ -184,7 +184,6 @@ enum {
PROP_PUBLISH_REQUEST,
PROP_CONTACT_GROUPS,
PROP_IS_BLOCKED,
- PROP_IS_SELF,
N_PROPS
};
@@ -219,7 +218,6 @@ struct _TpContactPrivate {
TpHandle handle;
gchar *identifier;
ContactFeatureFlags has_features;
- gboolean is_self;
/* aliasing */
gchar *alias;
@@ -371,33 +369,6 @@ tp_contact_has_feature (TpContact *self,
return ((self->priv->has_features & (1 << feature)) != 0);
}
-/**
- * tp_contact_is_self:
- * @self: a contact
- *
- * <!-- -->
- *
- * Returns: the value of #TpContact:is-self property
- * Since: 0.UNRELEASED
- */
-gboolean
-tp_contact_is_self (TpContact *self)
-{
- g_return_val_if_fail (TP_IS_CONTACT (self), FALSE);
-
- return self->priv->is_self;
-}
-
-void
-_tp_contact_set_is_self (TpContact *self,
- gboolean is_self)
-{
- g_return_if_fail (TP_IS_CONTACT (self));
-
- self->priv->is_self = is_self;
- g_object_notify ((GObject *) self, "is-self");
-}
-
/**
* tp_contact_get_alias:
@@ -985,10 +956,6 @@ tp_contact_get_property (GObject *object,
g_value_set_boolean (value, tp_contact_is_blocked (self));
break;
- case PROP_IS_SELF:
- g_value_set_boolean (value, tp_contact_is_self (self));
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -1364,7 +1331,7 @@ tp_contact_class_init (TpContactClass *klass)
g_object_class_install_property (object_class, PROP_CONTACT_GROUPS,
param_spec);
- /**
+/**
* TpContact:is-blocked:
*
* %TRUE if the contact has been blocked.
@@ -1383,22 +1350,6 @@ tp_contact_class_init (TpContactClass *klass)
g_object_class_install_property (object_class, PROP_IS_BLOCKED, param_spec);
/**
- * TpContact:is-self:
- *
- * This is %TRUE if the contact is set as
- * #TpConnection's #TpConnection:self-contact or
- * #TpChannel's #TpChannel:group-self-contact, %FALSE otherwise.
- *
- * Since: 0.UNRELEASED
- */
- param_spec = g_param_spec_boolean ("is-self",
- "is local user",
- "TRUE if contact is local user",
- FALSE,
- G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_IS_SELF, param_spec);
-
- /**
* TpContact::contact-groups-changed:
* @contact: A #TpContact
* @added: A #GStrv with added contact groups
diff --git a/telepathy-glib/contact.h b/telepathy-glib/contact.h
index d55ef60d9..412e569a3 100644
--- a/telepathy-glib/contact.h
+++ b/telepathy-glib/contact.h
@@ -79,8 +79,6 @@ TpConnection *tp_contact_get_connection (TpContact *self);
TpHandle tp_contact_get_handle (TpContact *self);
const gchar *tp_contact_get_identifier (TpContact *self);
gboolean tp_contact_has_feature (TpContact *self, TpContactFeature feature);
-_TP_AVAILABLE_IN_0_20
-gboolean tp_contact_is_self (TpContact *self);
/* TP_CONTACT_FEATURE_ALIAS */
const gchar *tp_contact_get_alias (TpContact *self);
diff --git a/tests/dbus/channel.c b/tests/dbus/channel.c
index 0d4f33e10..0cec68374 100644
--- a/tests/dbus/channel.c
+++ b/tests/dbus/channel.c
@@ -633,7 +633,6 @@ test_contacts (Test *test,
contact = tp_channel_group_get_self_contact (test->channel_room);
g_assert_cmpstr (tp_contact_get_identifier (contact), ==, "me@test.com");
- g_assert (tp_contact_is_self (contact));
/* Add a member in the room, assert that the member fetched its alias before
* being signaled. */
diff --git a/tests/dbus/contacts.c b/tests/dbus/contacts.c
index d57133b03..617f0b97f 100644
--- a/tests/dbus/contacts.c
+++ b/tests/dbus/contacts.c
@@ -2851,7 +2851,6 @@ test_self_contact (Fixture *f,
contact = tp_connection_get_self_contact (f->client_conn);
g_assert (contact != NULL);
g_assert (tp_contact_has_feature (contact, TP_CONTACT_FEATURE_ALIAS));
- g_assert (tp_contact_is_self (contact));
}
static void