libkcal
icalduration.h
Go to the documentation of this file.00001 /* -*- Mode: C -*- */ 00002 /*====================================================================== 00003 FILE: icalduration.h 00004 CREATOR: eric 26 Jan 2001 00005 00006 00007 00008 (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org> 00009 http://www.softwarestudio.org 00010 00011 This program is free software; you can redistribute it and/or modify 00012 it under the terms of either: 00013 00014 The LGPL as published by the Free Software Foundation, version 00015 2.1, available at: http://www.fsf.org/copyleft/lesser.html 00016 00017 Or: 00018 00019 The Mozilla Public License Version 1.0. You may obtain a copy of 00020 the License at http://www.mozilla.org/MPL/ 00021 00022 The Original Code is eric. The Initial Developer of the Original 00023 Code is Eric Busboom 00024 00025 00026 ======================================================================*/ 00027 00028 #ifndef ICALDURATION_H 00029 #define ICALDURATION_H 00030 00031 #include "icaltime.h" 00032 00033 struct icaldurationtype 00034 { 00035 int is_neg; 00036 unsigned int days; 00037 unsigned int weeks; 00038 unsigned int hours; 00039 unsigned int minutes; 00040 unsigned int seconds; 00041 }; 00042 00043 struct icaldurationtype icaldurationtype_from_int(int t); 00044 struct icaldurationtype icaldurationtype_from_string(const char*); 00045 int icaldurationtype_as_int(struct icaldurationtype duration); 00046 char* icaldurationtype_as_ical_string(struct icaldurationtype d); 00047 struct icaldurationtype icaldurationtype_null_duration(void); 00048 struct icaldurationtype icaldurationtype_bad_duration(void); 00049 int icaldurationtype_is_null_duration(struct icaldurationtype d); 00050 int icaldurationtype_is_bad_duration(struct icaldurationtype d); 00051 00052 struct icaltimetype icaltime_add(struct icaltimetype t, 00053 struct icaldurationtype d); 00054 00055 struct icaldurationtype icaltime_subtract(struct icaltimetype t1, 00056 struct icaltimetype t2); 00057 00058 #endif /* !ICALDURATION_H */ 00059 00060 00061