1 /*
2  * This program is free software; you can redistribute it and/or modify it
3  * under the terms of the GNU Lesser General Public License as published by
4  * the Free Software Foundation.
5  *
6  * This program is distributed in the hope that it will be useful, but
7  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
8  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9  * for more details.
10  *
11  * You should have received a copy of the GNU Lesser General Public License
12  * along with this program; if not, see <http://www.gnu.org/licenses/>.
13  *
14  *
15  * Authors:
16  *		Mike Kestner
17  *
18  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
19  *
20  */
21 
22 #ifndef E_MEETING_STORE_H
23 #define E_MEETING_STORE_H
24 
25 #include <gtk/gtk.h>
26 #include <libecal/libecal.h>
27 
28 #include <e-util/e-util.h>
29 
30 #include "e-meeting-attendee.h"
31 
32 /* Standard GObject macros */
33 #define E_TYPE_MEETING_STORE \
34 	(e_meeting_store_get_type ())
35 #define E_MEETING_STORE(obj) \
36 	(G_TYPE_CHECK_INSTANCE_CAST \
37 	((obj), E_TYPE_MEETING_STORE, EMeetingStore))
38 #define E_MEETING_STORE_CLASS(cls) \
39 	(G_TYPE_CHECK_CLASS_CAST \
40 	((cls), E_TYPE_MEETING_STORE, EMeetingStoreClass))
41 #define E_IS_MEETING_STORE(obj) \
42 	(G_TYPE_CHECK_INSTANCE_TYPE \
43 	((obj), E_TYPE_MEETING_STORE))
44 #define E_IS_MEETING_STORE_CLASS(cls) \
45 	(G_TYPE_CHECK_CLASS_TYPE \
46 	((obj), E_TYPE_MEETING_STORE))
47 #define E_MEETING_STORE_GET_CLASS(obj) \
48 	(G_TYPE_INSTANCE_GET_CLASS \
49 	((obj), E_TYPE_MEETING_STORE, EMeetingStoreClass))
50 
51 G_BEGIN_DECLS
52 
53 typedef struct _EMeetingStore EMeetingStore;
54 typedef struct _EMeetingStoreClass EMeetingStoreClass;
55 typedef struct _EMeetingStorePrivate EMeetingStorePrivate;
56 
57 typedef enum {
58 	E_MEETING_STORE_ADDRESS_COL,
59 	E_MEETING_STORE_MEMBER_COL,
60 	E_MEETING_STORE_TYPE_COL,
61 	E_MEETING_STORE_ROLE_COL,
62 	E_MEETING_STORE_RSVP_COL,
63 	E_MEETING_STORE_DELTO_COL,
64 	E_MEETING_STORE_DELFROM_COL,
65 	E_MEETING_STORE_STATUS_COL,
66 	E_MEETING_STORE_CN_COL,
67 	E_MEETING_STORE_LANGUAGE_COL,
68 	E_MEETING_STORE_ATTENDEE_COL,
69 	E_MEETING_STORE_ATTENDEE_UNDERLINE_COL,
70 	E_MEETING_STORE_COLUMN_COUNT
71 } EMeetingStoreColumns;
72 
73 struct _EMeetingStore {
74 	GtkListStore parent;
75 	EMeetingStorePrivate *priv;
76 };
77 
78 struct _EMeetingStoreClass {
79 	GtkListStoreClass parent_class;
80 };
81 
82 typedef gboolean (*EMeetingStoreRefreshCallback) (gpointer data);
83 
84 GType		e_meeting_store_get_type	(void);
85 GObject *	e_meeting_store_new		(void);
86 void		e_meeting_store_set_value	(EMeetingStore *meeting_store,
87 						 gint row,
88 						 gint col,
89 						 const gchar *val);
90 ECalClient *	e_meeting_store_get_client	(EMeetingStore *meeting_store);
91 void		e_meeting_store_set_client	(EMeetingStore *meeting_store,
92 						 ECalClient *client);
93 gint		e_meeting_store_get_default_reminder_interval
94 						(EMeetingStore *meeting_store);
95 void		e_meeting_store_set_default_reminder_interval
96 						(EMeetingStore *meeting_store,
97 						 gint default_reminder_interval);
98 EDurationType	e_meeting_store_get_default_reminder_units
99 						(EMeetingStore *meeting_store);
100 void		e_meeting_store_set_default_reminder_units
101 						(EMeetingStore *meeting_store,
102 						 EDurationType default_reminder_units);
103 const gchar *	e_meeting_store_get_free_busy_template
104 						(EMeetingStore *meeting_store);
105 void		e_meeting_store_set_free_busy_template
106 						(EMeetingStore *meeting_store,
107 						 const gchar *free_busy_template);
108 ICalTimezone *	e_meeting_store_get_timezone	(EMeetingStore *meeting_store);
109 void		e_meeting_store_set_timezone	(EMeetingStore *meeting_store,
110 						 const ICalTimezone *timezone);
111 gboolean	e_meeting_store_get_show_address(EMeetingStore *store);
112 void		e_meeting_store_set_show_address(EMeetingStore *store,
113 						 gboolean show_address);
114 void		e_meeting_store_add_attendee	(EMeetingStore *meeting_store,
115 						 EMeetingAttendee *attendee);
116 EMeetingAttendee *
117 		e_meeting_store_add_attendee_with_defaults
118 						(EMeetingStore *meeting_store);
119 void		e_meeting_store_remove_attendee	(EMeetingStore *meeting_store,
120 						 EMeetingAttendee *attendee);
121 void		e_meeting_store_remove_all_attendees
122 						(EMeetingStore *meeting_store);
123 EMeetingAttendee *
124 		e_meeting_store_find_self	(EMeetingStore *meeting_store,
125 						 gint *row);
126 EMeetingAttendee *
127 		e_meeting_store_find_attendee	(EMeetingStore *meeting_store,
128 						 const gchar *address,
129 						 gint *row);
130 EMeetingAttendee *
131 		e_meeting_store_find_attendee_at_row
132 						(EMeetingStore *meeting_store,
133 						 gint row);
134 GtkTreePath *	e_meeting_store_find_attendee_path
135 						(EMeetingStore *meeting_store,
136 						 EMeetingAttendee *attendee);
137 gint		e_meeting_store_count_actual_attendees
138 						(EMeetingStore *meeting_store);
139 const GPtrArray *
140 		e_meeting_store_get_attendees	(EMeetingStore *meeting_store);
141 void		e_meeting_store_refresh_all_busy_periods
142 						(EMeetingStore *meeting_store,
143 						 EMeetingTime *start,
144 						 EMeetingTime *end,
145 						 EMeetingStoreRefreshCallback call_back,
146 						 gpointer data);
147 void		e_meeting_store_refresh_busy_periods
148 						(EMeetingStore *meeting_store,
149 						 gint row,
150 						 EMeetingTime *start,
151 						 EMeetingTime *end,
152 						 EMeetingStoreRefreshCallback call_back,
153 						 gpointer data);
154 
155 guint		e_meeting_store_get_num_queries	(EMeetingStore *meeting_store);
156 
157 G_END_DECLS
158 
159 #endif
160