libkcal

icalvalueimpl.h

Go to the documentation of this file.
00001 /* -*- Mode: C -*- */
00002 /*======================================================================
00003   FILE: icalvalue.c
00004   CREATOR: eric 02 May 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.c
00023 
00024   Contributions from:
00025      Graham Davison (g.m.davison@computer.org)
00026 
00027 
00028 ======================================================================*/
00029 
00030 #ifdef HAVE_CONFIG_H
00031 #include <config.h>
00032 #endif
00033 
00034 #ifndef ICALVALUEIMPL_H
00035 #define ICALVALUEIMPL_H
00036 
00037 #include "icalenums.h"
00038 #include "icalproperty.h"
00039 #include "icalderivedvalue.h"
00040 
00041 
00042 struct icalvalue_impl {
00043     icalvalue_kind kind; /*this is the kind that is visible from the outside*/
00044 
00045     char id[5];
00046     int size;
00047     icalproperty* parent;
00048     char* x_value;
00049 
00050     union data {
00051     icalattach *v_attach;       
00052     /* void *v_binary; */ /* use v_attach */
00053     const char *v_string;
00054     /*char *v_text;*/
00055     /*char *v_caladdress;*/
00056     /*char *v_uri;*/
00057     float v_float;
00058     int v_int;
00059     /*int v_boolean;*/
00060     /*int v_integer;*/
00061     struct icaldurationtype v_duration;
00062     /*int v_utcoffset;*/
00063     
00064     struct icalperiodtype v_period;
00065     /*struct icalperiodtype v_datetimeperiod;*/
00066     struct icalgeotype v_geo;
00067     /*time_t v_time;*/
00068     struct icaltimetype v_time;
00069     /*struct icaltimetype v_date;*/
00070     /*struct icaltimetype v_datetime;*/
00071     /*struct icaltimetype v_datetimedate;*/
00072     
00073         struct icalreqstattype v_requeststatus;
00074 
00075     /* struct icalrecurrencetype was once included
00076        directly ( not referenced ) in this union, but it
00077        contributes 2000 bytes to every value, so now it is
00078        a reference*/
00079     
00080     struct icalrecurrencetype *v_recur;
00081     struct icaltriggertype v_trigger;
00082 
00083         int v_enum;
00084         /* v_enum takes care of several enumerated types including: 
00085     icalproperty_method v_method;
00086     icalproperty_status v_status;
00087         icalproperty_action v_action;
00088         icalproperty_class v_class;
00089     icalproperty_transp v_transp;
00090         */
00091 
00092     } data;
00093 };
00094 
00095 #endif