]> git.0d.be Git - empathy.git/blobdiff - libempathy/gossip-contact.c
[darcs-to-svn @ Syncing new contact list stuff from gossip]
[empathy.git] / libempathy / gossip-contact.c
index f198254372c0005ec64da4b05b153e3ff5e82d1e..fc0569021a67e76c11bd218342256ce924e96c42 100644 (file)
@@ -610,6 +610,24 @@ gossip_contact_is_online (GossipContact *contact)
        return (priv->presence != NULL);
 }
 
+gboolean
+gossip_contact_is_in_group (GossipContact *contact,
+                           const gchar   *group)
+{
+       GossipContactPriv *priv;
+
+       g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), FALSE);
+       g_return_val_if_fail (!G_STR_EMPTY (group), FALSE);
+
+       priv = GET_PRIV (contact);
+
+       if (g_list_find_custom (priv->groups, group, (GCompareFunc) strcmp)) {
+               return TRUE;
+       }
+
+       return FALSE;
+}
+
 const gchar *
 gossip_contact_get_status (GossipContact *contact)
 {