Diffstat (limited to 'libical/src/libical/icalproperty.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libical/src/libical/icalproperty.h | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/libical/src/libical/icalproperty.h b/libical/src/libical/icalproperty.h index e39c6b5..472adb9 100644 --- a/libical/src/libical/icalproperty.h +++ b/libical/src/libical/icalproperty.h | |||
@@ -2,121 +2,133 @@ | |||
2 | /*====================================================================== | 2 | /*====================================================================== |
3 | FILE: icalproperty.h | 3 | FILE: icalproperty.h |
4 | CREATOR: eric 20 March 1999 | 4 | CREATOR: eric 20 March 1999 |
5 | 5 | ||
6 | 6 | ||
7 | $Id$ | 7 | $Id$ |
8 | $Locker$ | 8 | $Locker$ |
9 | 9 | ||
10 | 10 | ||
11 | 11 | ||
12 | (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org | 12 | (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org |
13 | 13 | ||
14 | This program is free software; you can redistribute it and/or modify | 14 | This program is free software; you can redistribute it and/or modify |
15 | it under the terms of either: | 15 | it under the terms of either: |
16 | 16 | ||
17 | The LGPL as published by the Free Software Foundation, version | 17 | The LGPL as published by the Free Software Foundation, version |
18 | 2.1, available at: http://www.fsf.org/copyleft/lesser.html | 18 | 2.1, available at: http://www.fsf.org/copyleft/lesser.html |
19 | 19 | ||
20 | Or: | 20 | Or: |
21 | 21 | ||
22 | The Mozilla Public License Version 1.0. You may obtain a copy of | 22 | The Mozilla Public License Version 1.0. You may obtain a copy of |
23 | the License at http://www.mozilla.org/MPL/ | 23 | the License at http://www.mozilla.org/MPL/ |
24 | 24 | ||
25 | The original code is icalparam.h | 25 | The original code is icalparam.h |
26 | 26 | ||
27 | ======================================================================*/ | 27 | ======================================================================*/ |
28 | 28 | ||
29 | 29 | ||
30 | #ifndef ICALPROPERTY_H | 30 | #ifndef ICALPROPERTY_H |
31 | #define ICALPROPERTY_H | 31 | #define ICALPROPERTY_H |
32 | 32 | ||
33 | #include <time.h> | 33 | #include <time.h> |
34 | 34 | #include <stdarg.h> /* for va_... */ | |
35 | #ifdef _WIN32 | ||
36 | #include <stdio.h> /* for printf */ | ||
37 | #include <stdarg.h> /* for va_list, va_start, etc. */ | ||
38 | #endif | ||
39 | 35 | ||
40 | #include "icalderivedparameter.h" | 36 | #include "icalderivedparameter.h" |
41 | 37 | ||
42 | #include "icalvalue.h" | 38 | #include "icalvalue.h" |
43 | #include "icalrecur.h" | 39 | #include "icalrecur.h" |
44 | 40 | ||
45 | /* Actually in icalderivedproperty.h: | 41 | /* Actually in icalderivedproperty.h: |
46 | typedef void icalproperty; */ | 42 | typedef struct icalproperty_impl icalproperty; */ |
47 | 43 | ||
48 | #include "icalderivedproperty.h" /* To get icalproperty_kind enumerations */ | 44 | #include "icalderivedproperty.h" /* To get icalproperty_kind enumerations */ |
49 | 45 | ||
50 | // void icalproperty_add_parameters(struct icalproperty_impl *prop,va_list args); | ||
51 | |||
52 | icalproperty* icalproperty_new(icalproperty_kind kind); | 46 | icalproperty* icalproperty_new(icalproperty_kind kind); |
53 | 47 | ||
54 | icalproperty* icalproperty_new_clone(icalproperty * prop); | 48 | icalproperty* icalproperty_new_clone(icalproperty * prop); |
55 | 49 | ||
56 | icalproperty* icalproperty_new_from_string(const char* str); | 50 | icalproperty* icalproperty_new_from_string(const char* str); |
57 | 51 | ||
58 | const char* icalproperty_as_ical_string(icalproperty* prop); | 52 | const char* icalproperty_as_ical_string(icalproperty* prop); |
59 | 53 | ||
60 | void icalproperty_free(icalproperty* prop); | 54 | void icalproperty_free(icalproperty* prop); |
61 | 55 | ||
62 | icalproperty_kind icalproperty_isa(icalproperty* property); | 56 | icalproperty_kind icalproperty_isa(icalproperty* property); |
63 | int icalproperty_isa_property(void* property); | 57 | int icalproperty_isa_property(void* property); |
64 | 58 | ||
59 | void icalproperty_add_parameters(struct icalproperty_impl *prop,va_list args); | ||
65 | void icalproperty_add_parameter(icalproperty* prop,icalparameter* parameter); | 60 | void icalproperty_add_parameter(icalproperty* prop,icalparameter* parameter); |
66 | void icalproperty_set_parameter(icalproperty* prop,icalparameter* parameter); | 61 | void icalproperty_set_parameter(icalproperty* prop,icalparameter* parameter); |
67 | void icalproperty_set_parameter_from_string(icalproperty* prop, | 62 | void icalproperty_set_parameter_from_string(icalproperty* prop, |
68 | const char* name, const char* value); | 63 | const char* name, const char* value); |
69 | const char* icalproperty_get_parameter_as_string(icalproperty* prop, | 64 | const char* icalproperty_get_parameter_as_string(icalproperty* prop, |
70 | const char* name); | 65 | const char* name); |
71 | 66 | ||
72 | void icalproperty_remove_parameter(icalproperty* prop, | 67 | void icalproperty_remove_parameter(icalproperty* prop, |
73 | icalparameter_kind kind); | 68 | icalparameter_kind kind); |
74 | 69 | ||
75 | int icalproperty_count_parameters(icalproperty* prop); | 70 | void icalproperty_remove_parameter_by_kind(icalproperty* prop, |
71 | icalparameter_kind kind); | ||
72 | |||
73 | void icalproperty_remove_parameter_by_name(icalproperty* prop, | ||
74 | const char *name); | ||
75 | |||
76 | void icalproperty_remove_parameter_by_ref(icalproperty* prop, | ||
77 | icalparameter *param); | ||
78 | |||
79 | |||
80 | |||
81 | int icalproperty_count_parameters(const icalproperty* prop); | ||
76 | 82 | ||
77 | /* Iterate through the parameters */ | 83 | /* Iterate through the parameters */ |
78 | icalparameter* icalproperty_get_first_parameter(icalproperty* prop, | 84 | icalparameter* icalproperty_get_first_parameter(icalproperty* prop, |
79 | icalparameter_kind kind); | 85 | icalparameter_kind kind); |
80 | icalparameter* icalproperty_get_next_parameter(icalproperty* prop, | 86 | icalparameter* icalproperty_get_next_parameter(icalproperty* prop, |
81 | icalparameter_kind kind); | 87 | icalparameter_kind kind); |
82 | /* Access the value of the property */ | 88 | /* Access the value of the property */ |
83 | void icalproperty_set_value(icalproperty* prop, icalvalue* value); | 89 | void icalproperty_set_value(icalproperty* prop, icalvalue* value); |
84 | void icalproperty_set_value_from_string(icalproperty* prop,const char* value, const char* kind); | 90 | void icalproperty_set_value_from_string(icalproperty* prop,const char* value, const char* kind); |
85 | 91 | ||
86 | icalvalue* icalproperty_get_value(icalproperty* prop); | 92 | icalvalue* icalproperty_get_value(const icalproperty* prop); |
87 | const char* icalproperty_get_value_as_string(icalproperty* prop); | 93 | const char* icalproperty_get_value_as_string(const icalproperty* prop); |
88 | 94 | ||
89 | /* Deal with X properties */ | 95 | /* Deal with X properties */ |
90 | 96 | ||
91 | void icalproperty_set_x_name(icalproperty* prop, const char* name); | 97 | void icalproperty_set_x_name(icalproperty* prop, const char* name); |
92 | const char* icalproperty_get_x_name(icalproperty* prop); | 98 | const char* icalproperty_get_x_name(icalproperty* prop); |
93 | 99 | ||
94 | /* Return the name of the property -- the type name converted to a | 100 | /** Return the name of the property -- the type name converted to a |
95 | string, or the value of _get_x_name if the type is and X property */ | 101 | * string, or the value of _get_x_name if the type is and X |
96 | const char* icalproperty_get_name (icalproperty* prop); | 102 | * property |
103 | */ | ||
104 | const char* icalproperty_get_property_name (const icalproperty* prop); | ||
97 | 105 | ||
98 | icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value); | 106 | icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value); |
99 | 107 | ||
100 | /* Convert kinds to string and get default value type */ | 108 | /* Convert kinds to string and get default value type */ |
101 | 109 | ||
102 | icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind); | 110 | icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind); |
103 | icalvalue_kind icalproperty_value_kind_to_kind(icalvalue_kind kind); | 111 | icalproperty_kind icalproperty_value_kind_to_kind(icalvalue_kind kind); |
104 | const char* icalproperty_kind_to_string(icalproperty_kind kind); | 112 | const char* icalproperty_kind_to_string(icalproperty_kind kind); |
105 | icalproperty_kind icalproperty_string_to_kind(const char* string); | 113 | icalproperty_kind icalproperty_string_to_kind(const char* string); |
106 | 114 | ||
115 | /** Check validity of a specific icalproperty_kind **/ | ||
116 | int icalproperty_kind_is_valid(const icalproperty_kind kind); | ||
117 | |||
107 | icalproperty_method icalproperty_string_to_method(const char* str); | 118 | icalproperty_method icalproperty_string_to_method(const char* str); |
108 | const char* icalproperty_method_to_string(icalproperty_method method); | 119 | const char* icalproperty_method_to_string(icalproperty_method method); |
109 | 120 | ||
110 | 121 | ||
111 | const char* icalproperty_enum_to_string(int e); | 122 | const char* icalproperty_enum_to_string(int e); |
112 | int icalproperty_string_to_enum(const char* str); | 123 | int icalproperty_string_to_enum(const char* str); |
124 | int icalproperty_kind_and_string_to_enum(const int kind, const char* str); | ||
113 | 125 | ||
114 | const char* icalproperty_status_to_string(icalproperty_status); | 126 | const char* icalproperty_status_to_string(icalproperty_status); |
115 | icalproperty_status icalproperty_string_to_status(const char* string); | 127 | icalproperty_status icalproperty_string_to_status(const char* string); |
116 | 128 | ||
117 | int icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e); | 129 | int icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e); |
118 | 130 | ||
119 | 131 | ||
120 | 132 | ||
121 | 133 | ||
122 | #endif /*ICALPROPERTY_H*/ | 134 | #endif /*ICALPROPERTY_H*/ |