1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
4 * Copyright (C) 2003 Ximian, Inc.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of version 2 of the GNU Lesser General Public
8 * License as published by the Free Software Foundation.
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 Lesser General Public
16 * License along with this program; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
20 * Author: Ettore Perazzoli <ettore@ximian.com>
23 #ifndef _E_SOURCE_LIST_H_
24 #define _E_SOURCE_LIST_H_
26 #include <libxml/tree.h>
27 #include <gconf/gconf-client.h>
29 #include "e-source-group.h"
33 #define E_TYPE_SOURCE_LIST (e_source_list_get_type ())
34 #define E_SOURCE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_SOURCE_LIST, ESourceList))
35 #define E_SOURCE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_SOURCE_LIST, ESourceListClass))
36 #define E_IS_SOURCE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SOURCE_LIST))
37 #define E_IS_SOURCE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_SOURCE_LIST))
40 typedef struct _ESourceList ESourceList;
41 typedef struct _ESourceListPrivate ESourceListPrivate;
42 typedef struct _ESourceListClass ESourceListClass;
47 ESourceListPrivate *priv;
50 struct _ESourceListClass {
51 GObjectClass parent_class;
55 void (* changed) (ESourceList *source_list);
57 void (* group_removed) (ESourceList *source_list, ESourceGroup *group);
58 void (* group_added) (ESourceList *source_list, ESourceGroup *group);
62 GType e_source_list_get_type (void);
64 ESourceList *e_source_list_new (void);
65 ESourceList *e_source_list_new_for_gconf (GConfClient *client,
67 ESourceList *e_source_list_new_for_gconf_default (const char *path);
69 GSList *e_source_list_peek_groups (ESourceList *list);
70 ESourceGroup *e_source_list_peek_group_by_uid (ESourceList *list,
72 ESourceGroup *e_source_list_peek_group_by_name (ESourceList *list,
74 ESource *e_source_list_peek_source_by_uid (ESourceList *list,
76 ESource *e_source_list_peek_source_any (ESourceList *list);
77 gboolean e_source_list_add_group (ESourceList *list,
80 gboolean e_source_list_remove_group (ESourceList *list,
82 gboolean e_source_list_remove_group_by_uid (ESourceList *list,
84 gboolean e_source_list_remove_source_by_uid (ESourceList *list,
87 gboolean e_source_list_sync (ESourceList *list,
90 gboolean e_source_list_is_gconf_updated (ESourceList *list);
94 #endif /* _E_SOURCE_LIST_H_ */