libkcal
icaltypes.h
Go to the documentation of this file.00001 /* -*- Mode: C -*- */ 00002 /*====================================================================== 00003 FILE: icaltypes.h 00004 CREATOR: eric 20 March 1999 00005 00006 00007 (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org> 00008 http://www.softwarestudio.org 00009 00010 This program is free software; you can redistribute it and/or modify 00011 it under the terms of either: 00012 00013 The LGPL as published by the Free Software Foundation, version 00014 2.1, available at: http://www.fsf.org/copyleft/lesser.html 00015 00016 Or: 00017 00018 The Mozilla Public License Version 1.0. You may obtain a copy of 00019 the License at http://www.mozilla.org/MPL/ 00020 00021 The original code is icaltypes.h 00022 00023 ======================================================================*/ 00024 00025 #ifndef ICALTYPES_H 00026 #define ICALTYPES_H 00027 00028 #include <time.h> 00029 #include "icalenums.h" 00030 #include "icaltime.h" 00031 #include "icalduration.h" 00032 #include "icalperiod.h" 00033 00034 00035 struct icalgeotype 00036 { 00037 float lat; 00038 float lon; 00039 }; 00040 00041 00042 struct icaldatetimeperiodtype 00043 { 00044 struct icaltimetype time; 00045 struct icalperiodtype period; 00046 }; 00047 00048 00049 struct icaltriggertype 00050 { 00051 struct icaltimetype time; 00052 struct icaldurationtype duration; 00053 }; 00054 00055 struct icaltriggertype icaltriggertype_from_int(const int reltime); 00056 struct icaltriggertype icaltriggertype_from_string(const char* str); 00057 00058 int icaltriggertype_is_null_trigger(struct icaltriggertype tr); 00059 int icaltriggertype_is_bad_trigger(struct icaltriggertype tr); 00060 00061 /* struct icalreqstattype. This struct contains two string pointers, 00062 but don't try to free either of them. The "desc" string is a pointer 00063 to a static table inside the library. Don't try to free it. The 00064 "debug" string is a pointer into the string that the called passed 00065 into to icalreqstattype_from_string. Don't try to free it either, and 00066 don't use it after the original string has been freed. 00067 00068 BTW, you would get that original string from 00069 *icalproperty_get_requeststatus() or icalvalue_get_text(), when 00070 operating on a the value of a request_status property. */ 00071 00072 struct icalreqstattype { 00073 00074 icalrequeststatus code; 00075 const char* desc; 00076 const char* debug; 00077 }; 00078 00079 struct icalreqstattype icalreqstattype_from_string(const char* str); 00080 const char* icalreqstattype_as_string(struct icalreqstattype); 00081 00082 00083 00084 struct icaltimezonephase { 00085 const char* tzname; 00086 int is_stdandard; /* 1 = standard tme, 0 = daylight savings time */ 00087 struct icaltimetype dtstart; 00088 int offsetto; 00089 int tzoffsetfrom; 00090 const char* comment; 00091 struct icaldatetimeperiodtype rdate; 00092 const char* rrule; 00093 }; 00094 00095 00096 struct icaltimezonetype { 00097 const char* tzid; 00098 struct icaltimetype last_mod; 00099 const char* tzurl; 00100 00101 /* Array of phases. The end of the array is a phase with tzname == 0 */ 00102 struct icaltimezonephase *phases; 00103 }; 00104 00105 void icaltimezonetype_free(struct icaltimezonetype tzt); 00106 00107 00108 #endif /* !ICALTYPES_H */