libkcal

icalproperty.h

Go to the documentation of this file.
00001 /* -*- Mode: C -*- */
00002 /*======================================================================
00003   FILE: icalproperty.h
00004   CREATOR: eric 20 March 1999
00005 
00006 
00007 
00008   
00009 
00010  (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
00011      http://www.softwarestudio.org
00012 
00013  This program is free software; you can redistribute it and/or modify
00014  it under the terms of either: 
00015 
00016     The LGPL as published by the Free Software Foundation, version
00017     2.1, available at: http://www.fsf.org/copyleft/lesser.html
00018 
00019   Or:
00020 
00021     The Mozilla Public License Version 1.0. You may obtain a copy of
00022     the License at http://www.mozilla.org/MPL/
00023 
00024   The original code is icalparam.h
00025 
00026   ======================================================================*/
00027 
00028 
00029 #ifndef ICALPROPERTY_H
00030 #define ICALPROPERTY_H
00031 
00032 #include <time.h>
00033 #include <stdarg.h>  /* for va_... */
00034 
00035 #include "icalderivedparameter.h"
00036 
00037 #include "icalvalue.h"  
00038 #include "icalrecur.h"
00039 
00040 /* Actually in icalderivedproperty.h:
00041    typedef struct icalproperty_impl icalproperty; */
00042 
00043 #include "icalderivedproperty.h" /* To get icalproperty_kind enumerations */
00044 
00045 icalproperty* icalproperty_new(icalproperty_kind kind);
00046 
00047 icalproperty* icalproperty_new_clone(icalproperty * prop);
00048 
00049 icalproperty* icalproperty_new_from_string(const char* str);
00050 
00051 const char* icalproperty_as_ical_string(icalproperty* prop);
00052 
00053 void  icalproperty_free(icalproperty* prop);
00054 
00055 icalproperty_kind icalproperty_isa(icalproperty* property);
00056 int icalproperty_isa_property(void* property);
00057 
00058 void icalproperty_add_parameters(struct icalproperty_impl *prop,va_list args);
00059 void icalproperty_add_parameter(icalproperty* prop,icalparameter* parameter);
00060 void icalproperty_set_parameter(icalproperty* prop,icalparameter* parameter);
00061 void icalproperty_set_parameter_from_string(icalproperty* prop,
00062                                             const char* name, const char* value);
00063 const char* icalproperty_get_parameter_as_string(icalproperty* prop,
00064                                                  const char* name);
00065 
00066 void icalproperty_remove_parameter(icalproperty* prop,
00067                    icalparameter_kind kind);
00068 
00069 void icalproperty_remove_parameter_by_kind(icalproperty* prop,
00070                        icalparameter_kind kind);
00071 
00072 void icalproperty_remove_parameter_by_name(icalproperty* prop,
00073                        const char *name);
00074 
00075 void icalproperty_remove_parameter_by_ref(icalproperty* prop,
00076                       icalparameter *param);
00077 
00078 
00079 
00080 int icalproperty_count_parameters(const icalproperty* prop);
00081 
00082 /* Iterate through the parameters */
00083 icalparameter* icalproperty_get_first_parameter(icalproperty* prop,
00084                         icalparameter_kind kind);
00085 icalparameter* icalproperty_get_next_parameter(icalproperty* prop,
00086                         icalparameter_kind kind);
00087 /* Access the value of the property */
00088 void icalproperty_set_value(icalproperty* prop, icalvalue* value);
00089 void icalproperty_set_value_from_string(icalproperty* prop,const char* value, const char* kind);
00090 
00091 icalvalue* icalproperty_get_value(const icalproperty* prop);
00092 const char* icalproperty_get_value_as_string(const icalproperty* prop);
00093 
00094 /* Deal with X properties */
00095 
00096 void icalproperty_set_x_name(icalproperty* prop, const char* name);
00097 const char* icalproperty_get_x_name(icalproperty* prop);
00098 
00103 const char* icalproperty_get_property_name (const icalproperty* prop);
00104 
00105 icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value);
00106 
00107 /* Convert kinds to string and get default value type */
00108 
00109 icalvalue_kind icalproperty_kind_to_value_kind(icalproperty_kind kind);
00110 icalproperty_kind icalproperty_value_kind_to_kind(icalvalue_kind kind);
00111 const char* icalproperty_kind_to_string(icalproperty_kind kind);
00112 icalproperty_kind icalproperty_string_to_kind(const char* string);
00113 
00115 int icalproperty_kind_is_valid(const icalproperty_kind kind);
00116 
00117 icalproperty_method icalproperty_string_to_method(const char* str);
00118 const char* icalproperty_method_to_string(icalproperty_method method);
00119 
00120 
00121 const char* icalproperty_enum_to_string(int e);
00122 int icalproperty_string_to_enum(const char* str);
00123 int icalproperty_kind_and_string_to_enum(const int kind, const char* str);
00124 
00125 const char* icalproperty_status_to_string(icalproperty_status);
00126 icalproperty_status icalproperty_string_to_status(const char* string);
00127 
00128 int icalproperty_enum_belongs_to_property(icalproperty_kind kind, int e);
00129 
00130 
00131 
00132 
00133 #endif /*ICALPROPERTY_H*/