libkcal

icalvalue.h

Go to the documentation of this file.
00001 /* -*- Mode: C -*- */
00002 /*======================================================================
00003   FILE: icalvalue.h
00004   CREATOR: eric 20 March 1999
00005 
00006 
00007 
00008  (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
00009      http://www.softwarestudio.org
00010 
00011  This program is free software; you can redistribute it and/or modify
00012  it under the terms of either: 
00013 
00014     The LGPL as published by the Free Software Foundation, version
00015     2.1, available at: http://www.fsf.org/copyleft/lesser.html
00016 
00017   Or:
00018 
00019     The Mozilla Public License Version 1.0. You may obtain a copy of
00020     the License at http://www.mozilla.org/MPL/
00021 
00022   The original code is icalvalue.h
00023 
00024   ======================================================================*/
00025 
00026 #ifndef ICALVALUE_H
00027 #define ICALVALUE_H
00028 
00029 #include <time.h>
00030 #include "icalenums.h"
00031 #include "icaltypes.h"
00032 #include "icalrecur.h"
00033 #include "icalduration.h"
00034 #include "icalperiod.h"
00035 #include "icalderivedproperty.h" /* For icalproperty_method, etc. */
00036 #include "icalderivedparameter.h"
00037 #include "icalderivedvalue.h"
00038                           
00039 /* Defined in icalderivedvalue.h */
00040 /*typedef struct icalvalue_impl icalvalue;*/
00041 
00042 icalvalue* icalvalue_new(icalvalue_kind kind);
00043 
00044 icalvalue* icalvalue_new_clone(const icalvalue* value);
00045 
00046 icalvalue* icalvalue_new_from_string(icalvalue_kind kind, const char* str);
00047 
00048 void icalvalue_free(icalvalue* value);
00049 
00050 int icalvalue_is_valid(const icalvalue* value);
00051 
00052 const char* icalvalue_as_ical_string(const icalvalue* value);
00053 
00054 icalvalue_kind icalvalue_isa(const icalvalue* value);
00055 
00056 int icalvalue_isa_value(void*);
00057 
00058 icalparameter_xliccomparetype icalvalue_compare(const icalvalue* a, const icalvalue *b);
00059 
00060 
00061 /* Special, non autogenerated value accessors */
00062 
00063 icalvalue* icalvalue_new_recur (struct icalrecurrencetype v);
00064 void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v);
00065 struct icalrecurrencetype icalvalue_get_recur(const icalvalue* value);
00066 
00067 icalvalue* icalvalue_new_trigger (struct icaltriggertype v);
00068 void icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v);
00069 struct icaltriggertype icalvalue_get_trigger(const icalvalue* value);
00070 
00071 icalvalue* icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v);
00072 void icalvalue_set_datetimeperiod(icalvalue* value, 
00073                   struct icaldatetimeperiodtype v);
00074 struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(const icalvalue* value);
00075 
00076 /* Convert enumerations */
00077 
00078 icalvalue_kind icalvalue_string_to_kind(const char* str);
00079 const char* icalvalue_kind_to_string(const icalvalue_kind kind);
00080 
00082 int icalvalue_kind_is_valid(const icalvalue_kind kind);
00083 
00085 int icalvalue_encode_ical_string(const char *szText, char *szEncText, int MaxBufferLen);
00086 
00087 #endif /*ICALVALUE_H*/