1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2007 Collabora Ltd.
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * This program 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 * General Public License for more details.
15 * You should have received a copy of the GNU General Public
16 * License along with this program; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
20 * Authors: Xavier Claessens <xclaesse@gmail.com>
23 #ifndef __EMPATHY_CONTACT_LIST_H__
24 #define __EMPATHY_CONTACT_LIST_H__
26 #include <glib-object.h>
28 #include "gossip-contact.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 (*setup) (EmpathyContactList *list);
45 GossipContact * (*find) (EmpathyContactList *list,
47 void (*add) (EmpathyContactList *list,
48 GossipContact *contact,
49 const gchar *message);
50 void (*remove) (EmpathyContactList *list,
51 GossipContact *contact,
52 const gchar *message);
53 GList * (*get_contacts) (EmpathyContactList *list);
56 GType empathy_contact_list_get_type (void) G_GNUC_CONST;
57 void empathy_contact_list_setup (EmpathyContactList *list);
58 GossipContact * empathy_contact_list_find (EmpathyContactList *list,
60 void empathy_contact_list_add (EmpathyContactList *list,
61 GossipContact *contact,
62 const gchar *message);
63 void empathy_contact_list_remove (EmpathyContactList *list,
64 GossipContact *contact,
65 const gchar *message);
66 GList * empathy_contact_list_get_contacts (EmpathyContactList *list);
70 #endif /* __EMPATHY_CONTACT_LIST_H__ */