Moved files to make zouba the only project.
[ptas] / include / qmobilityglobal.h
1 /****************************************************************************
2 **
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
6 **
7 ** This file is part of the Qt Mobility Components.
8 **
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** No Commercial Usage
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
14 ** this package.
15 **
16 ** GNU Lesser General Public License Usage
17 ** Alternatively, this file may be used under the terms of the GNU Lesser
18 ** General Public License version 2.1 as published by the Free Software
19 ** Foundation and appearing in the file LICENSE.LGPL included in the
20 ** packaging of this file.  Please review the following information to
21 ** ensure the GNU Lesser General Public License version 2.1 requirements
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23 **
24 ** In addition, as a special exception, Nokia gives you certain additional
25 ** rights.  These rights are described in the Nokia Qt LGPL Exception
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27 **
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
30 **
31 **
32 **
33 **
34 **
35 **
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 #ifndef QMOBILITYGLOBAL_H
42 #define QMOBILITYGLOBAL_H
43
44
45 #define QTM_VERSION_STR   "1.0.0"
46 /*
47    QTM_VERSION is (major << 16) + (minor << 8) + patch.
48 */
49 #define QTM_VERSION 0x010000
50 /*
51    can be used like #if (QTM_VERSION >= QTM_VERSION_CHECK(1, 0, 0))
52 */
53 #define QTM_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))
54
55 #define QTM_PACKAGEDATE_STR "YYYY-MM-DD"
56
57 #define QTM_PACKAGE_TAG ""
58
59 #if defined(QTM_BUILD_UNITTESTS)
60 # include <qconfig.h>
61 # if !defined(QT_BUILD_INTERNAL)
62 #   define QT_BUILD_INTERNAL
63 # endif
64 #endif
65 #include <QtCore/qglobal.h>
66
67 #if defined(SYMBIAN_DATABASEMANAGER_SERVER)
68 #  define Q_SERVICEFW_EXPORT
69 #else
70 #  if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
71 #    if defined(QT_NODLL)
72 #      undef QT_MAKEDLL
73 #      undef QT_DLL
74 #    elif defined(QT_MAKEDLL)
75 #      if defined(QT_DLL)
76 #        undef QT_DLL
77 #      endif
78 #      if defined(QT_BUILD_BEARER_LIB)
79 #        define Q_BEARER_EXPORT Q_DECL_EXPORT
80 #      else
81 #        define Q_BEARER_EXPORT Q_DECL_IMPORT
82 #      endif
83 #      if defined(QT_BUILD_CFW_LIB)
84 #        define Q_PUBLISHSUBSCRIBE_EXPORT Q_DECL_EXPORT
85 #      else
86 #        define Q_PUBLISHSUBSCRIBE_EXPORT Q_DECL_IMPORT
87 #      endif
88 #      if defined(QT_BUILD_CONTACTS_LIB)
89 #        define Q_CONTACTS_EXPORT Q_DECL_EXPORT
90 #      else
91 #        define Q_CONTACTS_EXPORT Q_DECL_IMPORT
92 #      endif
93 #      if defined(QT_BUILD_VERSIT_LIB)
94 #        define Q_VERSIT_EXPORT Q_DECL_EXPORT
95 #      else
96 #        define Q_VERSIT_EXPORT Q_DECL_IMPORT
97 #      endif
98 #      if defined(QT_BUILD_LOCATION_LIB)
99 #        define Q_LOCATION_EXPORT Q_DECL_EXPORT
100 #      else
101 #        define Q_LOCATION_EXPORT Q_DECL_IMPORT
102 #      endif
103 #      if defined(QT_BUILD_MESSAGING_LIB)
104 #        define Q_MESSAGING_EXPORT Q_DECL_EXPORT
105 #      else
106 #        define Q_MESSAGING_EXPORT Q_DECL_IMPORT
107 #      endif
108 #      if defined(QT_BUILD_MEDIA_LIB)
109 #        define Q_MEDIA_EXPORT Q_DECL_EXPORT
110 #      else
111 #        define Q_MEDIA_EXPORT Q_DECL_IMPORT
112 #      endif
113 #      if defined(QT_BUILD_SFW_LIB)
114 #        define Q_SERVICEFW_EXPORT Q_DECL_EXPORT
115 #      else
116 #        define Q_SERVICEFW_EXPORT Q_DECL_IMPORT
117 #      endif
118 #      if defined(QT_BUILD_SYSINFO_LIB)
119 #        define Q_SYSINFO_EXPORT Q_DECL_EXPORT
120 #      else
121 #        define Q_SYSINFO_EXPORT Q_DECL_IMPORT
122 #      endif
123 #      if defined(QT_BUILD_SENSORS_LIB)
124 #        define Q_SENSORS_EXPORT Q_DECL_EXPORT
125 #      else
126 #        define Q_SENSORS_EXPORT Q_DECL_IMPORT
127 #      endif
128 #    elif defined(QT_DLL) /* use a Qt DLL library */
129 #      define Q_BEARER_EXPORT Q_DECL_IMPORT
130 #      define Q_PUBLISHSUBSCRIBE_EXPORT Q_DECL_IMPORT
131 #      define Q_CONTACTS_EXPORT Q_DECL_IMPORT
132 #      define Q_VERSIT_EXPORT Q_DECL_IMPORT
133 #      define Q_LOCATION_EXPORT Q_DECL_IMPORT
134 #      define Q_MEDIA_EXPORT Q_DECL_IMPORT
135 #      define Q_MESSAGING_EXPORT Q_DECL_IMPORT
136 #      define Q_SERVICEFW_EXPORT Q_DECL_IMPORT
137 #      define Q_SYSINFO_EXPORT Q_DECL_IMPORT
138 #      define Q_SENSORS_EXPORT Q_DECL_IMPORT
139 #    endif
140 #  else
141 #  endif
142 #  if !defined(Q_SERVICEFW_EXPORT)
143 #    if defined(QT_SHARED)
144 #      define Q_BEARER_EXPORT Q_DECL_EXPORT
145 #      define Q_PUBLISHSUBSCRIBE_EXPORT Q_DECL_EXPORT
146 #      define Q_CONTACTS_EXPORT Q_DECL_EXPORT
147 #      define Q_VERSIT_EXPORT Q_DECL_EXPORT
148 #      define Q_LOCATION_EXPORT Q_DECL_EXPORT
149 #      define Q_MEDIA_EXPORT Q_DECL_EXPORT
150 #      define Q_MESSAGING_EXPORT Q_DECL_EXPORT
151 #      define Q_SERVICEFW_EXPORT Q_DECL_EXPORT
152 #      define Q_SYSINFO_EXPORT Q_DECL_EXPORT
153 #      define Q_SENSORS_EXPORT Q_DECL_EXPORT
154 #    else
155 #      define Q_BEARER_EXPORT
156 #      define Q_PUBLISHSUBSCRIBE_EXPORT
157 #      define Q_CONTACTS_EXPORT
158 #      define Q_VERSIT_EXPORT
159 #      define Q_LOCATION_EXPORT
160 #      define Q_MEDIA_EXPORT
161 #      define Q_MESSAGING_EXPORT
162 #      define Q_SERVICEFW_EXPORT
163 #      define Q_SYSINFO_EXPORT
164 #      define Q_SENSORS_EXPORT
165 #    endif
166 #  endif
167 #endif
168
169 // The namespace is hardcoded as moc has issues resolving
170 // macros which would be a prerequisite for a dynmamic namespace
171 #define QTM_NAMESPACE QtMobility
172
173 #ifdef QTM_NAMESPACE
174 # define QTM_PREPEND_NAMESPACE(name) ::QTM_NAMESPACE::name
175 # define QTM_BEGIN_NAMESPACE namespace QTM_NAMESPACE {
176 # define QTM_END_NAMESPACE }
177 # define QTM_USE_NAMESPACE using namespace QTM_NAMESPACE;
178 #else
179 # define QTM_PREPEND_NAMESPACE(name) ::name
180 # define QTM_BEGIN_NAMESPACE
181 # define QTM_END_NAMESPACE
182 # define QTM_USE_NAMESPACE
183 #endif
184
185 //in case Qt is in namespace
186 QT_USE_NAMESPACE
187
188 #endif // QMOBILITYGLOBAL_H