author | zecke <zecke> | 2002-09-10 12:09:49 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-10 12:09:49 (UTC) |
commit | 6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4 (patch) (unidiff) | |
tree | 6ebc93c6432f4ed9d00ef1448b6a047ef522a79a /library/backend/vobject_p.h | |
parent | d10cddb3c9ce75bc90b14add14bc133737fe35aa (diff) | |
download | opie-6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4.zip opie-6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4.tar.gz opie-6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4.tar.bz2 |
Qtopia1-6 merge
still to test
bic changes to be resolved
more changes to be made?
-rw-r--r-- | library/backend/vobject_p.h | 810 |
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 |
3 | Business Machines Corporation and Siemens Rolm Communications Inc. | 3 | Business Machines Corporation and Siemens Rolm Communications Inc. |
4 | 4 | ||
5 | For purposes of this license notice, the term Licensors shall mean, | 5 | For purposes of this license notice, the term Licensors shall mean, |
6 | collectively, Apple Computer, Inc., AT&T Corp., International | 6 | collectively, Apple Computer, Inc., AT&T Corp., International |
7 | Business Machines Corporation and Siemens Rolm Communications Inc. | 7 | Business Machines Corporation and Siemens Rolm Communications Inc. |
8 | The term Licensor shall mean any of the Licensors. | 8 | The term Licensor shall mean any of the Licensors. |
9 | 9 | ||
10 | Subject to acceptance of the following conditions, permission is hereby | 10 | Subject to acceptance of the following conditions, permission is hereby |
11 | granted by Licensors without the need for written agreement and without | 11 | granted by Licensors without the need for written agreement and without |
12 | license or royalty fees, to use, copy, modify and distribute this | 12 | license or royalty fees, to use, copy, modify and distribute this |
13 | software for any purpose. | 13 | software for any purpose. |
14 | 14 | ||
15 | The above copyright notice and the following four paragraphs must be | 15 | The above copyright notice and the following four paragraphs must be |
16 | reproduced in all copies of this software and any software including | 16 | reproduced in all copies of this software and any software including |
17 | this software. | 17 | this software. |
18 | 18 | ||
19 | THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE | 19 | THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND NO LICENSOR SHALL HAVE |
20 | ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR | 20 | ANY OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR |
21 | MODIFICATIONS. | 21 | MODIFICATIONS. |
22 | 22 | ||
23 | IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, | 23 | IN NO EVENT SHALL ANY LICENSOR BE LIABLE TO ANY PARTY FOR DIRECT, |
24 | INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT | 24 | INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS ARISING OUT |
25 | OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | 25 | OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH |
26 | DAMAGE. | 26 | DAMAGE. |
27 | 27 | ||
28 | EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, | 28 | EACH LICENSOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, |
29 | INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE | 29 | INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF NONINFRINGEMENT OR THE |
30 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 30 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
31 | PURPOSE. | 31 | PURPOSE. |
32 | 32 | ||
33 | The software is provided with RESTRICTED RIGHTS. Use, duplication, or | 33 | The software is provided with RESTRICTED RIGHTS. Use, duplication, or |
34 | disclosure by the government are subject to restrictions set forth in | 34 | disclosure by the government are subject to restrictions set forth in |
35 | DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. | 35 | DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. |
36 | 36 | ||
37 | ***************************************************************************/ | 37 | ***************************************************************************/ |
38 | 38 | ||
39 | /* | 39 | /* |
40 | 40 | ||
41 | The vCard/vCalendar C interface is implemented in the set | 41 | The vCard/vCalendar C interface is implemented in the set |
42 | of files as follows: | 42 | of files as follows: |
43 | 43 | ||
44 | vcc.y, yacc source, and vcc.c, the yacc output you will use | 44 | vcc.y, yacc source, and vcc.c, the yacc output you will use |
45 | implements the core parser | 45 | implements the core parser |
46 | 46 | ||
47 | vobject.c implements an API that insulates the caller from | 47 | vobject.c implements an API that insulates the caller from |
48 | the parser and changes in the vCard/vCalendar BNF | 48 | the parser and changes in the vCard/vCalendar BNF |
49 | 49 | ||
50 | port.h defines compilation environment dependent stuff | 50 | port.h defines compilation environment dependent stuff |
51 | 51 | ||
52 | vcc.h and vobject.h are header files for their .c counterparts | 52 | vcc.h and vobject.h are header files for their .c counterparts |
53 | 53 | ||
54 | vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions | 54 | vcaltmp.h and vcaltmp.c implement vCalendar "macro" functions |
55 | which you may find useful. | 55 | which you may find useful. |
56 | 56 | ||
57 | test.c is a standalone test driver that exercises some of | 57 | test.c is a standalone test driver that exercises some of |
58 | the features of the APIs provided. Invoke test.exe on a | 58 | the features of the APIs provided. Invoke test.exe on a |
59 | VCARD/VCALENDAR input text file and you will see the pretty | 59 | VCARD/VCALENDAR input text file and you will see the pretty |
60 | print output of the internal representation (this pretty print | 60 | print output of the internal representation (this pretty print |
61 | output should give you a good idea of how the internal | 61 | output should give you a good idea of how the internal |
62 | representation looks like -- there is one such output in the | 62 | representation looks like -- there is one such output in the |
63 | following too). Also, a file with the .out suffix is generated | 63 | following too). Also, a file with the .out suffix is generated |
64 | to show that the internal representation can be written back | 64 | to show that the internal representation can be written back |
65 | in the original text format. | 65 | in the original text format. |
66 | 66 | ||
67 | For more information on this API see the readme.txt file | 67 | For more information on this API see the readme.txt file |
68 | which accompanied this distribution. | 68 | which 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" |
87 | are globally unique IDs which can be used to generate clipboard format | 87 | |
88 | ID's as per the requirements of a specific platform. For example, in | 88 | /* The above strings vCardClipboardFormat and vCalendarClipboardFormat |
89 | Windows they are used as the parameter in a call to RegisterClipboardFormat. | 89 | are globally unique IDs which can be used to generate clipboard format |
90 | For example: | 90 | ID's as per the requirements of a specific platform. For example, in |
91 | 91 | Windows they are used as the parameter in a call to RegisterClipboardFormat. | |
92 | CLIPFORMAT foo = RegisterClipboardFormat(vCardClipboardFormat); | 92 | For 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" | |
278 | typedef struct VObject VObject; | 278 | |
279 | 279 | ||
280 | typedef struct VObjectIterator { | 280 | typedef struct VObject VObject; |
281 | VObject* start; | 281 | |
282 | VObject* next; | 282 | typedef struct VObjectIterator { |
283 | } VObjectIterator; | 283 | VObject* start; |
284 | 284 | VObject* next; | |
285 | extern DLLEXPORT(VObject*) newVObject(const char *id); | 285 | } VObjectIterator; |
286 | extern DLLEXPORT(void) deleteVObject(VObject *p); | 286 | |
287 | extern DLLEXPORT(char*) dupStr(const char *s, unsigned int size); | 287 | extern DLLEXPORT(VObject*) newVObject(const char *id); |
288 | extern DLLEXPORT(void) deleteStr(const char *p); | 288 | extern DLLEXPORT(void) deleteVObject(VObject *p); |
289 | extern DLLEXPORT(void) unUseStr(const char *s); | 289 | extern DLLEXPORT(char*) dupStr(const char *s, unsigned int size); |
290 | 290 | extern DLLEXPORT(void) deleteStr(const char *p); | |
291 | extern DLLEXPORT(void) setVObjectName(VObject *o, const char* id); | 291 | extern DLLEXPORT(void) unUseStr(const char *s); |
292 | extern DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s); | 292 | |
293 | extern DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s); | 293 | extern DLLEXPORT(void) setVObjectName(VObject *o, const char* id); |
294 | extern DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i); | 294 | extern DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s); |
295 | extern DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l); | 295 | extern DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s); |
296 | extern DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t); | 296 | extern DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i); |
297 | extern DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size); | 297 | extern DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l); |
298 | extern DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size); | 298 | extern DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t); |
299 | 299 | extern DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size); | |
300 | extern DLLEXPORT(const char*) vObjectName(VObject *o); | 300 | extern DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size); |
301 | extern DLLEXPORT(const char*) vObjectStringZValue(VObject *o); | 301 | |
302 | extern DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o); | 302 | extern DLLEXPORT(const char*) vObjectName(VObject *o); |
303 | extern DLLEXPORT(unsigned long) vObjectLongValue(VObject *o); | 303 | extern DLLEXPORT(const char*) vObjectStringZValue(VObject *o); |
304 | extern DLLEXPORT(void*) vObjectAnyValue(VObject *o); | 304 | extern DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o); |
305 | extern DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o); | 305 | extern DLLEXPORT(unsigned long) vObjectLongValue(VObject *o); |
306 | extern DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p); | 306 | extern DLLEXPORT(void*) vObjectAnyValue(VObject *o); |
307 | 307 | extern DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o); | |
308 | extern DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p); | 308 | extern DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p); |
309 | extern DLLEXPORT(VObject*) addProp(VObject *o, const char *id); | 309 | |
310 | extern DLLEXPORT(VObject*) addProp_(VObject *o, const char *id); | 310 | extern DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p); |
311 | extern DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v); | 311 | extern DLLEXPORT(VObject*) addProp(VObject *o, const char *id); |
312 | extern DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size); | 312 | extern DLLEXPORT(VObject*) addProp_(VObject *o, const char *id); |
313 | extern DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size); | 313 | extern DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v); |
314 | extern DLLEXPORT(VObject*) addGroup(VObject *o, const char *g); | 314 | extern DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size); |
315 | extern DLLEXPORT(void) addList(VObject **o, VObject *p); | 315 | extern DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size); |
316 | 316 | extern DLLEXPORT(VObject*) addGroup(VObject *o, const char *g); | |
317 | extern DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id); | 317 | extern DLLEXPORT(void) addList(VObject **o, VObject *p); |
318 | 318 | ||
319 | extern DLLEXPORT(VObject*) nextVObjectInList(VObject *o); | 319 | extern DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id); |
320 | extern DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o); | 320 | |
321 | extern DLLEXPORT(int) moreIteration(VObjectIterator *i); | 321 | extern DLLEXPORT(VObject*) nextVObjectInList(VObject *o); |
322 | extern DLLEXPORT(VObject*) nextVObject(VObjectIterator *i); | 322 | extern DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o); |
323 | 323 | extern DLLEXPORT(int) moreIteration(VObjectIterator *i); | |
324 | extern DLLEXPORT(const char*) lookupStr(const char *s); | 324 | extern DLLEXPORT(VObject*) nextVObject(VObjectIterator *i); |
325 | extern DLLEXPORT(void) cleanStrTbl(); | 325 | |
326 | 326 | extern DLLEXPORT(const char*) lookupStr(const char *s); | |
327 | extern DLLEXPORT(void) cleanVObject(VObject *o); | 327 | extern DLLEXPORT(void) cleanStrTbl(); |
328 | extern DLLEXPORT(void) cleanVObjects(VObject *list); | 328 | |
329 | 329 | extern DLLEXPORT(void) cleanVObject(VObject *o); | |
330 | extern DLLEXPORT(const char*) lookupProp(const char* str); | 330 | extern DLLEXPORT(void) cleanVObjects(VObject *list); |
331 | extern DLLEXPORT(const char*) lookupProp_(const char* str); | 331 | |
332 | 332 | extern DLLEXPORT(const char*) lookupProp(const char* str); | |
333 | extern DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o); | 333 | extern DLLEXPORT(const char*) lookupProp_(const char* str); |
334 | extern DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list); | 334 | |
335 | 335 | extern DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o); | |
336 | extern DLLEXPORT(int) vObjectValueType(VObject *o); | 336 | extern DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list); |
337 | 337 | ||
338 | /* return type of vObjectValueType: */ | 338 | extern 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 | |
352 | extern const char** fieldedProp; | 352 | /* if the VObject has value set by setVObjectVObjectValue. */ |
353 | 353 | ||
354 | /*************************************************** | 354 | extern 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 | ||
360 | The functions below are not exported from the DLL because they | 360 | /* NOTE regarding printVObject and writeVObject |
361 | take a FILE* as a parameter, which cannot be passed across a DLL | 361 | |
362 | interface (at least that is my experience). Instead you can use | 362 | The functions below are not exported from the DLL because they |
363 | their companion functions which take file names or pointers | 363 | take a FILE* as a parameter, which cannot be passed across a DLL |
364 | to memory. However, if you are linking this code into | 364 | interface (at least that is my experience). Instead you can use |
365 | your build directly then you may find them a more convenient API | 365 | their companion functions which take file names or pointers |
366 | and you can go ahead and use them. If you try to use them with | 366 | to memory. However, if you are linking this code into |
367 | the DLL LIB you will get a link error. | 367 | your build directly then you may find them a more convenient API |
368 | */ | 368 | and you can go ahead and use them. If you try to use them with |
369 | extern void writeVObject(FILE *fp, VObject *o); | 369 | the DLL LIB you will get a link error. |
370 | 370 | */ | |
371 | 371 | extern void writeVObject(FILE *fp, VObject *o); | |
372 | 372 | ||
373 | typedef void (*MimeErrorHandler)(char *); | 373 | |
374 | 374 | ||
375 | extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler); | 375 | typedef void (*MimeErrorHandler)(char *); |
376 | 376 | ||
377 | extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len); | 377 | extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler); |
378 | extern DLLEXPORT(VObject*) Parse_MIME_FromFileName(char* fname); | 378 | |
379 | 379 | extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len); | |
380 | 380 | extern DLLEXPORT(VObject*) Parse_MIME_FromFileName(char* fname); | |
381 | /* NOTE regarding Parse_MIME_FromFile | 381 | |
382 | The function above, Parse_MIME_FromFile, comes in two flavors, | 382 | |
383 | neither of which is exported from the DLL. Each version takes | 383 | /* NOTE regarding Parse_MIME_FromFile |
384 | a CFile or FILE* as a parameter, neither of which can be | 384 | The function above, Parse_MIME_FromFile, comes in two flavors, |
385 | passed across a DLL interface (at least that is my experience). | 385 | neither of which is exported from the DLL. Each version takes |
386 | If you are linking this code into your build directly then | 386 | a CFile or FILE* as a parameter, neither of which can be |
387 | you may find them a more convenient API that the other flavors | 387 | passed across a DLL interface (at least that is my experience). |
388 | that take a file name. If you use them with the DLL LIB you | 388 | If you are linking this code into your build directly then |
389 | will get a link error. | 389 | you may find them a more convenient API that the other flavors |
390 | */ | 390 | that take a file name. If you use them with the DLL LIB you |
391 | 391 | will get a link error. | |
392 | 392 | */ | |
393 | #if INCLUDEMFC | 393 | |
394 | extern VObject* Parse_MIME_FromFile(CFile *file); | 394 | |
395 | #else | 395 | #if INCLUDEMFC |
396 | extern VObject* Parse_MIME_FromFile(FILE *file); | 396 | extern VObject* Parse_MIME_FromFile(CFile *file); |
397 | #endif | 397 | #else |
398 | 398 | extern VObject* Parse_MIME_FromFile(FILE *file); | |
399 | extern DLLEXPORT(const char *) vObjectTypeInfo(VObject *o); | 399 | #endif |
400 | 400 | ||
401 | 401 | extern DLLEXPORT(const char *) vObjectTypeInfo(VObject *o); | |
402 | #endif /* __VOBJECT_H__ */ | 402 | |
403 | 403 | ||
404 | 404 | #endif /* __VOBJECT_H__ */ | |
405 | |||
406 | |||