summaryrefslogtreecommitdiff
path: root/library/backend/vobject_p.h
Unidiff
Diffstat (limited to 'library/backend/vobject_p.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/vobject_p.h810
1 files changed, 406 insertions, 404 deletions
diff --git a/library/backend/vobject_p.h b/library/backend/vobject_p.h
index a0d921e..0d0a2a8 100644
--- a/library/backend/vobject_p.h
+++ b/library/backend/vobject_p.h
@@ -1,404 +1,406 @@
1/*************************************************************************** 1/***************************************************************************
2(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International 2(C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International
3Business Machines Corporation and Siemens Rolm Communications Inc. 3Business Machines Corporation and Siemens Rolm Communications Inc.
4 4
5For purposes of this license notice, the term Licensors shall mean, 5For purposes of this license notice, the term Licensors shall mean,
6collectively, Apple Computer, Inc., AT&T Corp., International 6collectively, Apple Computer, Inc., AT&T Corp., International
7Business Machines Corporation and Siemens Rolm Communications Inc. 7Business Machines Corporation and Siemens Rolm Communications Inc.
8The term Licensor shall mean any of the Licensors. 8The term Licensor shall mean any of the Licensors.
9 9
10Subject to acceptance of the following conditions, permission is hereby 10Subject to acceptance of the following conditions, permission is hereby
11granted by Licensors without the need for written agreement and without 11granted by Licensors without the need for written agreement and without
12license or royalty fees, to use, copy, modify and distribute this 12license or royalty fees, to use, copy, modify and distribute this
13software for any purpose. 13software for any purpose.
14 14
15The above copyright notice and the following four paragraphs must be 15The above copyright notice and the following four paragraphs must be
16reproduced in all copies of this software and any software including 16reproduced in all copies of this software and any software including
17this software. 17this software.
18 18
19THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE 19THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE
20ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR 20ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR
21MODIFICATIONS. 21MODIFICATIONS.
22 22
23IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, 23IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT,
24INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT 24INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT
25OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 25OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
26DAMAGE. 26DAMAGE.
27 27
28EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, 28EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED,
29INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE 29INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE
30IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 30IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31PURPOSE. 31PURPOSE.
32 32
33The software is provided with RESTRICTED RIGHTS. Use, duplication, or 33The software is provided with RESTRICTED RIGHTS. Use, duplication, or
34disclosure by the government are subject to restrictions set forth in 34disclosure by the government are subject to restrictions set forth in
35DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. 35DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
36 36
37***************************************************************************/ 37***************************************************************************/
38 38
39/* 39/*
40 40
41The vCard/vCalendar C interface is implemented in the set 41The vCard/vCalendar C interface is implemented in the set
42of files as follows: 42of files as follows:
43 43
44vcc.y, yacc source, and vcc.c, the yacc output you will use 44vcc.y, yacc source, and vcc.c, the yacc output you will use
45implements the core parser 45implements the core parser
46 46
47vobject.c implements an API that insulates the caller from 47vobject.c implements an API that insulates the caller from
48the parser and changes in the vCard/vCalendar BNF 48the parser and changes in the vCard/vCalendar BNF
49 49
50port.h defines compilation environment dependent stuff 50port.h defines compilation environment dependent stuff
51 51
52vcc.h and vobject.h are header files for their .c counterparts 52vcc.h and vobject.h are header files for their .c counterparts
53 53
54vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions 54vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions
55which you may find useful. 55which you may find useful.
56 56
57test.c is a standalone test driver that exercises some of 57test.c is a standalone test driver that exercises some of
58the features of the APIs provided. Invoke test.exe on a 58the features of the APIs provided. Invoke test.exe on a
59VCARD/VCALENDAR input text file and you will see the pretty 59VCARD/VCALENDAR input text file and you will see the pretty
60print output of the internal representation (this pretty print 60print output of the internal representation (this pretty print
61output should give you a good idea of how the internal 61output should give you a good idea of how the internal
62representation looks like -- there is one such output in the 62representation looks like -- there is one such output in the
63following too). Also, a file with the .out suffix is generated 63following too). Also, a file with the .out suffix is generated
64to show that the internal representation can be written back 64to show that the internal representation can be written back
65in the original text format. 65in the original text format.
66 66
67For more information on this API see the readme.txt file 67For more information on this API see the readme.txt file
68which accompanied this distribution. 68which accompanied this distribution.
69 69
70 Also visit: 70 Also visit:
71 71
72 http://www.versit.com 72 http://www.versit.com
73 http://www.ralden.com 73 http://www.ralden.com
74 74
75*/ 75*/
76 76
77 77// No tr() anywhere in this file
78#ifndef __VOBJECT_H__ 78
79#define __VOBJECT_H__ 1 79
80 80#ifndef __VOBJECT_H__
81#include <qstring.h> 81#define __VOBJECT_H__ 1
82 82
83 #define vCardClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCard" 83#include <qstring.h>
84 #define vCalendarClipboardFormat"+//ISBN 1-887687-00-9::versit::PDI//vCalendar" 84
85 85 #define vCardClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCard"
86/* The above strings vCardClipboardFormat and vCalendarClipboardFormat 86 #define vCalendarClipboardFormat"+//ISBN 1-887687-00-9::versit::PDI//vCalendar"
87are globally unique IDs which can be used to generate clipboard format 87
88ID's as per the requirements of a specific platform. For example, in 88/* The above strings vCardClipboardFormat and vCalendarClipboardFormat
89Windows they are used as the parameter in a call to RegisterClipboardFormat. 89are globally unique IDs which can be used to generate clipboard format
90For example: 90ID's as per the requirements of a specific platform. For example, in
91 91Windows they are used as the parameter in a call to RegisterClipboardFormat.
92 CLIPFORMAT foo = RegisterClipboardFormat(vCardClipboardFormat); 92For example:
93 93
94*/ 94 CLIPFORMAT foo = RegisterClipboardFormat(vCardClipboardFormat);
95 95
96 #define vCardMimeType "text/x-vCard" 96*/
97 #define vCalendarMimeType"text/x-vCalendar" 97
98 98 #define vCardMimeType "text/x-vCard"
99#undef DLLEXPORT 99 #define vCalendarMimeType"text/x-vCalendar"
100#include <qglobal.h> 100
101#if defined(Q_WS_WIN) 101#undef DLLEXPORT
102#define DLLEXPORT(t) __declspec(dllexport) t 102#include <qglobal.h>
103#else 103#if defined(Q_WS_WIN)
104#define DLLEXPORT(t) t 104#define DLLEXPORT(t) __declspec(dllexport) t
105#endif 105#else
106 106#define DLLEXPORT(t) t
107#ifndef FALSE 107#endif
108 #define FALSE0 108
109#endif 109#ifndef FALSE
110#ifndef TRUE 110 #define FALSE0
111 #define TRUE1 111#endif
112#endif 112#ifndef TRUE
113 113 #define TRUE1
114#include <stdlib.h> 114#endif
115#include <stdio.h> 115
116 116#include <stdlib.h>
117 117#include <stdio.h>
118 #define VC7bitProp "7BIT" 118
119 #define VC8bitProp "8BIT" 119
120 #define VCAAlarmProp "AALARM" 120 #define VC7bitProp "7BIT"
121 #define VCAdditionalNamesProp"ADDN" 121 #define VC8bitProp "8BIT"
122 #define VCAdrProp "ADR" 122 #define VCAAlarmProp "AALARM"
123 #define VCAgentProp "AGENT" 123 #define VCAdditionalNamesProp"ADDN"
124 #define VCAIFFProp "AIFF" 124 #define VCAdrProp "ADR"
125 #define VCAOLProp "AOL" 125 #define VCAgentProp "AGENT"
126 #define VCAppleLinkProp "APPLELINK" 126 #define VCAIFFProp "AIFF"
127 #define VCAttachProp "ATTACH" 127 #define VCAOLProp "AOL"
128 #define VCAttendeeProp "ATTENDEE" 128 #define VCAppleLinkProp "APPLELINK"
129 #define VCATTMailProp "ATTMAIL" 129 #define VCAttachProp "ATTACH"
130 #define VCAudioContentProp "AUDIOCONTENT" 130 #define VCAttendeeProp "ATTENDEE"
131 #define VCAVIProp "AVI" 131 #define VCATTMailProp "ATTMAIL"
132 #define VCBase64Prop "BASE64" 132 #define VCAudioContentProp "AUDIOCONTENT"
133 #define VCBBSProp "BBS" 133 #define VCAVIProp "AVI"
134 #define VCBirthDateProp "BDAY" 134 #define VCBase64Prop "BASE64"
135 #define VCBMPProp "BMP" 135 #define VCBBSProp "BBS"
136 #define VCBodyProp "BODY" 136 #define VCBirthDateProp "BDAY"
137 #define VCBusinessRoleProp "ROLE" 137 #define VCBMPProp "BMP"
138 #define VCCalProp "VCALENDAR" 138 #define VCBodyProp "BODY"
139 #define VCCaptionProp "CAP" 139 #define VCBusinessRoleProp "ROLE"
140 #define VCCardProp "VCARD" 140 #define VCCalProp "VCALENDAR"
141 #define VCCarProp "CAR" 141 #define VCCaptionProp "CAP"
142 #define VCCategoriesProp "CATEGORIES" 142 #define VCCardProp "VCARD"
143 #define VCCellularProp "CELL" 143 #define VCCarProp "CAR"
144 #define VCCGMProp "CGM" 144 #define VCCategoriesProp "CATEGORIES"
145 #define VCCharSetProp "CS" 145 #define VCCellularProp "CELL"
146 #define VCCIDProp "CID" 146 #define VCCGMProp "CGM"
147 #define VCCISProp "CIS" 147 #define VCCharSetProp "CHARSET"
148 #define VCCityProp "L" 148 #define VCCIDProp "CID"
149 #define VCClassProp "CLASS" 149 #define VCCISProp "CIS"
150 #define VCCommentProp "NOTE" 150 #define VCCityProp "L"
151 #define VCCompletedProp "COMPLETED" 151 #define VCClassProp "CLASS"
152 #define VCContentIDProp "CONTENT-ID" 152 #define VCCommentProp "NOTE"
153 #define VCCountryNameProp "C" 153 #define VCCompletedProp "COMPLETED"
154 #define VCDAlarmProp "DALARM" 154 #define VCContentIDProp "CONTENT-ID"
155 #define VCDataSizeProp "DATASIZE" 155 #define VCCountryNameProp "C"
156 #define VCDayLightProp "DAYLIGHT" 156 #define VCDAlarmProp "DALARM"
157 #define VCDCreatedProp "DCREATED" 157 #define VCDataSizeProp "DATASIZE"
158#define VCDeliveryLabelProp "LABEL" 158 #define VCDayLightProp "DAYLIGHT"
159 #define VCDescriptionProp "DESCRIPTION" 159 #define VCDCreatedProp "DCREATED"
160 #define VCDIBProp "DIB" 160#define VCDeliveryLabelProp "LABEL"
161 #define VCDisplayStringProp "DISPLAYSTRING" 161 #define VCDescriptionProp "DESCRIPTION"
162 #define VCDomesticProp "DOM" 162 #define VCDIBProp "DIB"
163 #define VCDTendProp "DTEND" 163 #define VCDisplayStringProp "DISPLAYSTRING"
164 #define VCDTstartProp "DTSTART" 164 #define VCDomesticProp "DOM"
165 #define VCDueProp "DUE" 165 #define VCDTendProp "DTEND"
166 #define VCEmailAddressProp "EMAIL" 166 #define VCDTstartProp "DTSTART"
167 #define VCEncodingProp "ENCODING" 167 #define VCDueProp "DUE"
168 #define VCEndProp "END" 168 #define VCEmailAddressProp "EMAIL"
169 #define VCEventProp "VEVENT" 169 #define VCEncodingProp "ENCODING"
170 #define VCEWorldProp "EWORLD" 170 #define VCEndProp "END"
171 #define VCExNumProp "EXNUM" 171 #define VCEventProp "VEVENT"
172 #define VCExpDateProp "EXDATE" 172 #define VCEWorldProp "EWORLD"
173 #define VCExpectProp "EXPECT" 173 #define VCExNumProp "EXNUM"
174 #define VCExtAddressProp "EXT ADD" 174 #define VCExpDateProp "EXDATE"
175 #define VCFamilyNameProp "F" 175 #define VCExpectProp "EXPECT"
176 #define VCFaxProp "FAX" 176 #define VCExtAddressProp "EXT ADD"
177 #define VCFullNameProp "FN" 177 #define VCFamilyNameProp "F"
178 #define VCGeoProp "GEO" 178 #define VCFaxProp "FAX"
179 #define VCGeoLocationProp "GEO" 179 #define VCFullNameProp "FN"
180 #define VCGIFProp "GIF" 180 #define VCGeoProp "GEO"
181 #define VCGivenNameProp "G" 181 #define VCGeoLocationProp "GEO"
182 #define VCGroupingProp "Grouping" 182 #define VCGIFProp "GIF"
183 #define VCHomeProp "HOME" 183 #define VCGivenNameProp "G"
184 #define VCIBMMailProp "IBMMail" 184 #define VCGroupingProp "Grouping"
185 #define VCInlineProp "INLINE" 185 #define VCHomeProp "HOME"
186 #define VCInternationalProp "INTL" 186 #define VCIBMMailProp "IBMMail"
187 #define VCInternetProp "INTERNET" 187 #define VCInlineProp "INLINE"
188 #define VCISDNProp "ISDN" 188 #define VCInternationalProp "INTL"
189 #define VCJPEGProp "JPEG" 189 #define VCInternetProp "INTERNET"
190 #define VCLanguageProp "LANG" 190 #define VCISDNProp "ISDN"
191 #define VCLastModifiedProp "LAST-MODIFIED" 191 #define VCJPEGProp "JPEG"
192 #define VCLastRevisedProp "REV" 192 #define VCLanguageProp "LANG"
193 #define VCLocationProp "LOCATION" 193 #define VCLastModifiedProp "LAST-MODIFIED"
194 #define VCLogoProp "LOGO" 194 #define VCLastRevisedProp "REV"
195 #define VCMailerProp "MAILER" 195 #define VCLocationProp "LOCATION"
196 #define VCMAlarmProp "MALARM" 196 #define VCLogoProp "LOGO"
197 #define VCMCIMailProp "MCIMAIL" 197 #define VCMailerProp "MAILER"
198 #define VCMessageProp "MSG" 198 #define VCMAlarmProp "MALARM"
199 #define VCMETProp "MET" 199 #define VCMCIMailProp "MCIMAIL"
200 #define VCModemProp "MODEM" 200 #define VCMessageProp "MSG"
201 #define VCMPEG2Prop "MPEG2" 201 #define VCMETProp "MET"
202 #define VCMPEGProp "MPEG" 202 #define VCModemProp "MODEM"
203 #define VCMSNProp "MSN" 203 #define VCMPEG2Prop "MPEG2"
204 #define VCNamePrefixesProp "NPRE" 204 #define VCMPEGProp "MPEG"
205 #define VCNameProp "N" 205 #define VCMSNProp "MSN"
206 #define VCNameSuffixesProp "NSUF" 206 #define VCNamePrefixesProp "NPRE"
207 #define VCNoteProp "NOTE" 207 #define VCNameProp "N"
208 #define VCOrgNameProp "ORGNAME" 208 #define VCNameSuffixesProp "NSUF"
209 #define VCOrgProp "ORG" 209 #define VCNoteProp "NOTE"
210 #define VCOrgUnit2Prop "OUN2" 210 #define VCOrgNameProp "ORGNAME"
211 #define VCOrgUnit3Prop "OUN3" 211 #define VCOrgProp "ORG"
212 #define VCOrgUnit4Prop "OUN4" 212 #define VCOrgUnit2Prop "OUN2"
213 #define VCOrgUnitProp "OUN" 213 #define VCOrgUnit3Prop "OUN3"
214 #define VCPagerProp "PAGER" 214 #define VCOrgUnit4Prop "OUN4"
215 #define VCPAlarmProp "PALARM" 215 #define VCOrgUnitProp "OUN"
216 #define VCParcelProp "PARCEL" 216 #define VCPagerProp "PAGER"
217 #define VCPartProp "PART" 217 #define VCPAlarmProp "PALARM"
218 #define VCPCMProp "PCM" 218 #define VCParcelProp "PARCEL"
219 #define VCPDFProp "PDF" 219 #define VCPartProp "PART"
220 #define VCPGPProp "PGP" 220 #define VCPCMProp "PCM"
221 #define VCPhotoProp "PHOTO" 221 #define VCPDFProp "PDF"
222 #define VCPICTProp "PICT" 222 #define VCPGPProp "PGP"
223 #define VCPMBProp "PMB" 223 #define VCPhotoProp "PHOTO"
224 #define VCPostalBoxProp "BOX" 224 #define VCPICTProp "PICT"
225 #define VCPostalCodeProp "PC" 225 #define VCPMBProp "PMB"
226 #define VCPostalProp "POSTAL" 226 #define VCPostalBoxProp "BOX"
227 #define VCPowerShareProp "POWERSHARE" 227 #define VCPostalCodeProp "PC"
228 #define VCPreferredProp "PREF" 228 #define VCPostalProp "POSTAL"
229 #define VCPriorityProp "PRIORITY" 229 #define VCPowerShareProp "POWERSHARE"
230 #define VCProcedureNameProp "PROCEDURENAME" 230 #define VCPreferredProp "PREF"
231 #define VCProdIdProp "PRODID" 231 #define VCPriorityProp "PRIORITY"
232 #define VCProdigyProp "PRODIGY" 232 #define VCProcedureNameProp "PROCEDURENAME"
233 #define VCPronunciationProp "SOUND" 233 #define VCProdIdProp "PRODID"
234 #define VCPSProp "PS" 234 #define VCProdigyProp "PRODIGY"
235 #define VCPublicKeyProp "KEY" 235 #define VCPronunciationProp "SOUND"
236 #define VCQPProp "QP" 236 #define VCPSProp "PS"
237 #define VCQuickTimeProp "QTIME" 237 #define VCPublicKeyProp "KEY"
238 #define VCQuotedPrintableProp"QUOTED-PRINTABLE" 238 #define VCQPProp "QP"
239 #define VCRDateProp "RDATE" 239 #define VCQuickTimeProp "QTIME"
240 #define VCRegionProp "R" 240 #define VCQuotedPrintableProp"QUOTED-PRINTABLE"
241 #define VCRelatedToProp "RELATED-TO" 241 #define VCRDateProp "RDATE"
242 #define VCRepeatCountProp "REPEATCOUNT" 242 #define VCRegionProp "R"
243 #define VCResourcesProp "RESOURCES" 243 #define VCRelatedToProp "RELATED-TO"
244 #define VCRNumProp "RNUM" 244 #define VCRepeatCountProp "REPEATCOUNT"
245 #define VCRoleProp "ROLE" 245 #define VCResourcesProp "RESOURCES"
246 #define VCRRuleProp "RRULE" 246 #define VCRNumProp "RNUM"
247 #define VCRSVPProp "RSVP" 247 #define VCRoleProp "ROLE"
248 #define VCRunTimeProp "RUNTIME" 248 #define VCRRuleProp "RRULE"
249 #define VCSequenceProp "SEQUENCE" 249 #define VCRSVPProp "RSVP"
250 #define VCSnoozeTimeProp "SNOOZETIME" 250 #define VCRunTimeProp "RUNTIME"
251 #define VCStartProp "START" 251 #define VCSequenceProp "SEQUENCE"
252 #define VCStatusProp "STATUS" 252 #define VCSnoozeTimeProp "SNOOZETIME"
253 #define VCStreetAddressProp "STREET" 253 #define VCStartProp "START"
254 #define VCSubTypeProp "SUBTYPE" 254 #define VCStatusProp "STATUS"
255 #define VCSummaryProp "SUMMARY" 255 #define VCStreetAddressProp "STREET"
256 #define VCTelephoneProp "TEL" 256 #define VCSubTypeProp "SUBTYPE"
257 #define VCTIFFProp "TIFF" 257 #define VCSummaryProp "SUMMARY"
258 #define VCTimeZoneProp "TZ" 258 #define VCTelephoneProp "TEL"
259 #define VCTitleProp "TITLE" 259 #define VCTIFFProp "TIFF"
260 #define VCTLXProp "TLX" 260 #define VCTimeZoneProp "TZ"
261 #define VCTodoProp "VTODO" 261 #define VCTitleProp "TITLE"
262 #define VCTranspProp "TRANSP" 262 #define VCTLXProp "TLX"
263 #define VCUniqueStringProp "UID" 263 #define VCTodoProp "VTODO"
264 #define VCURLProp "URL" 264 #define VCTranspProp "TRANSP"
265 #define VCURLValueProp "URLVAL" 265 #define VCUniqueStringProp "UID"
266 #define VCValueProp "VALUE" 266 #define VCURLProp "URL"
267 #define VCVersionProp "VERSION" 267 #define VCURLValueProp "URLVAL"
268 #define VCVideoProp "VIDEO" 268 #define VCValueProp "VALUE"
269 #define VCVoiceProp "VOICE" 269 #define VCVersionProp "VERSION"
270 #define VCWAVEProp "WAVE" 270 #define VCVideoProp "VIDEO"
271 #define VCWMFProp "WMF" 271 #define VCVoiceProp "VOICE"
272 #define VCWorkProp "WORK" 272 #define VCWAVEProp "WAVE"
273 #define VCX400Prop "X400" 273 #define VCWMFProp "WMF"
274 #define VCX509Prop "X509" 274 #define VCWorkProp "WORK"
275 #define VCXRuleProp "XRULE" 275 #define VCX400Prop "X400"
276 276 #define VCX509Prop "X509"
277 277 #define VCXRuleProp "XRULE"
278typedef struct VObject VObject; 278
279 279
280typedef struct VObjectIterator { 280typedef struct VObject VObject;
281 VObject* start; 281
282 VObject* next; 282typedef struct VObjectIterator {
283 } VObjectIterator; 283 VObject* start;
284 284 VObject* next;
285extern DLLEXPORT(VObject*) newVObject(const char *id); 285 } VObjectIterator;
286extern DLLEXPORT(void) deleteVObject(VObject *p); 286
287extern DLLEXPORT(char*) dupStr(const char *s, unsigned int size); 287extern DLLEXPORT(VObject*) newVObject(const char *id);
288extern DLLEXPORT(void) deleteStr(const char *p); 288extern DLLEXPORT(void) deleteVObject(VObject *p);
289extern DLLEXPORT(void) unUseStr(const char *s); 289extern DLLEXPORT(char*) dupStr(const char *s, unsigned int size);
290 290extern DLLEXPORT(void) deleteStr(const char *p);
291extern DLLEXPORT(void) setVObjectName(VObject *o, const char* id); 291extern DLLEXPORT(void) unUseStr(const char *s);
292extern DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s); 292
293extern DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s); 293extern DLLEXPORT(void) setVObjectName(VObject *o, const char* id);
294extern DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i); 294extern DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s);
295extern DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l); 295extern DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s);
296extern DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t); 296extern DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i);
297extern DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size); 297extern DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l);
298extern DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size); 298extern DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t);
299 299extern DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size);
300extern DLLEXPORT(const char*) vObjectName(VObject *o); 300extern DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size);
301extern DLLEXPORT(const char*) vObjectStringZValue(VObject *o); 301
302extern DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o); 302extern DLLEXPORT(const char*) vObjectName(VObject *o);
303extern DLLEXPORT(unsigned long) vObjectLongValue(VObject *o); 303extern DLLEXPORT(const char*) vObjectStringZValue(VObject *o);
304extern DLLEXPORT(void*) vObjectAnyValue(VObject *o); 304extern DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o);
305extern DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o); 305extern DLLEXPORT(unsigned long) vObjectLongValue(VObject *o);
306extern DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p); 306extern DLLEXPORT(void*) vObjectAnyValue(VObject *o);
307 307extern DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o);
308extern DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p); 308extern DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p);
309extern DLLEXPORT(VObject*) addProp(VObject *o, const char *id); 309
310extern DLLEXPORT(VObject*) addProp_(VObject *o, const char *id); 310extern DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p);
311extern DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v); 311extern DLLEXPORT(VObject*) addProp(VObject *o, const char *id);
312extern DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size); 312extern DLLEXPORT(VObject*) addProp_(VObject *o, const char *id);
313extern DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size); 313extern DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v);
314extern DLLEXPORT(VObject*) addGroup(VObject *o, const char *g); 314extern DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size);
315extern DLLEXPORT(void) addList(VObject **o, VObject *p); 315extern DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size);
316 316extern DLLEXPORT(VObject*) addGroup(VObject *o, const char *g);
317extern DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id); 317extern DLLEXPORT(void) addList(VObject **o, VObject *p);
318 318
319extern DLLEXPORT(VObject*) nextVObjectInList(VObject *o); 319extern DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id);
320extern DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o); 320
321extern DLLEXPORT(int) moreIteration(VObjectIterator *i); 321extern DLLEXPORT(VObject*) nextVObjectInList(VObject *o);
322extern DLLEXPORT(VObject*) nextVObject(VObjectIterator *i); 322extern DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o);
323 323extern DLLEXPORT(int) moreIteration(VObjectIterator *i);
324extern DLLEXPORT(const char*) lookupStr(const char *s); 324extern DLLEXPORT(VObject*) nextVObject(VObjectIterator *i);
325extern DLLEXPORT(void) cleanStrTbl(); 325
326 326extern DLLEXPORT(const char*) lookupStr(const char *s);
327extern DLLEXPORT(void) cleanVObject(VObject *o); 327extern DLLEXPORT(void) cleanStrTbl();
328extern DLLEXPORT(void) cleanVObjects(VObject *list); 328
329 329extern DLLEXPORT(void) cleanVObject(VObject *o);
330extern DLLEXPORT(const char*) lookupProp(const char* str); 330extern DLLEXPORT(void) cleanVObjects(VObject *list);
331extern DLLEXPORT(const char*) lookupProp_(const char* str); 331
332 332extern DLLEXPORT(const char*) lookupProp(const char* str);
333extern DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o); 333extern DLLEXPORT(const char*) lookupProp_(const char* str);
334extern DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list); 334
335 335extern DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o);
336extern DLLEXPORT(int) vObjectValueType(VObject *o); 336extern DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list);
337 337
338/* return type of vObjectValueType: */ 338extern DLLEXPORT(int) vObjectValueType(VObject *o);
339 #define VCVT_NOVALUE0 339
340 /* if the VObject has no value associated with it. */ 340/* return type of vObjectValueType: */
341 #define VCVT_STRINGZ1 341 #define VCVT_NOVALUE0
342 /* if the VObject has value set by setVObjectStringZValue. */ 342 /* if the VObject has no value associated with it. */
343 #define VCVT_UINT 2 343 #define VCVT_STRINGZ1
344 /* if the VObject has value set by setVObjectIntegerValue. */ 344 /* if the VObject has value set by setVObjectStringZValue. */
345 #define VCVT_ULONG 3 345 #define VCVT_UINT 2
346 /* if the VObject has value set by setVObjectLongValue. */ 346 /* if the VObject has value set by setVObjectIntegerValue. */
347 #define VCVT_RAW 4 347 #define VCVT_ULONG 3
348 /* if the VObject has value set by setVObjectAnyValue. */ 348 /* if the VObject has value set by setVObjectLongValue. */
349 #define VCVT_VOBJECT5 349 #define VCVT_RAW 4
350 /* if the VObject has value set by setVObjectVObjectValue. */ 350 /* if the VObject has value set by setVObjectAnyValue. */
351 351 #define VCVT_VOBJECT5
352extern const char** fieldedProp; 352 /* if the VObject has value set by setVObjectVObjectValue. */
353 353
354/*************************************************** 354extern const char** fieldedProp;
355 * The methods below are implemented in vcc.c (generated from vcc.y ) 355
356 ***************************************************/ 356/***************************************************
357 357 * The methods below are implemented in vcc.c (generated from vcc.y )
358/* NOTE regarding printVObject and writeVObject 358 ***************************************************/
359 359
360The functions below are not exported from the DLL because they 360/* NOTE regarding printVObject and writeVObject
361take a FILE* as a parameter, which cannot be passed across a DLL 361
362interface (at least that is my experience). Instead you can use 362The functions below are not exported from the DLL because they
363their companion functions which take file names or pointers 363take a FILE* as a parameter, which cannot be passed across a DLL
364to memory. However, if you are linking this code into 364interface (at least that is my experience). Instead you can use
365your build directly then you may find them a more convenient API 365their companion functions which take file names or pointers
366and you can go ahead and use them. If you try to use them with 366to memory. However, if you are linking this code into
367the DLL LIB you will get a link error. 367your build directly then you may find them a more convenient API
368*/ 368and you can go ahead and use them. If you try to use them with
369extern void writeVObject(FILE *fp, VObject *o); 369the DLL LIB you will get a link error.
370 370*/
371 371extern void writeVObject(FILE *fp, VObject *o);
372 372
373typedef void (*MimeErrorHandler)(char *); 373
374 374
375extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler); 375typedef void (*MimeErrorHandler)(char *);
376 376
377extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len); 377extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler);
378extern DLLEXPORT(VObject*) Parse_MIME_FromFileName(char* fname); 378
379 379extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len);
380 380extern DLLEXPORT(VObject*) Parse_MIME_FromFileName(char* fname);
381/* NOTE regarding Parse_MIME_FromFile 381
382The function above, Parse_MIME_FromFile, comes in two flavors, 382
383neither of which is exported from the DLL. Each version takes 383/* NOTE regarding Parse_MIME_FromFile
384a CFile or FILE* as a parameter, neither of which can be 384The function above, Parse_MIME_FromFile, comes in two flavors,
385passed across a DLL interface (at least that is my experience). 385neither of which is exported from the DLL. Each version takes
386If you are linking this code into your build directly then 386a CFile or FILE* as a parameter, neither of which can be
387you may find them a more convenient API that the other flavors 387passed across a DLL interface (at least that is my experience).
388that take a file name. If you use them with the DLL LIB you 388If you are linking this code into your build directly then
389will get a link error. 389you may find them a more convenient API that the other flavors
390*/ 390that take a file name. If you use them with the DLL LIB you
391 391will get a link error.
392 392*/
393#if INCLUDEMFC 393
394extern VObject* Parse_MIME_FromFile(CFile *file); 394
395#else 395#if INCLUDEMFC
396extern VObject* Parse_MIME_FromFile(FILE *file); 396extern VObject* Parse_MIME_FromFile(CFile *file);
397#endif 397#else
398 398extern VObject* Parse_MIME_FromFile(FILE *file);
399extern DLLEXPORT(const char *) vObjectTypeInfo(VObject *o); 399#endif
400 400
401 401extern DLLEXPORT(const char *) vObjectTypeInfo(VObject *o);
402#endif /* __VOBJECT_H__ */ 402
403 403
404 404#endif /* __VOBJECT_H__ */
405
406