Imported Upstream version 1.0beta1
[platform/upstream/syncevolution.git] / src / synthesis / src / sysync_SDK / Sources / sync_include.h
1 /*
2  *  File:     sync_include.h
3  *
4  *  Authors:  Beat Forster (bfo@synthesis.ch)
5  *
6  *
7  *  SDK include definitions
8  *
9  *  Copyright (c) 2004-2009 by Synthesis AG (www.synthesis.ch)
10  *
11  */
12
13
14 #ifndef SYNC_INCLUDE_H
15 #define SYNC_INCLUDE_H
16
17 #include "target_options.h"
18 #include "generic_types.h"   /* some basic defs, which aren't available */
19 #include "engine_defs.h"
20 #include "syerror.h"         /* "syerror.h" uses "generic_types.h" */
21
22 #if !defined(__cplusplus) && !defined(__OBJC__)
23   #if !defined(SYSYNC_ENGINE) || !defined(__MACH__) || defined(__GNUC__)
24     typedef unsigned char bool;
25     #define false 0
26     #define true  1
27   #endif
28 #endif
29
30 #if   !defined SYSYNC_ENGINE || !defined LINUX || defined __MACH__
31   typedef unsigned long ulong;
32 #endif
33
34 #ifdef SYSYNC_ENGINE
35   /* ==> if it is running within the SyncML engine */
36   #ifdef __cplusplus
37     #include "sysync.h"
38     #include "platform_file.h"
39   #else
40     #if defined _MSC_VER
41       #define NULL 0
42     #endif
43
44     #include "sysync_debug.h"
45   #endif
46 #else
47   /* ==> if running standalone, e.g. at a plug-in module */
48   #include <stdio.h>           /* used for printf calls */
49   #include <stdlib.h>          /* used for the malloc/free calls */
50   #include <string.h>          /* used for strcpy/strlen calls */
51
52   #ifdef __cplusplus
53     #ifndef __MACH__           /* MACH: IOFBF/RAND_MAX duplicate problem */
54       #include <string>        /* STL includes */
55       #include <list>
56     #endif
57
58     #ifdef __GNUC__
59       #include <typeinfo>
60     #else
61       #include <typeinfo.h>  /* type_info class */
62     #endif
63
64     using namespace std;
65   #endif
66
67   #if defined __MACH__ && !defined __GNUC__ /* used for va_list support */
68     #include <mw_stdarg.h>
69   #else
70     #include <stdarg.h>
71   #endif
72 #endif
73
74 #ifdef DBAPI_FILEOBJ
75   #ifndef FILEOBJ_SUPPORT
76   #define FILEOBJ_SUPPORT 1
77   #endif
78   
79   #define PLATFORM_FILE   1
80 #endif
81
82 /* JAVA native interface JNI */
83 #ifdef JNI_SUPPORT
84   #include <jni.h>
85
86 //#ifdef MACOSX
87 //  #include <JavaVM/jni.h>
88 //#else
89 //  #include <jni.h>
90 //#endif
91 #endif
92
93
94 #endif /* SYNC_INCLUDE_H */
95 /* eof */