summaryrefslogtreecommitdiff
path: root/library/backend/vobject_p.h
Side-by-side diff
Diffstat (limited to 'library/backend/vobject_p.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/vobject_p.h31
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
@@ -90,29 +90,33 @@ are globally unique IDs which can be used to generate clipboard format
ID's as per the requirements of a specific platform. For example, in
Windows they are used as the parameter in a call to RegisterClipboardFormat.
For example:
CLIPFORMAT foo = RegisterClipboardFormat(vCardClipboardFormat);
*/
#define vCardMimeType "text/x-vCard"
#define vCalendarMimeType "text/x-vCalendar"
#undef DLLEXPORT
+ //#include <qtopia/qpeglobal.h>
#include <qglobal.h>
-#if defined(Q_WS_WIN)
+
+#if defined(QTOPIA_MAKEDLL)
#define DLLEXPORT(t) __declspec(dllexport) t
+#elif defined(QTOPIA_DLL)
+#define DLLEXPORT(t) __declspec(dllimport) t
#else
-#define DLLEXPORT(t) t
+#define DLLEXPORT(t) t
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#include <stdlib.h>
#include <stdio.h>
@@ -342,80 +346,65 @@ extern DLLEXPORT(int) vObjectValueType(VObject *o);
/* if the VObject has no value associated with it. */
#define VCVT_STRINGZ 1
/* if the VObject has value set by setVObjectStringZValue. */
#define VCVT_UINT 2
/* if the VObject has value set by setVObjectIntegerValue. */
#define VCVT_ULONG 3
/* if the VObject has value set by setVObjectLongValue. */
#define VCVT_RAW 4
/* if the VObject has value set by setVObjectAnyValue. */
#define VCVT_VOBJECT 5
/* if the VObject has value set by setVObjectVObjectValue. */
-extern const char** fieldedProp;
+extern DLLEXPORT(const char**) fieldedProp;
/***************************************************
* The methods below are implemented in vcc.c (generated from vcc.y )
***************************************************/
/* NOTE regarding printVObject and writeVObject
The functions below are not exported from the DLL because they
take a FILE* as a parameter, which cannot be passed across a DLL
interface (at least that is my experience). Instead you can use
their companion functions which take file names or pointers
to memory. However, if you are linking this code into
your build directly then you may find them a more convenient API
and you can go ahead and use them. If you try to use them with
the DLL LIB you will get a link error.
*/
-extern void writeVObject(FILE *fp, VObject *o);
+extern DLLEXPORT(void) writeVObject(FILE *fp, VObject *o);
typedef void (*MimeErrorHandler)(char *);
extern DLLEXPORT(void) registerMimeErrorHandler(MimeErrorHandler);
extern DLLEXPORT(VObject*) Parse_MIME(const char *input, unsigned long len);
extern DLLEXPORT(VObject*) Parse_MIME_FromFileName(char* fname);
/* NOTE regarding Parse_MIME_FromFile
The function above, Parse_MIME_FromFile, comes in two flavors,
neither of which is exported from the DLL. Each version takes
a CFile or FILE* as a parameter, neither of which can be
passed across a DLL interface (at least that is my experience).
If you are linking this code into your build directly then
you may find them a more convenient API that the other flavors
that take a file name. If you use them with the DLL LIB you
will get a link error.
*/
#if INCLUDEMFC
-extern VObject* Parse_MIME_FromFile(CFile *file);
+extern DLLEXPORT(VObject*) Parse_MIME_FromFile(CFile *file);
#else
-extern VObject* Parse_MIME_FromFile(FILE *file);
+extern DLLEXPORT(VObject*) Parse_MIME_FromFile(FILE *file);
#endif
-#define __SHARP_COMP_
-
-#ifndef __SHARP_COMP_
extern DLLEXPORT(const char *) vObjectTypeInfo(VObject *o);
-#else
-// This function is not available in the Sharp ROM for SL 5500 !
-// Therefore I have to move it into the header file.. (se)
-
-inline const char* vObjectTypeInfo(VObject *o)
-{
- const char *type = vObjectName( o );
- if ( strcmp( type, "TYPE" ) == 0 )
- type = vObjectStringZValue( o );
- return type;
-}
-#endif
#endif /* __VOBJECT_H__ */