]> git.0d.be Git - empathy.git/blob - libempathy/empathy-contact-list.h
EmpathyContactList is now an interface implemented by
[empathy.git] / libempathy / empathy-contact-list.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2007 Collabora Ltd.
4  *
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.
9  *
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.
14  *
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.
19  *
20  * Authors: Xavier Claessens <xclaesse@gmail.com>
21  */
22
23 #ifndef __EMPATHY_CONTACT_LIST_H__
24 #define __EMPATHY_CONTACT_LIST_H__
25
26 #include <glib-object.h>
27
28 #include "gossip-contact.h"
29
30 G_BEGIN_DECLS
31
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))
36
37 typedef struct _EmpathyContactList      EmpathyContactList;
38 typedef struct _EmpathyContactListIface EmpathyContactListIface;
39
40 struct _EmpathyContactListIface {
41         GTypeInterface   base_iface;
42
43         /* VTabled */
44         void            (*setup)        (EmpathyContactList *list);
45         GossipContact * (*find)         (EmpathyContactList *list,
46                                          const gchar        *id);
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);
54 };
55
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,
59                                                    const gchar        *id);
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);
67
68 G_END_DECLS
69
70 #endif /* __EMPATHY_CONTACT_LIST_H__ */
71