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 "empathy-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;
41 EmpathyContact *contact;
43 } EmpathyContactListInfo;
45 struct _EmpathyContactListIface {
46 GTypeInterface base_iface;
49 void (*setup) (EmpathyContactList *list);
50 EmpathyContact * (*find) (EmpathyContactList *list,
52 void (*add) (EmpathyContactList *list,
53 EmpathyContact *contact,
54 const gchar *message);
55 void (*remove) (EmpathyContactList *list,
56 EmpathyContact *contact,
57 const gchar *message);
58 GList * (*get_members) (EmpathyContactList *list);
59 GList * (*get_local_pending) (EmpathyContactList *list);
60 void (*process_pending) (EmpathyContactList *list,
61 EmpathyContact *contact,
65 GType empathy_contact_list_get_type (void) G_GNUC_CONST;
66 EmpathyContactListInfo *empathy_contact_list_info_new (EmpathyContact *contact,
67 const gchar *message);
68 void empathy_contact_list_info_free (EmpathyContactListInfo *info);
69 void empathy_contact_list_setup (EmpathyContactList *list);
70 EmpathyContact * empathy_contact_list_find (EmpathyContactList *list,
72 void empathy_contact_list_add (EmpathyContactList *list,
73 EmpathyContact *contact,
74 const gchar *message);
75 void empathy_contact_list_remove (EmpathyContactList *list,
76 EmpathyContact *contact,
77 const gchar *message);
78 GList * empathy_contact_list_get_members (EmpathyContactList *list);
79 GList * empathy_contact_list_get_local_pending (EmpathyContactList *list);
80 void empathy_contact_list_process_pending (EmpathyContactList *list,
81 EmpathyContact *contact,
86 #endif /* __EMPATHY_CONTACT_LIST_H__ */