Back to index

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