1 
2 /*
3  * Osmo - a handy personal organizer
4  *
5  * Copyright (C) 2007 Tomasz Maka <pasp@users.sourceforge.net>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20  */
21 
22 #ifndef _CALENDAR_ICAL_H
23 #define _CALENDAR_ICAL_H
24 
25 #include "gui.h"
26 #include "calendar_utils.h"
27 
28 #ifdef HAVE_LIBICAL
29 
30 #define ICAL_NAME               "osmo_ical_files"
31 #define ICAL_ENTRIES_FILENAME   "ical_files.xml"
32 
33 struct ics_entry {
34 	guint32 julian;
35 	gint seconds_begin;
36 	gint seconds_end;
37     gchar *summary;
38     gchar *description;
39 };
40 
41 struct ics_file {
42     gchar *filename;
43     GSList *entries_list;
44 };
45 
46 enum {
47     I_COLUMN_DATE = 0,
48     I_COLUMN_DATE_JULIAN,
49     I_COLUMN_TIME,
50     I_COLUMN_TIME_B_SECONDS,
51     I_COLUMN_TIME_E_SECONDS,
52     I_COLUMN_SUMMARY,
53     I_COLUMN_FONT_WEIGHT,
54     ICAL_EVENTS_NUM_COLUMNS
55 };
56 
57 enum {
58     IE_COLUMN_DATE = 0,
59     IE_COLUMN_DATE_JULIAN,
60     IE_COLUMN_SUMMARY,
61     IE_COLUMN_DESCRIPTION,
62     ICAL_EXPORT_NUM_COLUMNS
63 };
64 
65 void        calendar_display_ics    (GDate *date, gchar **html, GUI *appGUI);
66 
67 void        ics_initialize_timezone (void);
68 void        ics_check_if_valid      (GUI *appGUI);
69 void        ics_calendar_refresh    (GUI *appGUI);
70 gboolean    ics_check_event         (guint32 julian, GUI *appGUI);
71 
72 void        ical_events_browser     (GUI *appGUI);
73 void        ical_export             (GUI *appGUI);
74 void        read_ical_entries       (GUI *appGUI);
75 void        write_ical_entries      (GUI *appGUI);
76 
77 #endif  /* HAVE_LIBICAL */
78 
79 #endif /* _CALENDAR_ICAL_H */
80 
81