qtmobility/src/global/qmobilityglobal.h
branchRCL_3
changeset 9 5d007b20cfd0
parent 8 885c2596c964
child 10 cd2778e5acfe
equal deleted inserted replaced
8:885c2596c964 9:5d007b20cfd0
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2010 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.2"
       
    46 /*
       
    47    QTM_VERSION is (major << 16) + (minor << 8) + patch.
       
    48 */
       
    49 #define QTM_VERSION 0x010002
       
    50 /*
       
    51    can be used like #if (QTM_VERSION >= QTM_VERSION_CHECK(1, 0, 2))
       
    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(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
       
    68 #  if defined(QT_NODLL)
       
    69 #    undef QT_MAKEDLL
       
    70 #    undef QT_DLL
       
    71 #  elif defined(QT_MAKEDLL)
       
    72 #    if defined(QT_DLL)
       
    73 #      undef QT_DLL
       
    74 #    endif
       
    75 #    if defined(QT_BUILD_BEARER_LIB)
       
    76 #      define Q_BEARER_EXPORT Q_DECL_EXPORT
       
    77 #    else
       
    78 #      define Q_BEARER_EXPORT Q_DECL_IMPORT
       
    79 #    endif
       
    80 #    if defined(QT_BUILD_CFW_LIB)
       
    81 #      define Q_PUBLISHSUBSCRIBE_EXPORT Q_DECL_EXPORT
       
    82 #    else
       
    83 #      define Q_PUBLISHSUBSCRIBE_EXPORT Q_DECL_IMPORT
       
    84 #    endif
       
    85 #    if defined(QT_BUILD_CONTACTS_LIB)
       
    86 #      define Q_CONTACTS_EXPORT Q_DECL_EXPORT
       
    87 #    else
       
    88 #      define Q_CONTACTS_EXPORT Q_DECL_IMPORT
       
    89 #    endif
       
    90 #    if defined(QT_BUILD_VERSIT_LIB)
       
    91 #      define Q_VERSIT_EXPORT Q_DECL_EXPORT
       
    92 #    else
       
    93 #      define Q_VERSIT_EXPORT Q_DECL_IMPORT
       
    94 #    endif
       
    95 #    if defined(QT_BUILD_LOCATION_LIB)
       
    96 #      define Q_LOCATION_EXPORT Q_DECL_EXPORT
       
    97 #    else
       
    98 #      define Q_LOCATION_EXPORT Q_DECL_IMPORT
       
    99 #    endif
       
   100 #    if defined(QT_BUILD_MESSAGING_LIB)
       
   101 #      define Q_MESSAGING_EXPORT Q_DECL_EXPORT
       
   102 #    else
       
   103 #      define Q_MESSAGING_EXPORT Q_DECL_IMPORT
       
   104 #    endif
       
   105 #      if defined(QT_BUILD_MULTIMEDIA_LIB)
       
   106 #        define Q_MULTIMEDIA_EXPORT Q_DECL_EXPORT
       
   107 #    else
       
   108 #        define Q_MULTIMEDIA_EXPORT Q_DECL_IMPORT
       
   109 #    endif
       
   110 #    if defined(QT_BUILD_SFW_LIB)
       
   111 #      define Q_SERVICEFW_EXPORT Q_DECL_EXPORT
       
   112 #    else
       
   113 #      define Q_SERVICEFW_EXPORT Q_DECL_IMPORT
       
   114 #    endif
       
   115 #    if defined(QT_BUILD_SYSINFO_LIB)
       
   116 #      define Q_SYSINFO_EXPORT Q_DECL_EXPORT
       
   117 #    else
       
   118 #      define Q_SYSINFO_EXPORT Q_DECL_IMPORT
       
   119 #    endif
       
   120 #    if defined(QT_BUILD_SENSORS_LIB)
       
   121 #      define Q_SENSORS_EXPORT Q_DECL_EXPORT
       
   122 #    else
       
   123 #      define Q_SENSORS_EXPORT Q_DECL_IMPORT
       
   124 #    endif
       
   125 #  elif defined(QT_DLL) /* use a Qt DLL library */
       
   126 #    define Q_BEARER_EXPORT Q_DECL_IMPORT
       
   127 #    define Q_PUBLISHSUBSCRIBE_EXPORT Q_DECL_IMPORT
       
   128 #    define Q_CONTACTS_EXPORT Q_DECL_IMPORT
       
   129 #    define Q_VERSIT_EXPORT Q_DECL_IMPORT
       
   130 #    define Q_LOCATION_EXPORT Q_DECL_IMPORT
       
   131 #      define Q_MULTIMEDIA_EXPORT Q_DECL_IMPORT
       
   132 #    define Q_MESSAGING_EXPORT Q_DECL_IMPORT
       
   133 #    if QTM_SERVICEFW_SYMBIAN_DATABASEMANAGER_SERVER
       
   134 #      define Q_SERVICEFW_EXPORT
       
   135 #    else
       
   136 #      define Q_SERVICEFW_EXPORT Q_DECL_IMPORT
       
   137 #    endif
       
   138 #    define Q_SYSINFO_EXPORT Q_DECL_IMPORT
       
   139 #    define Q_SENSORS_EXPORT Q_DECL_IMPORT
       
   140 #  endif
       
   141 #endif
       
   142 
       
   143 #if !defined(Q_SERVICEFW_EXPORT)
       
   144 #  if defined(QT_SHARED)
       
   145 #    define Q_BEARER_EXPORT Q_DECL_EXPORT
       
   146 #    define Q_PUBLISHSUBSCRIBE_EXPORT Q_DECL_EXPORT
       
   147 #    define Q_CONTACTS_EXPORT Q_DECL_EXPORT
       
   148 #    define Q_VERSIT_EXPORT Q_DECL_EXPORT
       
   149 #    define Q_LOCATION_EXPORT Q_DECL_EXPORT
       
   150 #    define Q_MULTIMEDIA_EXPORT Q_DECL_EXPORT
       
   151 #    define Q_MESSAGING_EXPORT Q_DECL_EXPORT
       
   152 #    define Q_SERVICEFW_EXPORT Q_DECL_EXPORT
       
   153 #    define Q_SYSINFO_EXPORT Q_DECL_EXPORT
       
   154 #    define Q_SENSORS_EXPORT Q_DECL_EXPORT
       
   155 #  else
       
   156 #    define Q_BEARER_EXPORT
       
   157 #    define Q_PUBLISHSUBSCRIBE_EXPORT
       
   158 #    define Q_CONTACTS_EXPORT
       
   159 #    define Q_VERSIT_EXPORT
       
   160 #    define Q_LOCATION_EXPORT
       
   161 #    define Q_MULTIMEDIA_EXPORT
       
   162 #    define Q_MESSAGING_EXPORT
       
   163 #    define Q_SERVICEFW_EXPORT
       
   164 #    define Q_SYSINFO_EXPORT
       
   165 #    define Q_SENSORS_EXPORT
       
   166 #  endif
       
   167 #endif
       
   168 
       
   169 
       
   170 #ifdef QTM_SERVICEFW_SYMBIAN_DATABASEMANAGER_SERVER
       
   171 #  ifdef Q_SERVICEFW_EXPORT
       
   172 #    undef Q_SERVICEFW_EXPORT
       
   173 #  endif
       
   174 #  define Q_SERVICEFW_EXPORT
       
   175 #  ifdef Q_AUTOTEST_EXPORT
       
   176 #    undef Q_AUTOTEST_EXPORT
       
   177 #  endif
       
   178 #  define Q_AUTOTEST_EXPORT
       
   179 #endif
       
   180 
       
   181 // The namespace is hardcoded as moc has issues resolving
       
   182 // macros which would be a prerequisite for a dynmamic namespace
       
   183 #define QTM_NAMESPACE QtMobility
       
   184 
       
   185 #ifdef QTM_NAMESPACE
       
   186 # define QTM_PREPEND_NAMESPACE(name) ::QTM_NAMESPACE::name
       
   187 # define QTM_BEGIN_NAMESPACE namespace QTM_NAMESPACE {
       
   188 # define QTM_END_NAMESPACE }
       
   189 # define QTM_USE_NAMESPACE using namespace QTM_NAMESPACE;
       
   190 #else
       
   191 # define QTM_PREPEND_NAMESPACE(name) ::name
       
   192 # define QTM_BEGIN_NAMESPACE
       
   193 # define QTM_END_NAMESPACE
       
   194 # define QTM_USE_NAMESPACE
       
   195 #endif
       
   196 
       
   197 //in case Qt is in namespace
       
   198 QT_USE_NAMESPACE
       
   199 
       
   200 #endif // QMOBILITYGLOBAL_H