]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-contact-list.c
add myself to AUTHORS
[empathy.git] / libempathy / empathy-contact-list.c
index 80308314eb129a203105860fb60f3426762db3ea..d4859210a6508e3dab49d40d9bf55d710a8a5167 100644 (file)
@@ -1,21 +1,20 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
- * Copyright (C) 2007 Collabora Ltd.
+ * Copyright (C) 2007-2008 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;
@@ -53,12 +54,21 @@ contact_list_base_init (gpointer klass)
        static gboolean initialized = FALSE;
 
        if (!initialized) {
+               g_signal_new ("member-renamed",
+                             G_TYPE_FROM_CLASS (klass),
+                             G_SIGNAL_RUN_LAST,
+                             0,
+                             NULL, NULL,
+                             _empathy_marshal_VOID__OBJECT_OBJECT_UINT_STRING,
+                             G_TYPE_NONE,
+                             4, EMPATHY_TYPE_CONTACT, EMPATHY_TYPE_CONTACT, G_TYPE_UINT, G_TYPE_STRING);
+
                g_signal_new ("members-changed",
                              G_TYPE_FROM_CLASS (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 +78,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 +88,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);
 
@@ -124,6 +134,18 @@ empathy_contact_list_get_members (EmpathyContactList *list)
        return NULL;
 }
 
+EmpathyContactMonitor *
+empathy_contact_list_get_monitor (EmpathyContactList *list)
+{
+       g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST (list), NULL);
+
+       if (EMPATHY_CONTACT_LIST_GET_IFACE (list)->get_monitor) {
+               return EMPATHY_CONTACT_LIST_GET_IFACE (list)->get_monitor (list);
+       }
+
+       return NULL;
+}
+
 GList *
 empathy_contact_list_get_pendings (EmpathyContactList *list)
 {
@@ -204,3 +226,26 @@ 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);
+       }
+}
+
+EmpathyContactListFlags
+empathy_contact_list_get_flags (EmpathyContactList *list)
+{
+       g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST (list), 0);
+
+       if (EMPATHY_CONTACT_LIST_GET_IFACE (list)->get_flags) {
+               return EMPATHY_CONTACT_LIST_GET_IFACE (list)->get_flags (list);
+       } else {
+               return 0;
+       }
+}