1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2007-2008 Collabora Ltd.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 * Authors: Xavier Claessens <xclaesse@gmail.com>
22 #ifndef __EMPATHY_CONTACT_LIST_H__
23 #define __EMPATHY_CONTACT_LIST_H__
25 #include <glib-object.h>
27 #include "empathy-contact.h"
28 #include "empathy-tp-group.h"
32 #define EMPATHY_TYPE_CONTACT_LIST (empathy_contact_list_get_type ())
33 #define EMPATHY_CONTACT_LIST(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CONTACT_LIST, EmpathyContactList))
34 #define EMPATHY_IS_CONTACT_LIST(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CONTACT_LIST))
35 #define EMPATHY_CONTACT_LIST_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), EMPATHY_TYPE_CONTACT_LIST, EmpathyContactListIface))
37 typedef struct _EmpathyContactList EmpathyContactList;
38 typedef struct _EmpathyContactListIface EmpathyContactListIface;
40 struct _EmpathyContactListIface {
41 GTypeInterface base_iface;
44 void (*add) (EmpathyContactList *list,
45 EmpathyContact *contact,
46 const gchar *message);
47 void (*remove) (EmpathyContactList *list,
48 EmpathyContact *contact,
49 const gchar *message);
50 GList * (*get_members) (EmpathyContactList *list);
51 GList * (*get_pendings) (EmpathyContactList *list);
52 GList * (*get_all_groups) (EmpathyContactList *list);
53 GList * (*get_groups) (EmpathyContactList *list,
54 EmpathyContact *contact);
55 void (*add_to_group) (EmpathyContactList *list,
56 EmpathyContact *contact,
58 void (*remove_from_group) (EmpathyContactList *list,
59 EmpathyContact *contact,
61 void (*rename_group) (EmpathyContactList *list,
62 const gchar *old_group,
63 const gchar *new_group);
64 void (*remove_group) (EmpathyContactList *list,
68 GType empathy_contact_list_get_type (void) G_GNUC_CONST;
69 void empathy_contact_list_add (EmpathyContactList *list,
70 EmpathyContact *contact,
71 const gchar *message);
72 void empathy_contact_list_remove (EmpathyContactList *list,
73 EmpathyContact *contact,
74 const gchar *message);
75 GList * empathy_contact_list_get_members (EmpathyContactList *list);
76 GList * empathy_contact_list_get_pendings (EmpathyContactList *list);
77 GList * empathy_contact_list_get_all_groups (EmpathyContactList *list);
78 GList * empathy_contact_list_get_groups (EmpathyContactList *list,
79 EmpathyContact *contact);
80 void empathy_contact_list_add_to_group (EmpathyContactList *list,
81 EmpathyContact *contact,
83 void empathy_contact_list_remove_from_group (EmpathyContactList *list,
84 EmpathyContact *contact,
86 void empathy_contact_list_rename_group (EmpathyContactList *list,
87 const gchar *old_group,
88 const gchar *new_group);
89 void empathy_contact_list_remove_group (EmpathyContactList *list,
94 #endif /* __EMPATHY_CONTACT_LIST_H__ */