2 * Copyright (C) 2013 HERE Global B.V. All rights reserved.
3 * This software, including documentation, is protected by copyright controlled by
4 * HERE Global B.V. (“Software”). All rights are reserved. Copying, including reproducing,
5 * storing, adapting or translating, any or all of this material requires the prior
6 * written consent of HERE Global B.V. You may use this
7 * Software in accordance with the terms and conditions defined in the
8 * HERE Location Platform Services Terms and Conditions, available at
9 * http://developer.here.com/terms-conditions-base
11 * As an additional permission to the above, you may distribute Software,
12 * in object code format as part of an Application, according to, and subject to, terms and
13 * conditions defined in the Tizen Software Development kit (“SDK”) License Agreement.
14 * You may distribute such object code format Application under terms of your choice,
15 * provided that the header and source files of the Software have not been modified.
18 #ifndef HEREMAPS_GLOBAL_H
19 #define HEREMAPS_GLOBAL_H
21 #define TIZEN_MIGRATION
23 #ifdef TIZEN_MIGRATION
24 /* enhancement for updated HERE APIs */
25 #define TIZEN_CUSTOMIZATION
28 #define TIZEN_SUPPORT_LIMIT_RETRYING_FETCHING_TILES /* limit the number of retrying when failed fetching tiles */
29 #define TIZEN_SUPPORT_TILE_FILE_CACHE
30 #define TIZEN_SUPPORT_POST_METHOD
31 #define TIZEN_SUPPORT_CRYPTO_LOCK /* mutex locking system for SSL */
32 #define TIZEN_SUPPORT_OPTIMIZATION_OF_REDRAWING
35 #define TIZEN_CFG_CURL_TIMEOUT 20 /* seconds */
36 #define TIZEN_CFG_CURL_MULTITHREADS 8 /* the limit of multi-threads for CURL */
39 //#define TIZEN_PROFILING_CURL_TIME
40 //#define TIZEN_PROFILING_MEMLEAK
45 #ifdef TIZEN_MIGRATION
48 typedef unsigned long result;
49 typedef std::string String;
50 typedef std::string Uri;
51 typedef std::wstring WString;
53 typedef unsigned char byte;
62 * Note: DEBUG variable should be set from the outside.
63 * Currently done in CMAKE file
66 #define HERE_MAPS_BEGIN_NAMESPACE namespace Here { namespace Maps {
67 #define HERE_MAPS_END_NAMESPACE }}
68 #define HERE_MAPS_NAMESPACE_PREFIX Here::Maps
70 #define TIZEN_MAPS_BEGIN_NAMESPACE namespace Tizen { namespace Maps {
71 #define TIZEN_MAPS_END_NAMESPACE }}
72 #define TIZEN_MAPS_NAMESPACE_PREFIX Tizen::Maps
77 //logging macro prototypes
81 #define LOG_TAG "HERE_PLUGIN"
83 #define HERE_MAPS_LOG_DBG_INFO(fmt,args...) LOGD(fmt, ##args);
84 #define HERE_MAPS_LOG_ERROR(fmt,args...) LOGE(fmt, ##args);
85 #define HERE_MAPS_LOG_WARNING(fmt,args...) LOGW(fmt, ##args);
87 #define HERE_MAPS_RETURN_RESULT(cond,ret,fmt,args...)\
93 #define HERE_MAPS_TRY_CATCH(cond,catch,fmt,args...)\
104 #define E_INVALID_STATE -3
105 #define E_OUT_OF_MEMORY -4
108 #define INFINITE 0xFFFFFFFF
114 #define HERE_MAPS_ASSERT(x) assert(x);
116 #define HERE_MAPS_ASSERT(x)
119 typedef unsigned char Byte;
120 typedef unsigned int UInt;
124 #define HERE_MAPS_NO_COPY_NO_ASSIGN(ClassName) \
126 ClassName(const ClassName&); \
127 ClassName& operator=(const ClassName&)
130 HERE_MAPS_BEGIN_NAMESPACE
131 extern void Stopwatch_Start(int aIndex);
132 extern void Stopwatch_Stop(int aIndex);
133 extern void Stopwatch_Show(int aIndex);
134 extern void Stopwatch_Reset(int aIndex);
135 HERE_MAPS_END_NAMESPACE
137 #endif // HEREMAPS_GLOBAL_H