vobject_p.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080 #ifndef __VOBJECT_H__
00081 #define __VOBJECT_H__ 1
00082
00083 #include <qstring.h>
00084
00085 #define vCardClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCard"
00086 #define vCalendarClipboardFormat "+//ISBN 1-887687-00-9::versit::PDI//vCalendar"
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098 #define vCardMimeType "text/x-vCard"
00099 #define vCalendarMimeType "text/x-vCalendar"
00100
00101 #undef DLLEXPORT
00102 #include <qtopia/global.h>
00103 #if defined(QTOPIA_MAKEDLL)
00104 #define DLLEXPORT(t) __declspec(dllexport) t
00105 #elif defined(QTOPIA_DLL)
00106 #define DLLEXPORT(t) __declspec(dllimport) t
00107 #else
00108 #define DLLEXPORT(t) t
00109 #endif
00110
00111 #ifndef FALSE
00112 #define FALSE 0
00113 #endif
00114 #ifndef TRUE
00115 #define TRUE 1
00116 #endif
00117
00118 #include <stdlib.h>
00119 #include <stdio.h>
00120
00121
00122 #define VC7bitProp "7BIT"
00123 #define VC8bitProp "8BIT"
00124 #define VCAAlarmProp "AALARM"
00125 #define VCAdditionalNamesProp "ADDN"
00126 #define VCAdrProp "ADR"
00127 #define VCAgentProp "AGENT"
00128 #define VCAIFFProp "AIFF"
00129 #define VCAOLProp "AOL"
00130 #define VCAppleLinkProp "APPLELINK"
00131 #define VCAttachProp "ATTACH"
00132 #define VCAttendeeProp "ATTENDEE"
00133 #define VCATTMailProp "ATTMAIL"
00134 #define VCAudioContentProp "AUDIOCONTENT"
00135 #define VCAVIProp "AVI"
00136 #define VCBase64Prop "BASE64"
00137 #define VCBBSProp "BBS"
00138 #define VCBirthDateProp "BDAY"
00139 #define VCBMPProp "BMP"
00140 #define VCBodyProp "BODY"
00141 #define VCBusinessRoleProp "ROLE"
00142 #define VCCalProp "VCALENDAR"
00143 #define VCCaptionProp "CAP"
00144 #define VCCardProp "VCARD"
00145 #define VCCarProp "CAR"
00146 #define VCCategoriesProp "CATEGORIES"
00147 #define VCCellularProp "CELL"
00148 #define VCCGMProp "CGM"
00149 #define VCCharSetProp "CHARSET"
00150 #define VCCIDProp "CID"
00151 #define VCCISProp "CIS"
00152 #define VCCityProp "L"
00153 #define VCClassProp "CLASS"
00154 #define VCCommentProp "NOTE"
00155 #define VCCompletedProp "COMPLETED"
00156 #define VCContentIDProp "CONTENT-ID"
00157 #define VCCountryNameProp "C"
00158 #define VCDAlarmProp "DALARM"
00159 #define VCDataSizeProp "DATASIZE"
00160 #define VCDayLightProp "DAYLIGHT"
00161 #define VCDCreatedProp "DCREATED"
00162 #define VCDeliveryLabelProp "LABEL"
00163 #define VCDescriptionProp "DESCRIPTION"
00164 #define VCDIBProp "DIB"
00165 #define VCDisplayStringProp "DISPLAYSTRING"
00166 #define VCDomesticProp "DOM"
00167 #define VCDTendProp "DTEND"
00168 #define VCDTstartProp "DTSTART"
00169 #define VCDueProp "DUE"
00170 #define VCEmailAddressProp "EMAIL"
00171 #define VCEncodingProp "ENCODING"
00172 #define VCEndProp "END"
00173 #define VCEventProp "VEVENT"
00174 #define VCEWorldProp "EWORLD"
00175 #define VCExNumProp "EXNUM"
00176 #define VCExpDateProp "EXDATE"
00177 #define VCExpectProp "EXPECT"
00178 #define VCExtAddressProp "EXT ADD"
00179 #define VCFamilyNameProp "F"
00180 #define VCFaxProp "FAX"
00181 #define VCFullNameProp "FN"
00182 #define VCGeoProp "GEO"
00183 #define VCGeoLocationProp "GEO"
00184 #define VCGIFProp "GIF"
00185 #define VCGivenNameProp "G"
00186 #define VCGroupingProp "Grouping"
00187 #define VCHomeProp "HOME"
00188 #define VCIBMMailProp "IBMMail"
00189 #define VCInlineProp "INLINE"
00190 #define VCInternationalProp "INTL"
00191 #define VCInternetProp "INTERNET"
00192 #define VCISDNProp "ISDN"
00193 #define VCJPEGProp "JPEG"
00194 #define VCLanguageProp "LANG"
00195 #define VCLastModifiedProp "LAST-MODIFIED"
00196 #define VCLastRevisedProp "REV"
00197 #define VCLocationProp "LOCATION"
00198 #define VCLogoProp "LOGO"
00199 #define VCMailerProp "MAILER"
00200 #define VCMAlarmProp "MALARM"
00201 #define VCMCIMailProp "MCIMAIL"
00202 #define VCMessageProp "MSG"
00203 #define VCMETProp "MET"
00204 #define VCModemProp "MODEM"
00205 #define VCMPEG2Prop "MPEG2"
00206 #define VCMPEGProp "MPEG"
00207 #define VCMSNProp "MSN"
00208 #define VCNamePrefixesProp "NPRE"
00209 #define VCNameProp "N"
00210 #define VCNameSuffixesProp "NSUF"
00211 #define VCNoteProp "NOTE"
00212 #define VCOrgNameProp "ORGNAME"
00213 #define VCOrgProp "ORG"
00214 #define VCOrgUnit2Prop "OUN2"
00215 #define VCOrgUnit3Prop "OUN3"
00216 #define VCOrgUnit4Prop "OUN4"
00217 #define VCOrgUnitProp "OUN"
00218 #define VCPagerProp "PAGER"
00219 #define VCPAlarmProp "PALARM"
00220 #define VCParcelProp "PARCEL"
00221 #define VCPartProp "PART"
00222 #define VCPCMProp "PCM"
00223 #define VCPDFProp "PDF"
00224 #define VCPGPProp "PGP"
00225 #define VCPhotoProp "PHOTO"
00226 #define VCPICTProp "PICT"
00227 #define VCPMBProp "PMB"
00228 #define VCPostalBoxProp "BOX"
00229 #define VCPostalCodeProp "PC"
00230 #define VCPostalProp "POSTAL"
00231 #define VCPowerShareProp "POWERSHARE"
00232 #define VCPreferredProp "PREF"
00233 #define VCPriorityProp "PRIORITY"
00234 #define VCProcedureNameProp "PROCEDURENAME"
00235 #define VCProdIdProp "PRODID"
00236 #define VCProdigyProp "PRODIGY"
00237 #define VCPronunciationProp "SOUND"
00238 #define VCPSProp "PS"
00239 #define VCPublicKeyProp "KEY"
00240 #define VCQPProp "QP"
00241 #define VCQuickTimeProp "QTIME"
00242 #define VCQuotedPrintableProp "QUOTED-PRINTABLE"
00243 #define VCRDateProp "RDATE"
00244 #define VCRegionProp "R"
00245 #define VCRelatedToProp "RELATED-TO"
00246 #define VCRepeatCountProp "REPEATCOUNT"
00247 #define VCResourcesProp "RESOURCES"
00248 #define VCRNumProp "RNUM"
00249 #define VCRoleProp "ROLE"
00250 #define VCRRuleProp "RRULE"
00251 #define VCRSVPProp "RSVP"
00252 #define VCRunTimeProp "RUNTIME"
00253 #define VCSequenceProp "SEQUENCE"
00254 #define VCSnoozeTimeProp "SNOOZETIME"
00255 #define VCStartProp "START"
00256 #define VCStatusProp "STATUS"
00257 #define VCStreetAddressProp "STREET"
00258 #define VCSubTypeProp "SUBTYPE"
00259 #define VCSummaryProp "SUMMARY"
00260 #define VCTelephoneProp "TEL"
00261 #define VCTIFFProp "TIFF"
00262 #define VCTimeZoneProp "TZ"
00263 #define VCTitleProp "TITLE"
00264 #define VCTLXProp "TLX"
00265 #define VCTodoProp "VTODO"
00266 #define VCTranspProp "TRANSP"
00267 #define VCUniqueStringProp "UID"
00268 #define VCURLProp "URL"
00269 #define VCURLValueProp "URLVAL"
00270 #define VCValueProp "VALUE"
00271 #define VCVersionProp "VERSION"
00272 #define VCVideoProp "VIDEO"
00273 #define VCVoiceProp "VOICE"
00274 #define VCWAVEProp "WAVE"
00275 #define VCWMFProp "WMF"
00276 #define VCWorkProp "WORK"
00277 #define VCX400Prop "X400"
00278 #define VCX509Prop "X509"
00279 #define VCXRuleProp "XRULE"
00280
00281
00282 typedef struct VObject VObject;
00283
00284 typedef struct VObjectIterator {
00285 VObject* start;
00286 VObject* next;
00287 } VObjectIterator;
00288
00289 extern DLLEXPORT(VObject*) newVObject(const char *id);
00290 extern DLLEXPORT(void) deleteVObject(VObject *p);
00291 extern DLLEXPORT(char*) dupStr(const char *s, unsigned int size);
00292 extern DLLEXPORT(void) deleteStr(const char *p);
00293 extern DLLEXPORT(void) unUseStr(const char *s);
00294
00295 extern DLLEXPORT(void) setVObjectName(VObject *o, const char* id);
00296 extern DLLEXPORT(void) setVObjectStringZValue(VObject *o, const char *s);
00297 extern DLLEXPORT(void) setVObjectStringZValue_(VObject *o, const char *s);
00298 extern DLLEXPORT(void) setVObjectIntegerValue(VObject *o, unsigned int i);
00299 extern DLLEXPORT(void) setVObjectLongValue(VObject *o, unsigned long l);
00300 extern DLLEXPORT(void) setVObjectAnyValue(VObject *o, void *t);
00301 extern DLLEXPORT(VObject*) setValueWithSize(VObject *prop, void *val, unsigned int size);
00302 extern DLLEXPORT(VObject*) setValueWithSize_(VObject *prop, void *val, unsigned int size);
00303
00304 extern DLLEXPORT(const char*) vObjectName(VObject *o);
00305 extern DLLEXPORT(const char*) vObjectStringZValue(VObject *o);
00306 extern DLLEXPORT(unsigned int) vObjectIntegerValue(VObject *o);
00307 extern DLLEXPORT(unsigned long) vObjectLongValue(VObject *o);
00308 extern DLLEXPORT(void*) vObjectAnyValue(VObject *o);
00309 extern DLLEXPORT(VObject*) vObjectVObjectValue(VObject *o);
00310 extern DLLEXPORT(void) setVObjectVObjectValue(VObject *o, VObject *p);
00311
00312 extern DLLEXPORT(VObject*) addVObjectProp(VObject *o, VObject *p);
00313 extern DLLEXPORT(VObject*) addProp(VObject *o, const char *id);
00314 extern DLLEXPORT(VObject*) addProp_(VObject *o, const char *id);
00315 extern DLLEXPORT(VObject*) addPropValue(VObject *o, const char *p, const char *v);
00316 extern DLLEXPORT(VObject*) addPropSizedValue_(VObject *o, const char *p, const char *v, unsigned int size);
00317 extern DLLEXPORT(VObject*) addPropSizedValue(VObject *o, const char *p, const char *v, unsigned int size);
00318 extern DLLEXPORT(VObject*) addGroup(VObject *o, const char *g);
00319 extern DLLEXPORT(void) addList(VObject **o, VObject *p);
00320
00321 extern DLLEXPORT(VObject*) isAPropertyOf(VObject *o, const char *id);
00322
00323 extern DLLEXPORT(VObject*) nextVObjectInList(VObject *o);
00324 extern DLLEXPORT(void) initPropIterator(VObjectIterator *i, VObject *o);
00325 extern DLLEXPORT(int) moreIteration(VObjectIterator *i);
00326 extern DLLEXPORT(VObject*) nextVObject(VObjectIterator *i);
00327
00328 extern DLLEXPORT(const char*) lookupStr(const char *s);
00329 extern DLLEXPORT(void) cleanStrTbl();
00330
00331 extern DLLEXPORT(void) cleanVObject(VObject *o);
00332 extern DLLEXPORT(void) cleanVObjects(VObject *list);
00333
00334 extern DLLEXPORT(const char*) lookupProp(const char* str);
00335 extern DLLEXPORT(const char*) lookupProp_(const char* str);
00336
00337 extern DLLEXPORT(void) writeVObjectToFile(char *fname, VObject *o);
00338 extern DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list);
00339
00340 extern DLLEXPORT(int) vObjectValueType(VObject *o);
00341
00342
00343 #define VCVT_NOVALUE 0
00344
00345 #define VCVT_STRINGZ 1
00346
00347 #define VCVT_UINT 2
00348
00349 #define VCVT_ULONG 3
00350
00351 #define VCVT_RAW 4
00352
00353 #define VCVT_VOBJECT 5
00354
00355
00356 extern DLLEXPORT(const char**) fieldedProp;
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373 extern DLLEXPORT(void) writeVObject(FILE *fp, VObject *o);
00374
00375
00376
00377 typedef void (*MimeErrorHandler)(char *);
00378
00379 extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler);
00380
00381 extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len);
00382 extern DLLEXPORT(VObject*) Parse_MIME_FromFileName(char* fname);
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397 #if INCLUDEMFC
00398 extern DLLEXPORT(VObject*) Parse_MIME_FromFile(CFile *file);
00399 #else
00400 extern DLLEXPORT(VObject*) Parse_MIME_FromFile(FILE *file);
00401 #endif
00402
00403 extern DLLEXPORT(const char *) vObjectTypeInfo(VObject *o);
00404
00405
00406 #endif
00407
00408
This file is part of the documentation for OPIE Version 1.5.5.