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 120 /* seconds */
36 #define TIZEN_CFG_CURL_MULTITHREADS 8 /* the limit of multi-threads for CURL */
38 #define TIZEN_CFG_CPP11_UNIQUE_PTR
41 //#define TIZEN_PROFILING_CURL_TIME
42 //#define TIZEN_PROFILING_MEMLEAK
47 #ifdef TIZEN_MIGRATION
50 typedef unsigned long result;
51 typedef std::string String;
52 typedef std::string Uri;
53 typedef std::wstring WString;
55 typedef unsigned char byte;
64 * Note: DEBUG variable should be set from the outside.
65 * Currently done in CMAKE file
68 #define HERE_MAPS_BEGIN_NAMESPACE namespace Here { namespace Maps {
69 #define HERE_MAPS_END_NAMESPACE }}
70 #define HERE_MAPS_NAMESPACE_PREFIX Here::Maps
72 #define TIZEN_MAPS_BEGIN_NAMESPACE namespace Tizen { namespace Maps {
73 #define TIZEN_MAPS_END_NAMESPACE }}
74 #define TIZEN_MAPS_NAMESPACE_PREFIX Tizen::Maps
79 //logging macro prototypes
83 #define LOG_TAG "HERE_PLUGIN"
85 #define HERE_MAPS_LOG_DBG_INFO(fmt,args...) LOGD(fmt, ##args);
86 #define HERE_MAPS_LOG_ERROR(fmt,args...) LOGE(fmt, ##args);
87 #define HERE_MAPS_LOG_WARNING(fmt,args...) LOGW(fmt, ##args);
89 #define HERE_MAPS_RETURN_RESULT(cond,ret,fmt,args...)\
95 #define HERE_MAPS_TRY_CATCH(cond,catch,fmt,args...)\
106 #define E_INVALID_STATE -3
107 #define E_OUT_OF_MEMORY -4
110 #define INFINITE 0xFFFFFFFF
116 #define HERE_MAPS_ASSERT(x) assert(x);
118 #define HERE_MAPS_ASSERT(x)
121 typedef unsigned char Byte;
122 typedef unsigned int UInt;
126 #define HERE_MAPS_NO_COPY_NO_ASSIGN(ClassName) \
128 ClassName(const ClassName&); \
129 ClassName& operator=(const ClassName&)
132 HERE_MAPS_BEGIN_NAMESPACE
133 extern void Stopwatch_Start(int aIndex);
134 extern void Stopwatch_Stop(int aIndex);
135 extern void Stopwatch_Show(int aIndex);
136 extern void Stopwatch_Reset(int aIndex);
137 HERE_MAPS_END_NAMESPACE
140 #define VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
142 #endif // HEREMAPS_GLOBAL_H