author | eilers <eilers> | 2003-03-27 16:17:48 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-03-27 16:17:48 (UTC) |
commit | 390a5a0c332c8c6fb380c1ed4cd6adae3e544a08 (patch) (unidiff) | |
tree | 7ad6266be3d78d25ae061a0be067f82f8d666246 /library/backend/vobject_p.h | |
parent | ff43585778968407bb08473e45ddd1d942f8d8c8 (diff) | |
download | opie-390a5a0c332c8c6fb380c1ed4cd6adae3e544a08.zip opie-390a5a0c332c8c6fb380c1ed4cd6adae3e544a08.tar.gz opie-390a5a0c332c8c6fb380c1ed4cd6adae3e544a08.tar.bz2 |
using releases from qtopia-free-1.6.0-snapshot-20030324 which fixes the
following bugs #776 and #490:
Now, we could successfully parse vcards from palm 4 + 5 and
quoted-printable encoded lines .. !
-rw-r--r-- | library/backend/vobject_p.h | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/library/backend/vobject_p.h b/library/backend/vobject_p.h index bab22bb..f969898 100644 --- a/library/backend/vobject_p.h +++ b/library/backend/vobject_p.h | |||
@@ -94,21 +94,25 @@ For example: | |||
94 | CLIPFORMAT foo = RegisterClipboardFormat(vCardClipboardFormat); | 94 | CLIPFORMAT foo = RegisterClipboardFormat(vCardClipboardFormat); |
95 | 95 | ||
96 | */ | 96 | */ |
97 | 97 | ||
98 | #define vCardMimeType "text/x-vCard" | 98 | #define vCardMimeType "text/x-vCard" |
99 | #define vCalendarMimeType"text/x-vCalendar" | 99 | #define vCalendarMimeType"text/x-vCalendar" |
100 | 100 | ||
101 | #undef DLLEXPORT | 101 | #undef DLLEXPORT |
102 | //#include <qtopia/qpeglobal.h> | ||
102 | #include <qglobal.h> | 103 | #include <qglobal.h> |
103 | #if defined(Q_WS_WIN) | 104 | |
105 | #if defined(QTOPIA_MAKEDLL) | ||
104 | #define DLLEXPORT(t) __declspec(dllexport) t | 106 | #define DLLEXPORT(t) __declspec(dllexport) t |
107 | #elif defined(QTOPIA_DLL) | ||
108 | #define DLLEXPORT(t) __declspec(dllimport) t | ||
105 | #else | 109 | #else |
106 | #define DLLEXPORT(t) t | 110 | #define DLLEXPORT(t) t |
107 | #endif | 111 | #endif |
108 | 112 | ||
109 | #ifndef FALSE | 113 | #ifndef FALSE |
110 | #define FALSE0 | 114 | #define FALSE0 |
111 | #endif | 115 | #endif |
112 | #ifndef TRUE | 116 | #ifndef TRUE |
113 | #define TRUE1 | 117 | #define TRUE1 |
114 | #endif | 118 | #endif |
@@ -346,34 +350,34 @@ extern DLLEXPORT(int) vObjectValueType(VObject *o); | |||
346 | /* if the VObject has value set by setVObjectIntegerValue. */ | 350 | /* if the VObject has value set by setVObjectIntegerValue. */ |
347 | #define VCVT_ULONG 3 | 351 | #define VCVT_ULONG 3 |
348 | /* if the VObject has value set by setVObjectLongValue. */ | 352 | /* if the VObject has value set by setVObjectLongValue. */ |
349 | #define VCVT_RAW 4 | 353 | #define VCVT_RAW 4 |
350 | /* if the VObject has value set by setVObjectAnyValue. */ | 354 | /* if the VObject has value set by setVObjectAnyValue. */ |
351 | #define VCVT_VOBJECT5 | 355 | #define VCVT_VOBJECT5 |
352 | /* if the VObject has value set by setVObjectVObjectValue. */ | 356 | /* if the VObject has value set by setVObjectVObjectValue. */ |
353 | 357 | ||
354 | extern const char** fieldedProp; | 358 | extern DLLEXPORT(const char**) fieldedProp; |
355 | 359 | ||
356 | /*************************************************** | 360 | /*************************************************** |
357 | * The methods below are implemented in vcc.c (generated from vcc.y ) | 361 | * The methods below are implemented in vcc.c (generated from vcc.y ) |
358 | ***************************************************/ | 362 | ***************************************************/ |
359 | 363 | ||
360 | /* NOTE regarding printVObject and writeVObject | 364 | /* NOTE regarding printVObject and writeVObject |
361 | 365 | ||
362 | The functions below are not exported from the DLL because they | 366 | The functions below are not exported from the DLL because they |
363 | take a FILE* as a parameter, which cannot be passed across a DLL | 367 | take a FILE* as a parameter, which cannot be passed across a DLL |
364 | interface (at least that is my experience). Instead you can use | 368 | interface (at least that is my experience). Instead you can use |
365 | their companion functions which take file names or pointers | 369 | their companion functions which take file names or pointers |
366 | to memory. However, if you are linking this code into | 370 | to memory. However, if you are linking this code into |
367 | your build directly then you may find them a more convenient API | 371 | your build directly then you may find them a more convenient API |
368 | and you can go ahead and use them. If you try to use them with | 372 | and you can go ahead and use them. If you try to use them with |
369 | the DLL LIB you will get a link error. | 373 | the DLL LIB you will get a link error. |
370 | */ | 374 | */ |
371 | extern void writeVObject(FILE *fp, VObject *o); | 375 | extern DLLEXPORT(void) writeVObject(FILE *fp, VObject *o); |
372 | 376 | ||
373 | 377 | ||
374 | 378 | ||
375 | typedef void (*MimeErrorHandler)(char *); | 379 | typedef void (*MimeErrorHandler)(char *); |
376 | 380 | ||
377 | extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler); | 381 | extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler); |
378 | 382 | ||
379 | extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len); | 383 | extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len); |
@@ -388,34 +392,19 @@ passed across a DLL interface (at least that is my experience). | |||
388 | If you are linking this code into your build directly then | 392 | If you are linking this code into your build directly then |
389 | you may find them a more convenient API that the other flavors | 393 | you may find them a more convenient API that the other flavors |
390 | that take a file name. If you use them with the DLL LIB you | 394 | that take a file name. If you use them with the DLL LIB you |
391 | will get a link error. | 395 | will get a link error. |
392 | */ | 396 | */ |
393 | 397 | ||
394 | 398 | ||
395 | #if INCLUDEMFC | 399 | #if INCLUDEMFC |
396 | extern VObject* Parse_MIME_FromFile(CFile *file); | 400 | extern DLLEXPORT(VObject*) Parse_MIME_FromFile(CFile *file); |
397 | #else | 401 | #else |
398 | extern VObject* Parse_MIME_FromFile(FILE *file); | 402 | extern DLLEXPORT(VObject*) Parse_MIME_FromFile(FILE *file); |
399 | #endif | 403 | #endif |
400 | 404 | ||
401 | #define __SHARP_COMP_ | ||
402 | |||
403 | #ifndef __SHARP_COMP_ | ||
404 | extern DLLEXPORT(const char *) vObjectTypeInfo(VObject *o); | 405 | extern DLLEXPORT(const char *) vObjectTypeInfo(VObject *o); |
405 | 406 | ||
406 | #else | ||
407 | // This function is not available in the Sharp ROM for SL 5500 ! | ||
408 | // Therefore I have to move it into the header file.. (se) | ||
409 | |||
410 | inline const char* vObjectTypeInfo(VObject *o) | ||
411 | { | ||
412 | const char *type = vObjectName( o ); | ||
413 | if ( strcmp( type, "TYPE" ) == 0 ) | ||
414 | type = vObjectStringZValue( o ); | ||
415 | return type; | ||
416 | } | ||
417 | #endif | ||
418 | 407 | ||
419 | #endif /* __VOBJECT_H__ */ | 408 | #endif /* __VOBJECT_H__ */ |
420 | 409 | ||
421 | 410 | ||