1 /*
2  * e-data-cal.h
3  *
4  * This library is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11  * for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library. If not, see <http://www.gnu.org/licenses/>.
15  *
16  */
17 
18 #if !defined (__LIBEDATA_CAL_H_INSIDE__) && !defined (LIBEDATA_CAL_COMPILATION)
19 #error "Only <libedata-cal/libedata-cal.h> should be included directly."
20 #endif
21 
22 #ifndef E_DATA_CAL_H
23 #define E_DATA_CAL_H
24 
25 #include <gio/gio.h>
26 #include <libedata-cal/e-data-cal-view.h>
27 
28 /* Standard GObject macros */
29 #define E_TYPE_DATA_CAL \
30 	(e_data_cal_get_type ())
31 #define E_DATA_CAL(obj) \
32 	(G_TYPE_CHECK_INSTANCE_CAST \
33 	((obj), E_TYPE_DATA_CAL, EDataCal))
34 #define E_DATA_CAL_CLASS(cls) \
35 	(G_TYPE_CHECK_CLASS_CAST \
36 	((cls), E_TYPE_DATA_CAL, EDataCalClass))
37 #define E_IS_DATA_CAL(obj) \
38 	(G_TYPE_CHECK_INSTANCE_TYPE \
39 	((obj), E_TYPE_DATA_CAL))
40 #define E_IS_DATA_CAL_CLASS(cls) \
41 	(G_TYPE_CHECK_CLASS_TYPE \
42 	((cls), E_TYPE_DATA_CAL))
43 #define E_DATA_CAL_GET_CLASS(obj) \
44 	(G_TYPE_INSTANCE_GET_CLASS \
45 	((obj), E_TYPE_DATA_CAL, EDataCalClass))
46 
47 G_BEGIN_DECLS
48 
49 struct _ECalBackend;
50 
51 typedef struct _EDataCal EDataCal;
52 typedef struct _EDataCalClass EDataCalClass;
53 typedef struct _EDataCalPrivate EDataCalPrivate;
54 
55 struct _EDataCal {
56 	GObject parent;
57 	EDataCalPrivate *priv;
58 };
59 
60 struct _EDataCalClass {
61 	GObjectClass parent_class;
62 };
63 
64 GType		e_data_cal_get_type		(void) G_GNUC_CONST;
65 EDataCal *	e_data_cal_new			(struct _ECalBackend *backend,
66 						 GDBusConnection *connection,
67 						 const gchar *object_path,
68 						 GError **error);
69 struct _ECalBackend *
70 		e_data_cal_ref_backend		(EDataCal *cal);
71 GDBusConnection *
72 		e_data_cal_get_connection	(EDataCal *cal);
73 const gchar *	e_data_cal_get_object_path	(EDataCal *cal);
74 
75 void		e_data_cal_respond_open		(EDataCal *cal,
76 						 guint32 opid,
77 						 GError *error);
78 void		e_data_cal_respond_refresh	(EDataCal *cal,
79 						 guint32 opid,
80 						 GError *error);
81 void		e_data_cal_respond_get_object	(EDataCal *cal,
82 						 guint32 opid,
83 						 GError *error,
84 						 const gchar *object);
85 void		e_data_cal_respond_get_object_list
86 						(EDataCal *cal,
87 						 guint32 opid,
88 						 GError *error,
89 						 const GSList *objects);
90 void		e_data_cal_respond_get_free_busy
91 						(EDataCal *cal,
92 						 guint32 opid,
93 						 GError *error,
94 						 const GSList *freebusy);
95 void		e_data_cal_respond_create_objects
96 						(EDataCal *cal,
97 						 guint32 opid,
98 						 GError *error,
99 						 const GSList *uids,
100 						 GSList *new_components);
101 void		e_data_cal_respond_modify_objects
102 						(EDataCal *cal,
103 						 guint32 opid,
104 						 GError *error,
105 						 GSList *old_components,
106 						 GSList *new_components);
107 void		e_data_cal_respond_remove_objects
108 						(EDataCal *cal,
109 						 guint32 opid,
110 						 GError *error,
111 						 const GSList *ids,
112 						 GSList *old_components,
113 						 GSList *new_components);
114 void		e_data_cal_respond_receive_objects
115 						(EDataCal *cal,
116 						 guint32 opid,
117 						 GError *error);
118 void		e_data_cal_respond_send_objects	(EDataCal *cal,
119 						 guint32 opid,
120 						 GError *error,
121 						 const GSList *users,
122 						 const gchar *calobj);
123 void		e_data_cal_respond_get_attachment_uris
124 						(EDataCal *cal,
125 						 guint32 opid,
126 						 GError *error,
127 						 const GSList *attachment_uris);
128 void		e_data_cal_respond_discard_alarm
129 						(EDataCal *cal,
130 						 guint32 opid,
131 						 GError *error);
132 void		e_data_cal_respond_get_timezone	(EDataCal *cal,
133 						 guint32 opid,
134 						 GError *error,
135 						 const gchar *tzobject);
136 void		e_data_cal_respond_add_timezone	(EDataCal *cal,
137 						 guint32 opid,
138 						 GError *error);
139 void		e_data_cal_report_error		(EDataCal *cal,
140 						 const gchar *message);
141 void		e_data_cal_report_free_busy_data
142 						(EDataCal *cal,
143 						 const GSList *freebusy);
144 void		e_data_cal_report_backend_property_changed
145 						(EDataCal *cal,
146 						 const gchar *prop_name,
147 						 const gchar *prop_value);
148 
149 G_END_DECLS
150 
151 #endif /* E_DATA_CAL_H */
152