-rw-r--r-- | libkcal/versit/vobject.h | 173 |
1 files changed, 79 insertions, 94 deletions
diff --git a/libkcal/versit/vobject.h b/libkcal/versit/vobject.h index 0ec8b31..85c299e 100644 --- a/libkcal/versit/vobject.h +++ b/libkcal/versit/vobject.h | |||
@@ -97,97 +97,97 @@ extern "C" { | |||
97 | #define VCAIFFProp "AIFF" | 97 | #define VCAIFFProp "AIFF" |
98 | #define VCAOLProp "AOL" | 98 | #define VCAOLProp "AOL" |
99 | #define VCAppleLinkProp "APPLELINK" | 99 | #define VCAppleLinkProp "APPLELINK" |
100 | #define VCAttachProp "ATTACH" | 100 | #define VCAttachProp "ATTACH" |
101 | #define VCAttendeeProp "ATTENDEE" | 101 | #define VCAttendeeProp "ATTENDEE" |
102 | #define VCATTMailProp "ATTMAIL" | 102 | #define VCATTMailProp "ATTMAIL" |
103 | #define VCAudioContentProp "AUDIOCONTENT" | 103 | #define VCAudioContentProp "AUDIOCONTENT" |
104 | #define VCAVIProp "AVI" | 104 | #define VCAVIProp "AVI" |
105 | #define VCBase64Prop "BASE64" | 105 | #define VCBase64Prop "BASE64" |
106 | #define VCBBSProp "BBS" | 106 | #define VCBBSProp "BBS" |
107 | #define VCBirthDateProp "BDAY" | 107 | #define VCBirthDateProp "BDAY" |
108 | #define VCBMPProp "BMP" | 108 | #define VCBMPProp "BMP" |
109 | #define VCBodyProp "BODY" | 109 | #define VCBodyProp "BODY" |
110 | #define VCBusinessRoleProp "ROLE" | 110 | #define VCBusinessRoleProp "ROLE" |
111 | #define VCCalProp "VCALENDAR" | 111 | #define VCCalProp "VCALENDAR" |
112 | #define VCCaptionProp "CAP" | 112 | #define VCCaptionProp "CAP" |
113 | #define VCCardProp "VCARD" | 113 | #define VCCardProp "VCARD" |
114 | #define VCCarProp "CAR" | 114 | #define VCCarProp "CAR" |
115 | #define VCCategoriesProp "CATEGORIES" | 115 | #define VCCategoriesProp "CATEGORIES" |
116 | #define VCCellularProp "CELL" | 116 | #define VCCellularProp "CELL" |
117 | #define VCCGMProp "CGM" | 117 | #define VCCGMProp "CGM" |
118 | #define VCCharSetProp "CS" | 118 | #define VCCharSetProp "CS" |
119 | #define VCCIDProp "CID" | 119 | #define VCCIDProp "CID" |
120 | #define VCCISProp "CIS" | 120 | #define VCCISProp "CIS" |
121 | #define VCCityProp "L" | 121 | #define VCCityProp "L" |
122 | #define VCClassProp "CLASS" | 122 | #define VCClassProp "CLASS" |
123 | #define VCCommentProp "NOTE" | 123 | #define VCCommentProp "NOTE" |
124 | #define VCCompletedProp "COMPLETED" | 124 | #define VCCompletedProp "COMPLETED" |
125 | #define VCContentIDProp "CONTENT-ID" | 125 | #define VCContentIDProp "CONTENT-ID" |
126 | #define VCCountryNameProp "C" | 126 | #define VCCountryNameProp "C" |
127 | #define VCDAlarmProp "DALARM" | 127 | #define VCDAlarmProp "DALARM" |
128 | #define VCDataSizeProp "DATASIZE" | 128 | #define VCDataSizeProp "DATASIZE" |
129 | #define VCDayLightProp "DAYLIGHT" | 129 | #define VCDayLightProp "DAYLIGHT" |
130 | #define VCDCreatedProp "DCREATED" | 130 | #define VCDCreatedProp "DCREATED" |
131 | #define VCDeliveryLabelProp "LABEL" | 131 | #define VCDeliveryLabelProp "LABEL" |
132 | #define VCDescriptionProp "DESCRIPTION" | 132 | #define VCDescriptionProp "DESCRIPTION" |
133 | #define VCDIBProp "DIB" | 133 | #define VCDIBProp "DIB" |
134 | #define VCDisplayStringProp "DISPLAYSTRING" | 134 | #define VCDisplayStringProp "DISPLAYSTRING" |
135 | #define VCDomesticProp "DOM" | 135 | #define VCDomesticProp "DOM" |
136 | #define VCDTendProp "DTEND" | 136 | #define VCDTendProp "DTEND" |
137 | #define VCDTstartProp "DTSTART" | 137 | #define VCDTstartProp "DTSTART" |
138 | #define VCDueProp "DUE" | 138 | #define VCDueProp "DUE" |
139 | #define VCEmailAddressProp "EMAIL" | 139 | #define VCEmailAddressProp "EMAIL" |
140 | #define VCEncodingProp "ENCODING" | 140 | #define VCEncodingProp "ENCODING" |
141 | #define VCEndProp "END" | 141 | #define VCEndProp "END" |
142 | #define VCEventProp "VEVENT" | 142 | #define VCEventProp "VEVENT" |
143 | #define VCEWorldProp "EWORLD" | 143 | #define VCEWorldProp "EWORLD" |
144 | #define VCExNumProp "EXNUM" | 144 | #define VCExNumProp "EXNUM" |
145 | #define VCExDateProp "EXDATE" | 145 | #define VCExpDateProp "EXDATE" |
146 | #define VCExpectProp "EXPECT" | 146 | #define VCExpectProp "EXPECT" |
147 | #define VCExtAddressProp "EXT ADD" | 147 | #define VCExtAddressProp "EXT ADD" |
148 | #define VCFamilyNameProp "F" | 148 | #define VCFamilyNameProp "F" |
149 | #define VCFaxProp "FAX" | 149 | #define VCFaxProp "FAX" |
150 | #define VCFullNameProp "FN" | 150 | #define VCFullNameProp "FN" |
151 | #define VCGeoProp "GEO" | 151 | #define VCGeoProp "GEO" |
152 | #define VCGeoLocationProp "GEO" | 152 | #define VCGeoLocationProp "GEO" |
153 | #define VCGIFProp "GIF" | 153 | #define VCGIFProp "GIF" |
154 | #define VCGivenNameProp "G" | 154 | #define VCGivenNameProp "G" |
155 | #define VCGroupingProp "Grouping" | 155 | #define VCGroupingProp "Grouping" |
156 | #define VCHomeProp "HOME" | 156 | #define VCHomeProp "HOME" |
157 | #define VCIBMMailProp "IBMMail" | 157 | #define VCIBMMailProp "IBMMail" |
158 | #define VCInlineProp "INLINE" | 158 | #define VCInlineProp "INLINE" |
159 | #define VCInternationalProp "INTL" | 159 | #define VCInternationalProp "INTL" |
160 | #define VCInternetProp "INTERNET" | 160 | #define VCInternetProp "INTERNET" |
161 | #define VCISDNProp "ISDN" | 161 | #define VCISDNProp "ISDN" |
162 | #define VCJPEGProp "JPEG" | 162 | #define VCJPEGProp "JPEG" |
163 | #define VCLanguageProp "LANG" | 163 | #define VCLanguageProp "LANG" |
164 | #define VCLastModifiedProp "LAST-MODIFIED" | 164 | #define VCLastModifiedProp "LAST-MODIFIED" |
165 | #define VCLastRevisedProp "REV" | 165 | #define VCLastRevisedProp "REV" |
166 | #define VCLocationProp "LOCATION" | 166 | #define VCLocationProp "LOCATION" |
167 | #define VCLogoProp "LOGO" | 167 | #define VCLogoProp "LOGO" |
168 | #define VCMailerProp "MAILER" | 168 | #define VCMailerProp "MAILER" |
169 | #define VCMAlarmProp "MALARM" | 169 | #define VCMAlarmProp "MALARM" |
170 | #define VCMCIMailProp "MCIMAIL" | 170 | #define VCMCIMailProp "MCIMAIL" |
171 | #define VCMessageProp "MSG" | 171 | #define VCMessageProp "MSG" |
172 | #define VCMETProp "MET" | 172 | #define VCMETProp "MET" |
173 | #define VCModemProp "MODEM" | 173 | #define VCModemProp "MODEM" |
174 | #define VCMPEG2Prop "MPEG2" | 174 | #define VCMPEG2Prop "MPEG2" |
175 | #define VCMPEGProp "MPEG" | 175 | #define VCMPEGProp "MPEG" |
176 | #define VCMSNProp "MSN" | 176 | #define VCMSNProp "MSN" |
177 | #define VCNamePrefixesProp "NPRE" | 177 | #define VCNamePrefixesProp "NPRE" |
178 | #define VCNameProp "N" | 178 | #define VCNameProp "N" |
179 | #define VCNameSuffixesProp "NSUF" | 179 | #define VCNameSuffixesProp "NSUF" |
180 | #define VCNoteProp "NOTE" | 180 | #define VCNoteProp "NOTE" |
181 | #define VCOrgNameProp "ORGNAME" | 181 | #define VCOrgNameProp "ORGNAME" |
182 | #define VCOrgProp "ORG" | 182 | #define VCOrgProp "ORG" |
183 | #define VCOrgUnit2Prop "OUN2" | 183 | #define VCOrgUnit2Prop "OUN2" |
184 | #define VCOrgUnit3Prop "OUN3" | 184 | #define VCOrgUnit3Prop "OUN3" |
185 | #define VCOrgUnit4Prop "OUN4" | 185 | #define VCOrgUnit4Prop "OUN4" |
186 | #define VCOrgUnitProp "OUN" | 186 | #define VCOrgUnitProp "OUN" |
187 | #define VCPagerProp "PAGER" | 187 | #define VCPagerProp "PAGER" |
188 | #define VCPAlarmProp "PALARM" | 188 | #define VCPAlarmProp "PALARM" |
189 | #define VCParcelProp "PARCEL" | 189 | #define VCParcelProp "PARCEL" |
190 | #define VCPartProp "PART" | 190 | #define VCPartProp "PART" |
191 | #define VCPCMProp "PCM" | 191 | #define VCPCMProp "PCM" |
192 | #define VCPDFProp "PDF" | 192 | #define VCPDFProp "PDF" |
193 | #define VCPGPProp "PGP" | 193 | #define VCPGPProp "PGP" |
@@ -202,183 +202,168 @@ extern "C" { | |||
202 | #define VCPriorityProp "PRIORITY" | 202 | #define VCPriorityProp "PRIORITY" |
203 | #define VCProcedureNameProp "PROCEDURENAME" | 203 | #define VCProcedureNameProp "PROCEDURENAME" |
204 | #define VCProdIdProp "PRODID" | 204 | #define VCProdIdProp "PRODID" |
205 | #define VCProdigyProp "PRODIGY" | 205 | #define VCProdigyProp "PRODIGY" |
206 | #define VCPronunciationProp "SOUND" | 206 | #define VCPronunciationProp "SOUND" |
207 | #define VCPSProp "PS" | 207 | #define VCPSProp "PS" |
208 | #define VCPublicKeyProp "KEY" | 208 | #define VCPublicKeyProp "KEY" |
209 | #define VCQPProp "QP" | 209 | #define VCQPProp "QP" |
210 | #define VCQuickTimeProp "QTIME" | 210 | #define VCQuickTimeProp "QTIME" |
211 | #define VCQuotedPrintableProp"QUOTED-PRINTABLE" | 211 | #define VCQuotedPrintableProp"QUOTED-PRINTABLE" |
212 | #define VCRDateProp "RDATE" | 212 | #define VCRDateProp "RDATE" |
213 | #define VCRegionProp "R" | 213 | #define VCRegionProp "R" |
214 | #define VCRelatedToProp "RELATED-TO" | 214 | #define VCRelatedToProp "RELATED-TO" |
215 | #define VCRepeatCountProp "REPEATCOUNT" | 215 | #define VCRepeatCountProp "REPEATCOUNT" |
216 | #define VCResourcesProp "RESOURCES" | 216 | #define VCResourcesProp "RESOURCES" |
217 | #define VCRNumProp "RNUM" | 217 | #define VCRNumProp "RNUM" |
218 | #define VCRoleProp "ROLE" | 218 | #define VCRoleProp "ROLE" |
219 | #define VCRRuleProp "RRULE" | 219 | #define VCRRuleProp "RRULE" |
220 | #define VCRSVPProp "RSVP" | 220 | #define VCRSVPProp "RSVP" |
221 | #define VCRunTimeProp "RUNTIME" | 221 | #define VCRunTimeProp "RUNTIME" |
222 | #define VCSequenceProp "SEQUENCE" | 222 | #define VCSequenceProp "SEQUENCE" |
223 | #define VCSnoozeTimeProp "SNOOZETIME" | 223 | #define VCSnoozeTimeProp "SNOOZETIME" |
224 | #define VCStartProp "START" | 224 | #define VCStartProp "START" |
225 | #define VCStatusProp "STATUS" | 225 | #define VCStatusProp "STATUS" |
226 | #define VCStreetAddressProp "STREET" | 226 | #define VCStreetAddressProp "STREET" |
227 | #define VCSubTypeProp "SUBTYPE" | 227 | #define VCSubTypeProp "SUBTYPE" |
228 | #define VCSummaryProp "SUMMARY" | 228 | #define VCSummaryProp "SUMMARY" |
229 | #define VCTelephoneProp "TEL" | 229 | #define VCTelephoneProp "TEL" |
230 | #define VCTIFFProp "TIFF" | 230 | #define VCTIFFProp "TIFF" |
231 | #define VCTimeZoneProp "TZ" | 231 | #define VCTimeZoneProp "TZ" |
232 | #define VCTitleProp "TITLE" | 232 | #define VCTitleProp "TITLE" |
233 | #define VCTLXProp "TLX" | 233 | #define VCTLXProp "TLX" |
234 | #define VCTodoProp "VTODO" | 234 | #define VCTodoProp "VTODO" |
235 | #define VCTranspProp "TRANSP" | 235 | #define VCTranspProp "TRANSP" |
236 | #define VCUniqueStringProp "UID" | 236 | #define VCUniqueStringProp "UID" |
237 | #define VCURLProp "URL" | 237 | #define VCURLProp "URL" |
238 | #define VCURLValueProp "URLVAL" | 238 | #define VCURLValueProp "URLVAL" |
239 | #define VCValueProp "VALUE" | 239 | #define VCValueProp "VALUE" |
240 | #define VCVersionProp "VERSION" | 240 | #define VCVersionProp "VERSION" |
241 | #define VCVideoProp "VIDEO" | 241 | #define VCVideoProp "VIDEO" |
242 | #define VCVoiceProp "VOICE" | 242 | #define VCVoiceProp "VOICE" |
243 | #define VCWAVEProp "WAVE" | 243 | #define VCWAVEProp "WAVE" |
244 | #define VCWMFProp "WMF" | 244 | #define VCWMFProp "WMF" |
245 | #define VCWorkProp "WORK" | 245 | #define VCWorkProp "WORK" |
246 | #define VCX400Prop "X400" | 246 | #define VCX400Prop "X400" |
247 | #define VCX509Prop "X509" | 247 | #define VCX509Prop "X509" |
248 | #define VCXRuleProp "XRULE" | 248 | #define VCXRuleProp "XRULE" |
249 | 249 | ||
250 | /* extensions for KOrganizer / KPilot */ | 250 | /* Extensions */ |
251 | #define KPilotIdProp "X-PILOTID" | ||
252 | #define KPilotStatusProp "X-PILOTSTAT" | ||
253 | 251 | ||
252 | #define XPilotIdProp "X-PILOTID" | ||
253 | #define XPilotStatusProp "X-PILOTSTAT" | ||
254 | /* extensions for iMIP / iTIP */ | 254 | /* extensions for iMIP / iTIP */ |
255 | #define ICOrganizerProp "X-ORGANIZER" | 255 | #define ICOrganizerProp "X-ORGANIZER" |
256 | #define ICMethodProp "X-METHOD" | 256 | #define ICMethodProp "X-METHOD" |
257 | #define ICRequestStatusProp "X-REQUEST-STATUS" | 257 | #define ICRequestStatusProp "X-REQUEST-STATUS" |
258 | |||
259 | typedef struct VObject VObject; | 258 | typedef struct VObject VObject; |
260 | 259 | ||
261 | typedef union ValueItem { | ||
262 | const char *strs; | ||
263 | const wchar_t *ustrs; | ||
264 | unsigned int i; | ||
265 | unsigned long l; | ||
266 | void *any; | ||
267 | VObject *vobj; | ||
268 | } ValueItem; | ||
269 | |||
270 | struct VObject { | ||
271 | VObject *next; | ||
272 | const char *id; | ||
273 | VObject *prop; | ||
274 | unsigned short valType; | ||
275 | ValueItem val; | ||
276 | }; | ||
277 | |||
278 | typedef struct StrItem StrItem; | ||
279 | |||
280 | struct StrItem { | ||
281 | StrItem *next; | ||
282 | const char *s; | ||
283 | unsigned int refCnt; | ||
284 | }; | ||
285 | |||
286 | typedef struct VObjectIterator { | 260 | typedef struct VObjectIterator { |
287 | VObject* start; | 261 | VObject* start; |
288 | VObject* next; | 262 | VObject* next; |
289 | } VObjectIterator; | 263 | } VObjectIterator; |
290 | 264 | ||
291 | extern VObject* newVObject(const char *id); | 265 | extern DLLEXPORT(VObject*) newVObject(const char *id); |
292 | extern void deleteVObject(VObject *p); | 266 | extern DLLEXPORT(void) deleteVObject(VObject *p); |
293 | extern char* dupStr(const char *s, unsigned int size); | 267 | extern DLLEXPORT(char*) dupStr(const char *s, unsigned int size); |
294 | extern void deleteStr(const char *p); | 268 | extern DLLEXPORT(void) deleteStr(const char *p); |
295 | extern void unUseStr(const char *s); | 269 | extern DLLEXPORT(void) unUseStr(const char *s); |
296 | 270 | ||
297 | extern void setVObjectName(VObject *o, const char* id); | 271 | extern DLLEXPORT(void) setVObjectName(VObject *o, const char* id); |
298 | extern void setVObjectStringZValue(VObject *o, const char *s); | 272 | extern DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s); |
299 | extern void setVObjectStringZValue_(VObject *o, const char *s); | 273 | extern DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s); |
300 | extern void setVObjectUStringZValue(VObject *o, const wchar_t *s); | 274 | extern DLLEXPORT(void) setVObjectUStringZValue(VObject *o, const wchar_t *s); |
301 | extern void setVObjectUStringZValue_(VObject *o, const wchar_t *s); | 275 | extern DLLEXPORT(void) setVObjectUStringZValue_(VObject *o, const wchar_t *s); |
302 | extern void setVObjectIntegerValue(VObject *o, unsigned int i); | 276 | extern DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i); |
303 | extern void setVObjectLongValue(VObject *o, unsigned long l); | 277 | extern DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l); |
304 | extern void setVObjectAnyValue(VObject *o, void *t); | 278 | extern DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t); |
305 | extern VObject* setValueWithSize(VObject *prop, void *val, unsigned int size); | 279 | extern DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size); |
306 | extern VObject* setValueWithSize_(VObject *prop, void *val, unsigned int size); | 280 | extern DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size); |
307 | 281 | ||
308 | extern const char* vObjectName(VObject *o); | 282 | extern DLLEXPORT(const char*) vObjectName(VObject *o); |
309 | extern const char* vObjectStringZValue(VObject *o); | 283 | extern DLLEXPORT(const char*) vObjectStringZValue(VObject *o); |
310 | extern const wchar_t* vObjectUStringZValue(VObject *o); | 284 | extern DLLEXPORT(const wchar_t*) vObjectUStringZValue(VObject *o); |
311 | extern unsigned int vObjectIntegerValue(VObject *o); | 285 | extern DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o); |
312 | extern unsigned long vObjectLongValue(VObject *o); | 286 | extern DLLEXPORT(unsigned long) vObjectLongValue(VObject *o); |
313 | extern void* vObjectAnyValue(VObject *o); | 287 | extern DLLEXPORT(void*) vObjectAnyValue(VObject *o); |
314 | extern VObject* vObjectVObjectValue(VObject *o); | 288 | extern DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o); |
315 | extern void setVObjectVObjectValue(VObject *o, VObject *p); | 289 | extern DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p); |
316 | 290 | ||
317 | extern VObject* addVObjectProp(VObject *o, VObject *p); | 291 | extern DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p); |
318 | extern VObject* addProp(VObject *o, const char *id); | 292 | extern DLLEXPORT(VObject*) addProp(VObject *o, const char *id); |
319 | extern VObject* addProp_(VObject *o, const char *id); | 293 | extern DLLEXPORT(VObject*) addProp_(VObject *o, const char *id); |
320 | extern VObject* addPropValue(VObject *o, const char *p, const char *v); | 294 | extern DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v); |
321 | extern VObject* addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size); | 295 | extern DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size); |
322 | extern VObject* addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size); | 296 | extern DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size); |
323 | extern VObject* addGroup(VObject *o, const char *g); | 297 | extern DLLEXPORT(VObject*) addGroup(VObject *o, const char *g); |
324 | extern void addList(VObject **o, VObject *p); | 298 | extern DLLEXPORT(void) addList(VObject **o, VObject *p); |
325 | 299 | ||
326 | extern VObject* isAPropertyOf(VObject *o, const char *id); | 300 | extern DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id); |
327 | 301 | ||
328 | extern VObject* nextVObjectInList(VObject *o); | 302 | extern DLLEXPORT(VObject*) nextVObjectInList(VObject *o); |
329 | extern void initPropIterator(VObjectIterator *i, VObject *o); | 303 | extern DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o); |
330 | extern int moreIteration(VObjectIterator *i); | 304 | extern DLLEXPORT(int) moreIteration(VObjectIterator *i); |
331 | extern VObject* nextVObject(VObjectIterator *i); | 305 | extern DLLEXPORT(VObject*) nextVObject(VObjectIterator *i); |
332 | 306 | ||
333 | extern char* writeMemVObject(char *s, int *len, VObject *o); | 307 | extern DLLEXPORT(char*) writeMemVObject(char *s, int *len, VObject *o); |
334 | extern char* writeMemVObjects(char *s, int *len, VObject *list); | 308 | extern DLLEXPORT(char*) writeMemVObjects(char *s, int *len, VObject *list); |
335 | 309 | ||
336 | extern const char* lookupStr(const char *s); | 310 | extern DLLEXPORT(const char*) lookupStr(const char *s); |
337 | extern void cleanStrTbl(); | 311 | extern DLLEXPORT(void) cleanStrTbl(); |
338 | 312 | ||
339 | extern void cleanVObject(VObject *o); | 313 | extern DLLEXPORT(void) cleanVObject(VObject *o); |
340 | extern void cleanVObjects(VObject *list); | 314 | extern DLLEXPORT(void) cleanVObjects(VObject *list); |
341 | 315 | ||
342 | extern const char* lookupProp(const char* str); | 316 | extern DLLEXPORT(const char*) lookupProp(const char* str); |
343 | extern const char* lookupProp_(const char* str); | 317 | extern DLLEXPORT(const char*) lookupProp_(const char* str); |
344 | 318 | ||
345 | extern wchar_t* fakeUnicode(const char *ps, int *bytes); | 319 | extern DLLEXPORT(wchar_t*) fakeUnicode(const char *ps, int *bytes); |
346 | extern int uStrLen(const wchar_t *u); | 320 | extern DLLEXPORT(int) uStrLen(const wchar_t *u); |
347 | extern char* fakeCString(const wchar_t *u); | 321 | extern DLLEXPORT(char*) fakeCString(const wchar_t *u); |
348 | 322 | ||
349 | extern void printVObjectToFile(char *fname,VObject *o); | 323 | extern DLLEXPORT(void) printVObjectToFile(char *fname,VObject *o); |
350 | extern void printVObjectsToFile(char *fname,VObject *list); | 324 | extern DLLEXPORT(void) printVObjectsToFile(char *fname,VObject *list); |
351 | extern void writeVObjectToFile(char *fname, VObject *o); | 325 | extern DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o); |
352 | extern void writeVObjectsToFile(char *fname, VObject *list); | 326 | extern DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list); |
353 | 327 | ||
354 | extern int vObjectValueType(VObject *o); | 328 | extern DLLEXPORT(int) vObjectValueType(VObject *o); |
355 | 329 | ||
356 | /* return type of vObjectValueType: */ | 330 | /* return type of vObjectValueType: */ |
357 | #define VCVT_NOVALUE0 | 331 | #define VCVT_NOVALUE0 |
358 | /* if the VObject has no value associated with it. */ | 332 | /* if the VObject has no value associated with it. */ |
359 | #define VCVT_STRINGZ1 | 333 | #define VCVT_STRINGZ1 |
360 | /* if the VObject has value set by setVObjectStringZValue. */ | 334 | /* if the VObject has value set by setVObjectStringZValue. */ |
361 | #define VCVT_USTRINGZ2 | 335 | #define VCVT_USTRINGZ2 |
362 | /* if the VObject has value set by setVObjectUStringZValue. */ | 336 | /* if the VObject has value set by setVObjectUStringZValue. */ |
363 | #define VCVT_UINT 3 | 337 | #define VCVT_UINT 3 |
364 | /* if the VObject has value set by setVObjectIntegerValue. */ | 338 | /* if the VObject has value set by setVObjectIntegerValue. */ |
365 | #define VCVT_ULONG 4 | 339 | #define VCVT_ULONG 4 |
366 | /* if the VObject has value set by setVObjectLongValue. */ | 340 | /* if the VObject has value set by setVObjectLongValue. */ |
367 | #define VCVT_RAW 5 | 341 | #define VCVT_RAW 5 |
368 | /* if the VObject has value set by setVObjectAnyValue. */ | 342 | /* if the VObject has value set by setVObjectAnyValue. */ |
369 | #define VCVT_VOBJECT6 | 343 | #define VCVT_VOBJECT6 |
370 | /* if the VObject has value set by setVObjectVObjectValue. */ | 344 | /* if the VObject has value set by setVObjectVObjectValue. */ |
371 | 345 | ||
372 | extern const char** fieldedProp; | 346 | extern const char** fieldedProp; |
373 | 347 | ||
348 | /* NOTE regarding printVObject and writeVObject | ||
349 | |||
350 | The functions below are not exported from the DLL because they | ||
351 | take a FILE* as a parameter, which cannot be passed across a DLL | ||
352 | interface (at least that is my experience). Instead you can use | ||
353 | their companion functions which take file names or pointers | ||
354 | to memory. However, if you are linking this code into | ||
355 | your build directly then you may find them a more convenient API | ||
356 | and you can go ahead and use them. If you try to use them with | ||
357 | the DLL LIB you will get a link error. | ||
358 | */ | ||
374 | extern void printVObject(FILE *fp,VObject *o); | 359 | extern void printVObject(FILE *fp,VObject *o); |
375 | extern void writeVObject(FILE *fp, VObject *o); | 360 | extern void writeVObject(FILE *fp, VObject *o); |
376 | 361 | ||
377 | 362 | ||
378 | #if defined(__CPLUSPLUS__) || defined(__cplusplus) | 363 | #if defined(__CPLUSPLUS__) || defined(__cplusplus) |
379 | } | 364 | } |
380 | #endif | 365 | #endif |
381 | 366 | ||
382 | #endif /* __VOBJECT_H__ */ | 367 | #endif /* __VOBJECT_H__ */ |
383 | 368 | ||
384 | 369 | ||