2 /*======================================================================
4 CREATOR: eric 20 March 1999
12 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
14 This program is free software; you can redistribute it and/or modify
15 it under the terms of either:
17 The LGPL as published by the Free Software Foundation, version
18 2.1, available at: http://www.fsf.org/copyleft/lesser.html
22 The Mozilla Public License Version 1.0. You may obtain a copy of
23 the License at http://www.mozilla.org/MPL/
25 The original code is icalparam.h
27 ======================================================================*/
30 #ifndef ICALPROPERTY_H
31 #define ICALPROPERTY_H
36 #include "icalderivedparameter.h"
38 #include "icalvalue.h"
39 #include "icalrecur.h"
41 /* Actually in icalderivedproperty.h:
42 typedef void icalproperty; */
44 #include "icalderivedproperty.h" /* To get icalproperty_kind enumerations */
46 icalproperty* icalproperty_new(icalproperty_kind kind);
48 icalproperty* icalproperty_new_clone(icalproperty * prop);
50 icalproperty* icalproperty_new_from_string(char* str);
52 char* icalproperty_as_ical_string(icalproperty* prop);
54 void icalproperty_free(icalproperty* prop);
56 icalproperty_kind icalproperty_isa(icalproperty* property);
57 int icalproperty_isa_property(void* property);
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,
66 void icalproperty_remove_parameter(icalproperty* prop,
67 icalparameter_kind kind);
69 int icalproperty_count_parameters(icalproperty* prop);
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);
80 icalvalue* icalproperty_get_value(icalproperty* prop);
81 const char* icalproperty_get_value_as_string(icalproperty* prop);
83 /* Deal with X properties */
85 void icalproperty_set_x_name(icalproperty* prop, char* name);
86 char* icalproperty_get_x_name(icalproperty* prop);
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);
92 icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value);
94 /* Convert kinds to string and get default value type */
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);
101 icalproperty_method icalproperty_string_to_method(const char* str);
102 const char* icalproperty_method_to_string(icalproperty_method method);
105 const char* icalproperty_enum_to_string(int e);
106 int icalproperty_string_to_enum(const char* str);
108 const char* icalproperty_status_to_string(icalproperty_status);
109 icalproperty_status icalproperty_string_to_status(const char* string);
111 int icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e);
116 #endif /*ICALPROPERTY_H*/