]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-contact-list.c
Merge call branch from Elliot Fairweather with cleanups from Xavier Claessens.
[empathy.git] / libempathy / empathy-contact-list.c
index 80308314eb129a203105860fb60f3426762db3ea..c34dc533491fa76df4e9d583023baa8a0b81223c 100644 (file)
@@ -2,20 +2,19 @@
 /*
  * Copyright (C) 2007 Collabora Ltd.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
  *
- * This program is distributed in the hope that it will be useful,
+ * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
+ * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  *
  * Authors: Xavier Claessens <xclaesse@gmail.com>
  */
@@ -42,6 +41,8 @@ empathy_contact_list_get_type (void)
                type = g_type_register_static (G_TYPE_INTERFACE,
                                               "EmpathyContactList",
                                               &type_info, 0);
+
+               g_type_interface_add_prerequisite (type, G_TYPE_OBJECT);
        }
 
        return type;
@@ -58,7 +59,7 @@ contact_list_base_init (gpointer klass)
                              G_SIGNAL_RUN_LAST,
                              0,
                              NULL, NULL,
-                             empathy_marshal_VOID__OBJECT_OBJECT_UINT_STRING_BOOLEAN,
+                             _empathy_marshal_VOID__OBJECT_OBJECT_UINT_STRING_BOOLEAN,
                              G_TYPE_NONE,
                              5, EMPATHY_TYPE_CONTACT, EMPATHY_TYPE_CONTACT,
                              G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN);
@@ -68,7 +69,7 @@ contact_list_base_init (gpointer klass)
                              G_SIGNAL_RUN_LAST,
                              0,
                              NULL, NULL,
-                             empathy_marshal_VOID__OBJECT_OBJECT_UINT_STRING_BOOLEAN,
+                             _empathy_marshal_VOID__OBJECT_OBJECT_UINT_STRING_BOOLEAN,
                              G_TYPE_NONE,
                              5, EMPATHY_TYPE_CONTACT, EMPATHY_TYPE_CONTACT,
                              G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN);
@@ -78,7 +79,7 @@ contact_list_base_init (gpointer klass)
                              G_SIGNAL_RUN_LAST,
                              0,
                              NULL, NULL,
-                             empathy_marshal_VOID__OBJECT_STRING_BOOLEAN,
+                             _empathy_marshal_VOID__OBJECT_STRING_BOOLEAN,
                              G_TYPE_NONE,
                              3, EMPATHY_TYPE_CONTACT, G_TYPE_STRING, G_TYPE_BOOLEAN);
 
@@ -204,3 +205,15 @@ empathy_contact_list_rename_group (EmpathyContactList *list,
        }
 }
 
+void
+empathy_contact_list_remove_group (EmpathyContactList *list,
+                                  const gchar *group)
+{
+       g_return_if_fail (EMPATHY_IS_CONTACT_LIST (list));
+       g_return_if_fail (group != NULL);
+
+       if (EMPATHY_CONTACT_LIST_GET_IFACE (list)->remove_group) {
+               EMPATHY_CONTACT_LIST_GET_IFACE (list)->remove_group (list, group);
+       }
+}
+