1 /* -*- Mode: C -*- */
2 /*======================================================================
3   FILE: icalvalue.c
4   CREATOR: eric 02 May 1999
5 
6   $Id: icalvalueimpl.h,v 1.7 2008-01-15 23:17:43 dothebart Exp $
7 
8 
9  (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org>
10      http://www.softwarestudio.org
11 
12  This program is free software; you can redistribute it and/or modify
13  it under the terms of either:
14 
15     The LGPL as published by the Free Software Foundation, version
16     2.1, available at: http://www.fsf.org/copyleft/lesser.html
17 
18   Or:
19 
20     The Mozilla Public License Version 1.0. You may obtain a copy of
21     the License at http://www.mozilla.org/MPL/
22 
23   The original code is icalvalue.c
24 
25   Contributions from:
26      Graham Davison (g.m.davison@computer.org)
27 
28 
29 ======================================================================*/
30 
31 #ifdef HAVE_CONFIG_H
32 #include "config.h"
33 #endif
34 
35 #ifndef ICALVALUEIMPL_H
36 #define ICALVALUEIMPL_H
37 
38 #include "icalenums.h"
39 #include "icalproperty.h"
40 #include "icalderivedvalue.h"
41 
42 
43 struct icalvalue_impl {
44     icalvalue_kind kind; /*this is the kind that is visible from the outside*/
45 
46     char id[5];
47     int size;
48     icalproperty* parent;
49     char* x_value;
50 
51     union data {
52 	icalattach *v_attach;
53 	/* void *v_binary; */ /* use v_attach */
54 	const char *v_string;
55 	/*char *v_text;*/
56 	/*char *v_caladdress;*/
57 	/*char *v_uri;*/
58 	float v_float;
59 	int v_int;
60 	/*int v_boolean;*/
61 	/*int v_integer;*/
62 	struct icaldurationtype v_duration;
63 	/*int v_utcoffset;*/
64 
65 	struct icalperiodtype v_period;
66 	/*struct icalperiodtype v_datetimeperiod;*/
67 	struct icalgeotype v_geo;
68 	/*time_t v_time;*/
69 	struct icaltimetype v_time;
70 	/*struct icaltimetype v_date;*/
71 	/*struct icaltimetype v_datetime;*/
72 	/*struct icaltimetype v_datetimedate;*/
73 
74         struct icalreqstattype v_requeststatus;
75 
76 	/* struct icalrecurrencetype was once included
77 	   directly ( not referenced ) in this union, but it
78 	   contributes 2000 bytes to every value, so now it is
79 	   a reference*/
80 
81 	struct icalrecurrencetype *v_recur;
82 	struct icaltriggertype v_trigger;
83 
84         int v_enum;
85         /* v_enum takes care of several enumerated types including:
86 	icalproperty_method v_method;
87 	icalproperty_status v_status;
88         icalproperty_action v_action;
89         icalproperty_class v_class;
90 	icalproperty_transp v_transp;
91         */
92 
93     } data;
94 };
95 
96 #endif
97