2 * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2007 Colin Leroy <colin@colino.net> and
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 #ifndef __VCAL_MANAGER_H__
22 #define __VCAL_MANAGER_H__
26 #include "prefs_account.h"
29 #define EVENT_PAST_ID "past-events@vcal"
30 #define EVENT_TODAY_ID "today-events@vcal"
31 #define EVENT_TOMORROW_ID "tomorrow-events@vcal"
32 #define EVENT_THISWEEK_ID "thisweek-events@vcal"
33 #define EVENT_LATER_ID "later-events@vcal"
34 typedef struct _VCalEvent VCalEvent;
51 enum icalproperty_method method;
54 enum icalcomponent_kind type;
56 gboolean rec_occurence;
59 typedef struct _Answer Answer;
64 enum icalparameter_partstat answer;
65 enum icalparameter_cutype cutype;
75 VCalEvent *vcal_manager_new_event (const gchar *uid,
76 const gchar *organizer,
78 const gchar *location,
80 const gchar *description,
86 enum icalproperty_method method,
88 enum icalcomponent_kind type);
90 void vcal_manager_free_event (VCalEvent *event);
91 void vcal_manager_save_event (VCalEvent *event, gboolean export_after);
92 void vcal_manager_update_answer (VCalEvent *event,
93 const gchar *attendee,
95 enum icalparameter_partstat ans,
96 enum icalparameter_cutype cutype);
98 VCalEvent *vcal_manager_load_event (const gchar *uid);
99 gboolean vcal_manager_reply (PrefsAccount *account,
101 gboolean vcal_manager_request (PrefsAccount *account,
104 GSList *vcal_manager_get_answers_emails(VCalEvent *event);
105 gchar *vcal_manager_get_attendee_name(VCalEvent *event, const gchar *attendee);
106 gchar *vcal_manager_get_reply_text_for_attendee(VCalEvent *event, const gchar *att);
107 gchar *vcal_manager_get_cutype_text_for_attendee(VCalEvent *event, const gchar *att);
108 enum icalparameter_partstat vcal_manager_get_reply_for_attendee(VCalEvent *event, const gchar *att);
109 enum icalparameter_partstat vcal_manager_get_cutype_for_attendee(VCalEvent *event, const gchar *att);
110 gchar *vcal_manager_get_event_path(void);
111 gchar *vcal_manager_get_event_file(const gchar *uid);
112 gchar *vcal_manager_event_dump(VCalEvent *event, gboolean change_date, gboolean
113 change_from, icalcomponent *use_calendar, gboolean modif);
114 gchar *vcal_manager_icalevent_dump(icalcomponent *event, gchar *orga, icalcomponent *use_calendar);
115 gchar *vcal_manager_dateevent_dump(const gchar *uid, FolderItem *item);
117 gchar *vcal_manager_answer_get_text(enum icalparameter_partstat ans);
118 gchar *vcal_manager_cutype_get_text(enum icalparameter_cutype type);
120 PrefsAccount *vcal_manager_get_account_from_event(VCalEvent *event);
122 void vcal_manager_event_print(VCalEvent *event);
123 EventTime event_to_today(VCalEvent *event, time_t t);
124 const gchar *event_to_today_str(VCalEvent *event, time_t t);
125 void vcal_manager_copy_attendees(VCalEvent *src, VCalEvent *dest);
126 Answer *answer_new(const gchar *attendee,
128 enum icalparameter_partstat ans,
129 enum icalparameter_cutype cutype);