qthighway/xqserviceutil/src/xqservicemetadata/xqaiwinterfacedescriptor_p.h
branchRCL_3
changeset 10 cd2778e5acfe
parent 9 5d007b20cfd0
child 11 19a54be74e5e
equal deleted inserted replaced
9:5d007b20cfd0 10:cd2778e5acfe
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** Contact: Nokia Corporation (qt-info@nokia.com)
       
     5 **
       
     6 ** This file is part of the Qt Mobility Components.
       
     7 **
       
     8 ** $QT_BEGIN_LICENSE:LGPL$
       
     9 ** No Commercial Usage
       
    10 ** This file contains pre-release code and may not be distributed.
       
    11 ** You may use this file in accordance with the terms and conditions
       
    12 ** contained in Technology Preview License Agreement accompanying
       
    13 ** this package.
       
    14 **
       
    15 ** GNU Lesser General Public License Usage
       
    16 ** Alternatively, this file may be used under the terms of the GNU Lesser
       
    17 ** General Public License version 2.1 as published by the Free Software
       
    18 ** Foundation and appearing in the file LICENSE.LGPL included in the
       
    19 ** packaging of this file.  Please review the following information to
       
    20 ** ensure the GNU Lesser General Public License version 2.1 requirements
       
    21 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    22 **
       
    23 ** In addition, as a special exception, Nokia gives you certain
       
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
       
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
       
    26 ** package.
       
    27 **
       
    28 ** If you have questions regarding the use of this file, please
       
    29 ** contact Nokia at http://qt.nokia.com/contact.
       
    30 ** $QT_END_LICENSE$
       
    31 **
       
    32 ****************************************************************************/
       
    33 
       
    34 #ifndef XQSAIWINTERFACEDESCRIPTOR_P_H
       
    35 #define XQSAIWINTERFACEDESCRIPTOR_P_H
       
    36 
       
    37 //
       
    38 //  W A R N I N G
       
    39 //  -------------
       
    40 //
       
    41 // This file is not part of the Qt API.  It exists for the convenience
       
    42 // of the QLibrary class.  This header file may change from
       
    43 // version to version without notice, or even be removed.
       
    44 //
       
    45 // We mean it.
       
    46 //
       
    47 
       
    48 #include "xqaiwinterfacedescriptor.h"
       
    49 
       
    50 #include <QString>
       
    51 #include <QHash>
       
    52 
       
    53 QT_BEGIN_NAMESPACE
       
    54 
       
    55 class XQAiwInterfaceDescriptorPrivate
       
    56 {
       
    57 public:
       
    58     XQAiwInterfaceDescriptorPrivate()
       
    59     {
       
    60         major = -1;
       
    61         minor = -1;
       
    62         systemScope = false;
       
    63     }
       
    64 
       
    65     bool operator==(const XQAiwInterfaceDescriptorPrivate& other) const
       
    66     {
       
    67         if (major == other.major 
       
    68                 && minor == other.minor
       
    69                 && interfaceName == other.interfaceName
       
    70                 && serviceName == other.serviceName
       
    71                 && properties == other.properties 
       
    72                 && customProperties == other.customProperties
       
    73                 && systemScope == other.systemScope)
       
    74             return true;
       
    75         return false;
       
    76     }
       
    77 
       
    78     XQAiwInterfaceDescriptorPrivate& operator=(const XQAiwInterfaceDescriptorPrivate& other)
       
    79     {
       
    80         serviceName = other.serviceName;
       
    81         interfaceName = other.interfaceName;
       
    82         minor = other.minor;
       
    83         major = other.major;
       
    84         properties = other.properties;
       
    85         customProperties = other.customProperties;
       
    86         systemScope = other.systemScope;
       
    87 
       
    88         return *this;
       
    89     }
       
    90 
       
    91     static XQAiwInterfaceDescriptorPrivate *getPrivate(XQAiwInterfaceDescriptor *descriptor)
       
    92     {
       
    93         return descriptor->d;
       
    94     }
       
    95 
       
    96     static const XQAiwInterfaceDescriptorPrivate *getPrivate(const XQAiwInterfaceDescriptor *descriptor)
       
    97     {
       
    98         return descriptor->d;
       
    99     }
       
   100 
       
   101     static void setPrivate(XQAiwInterfaceDescriptor *descriptor, XQAiwInterfaceDescriptorPrivate *p)
       
   102     {
       
   103         descriptor->d = p;
       
   104     }
       
   105 
       
   106     QString serviceName;
       
   107     QString interfaceName;
       
   108     QHash<XQAiwInterfaceDescriptor::PropertyKey, QVariant> properties;
       
   109     QHash<QString, QString> customProperties;
       
   110     int major;
       
   111     int minor;
       
   112     bool systemScope;
       
   113 };
       
   114 QT_END_NAMESPACE
       
   115 
       
   116 #endif //XQSAIWINTERFACEDESCRIPTOR_P_H