qtmobility/src/bearer/qnetworkconfiguration_s60_p.h
branchRCL_3
changeset 10 cd2778e5acfe
equal deleted inserted replaced
9:5d007b20cfd0 10:cd2778e5acfe
       
     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 
       
    42 #ifndef QNETWORKCONFIGURATIONPRIVATE_H
       
    43 #define QNETWORKCONFIGURATIONPRIVATE_H
       
    44 
       
    45 //
       
    46 //  W A R N I N G
       
    47 //  -------------
       
    48 //
       
    49 // This file is not part of the Qt API.  It exists purely as an
       
    50 // implementation detail.  This header file may change from version to
       
    51 // version without notice, or even be removed.
       
    52 //
       
    53 // We mean it.
       
    54 //
       
    55 
       
    56 #include <qnetworkconfiguration.h>
       
    57 #include <QtCore/qshareddata.h>
       
    58 
       
    59 QTM_BEGIN_NAMESPACE
       
    60 
       
    61 class QNetworkConfigurationPrivate : public QSharedData
       
    62 {
       
    63 public:
       
    64     enum Bearer {
       
    65         BearerEthernet,
       
    66         BearerWLAN,
       
    67         Bearer2G,
       
    68         BearerCDMA2000,
       
    69         BearerWCDMA,
       
    70         BearerHSPA,
       
    71         BearerBluetooth,
       
    72         BearerWiMAX,
       
    73         BearerUnknown = -1
       
    74     };    
       
    75 
       
    76     QNetworkConfigurationPrivate();
       
    77     ~QNetworkConfigurationPrivate();
       
    78 
       
    79     QString name;
       
    80     bool isValid;
       
    81     QString id;
       
    82     QNetworkConfiguration::StateFlags state;
       
    83     QNetworkConfiguration::Type type;
       
    84     bool roamingSupported;
       
    85     QNetworkConfiguration::Purpose purpose;
       
    86 
       
    87     QList<QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> > serviceNetworkMembers;
       
    88 
       
    89     QNetworkConfigurationPrivate::Bearer bearer;
       
    90     QString bearerName() const;
       
    91     // So called IAP id from the platform. Remains constant as long as the
       
    92     // platform is aware of the configuration ie. it is stored in the databases
       
    93     // --> does not depend on whether connections are currently open or not.
       
    94     // In practice is the same for the lifetime of the QNetworkConfiguration.
       
    95     TUint32 numericId;
       
    96     // So called connection id, or connection monitor ID. A dynamic ID assigned
       
    97     // by RConnectionMonitor whenever a new connection is opened. ConnectionID and
       
    98     // numericId/IAP id have 1-to-1 mapping during the lifetime of the connection at
       
    99     // connection monitor. Notably however it changes whenever a new connection to
       
   100     // a given IAP is created. In a sense it is constant during the time the
       
   101     // configuration remains between states Discovered..Active..Discovered, do not
       
   102     // however relay on this.
       
   103     TUint connectionId;
       
   104     
       
   105     TAny* manager;
       
   106  
       
   107     QString mappingName;
       
   108  
       
   109     QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> serviceNetworkPtr; 
       
   110 
       
   111 private:
       
   112     // disallow detaching
       
   113     QNetworkConfigurationPrivate &operator=(const QNetworkConfigurationPrivate &other);
       
   114     QNetworkConfigurationPrivate(const QNetworkConfigurationPrivate &other);
       
   115 };
       
   116 
       
   117 QTM_END_NAMESPACE
       
   118 
       
   119 #endif //QNETWORKCONFIGURATIONPRIVATE_H
       
   120