Libical API Documentation  3.0
icalperiod.h
Go to the documentation of this file.
1 /*======================================================================
2  FILE: icalperiod.h
3  CREATOR: eric 26 Jan 2001
4 
5  (C) COPYRIGHT 2000, Eric Busboom <eric@civicknowledge.com>
6 
7  This library is free software; you can redistribute it and/or modify
8  it under the terms of either:
9 
10  The LGPL as published by the Free Software Foundation, version
11  2.1, available at: https://www.gnu.org/licenses/lgpl-2.1.html
12 
13  Or:
14 
15  The Mozilla Public License Version 2.0. You may obtain a copy of
16  the License at https://www.mozilla.org/MPL/
17 
18  The Original Code is eric. The Initial Developer of the Original
19  Code is Eric Busboom
20 ======================================================================*/
21 
22 #ifndef ICALPERIOD_H
23 #define ICALPERIOD_H
24 
30 #include "libical_ical_export.h"
31 #include "icalduration.h"
32 #include "icaltime.h"
33 
38 {
39  struct icaltimetype start;
40  struct icaltimetype end;
41  struct icaldurationtype duration;
42 };
43 
44 #define ICALPERIODTYPE_INITIALIZER { \
45  ICALTIMETYPE_INITIALIZER, \
46  ICALTIMETYPE_INITIALIZER, \
47  ICALDURATIONTYPE_INITIALIZER \
48 }
49 
81 LIBICAL_ICAL_EXPORT struct icalperiodtype icalperiodtype_from_string(const char *str);
82 
107 LIBICAL_ICAL_EXPORT const char *icalperiodtype_as_ical_string(struct icalperiodtype p);
108 
135 LIBICAL_ICAL_EXPORT char *icalperiodtype_as_ical_string_r(struct icalperiodtype p);
136 
153 LIBICAL_ICAL_EXPORT struct icalperiodtype icalperiodtype_null_period(void);
154 
170 LIBICAL_ICAL_EXPORT int icalperiodtype_is_null_period(struct icalperiodtype p);
171 
186 LIBICAL_ICAL_EXPORT int icalperiodtype_is_valid_period(struct icalperiodtype p);
187 
188 #endif /* !ICALTIME_H */
Methods for working with durations in iCal.
char * icalperiodtype_as_ical_string_r(struct icalperiodtype p)
Converts an icalperiodtype into an iCal-formatted string.
Definition: icalperiod.c:103
Struct to represent a period in time.
Definition: icalperiod.h:37
struct icaltimetype is a pseudo-object that abstracts time handling.
struct icalperiodtype icalperiodtype_from_string(const char *str)
Constructs a new icalperiodtype from str.
Definition: icalperiod.c:30
int icalperiodtype_is_null_period(struct icalperiodtype p)
Definition: icalperiod.c:144
A struct representing a duration.
Definition: icalduration.h:36
Definition: icaltime.h:104
int icalperiodtype_is_valid_period(struct icalperiodtype p)
Definition: icalperiod.c:154
struct icalperiodtype icalperiodtype_null_period(void)
Definition: icalperiod.c:133
const char * icalperiodtype_as_ical_string(struct icalperiodtype p)
Converts an icalperiodtype into an iCal-formatted string.
Definition: icalperiod.c:94