1 /* 2 * 3 * This program is free software; you can redistribute it and/or modify it 4 * under the terms of the GNU Lesser General Public License as published by 5 * the Free Software Foundation. 6 * 7 * This program is distributed in the hope that it will be useful, but 8 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 9 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 10 * for more details. 11 * 12 * You should have received a copy of the GNU Lesser General Public License 13 * along with this program; if not, see <http://www.gnu.org/licenses/>. 14 * 15 * 16 * Authors: 17 * JP Rosevear <jpr@novell.com> 18 * 19 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) 20 * 21 */ 22 23 #ifndef _E_MEETING_TYPES_H_ 24 #define _E_MEETING_TYPES_H_ 25 26 #include <glib.h> 27 28 /* Extended free/busy (XFB) vfreebusy properties */ 29 #define E_MEETING_FREE_BUSY_XPROP_SUMMARY "X-SUMMARY" 30 #define E_MEETING_FREE_BUSY_XPROP_LOCATION "X-LOCATION" 31 /* Maximum string length displayed in the XFB tooltip */ 32 #define E_MEETING_FREE_BUSY_XPROP_MAXLEN 200 33 34 G_BEGIN_DECLS 35 36 typedef struct _EMeetingTime EMeetingTime; 37 typedef struct _EMeetingFreeBusyPeriod EMeetingFreeBusyPeriod; 38 typedef struct _EMeetingXfbData EMeetingXfbData; 39 40 /* These are used to specify whether an attendee is free or busy at a 41 * particular time. We'll probably replace this with a global calendar type. 42 * These should be ordered in increasing order of preference. Higher precedence 43 * busy periods will be painted over lower precedence ones. These are also 44 * used as for loop counters, so they should start at 0 and be ordered. */ 45 typedef enum 46 { 47 E_MEETING_FREE_BUSY_TENTATIVE = 0, 48 E_MEETING_FREE_BUSY_OUT_OF_OFFICE = 1, 49 E_MEETING_FREE_BUSY_BUSY = 2, 50 E_MEETING_FREE_BUSY_FREE = 3, 51 52 E_MEETING_FREE_BUSY_LAST = 4 53 } EMeetingFreeBusyType; 54 55 /* This is our representation of a time. We use a GDate to store the day, 56 * and guint8s for the hours and minutes. */ 57 struct _EMeetingTime 58 { 59 GDate date; 60 guint8 hour; 61 guint8 minute; 62 }; 63 64 /* This represents extended free/busy data (XFB) associated 65 * with a busy period (optional). Groupware servers like Kolab 66 * may send it as X-SUMMARY and X-LOCATION properties of vfreebusy 67 * calendar objects. 68 * See http://wiki.kolab.org/Free_Busy#Kolab_Object_Storage_Format 69 * for a reference. If we find that a vfreebusy object carries 70 * such information, we extract it and display it as a tooltip 71 * for the busy period in the meeting time selector scheduling page. 72 */ 73 struct _EMeetingXfbData 74 { 75 /* if adding more items, adapt e_meeting_xfb_data_clear() */ 76 gchar *summary; 77 gchar *location; 78 }; 79 80 /* This represents a busy period. */ 81 struct _EMeetingFreeBusyPeriod 82 { 83 EMeetingTime start; 84 EMeetingTime end; 85 EMeetingFreeBusyType busy_type; 86 EMeetingXfbData xfb; 87 }; 88 89 G_END_DECLS 90 91 #endif /* _E_MEETING_TYPES_H_ */ 92