6f5f1bfaefe8f7f4c4b1295aa7b0855142f15238
[claws.git] / src / plugins / vcalendar / libical / libical / icalproperty.h
1 /* -*- Mode: C -*- */
2 /*======================================================================
3   FILE: icalproperty.h
4   CREATOR: eric 20 March 1999
5
6
7   $Id$
8   $Locker$
9
10   
11
12  (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
13
14  This program is free software; you can redistribute it and/or modify
15  it under the terms of either: 
16
17     The LGPL as published by the Free Software Foundation, version
18     2.1, available at: http://www.fsf.org/copyleft/lesser.html
19
20   Or:
21
22     The Mozilla Public License Version 1.0. You may obtain a copy of
23     the License at http://www.mozilla.org/MPL/
24
25   The original code is icalparam.h
26
27   ======================================================================*/
28
29
30 #ifndef ICALPROPERTY_H
31 #define ICALPROPERTY_H
32
33 #include <time.h>
34
35
36 #include "icalderivedparameter.h"
37
38 #include "icalvalue.h"  
39 #include "icalrecur.h"
40
41 /* Actually in icalderivedproperty.h:
42    typedef void icalproperty; */
43
44 #include "icalderivedproperty.h" /* To get icalproperty_kind enumerations */
45
46 icalproperty* icalproperty_new(icalproperty_kind kind);
47
48 icalproperty* icalproperty_new_clone(icalproperty * prop);
49
50 icalproperty* icalproperty_new_from_string(char* str);
51
52 char* icalproperty_as_ical_string(icalproperty* prop);
53
54 void  icalproperty_free(icalproperty* prop);
55
56 icalproperty_kind icalproperty_isa(icalproperty* property);
57 int icalproperty_isa_property(void* property);
58
59 void icalproperty_add_parameter(icalproperty* prop,icalparameter* parameter);
60 void icalproperty_set_parameter(icalproperty* prop,icalparameter* parameter);
61 void icalproperty_set_parameter_from_string(icalproperty* prop,
62                                             const char* name, const char* value);
63 const char* icalproperty_get_parameter_as_string(icalproperty* prop,
64                                                  const char* name);
65
66 void icalproperty_remove_parameter(icalproperty* prop,
67                                    icalparameter_kind kind);
68
69 int icalproperty_count_parameters(icalproperty* prop);
70
71 /* Iterate through the parameters */
72 icalparameter* icalproperty_get_first_parameter(icalproperty* prop,
73                                                 icalparameter_kind kind);
74 icalparameter* icalproperty_get_next_parameter(icalproperty* prop,
75                                                 icalparameter_kind kind);
76 /* Access the value of the property */
77 void icalproperty_set_value(icalproperty* prop, icalvalue* value);
78 void icalproperty_set_value_from_string(icalproperty* prop,const char* value, const char* kind);
79
80 icalvalue* icalproperty_get_value(icalproperty* prop);
81 const char* icalproperty_get_value_as_string(icalproperty* prop);
82
83 /* Deal with X properties */
84
85 void icalproperty_set_x_name(icalproperty* prop, char* name);
86 char* icalproperty_get_x_name(icalproperty* prop);
87
88 /* Return the name of the property -- the type name converted to a
89    string, or the value of _get_x_name if the type is and X property */
90 char* icalproperty_get_name (icalproperty* prop);
91
92 icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value);
93
94 /* Convert kinds to string and get default value type */
95
96 icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);
97 icalvalue_kind icalproperty_value_kind_to_kind(icalvalue_kind kind);
98 const char* icalproperty_kind_to_string(icalproperty_kind kind);
99 icalproperty_kind icalproperty_string_to_kind(const char* string);
100
101 icalproperty_method icalproperty_string_to_method(const char* str);
102 const char* icalproperty_method_to_string(icalproperty_method method);
103
104
105 const char* icalproperty_enum_to_string(int e);
106 int icalproperty_string_to_enum(const char* str);
107
108 const char* icalproperty_status_to_string(icalproperty_status);
109 icalproperty_status icalproperty_string_to_status(const char* string);
110
111 int icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e);
112
113
114
115
116 #endif /*ICALPROPERTY_H*/