qthighway/inc/xqserviceglobal.h
branchRCL_3
changeset 10 cd2778e5acfe
parent 9 5d007b20cfd0
child 11 19a54be74e5e
equal deleted inserted replaced
9:5d007b20cfd0 10:cd2778e5acfe
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 *
       
     5 * This program is free software: you can redistribute it and/or modify
       
     6 * it under the terms of the GNU Lesser General Public License as published by
       
     7 * the Free Software Foundation, version 2.1 of the License.
       
     8 * 
       
     9 * This program is distributed in the hope that it will be useful,
       
    10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    12 * GNU Lesser General Public License for more details.
       
    13 *
       
    14 * You should have received a copy of the GNU Lesser General Public License
       
    15 * along with this program.  If not, 
       
    16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
       
    17 *
       
    18 * Description:  Globals from XQService
       
    19 *
       
    20 */
       
    21 
       
    22 #ifndef XQSERVICEGLOBAL_H
       
    23 #define XQSERVICEGLOBAL_H
       
    24 
       
    25 #include <QtCore/qglobal.h>
       
    26 #include <QtCore/qplugin.h>
       
    27 #include <xqserviceerrdefs.h>
       
    28 
       
    29 #if defined(Q_OS_WIN)
       
    30 #  if defined(QT_NODLL)
       
    31 #    undef QT_MAKEDLL
       
    32 #    undef QT_DLL
       
    33 #  elif defined(QT_MAKEDLL)
       
    34 #    if defined(QT_DLL)
       
    35 #      undef QT_DLL
       
    36 #    endif
       
    37 #    if defined(QT_BUILD_SFW_LIB)
       
    38 #      define Q_SFW_EXPORT Q_DECL_EXPORT
       
    39 #    else
       
    40 #      define Q_SFW_EXPORT Q_DECL_IMPORT
       
    41 #    endif
       
    42 #  elif defined(QT_DLL) /* use a Qt DLL library */
       
    43 #    define Q_SFW_EXPORT Q_DECL_IMPORT
       
    44 #  endif
       
    45 #else
       
    46 #endif
       
    47 
       
    48 #if !defined(Q_SFW_EXPORT)
       
    49 #  if defined(QT_SHARED)
       
    50 #    define Q_SFW_EXPORT Q_DECL_EXPORT
       
    51 #  else
       
    52 #    define Q_SFW_EXPORT
       
    53 #  endif
       
    54 #endif
       
    55 
       
    56 #if !defined(XQSERVICE_EXPORT)
       
    57 #if defined(XQ_BUILD_XQSERVICE_LIB)
       
    58 #define XQSERVICE_EXPORT Q_DECL_EXPORT
       
    59 #else
       
    60 #define XQSERVICE_EXPORT Q_DECL_IMPORT
       
    61 #endif
       
    62 #endif
       
    63 
       
    64 #if !defined(XQSERVICEUTIL_EXPORT)
       
    65 #if defined(XQ_BUILD_XQSERVICEUTIL_LIB)
       
    66 #define XQSERVICEUTIL_EXPORT Q_DECL_EXPORT
       
    67 #else
       
    68 #define XQSERVICEUTIL_EXPORT Q_DECL_IMPORT
       
    69 #endif
       
    70 #endif
       
    71 
       
    72 namespace XQService
       
    73 {
       
    74 	enum ServiceIPCErrors
       
    75 	    {
       
    76 	    ENoError=0, 
       
    77 	    EConnectionError = QtService::IPC_ERR_START_VALUE ,  /*!< Error in IPC Connection */
       
    78 	    EConnectionClosed,                      /*!< IPC Connection is closed             */
       
    79 	    EServerNotFound,                        /*!< Can not find server                  */
       
    80 	    EIPCError,                              /*!< Known IPC error                      */
       
    81 	    EUnknownError,                          /*!< Unknown IPC error                    */
       
    82         ERequestPending,                        /*!< Already pending request              */
       
    83         EMessageNotFound,                       /*!< Message slot not found               */
       
    84         EArgumentError                          /*!< Argument error                       */
       
    85 	    };
       
    86 
       
    87     enum ServiceMetadataErrors
       
    88     {
       
    89         EMetaNoService = QtService::METADATA_ERR_START_VALUE,    /*!< Can not find service root node in XML file                  */
       
    90         EMetaNoServiceName,                          /*!< Can not find service name in XML file                                   */
       
    91         EMetaNoServiceFilepath,                      /*!< Can not find service filepath in XML file                               */
       
    92         EMetaNoServiceInterface,                     /*!< No interface for the service in XML file                                */
       
    93         EMetaNoInterfaceVersion,                     /*!< Can not find interface version in XML file                              */
       
    94         EMetaNoInterfaceName,                        /*!< Can not find interface name in XML file                                 */
       
    95         EMetaUnableToOpenFile,                       /*!< Error opening XML file                                                  */
       
    96         EMetaInvalidXmlFile,                         /*!< Not a valid XML file                                                    */
       
    97         EMetaParseService,                           /*!< Error parsing service node                                              */
       
    98         EMetaParseInterface,                         /*!< Error parsing interface node                                            */
       
    99         EMetaDuplicatedInterface,                    /*!< The same interface is defined twice                                     */
       
   100         EMetaInvalidVersion,
       
   101         EMetaDuplicatedTag,                          /*!< The tag appears twice                                                   */
       
   102         EMetaInvalidCustomTag,                       /*!< The customproperty tag is not corectly formatted or otherwise incorrect */
       
   103         EMetaDuplicatedCustomKey                     /*!< The customproperty appears twice                                        */
       
   104     };
       
   105 
       
   106     enum ServiceManagerErrors
       
   107     {
       
   108         EMgrInternalError = QtService::RESOLVER_ERR_START_VALUE  /* Internal error */
       
   109     };
       
   110     
       
   111 }            
       
   112             
       
   113 #endif