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
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)
22 #include <libical/ical.h>
24 #include <libecal/libecal.h>
25 #include <calendar/gui/e-cal-model.h>
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
{
51 void itip_cal_mime_attach_free (gpointer ptr
); /* struct CalMimeAttach * */
53 gboolean itip_get_default_name_and_address
54 (ESourceRegistry
*registry
,
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
,
63 ECalClient
*cal_client
);
64 gboolean
itip_organizer_is_user_ex (ESourceRegistry
*registry
,
66 ECalClient
*cal_client
,
67 gboolean skip_cap_test
);
68 gboolean
itip_sentby_is_user (ESourceRegistry
*registry
,
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
,
75 ECalClient
*cal_client
);
76 gboolean
itip_send_comp_sync (ESourceRegistry
*registry
,
77 ECalComponentItipMethod method
,
78 ECalComponent
*send_comp
,
79 ECalClient
*cal_client
,
81 GSList
*attachments_list
,
83 gboolean strip_alarms
,
84 gboolean only_new_attendees
,
85 GCancellable
*cancellable
,
87 void itip_send_component_with_model (ECalModel
*model
,
88 ECalComponentItipMethod method
,
89 ECalComponent
*send_comp
,
90 ECalClient
*cal_client
,
92 GSList
*attachments_list
,
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
,
104 gboolean strip_alarms
,
105 gboolean only_new_attendees
,
106 gboolean ensure_master_object
,
107 GCancellable
*cancellable
,
108 GAsyncReadyCallback callback
,
110 gboolean
itip_send_component_finish (GAsyncResult
*result
,
112 gboolean
itip_publish_begin (ECalComponent
*pub_comp
,
113 ECalClient
*cal_client
,
115 ECalComponent
**clone
);
116 gboolean
reply_to_calendar_comp (ESourceRegistry
*registry
,
117 ECalComponentItipMethod method
,
118 ECalComponent
*send_comp
,
119 ECalClient
*cal_client
,
121 icalcomponent
*zones
,
122 GSList
*attachments_list
);
123 gboolean
is_icalcomp_valid (icalcomponent
*icalcomp
);
124 gboolean
itip_component_has_recipients (ECalComponent
*comp
);
128 #endif /* ITIP_UTILS_H */