Back to index

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