diff options
author | Sjoerd Simons <sjoerd@luon.net> | 2008-02-16 06:04:44 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd@luon.net> | 2008-02-16 06:04:44 +0800 |
commit | 80c61499e7998ca5bdf235214654efab85376667 (patch) | |
tree | 4badefefabe63949101348d6dda5a9d28a21887f /libempathy | |
parent | 418614a8e2c51cf619ff2567f59c8f386037bafc (diff) | |
download | gsoc2013-empathy-80c61499e7998ca5bdf235214654efab85376667.tar gsoc2013-empathy-80c61499e7998ca5bdf235214654efab85376667.tar.gz gsoc2013-empathy-80c61499e7998ca5bdf235214654efab85376667.tar.bz2 gsoc2013-empathy-80c61499e7998ca5bdf235214654efab85376667.tar.lz gsoc2013-empathy-80c61499e7998ca5bdf235214654efab85376667.tar.xz gsoc2013-empathy-80c61499e7998ca5bdf235214654efab85376667.tar.zst gsoc2013-empathy-80c61499e7998ca5bdf235214654efab85376667.zip |
Add a EMPATHY_CAPABILITIES_UNKNOWN_FLAG to signal the capabilities haven't been retrieved just yet. (Sjoerd)
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-contact.c | 4 | ||||
-rw-r--r-- | libempathy/empathy-contact.h | 2 | ||||
-rw-r--r-- | libempathy/empathy-tp-contact-factory.c | 7 |
3 files changed, 10 insertions, 3 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index 70025c7b0..3f03c1d33 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -176,6 +176,10 @@ empathy_contact_class_init (EmpathyContactClass *class) static void empathy_contact_init (EmpathyContact *contact) { + EmpathyContactPriv *priv; + + priv = GET_PRIV (contact); + priv->capabilities = EMPATHY_CAPABILITIES_UNKNOWN; } static void diff --git a/libempathy/empathy-contact.h b/libempathy/empathy-contact.h index 57a72c906..b84f784cc 100644 --- a/libempathy/empathy-contact.h +++ b/libempathy/empathy-contact.h @@ -54,8 +54,10 @@ struct _EmpathyContactClass { }; typedef enum { + EMPATHY_CAPABILITIES_NONE = 0, EMPATHY_CAPABILITIES_AUDIO = 1 << 0, EMPATHY_CAPABILITIES_VIDEO = 1 << 1, + EMPATHY_CAPABILITIES_UNKNOWN = 1 << 7 } EmpathyCapabilities; GType empathy_contact_get_type (void) G_GNUC_CONST; diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c index 77482522b..533f1c5b1 100644 --- a/libempathy/empathy-tp-contact-factory.c +++ b/libempathy/empathy-tp-contact-factory.c @@ -505,8 +505,7 @@ tp_contact_factory_update_capabilities (EmpathyTpContactFactory *tp_factory, capabilities = empathy_contact_get_capabilities (contact); if (strcmp (channel_type, TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA) == 0) { - capabilities &= ~EMPATHY_CAPABILITIES_AUDIO; - capabilities &= ~EMPATHY_CAPABILITIES_VIDEO; + capabilities = EMPATHY_CAPABILITIES_NONE; if (specific & TP_CHANNEL_MEDIA_CAPABILITY_AUDIO) { capabilities |= EMPATHY_CAPABILITIES_AUDIO; } @@ -534,7 +533,9 @@ tp_contact_factory_get_capabilities_cb (DBusGProxy *proxy, if (error) { empathy_debug (DEBUG_DOMAIN, "Error getting capabilities: %s", - error->message); + error->message); + /* FIXME Should set the capabilities of the contacts for which this request + * originated to NONE */ goto OUT; } |