1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* Evolution calendar factory
3  *
4  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
5  *
6  * This library is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13  * for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this library. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * Authors: Federico Mena-Quintero <federico@ximian.com>
19  */
20 
21 #if !defined (__LIBEDATA_CAL_H_INSIDE__) && !defined (LIBEDATA_CAL_COMPILATION)
22 #error "Only <libedata-cal/libedata-cal.h> should be included directly."
23 #endif
24 
25 #ifndef E_DATA_CAL_FACTORY_H
26 #define E_DATA_CAL_FACTORY_H
27 
28 #include <libebackend/libebackend.h>
29 
30 /* Standard GObject macros */
31 #define E_TYPE_DATA_CAL_FACTORY \
32 	(e_data_cal_factory_get_type ())
33 #define E_DATA_CAL_FACTORY(obj) \
34 	(G_TYPE_CHECK_INSTANCE_CAST \
35 	((obj), E_TYPE_DATA_CAL_FACTORY, EDataCalFactory))
36 #define E_DATA_CAL_FACTORY_CLASS(cls) \
37 	(G_TYPE_CHECK_CLASS_CAST \
38 	((cls), E_TYPE_DATA_CAL_FACTORY,  EDataCalFactoryClass))
39 #define E_IS_DATA_CAL_FACTORY(obj) \
40 	(G_TYPE_CHECK_INSTANCE_TYPE \
41 	((obj), E_TYPE_DATA_CAL_FACTORY))
42 #define E_IS_DATA_CAL_FACTORY_CLASS(cls) \
43 	(G_TYPE_CHECK_CLASS_TYPE \
44 	((cls), E_TYPE_DATA_CAL_FACTORY))
45 #define E_DATA_CAL_FACTORY_GET_CLASS(obj) \
46 	(G_TYPE_INSTANCE_GET_CLASS \
47 	((obj), E_TYPE_DATA_CAL_FACTORY, EDataCalFactoryClass))
48 
49 /**
50  * EDS_CALENDAR_MODULES:
51  *
52  * This environment variable configures where the calendar
53  * factory loads its backend modules from.
54  */
55 #define EDS_CALENDAR_MODULES    "EDS_CALENDAR_MODULES"
56 
57 /**
58  * EDS_SUBPROCESS_CAL_PATH:
59  *
60  * This environment variable configures where the calendar
61  * factory subprocess is located in.
62  */
63 #define EDS_SUBPROCESS_CAL_PATH "EDS_SUBPROCESS_CAL_PATH"
64 
65 G_BEGIN_DECLS
66 
67 typedef struct _EDataCalFactory EDataCalFactory;
68 typedef struct _EDataCalFactoryClass EDataCalFactoryClass;
69 typedef struct _EDataCalFactoryPrivate EDataCalFactoryPrivate;
70 
71 struct _EDataCalFactory {
72 	EDataFactory parent;
73 	EDataCalFactoryPrivate *priv;
74 };
75 
76 struct _EDataCalFactoryClass {
77 	EDataFactoryClass parent_class;
78 };
79 
80 GType		e_data_cal_factory_get_type	(void);
81 EDBusServer *	e_data_cal_factory_new		(gint backend_per_process,
82 						 GCancellable *cancellable,
83 						 GError **error);
84 
85 G_END_DECLS
86 
87 #endif /* E_DATA_CAL_FACTORY_H */
88