aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-03-11 20:22:22 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-03-11 20:22:22 +0800
commitc68fcffc69b5c5941883965496f62f8b056868b0 (patch)
tree2b4cf4932da534b9b6a258dab7041769a4e156bd /libempathy
parentba02e026e2dc5a87bf13047a2de1b132fb5044dc (diff)
downloadgsoc2013-empathy-c68fcffc69b5c5941883965496f62f8b056868b0.tar
gsoc2013-empathy-c68fcffc69b5c5941883965496f62f8b056868b0.tar.gz
gsoc2013-empathy-c68fcffc69b5c5941883965496f62f8b056868b0.tar.bz2
gsoc2013-empathy-c68fcffc69b5c5941883965496f62f8b056868b0.tar.lz
gsoc2013-empathy-c68fcffc69b5c5941883965496f62f8b056868b0.tar.xz
gsoc2013-empathy-c68fcffc69b5c5941883965496f62f8b056868b0.tar.zst
gsoc2013-empathy-c68fcffc69b5c5941883965496f62f8b056868b0.zip
Ready property on EmpathyContact is not a boolean but flags for each property.
svn path=/trunk/; revision=748
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-contact.c19
-rw-r--r--libempathy/empathy-contact.h10
2 files changed, 19 insertions, 10 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index ef6b87dbf..7e3fa8f75 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -53,7 +53,7 @@ struct _EmpathyContactPriv {
EmpathyCapabilities capabilities;
gboolean is_user;
guint hash;
- gboolean ready;
+ EmpathyContactReady ready;
};
static void empathy_contact_class_init (EmpathyContactClass *class);
@@ -173,11 +173,12 @@ empathy_contact_class_init (EmpathyContactClass *class)
g_object_class_install_property (object_class,
PROP_READY,
- g_param_spec_boolean ("ready",
- "Contact ready",
- "Is contact ready",
- FALSE,
- G_PARAM_READABLE));
+ g_param_spec_flags ("ready",
+ "Contact ready flags",
+ "Flags for ready properties",
+ EMPATHY_TYPE_CONTACT_READY,
+ EMPATHY_CONTACT_READY_NONE,
+ G_PARAM_READABLE));
g_type_class_add_private (object_class, sizeof (EmpathyContactPriv));
}
@@ -251,7 +252,7 @@ contact_get_property (GObject *object,
g_value_set_boolean (value, priv->is_user);
break;
case PROP_READY:
- g_value_set_boolean (value, priv->ready);
+ g_value_set_flags (value, priv->ready);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
@@ -672,8 +673,8 @@ empathy_contact_can_voip (EmpathyContact *contact)
EMPATHY_CAPABILITIES_VIDEO);
}
-gboolean
-empathy_contact_is_ready (EmpathyContact *contact)
+EmpathyContactReady
+empathy_contact_get_ready (EmpathyContact *contact)
{
EmpathyContactPriv *priv;
diff --git a/libempathy/empathy-contact.h b/libempathy/empathy-contact.h
index 02c252d6e..343bf2f49 100644
--- a/libempathy/empathy-contact.h
+++ b/libempathy/empathy-contact.h
@@ -60,6 +60,14 @@ typedef enum {
EMPATHY_CAPABILITIES_UNKNOWN = 1 << 7
} EmpathyCapabilities;
+typedef enum {
+ EMPATHY_CONTACT_READY_NONE = 0,
+ EMPATHY_CONTACT_READY_ID = 1 << 0,
+ EMPATHY_CONTACT_READY_HANDLE = 1 << 1,
+ EMPATHY_CONTACT_READY_ALIAS = 1 << 2,
+ EMPATHY_CONTACT_READY_ALL = (1 << 3) - 1,
+} EmpathyContactReady;
+
GType empathy_contact_get_type (void) G_GNUC_CONST;
EmpathyContact * empathy_contact_new (McAccount *account);
EmpathyContact * empathy_contact_new_full (McAccount *account,
@@ -89,13 +97,13 @@ void empathy_contact_set_handle (EmpathyContact *con
EmpathyCapabilities empathy_contact_get_capabilities (EmpathyContact *contact);
void empathy_contact_set_capabilities (EmpathyContact *contact,
EmpathyCapabilities capabilities);
+EmpathyContactReady empathy_contact_get_ready (EmpathyContact *contact);
gboolean empathy_contact_is_user (EmpathyContact *contact);
void empathy_contact_set_is_user (EmpathyContact *contact,
gboolean is_user);
gboolean empathy_contact_is_online (EmpathyContact *contact);
const gchar * empathy_contact_get_status (EmpathyContact *contact);
gboolean empathy_contact_can_voip (EmpathyContact *contact);
-gboolean empathy_contact_is_ready (EmpathyContact *contact);
gboolean empathy_contact_equal (gconstpointer v1,
gconstpointer v2);
guint empathy_contact_hash (gconstpointer key);