Bug 793125 - Crash due to popup menus left attached too long
[evolution.git] / src / calendar / gui / itip-utils.h
blob47b19fc4378131331918f8a1ef6c1e07f33c636a
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.
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.
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/>.
15 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
19 #ifndef ITIP_UTILS_H
20 #define ITIP_UTILS_H
22 #include <libical/ical.h>
23 #include <string.h>
24 #include <libecal/libecal.h>
25 #include <calendar/gui/e-cal-model.h>
27 G_BEGIN_DECLS
29 typedef enum {
30 E_CAL_COMPONENT_METHOD_NONE = -1,
31 E_CAL_COMPONENT_METHOD_PUBLISH,
32 E_CAL_COMPONENT_METHOD_REQUEST,
33 E_CAL_COMPONENT_METHOD_REPLY,
34 E_CAL_COMPONENT_METHOD_ADD,
35 E_CAL_COMPONENT_METHOD_CANCEL,
36 E_CAL_COMPONENT_METHOD_REFRESH,
37 E_CAL_COMPONENT_METHOD_COUNTER,
38 E_CAL_COMPONENT_METHOD_DECLINECOUNTER
39 } ECalComponentItipMethod;
41 struct CalMimeAttach {
42 gchar *filename;
43 gchar *content_type;
44 gchar *content_id;
45 gchar *description;
46 gchar *encoded_data;
47 gboolean disposition;
48 guint length;
51 void itip_cal_mime_attach_free (gpointer ptr); /* struct CalMimeAttach * */
53 gboolean itip_get_default_name_and_address
54 (ESourceRegistry *registry,
55 gchar **name,
56 gchar **address);
57 gchar ** itip_get_user_identities (ESourceRegistry *registry);
58 gchar * itip_get_fallback_identity (ESourceRegistry *registry);
59 gboolean itip_address_is_user (ESourceRegistry *registry,
60 const gchar *address);
61 gboolean itip_organizer_is_user (ESourceRegistry *registry,
62 ECalComponent *comp,
63 ECalClient *cal_client);
64 gboolean itip_organizer_is_user_ex (ESourceRegistry *registry,
65 ECalComponent *comp,
66 ECalClient *cal_client,
67 gboolean skip_cap_test);
68 gboolean itip_sentby_is_user (ESourceRegistry *registry,
69 ECalComponent *comp,
70 ECalClient *cal_client);
71 gboolean itip_has_any_attendees (ECalComponent *comp);
72 const gchar * itip_strip_mailto (const gchar *address);
73 gchar * itip_get_comp_attendee (ESourceRegistry *registry,
74 ECalComponent *comp,
75 ECalClient *cal_client);
76 gboolean itip_send_comp_sync (ESourceRegistry *registry,
77 ECalComponentItipMethod method,
78 ECalComponent *send_comp,
79 ECalClient *cal_client,
80 icalcomponent *zones,
81 GSList *attachments_list,
82 GSList *users,
83 gboolean strip_alarms,
84 gboolean only_new_attendees,
85 GCancellable *cancellable,
86 GError **error);
87 void itip_send_component_with_model (ECalModel *model,
88 ECalComponentItipMethod method,
89 ECalComponent *send_comp,
90 ECalClient *cal_client,
91 icalcomponent *zones,
92 GSList *attachments_list,
93 GSList *users,
94 gboolean strip_alarms,
95 gboolean only_new_attendees,
96 gboolean ensure_master_object);
97 void itip_send_component (ESourceRegistry *registry,
98 ECalComponentItipMethod method,
99 ECalComponent *send_comp,
100 ECalClient *cal_client,
101 icalcomponent *zones,
102 GSList *attachments_list,
103 GSList *users,
104 gboolean strip_alarms,
105 gboolean only_new_attendees,
106 gboolean ensure_master_object,
107 GCancellable *cancellable,
108 GAsyncReadyCallback callback,
109 gpointer user_data);
110 gboolean itip_send_component_finish (GAsyncResult *result,
111 GError **error);
112 gboolean itip_publish_begin (ECalComponent *pub_comp,
113 ECalClient *cal_client,
114 gboolean cloned,
115 ECalComponent **clone);
116 gboolean reply_to_calendar_comp (ESourceRegistry *registry,
117 ECalComponentItipMethod method,
118 ECalComponent *send_comp,
119 ECalClient *cal_client,
120 gboolean reply_all,
121 icalcomponent *zones,
122 GSList *attachments_list);
123 gboolean is_icalcomp_valid (icalcomponent *icalcomp);
124 gboolean itip_component_has_recipients (ECalComponent *comp);
126 G_END_DECLS
128 #endif /* ITIP_UTILS_H */