summaryrefslogtreecommitdiff
path: root/src/global_options.h
blob: c4c8af18a1711ad4281ab0790e42920b52cd0004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
/* SySync entirely global options (affects all targets)
 * ====================================================
 *
 * (c) 2001-2012 by Synthesis AG + plan44.ch
 *
 */

#ifndef GLOBAL_OPTIONS_H
#define GLOBAL_OPTIONS_H


// the following should be defined BEFORE including this file
// - SYSYNC_CLIENT : defined if client functionality should be included
// - SYSYNC_SERVER : defined if server functionality should be included
//   If not defined, and SYSYNC_CLIENT is also not defined, build
//   defaults to SYSYNC_SERVER
// - platform defines, like MACOSX, MOBOSX, LINUX, WINCE, _WIN32
//   __PALM_OS__, __EPOC_OS__ etc.
// - RELEASE_VERSION : define in targets that are real product releases
//   not internal debug/test/experimental releases
// - RELEASE_SYDEBUG : define the debug level for RELEASE_VERSION
//   (0=no debug code at all, 1=basic debug, 2=extended, 3=developer only)
//   Non-release versions (RELEASE_VERSION undefined) usually have
//   a debug level of 2 or 3 (defined in target or product options).


// signal that we are compiling with the SYSYNC engine
#define SYSYNC_ENGINE 1


// Expiry date for products (those that have use EXPIRES_AFTER_DATE at all)
#if defined(EXPIRY_YEAR) && defined(SYSER_REGISTRATION)
  #error "it seems that this target still defines it's own private expiry date - please update target_options.h"
#endif
#if defined(EXPIRY_YEAR) && EXPIRY_YEAR<2014
	#warning "Target has a dangerously early expiry year - please check if it is correct"
#endif
// global expiry date (usually applies for unregistered demos or regular products in trial mode)
#ifndef EXPIRY_YEAR
  #define EXPIRY_DATE_STRING "2016-03-31"
  #define EXPIRY_YEAR 2016
  #define EXPIRY_MONTH 3
  #define EXPIRY_DAY 31
#endif

// Release date (date relevant for licenses that are valid only up to a certain release date)
#if !defined(RELEASE_YEAR) || !defined(RELEASE_MONTH)
  // define one globally in case target or product does not specify it's own date
  #define RELEASE_YEAR        	2010
  #define RELEASE_YEAR_TXT   		"2010"
  #define RELEASE_MONTH       	1
  #define RELEASE_MONTH_TXT  		"1"
#endif
// Real Release date (shown in some texts)
#if !defined(REAL_RELEASE_YEAR)
  #define REAL_RELEASE_YEAR     2012
  #define REAL_RELEASE_YEAR_TXT "2012"
#endif


// For old targets that do not have product_options.h yet
// - Set common Version information
#ifndef SYSYNC_VERSION_MAJOR
#define SYSYNC_VERSION_MAJOR        3
#define SYSYNC_VERSION_MAJOR_TXT   "3"
#endif

#ifndef SYSYNC_VERSION_MINOR
#define SYSYNC_VERSION_MINOR        4
#define SYSYNC_VERSION_MINOR_TXT   "4"
#endif

#ifndef SYSYNC_SUBVERSION
#define SYSYNC_SUBVERSION           0
#define SYSYNC_SUBVERSION_TXT      "0"
#endif

#ifndef SYSYNC_BUILDNUMBER
#define SYSYNC_BUILDNUMBER          47
#define SYSYNC_BUILDNUMBER_TXT     "47"
#endif


// Platform name
#ifndef SYSYNC_PLATFORM_NAME
  #if defined(__EPOC_OS__)
    #define SYSYNC_PLATFORM_NAME "SymbianOS"
  #elif defined(MOBOSX)
    #define SYSYNC_PLATFORM_NAME "iOS"
  #elif defined(MACOSX)
    #define SYSYNC_PLATFORM_NAME "MacOSX"
  #elif defined(ANDROID)
    #define SYSYNC_PLATFORM_NAME "Android"
  #elif defined(LINUX)
    #define SYSYNC_PLATFORM_NAME "Linux"
  #elif defined(__PALM_OS__)
    #define SYSYNC_PLATFORM_NAME "PalmOS"
  #elif defined(WINCE)
    #define SYSYNC_PLATFORM_NAME "WinCE"
  #elif defined(_WIN32)
    #define SYSYNC_PLATFORM_NAME "Win32"
  #endif
#endif


// product version string
#define SYSYNC_VERSION_STRING SYSYNC_VERSION_MAJOR_TXT "." SYSYNC_VERSION_MINOR_TXT "." SYSYNC_SUBVERSION_TXT
// full version string
#define SYSYNC_FULL_VERSION_STRING SYSYNC_VERSION_MAJOR_TXT "." SYSYNC_VERSION_MINOR_TXT "." SYSYNC_SUBVERSION_TXT "." SYSYNC_BUILDNUMBER_TXT
// full version string
#define SYSYNC_MAIN_VERSION_STRING SYSYNC_VERSION_MAJOR_TXT "." SYSYNC_VERSION_MINOR_TXT
// uInt32 format of version (8 bits per dotted group)
#define SYSYNC_VERSION_UINT32 (((uInt32)SYSYNC_VERSION_MAJOR<<24)+((uInt32)SYSYNC_VERSION_MINOR<<16)+((uInt32)SYSYNC_SUBVERSION<<8)+(uInt32)SYSYNC_BUILDNUMBER)


// client and server strings for XPT-based apps
#define SERVER_NAME "Synthesis SyncML Server/" SYSYNC_FULL_VERSION_STRING
#define CLIENT_NAME "Synthesis SyncML Client/" SYSYNC_FULL_VERSION_STRING " [en] (" SYSYNC_PLATFORM_NAME "; I)"

// FPI product identifier
#define SYSYNC_FPI "-//Synthesis AG//NONSGML SyncML Engine V" SYSYNC_FULL_VERSION_STRING "//EN"


// Global feature switches (might be overridden in individual targets)
// ###################################################################


// server or client macros
// - make sure we have either SYSYNC_CLIENT, SYSYNC_SERVER or both
// - if combined build, define SERVER_CLIENT_BUILD as well
#if defined(SYSYNC_CLIENT) && defined(SYSYNC_SERVER)
	#define SERVER_CLIENT_BUILD 1
#elif !defined(SYSYNC_CLIENT)
	#define SYSYNC_SERVER 1
#endif
// build differentiation macros
#ifdef SERVER_CLIENT_BUILD
	// dynamically switching between server and client
  #define IS_CLIENT (!getSyncAppBase()->isServer())
  #define IS_SERVER (getSyncAppBase()->isServer())
#else
	// static, built as either server or client
  #ifdef SYSYNC_CLIENT
  	// client
    #define IS_CLIENT 1
    #define IS_SERVER 0
  #else
  	// server
    #define IS_CLIENT 0
    #define IS_SERVER 1
  #endif
#endif


// build type
#ifdef ENGINE_LIBRARY
  // SySync engine with API
  // - may not have any globals
  #undef DIRECT_APPBASE_GLOBALACCESS
  // - has Engine Interface
  #define ENGINEINTERFACE_SUPPORT 1
  // - should support constant XML config
  #define CONSTANTXML_CONFIG 1
#else
  // Classic SySync build
  // - needs direct accessors to syncAppBase and maybe other global vars
  #define DIRECT_APPBASE_GLOBALACCESS 1
#endif

// binfile layer specifics
#if defined(BASED_ON_BINFILE_CLIENT) && !defined(SYSYNC_SERVER)
	// client-only build with binfiles included -> binfile must be always active
  // (and customimpl does not need a lot of stuff it would otherwise include)
	#define BINFILE_ALWAYS_ACTIVE 1
#endif


// default datatype support
#define MIMEDIR_SUPPORT 1
#define TEXTTYPE_SUPPORT 1
#define DATAOBJ_SUPPORT 1
#define RAWTYPE_SUPPORT 1

// intermediate stuff for v3.x development
/// @todo
/// the following defines are for v3.x development only and must be cleared out or moved to a permanent location for a final version!

// default to ODBC support (if and only if SQL_SUPPORT is selected in the target)
#define ODBCAPI_SUPPORT 1

// default to both text and AsKey variants of item passing in Api datastores
#define DBAPI_TEXTITEMS 1
#define DBAPI_ASKEYITEMS 1


// SyncML version support
#define MAX_SYNCML_VERSION syncml_vers_1_2

#ifdef SYSYNC_CLIENT
  // these are normally client options, servers don't have them by default

  // client provides GUI suport for CGI server options such as TAF and/or /li(x) /dr(x,y)...
  #define CGI_SERVER_OPTIONS 1

  #undef CHINESE_SUPPORT

#else
  // these are normally server options, clients don't have them by default

  // include large-footprint conversions between chinese and UTF-8
  #define CHINESE_SUPPORT 1

  // if defined, TAF option chars will be used like syncset filter /fi(...)
  // (that's how it always was before 1.0.8.9 server)
  // Was globally defined 1 until and including server 2.0.5.12
  // Starting with 2.0.5.13 server, real TAF is now (partially) available, so we
  // switch this off
  #undef TAF_AS_SYNCSETFILTER
  // real SyncML-like TAF
  #define SYNCML_TAF_SUPPORT 1

  // if defined, we support Synthesis style target options (/opt(args) style)
  #define SYSYNC_TARGET_OPTIONS 1

  // object is enabled by default for now (standard version turns it off)
  #define OBJECT_FILTERING 1

  // array field support is enabled by default for now (standard version turns it off)
  #define ARRAYFIELD_SUPPORT 1

  // array field support is enabled by default for now (standard version turns it off)
  #define STREAMFIELD_SUPPORT 1

  // full support for email in textitem
  #define EMAIL_FORMAT_SUPPORT 1
  #define EMAIL_ATTACHMENT_SUPPORT 1

  // script support is enabled by default for now (standard version turns it off)
  #define SCRIPT_SUPPORT 1
  #define REGEX_SUPPORT 1

  // superdatastore support is enabled by default
  #define SUPERDATASTORES 1

#endif



// ODBC not compatible with 1.0.5.x type config any more
#undef OLD_1_0_5_CONFIG_COMPATIBLE


// Settings that have proven globally correct by now
// #################################################

// SySync options
// ==============

// s2g does not need these extras any more, everything is solved with scripts
// #define SPACE2GO_EXTRAS 1

// use new space evaluation method
#define USE_SML_EVALUATION 1

// do not modify remote IDs in any way while processing them
#define DONT_STRIP_PATHPREFIX_FROM_REMOTEIDS 1

// Time options
// - if defined, querying current lineartime will return millisecond
//   accuray value.
#define NOW_WITH_MILLISECONDS 1
// activate the new timezone system
#define NEW_TIMEZONES 1

// - if defined, code for incoming and outgoing SyncML dumping into (WB)XML logfiles is included
#define MSGDUMP 1

// - if defined, code for incoming message simulation from "i_" prefixed incoming message dump file is included
#undef SIMMSGREAD

// - allow keep connection
#define HTTP_KEEP_CONNECTION 1


// SyncML Toolkit options
// ======================

// if defined, the entire complicated and thread-unsafe workspace manager
// is completely bypassed
#define NOWSM 1

/* correct tagging of XML payload with <![CDATA[ */
#define PCDATA_OPAQUE_AS_CDATA 1

// allow Alert w/o Itemlist
#define SYNCFEST_ALLOW_ALERT_WITHOUT_ITEMLIST 1


// PCRE options
// ============

#define PCRE_STATIC 1 // no special declaration, PCRE is compiled-in

#endif // GLOBAL_OPTIONS_H

/* eof */