File: e-source-list.h

package info (click to toggle)
evolution-data-server 1.0.4-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 39,504 kB
  • ctags: 26,423
  • sloc: ansic: 175,347; tcl: 30,499; sh: 20,699; perl: 11,320; xml: 9,039; java: 7,653; cpp: 6,029; makefile: 4,866; awk: 1,338; yacc: 1,103; sed: 772; cs: 505; lex: 134; asm: 14
file content (92 lines) | stat: -rw-r--r-- 3,192 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* e-source-list.h
 *
 * Copyright (C) 2003  Ximian, Inc.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * Author: Ettore Perazzoli <ettore@ximian.com>
 */

#ifndef _E_SOURCE_LIST_H_
#define _E_SOURCE_LIST_H_

#include <libxml/tree.h>
#include <gconf/gconf-client.h>

#include "e-source-group.h"

G_BEGIN_DECLS

#define E_TYPE_SOURCE_LIST			(e_source_list_get_type ())
#define E_SOURCE_LIST(obj)			(G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_SOURCE_LIST, ESourceList))
#define E_SOURCE_LIST_CLASS(klass)		(G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_SOURCE_LIST, ESourceListClass))
#define E_IS_SOURCE_LIST(obj)			(G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SOURCE_LIST))
#define E_IS_SOURCE_LIST_CLASS(klass)		(G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_SOURCE_LIST))


typedef struct _ESourceList        ESourceList;
typedef struct _ESourceListPrivate ESourceListPrivate;
typedef struct _ESourceListClass   ESourceListClass;

struct _ESourceList {
	GObject parent;

	ESourceListPrivate *priv;
};

struct _ESourceListClass {
	GObjectClass parent_class;

	/* Signals.  */

	void (* changed) (ESourceList *source_list);

	void (* group_removed) (ESourceList *source_list, ESourceGroup *group);
	void (* group_added) (ESourceList *source_list, ESourceGroup *group);
};


GType    e_source_list_get_type (void);

ESourceList *e_source_list_new            (void);
ESourceList *e_source_list_new_for_gconf  (GConfClient *client,
					   const char  *path);
ESourceList *e_source_list_new_for_gconf_default  (const char  *path);

GSList       *e_source_list_peek_groups         (ESourceList *list);
ESourceGroup *e_source_list_peek_group_by_uid   (ESourceList *list,
						 const char  *uid);
ESourceGroup *e_source_list_peek_group_by_name  (ESourceList *list,
						 const char *name);
ESource      *e_source_list_peek_source_by_uid  (ESourceList *list,
						 const char  *uid);
ESource      *e_source_list_peek_source_any     (ESourceList *list);
gboolean  e_source_list_add_group             (ESourceList  *list,
					       ESourceGroup *group,
					       int           position);
gboolean  e_source_list_remove_group          (ESourceList  *list,
					       ESourceGroup *group);
gboolean  e_source_list_remove_group_by_uid   (ESourceList  *list,
					       const char   *uid);
gboolean  e_source_list_remove_source_by_uid  (ESourceList  *list,
					       const char   *uidj);

gboolean  e_source_list_sync  (ESourceList  *list,
			       GError      **error);

G_END_DECLS

#endif /* _E_SOURCE_LIST_H_ */