wlanutilities/wlanwizard/tsrc/stubs/wlanqtutils.h
author hgs
Mon, 23 Aug 2010 13:30:09 +0300
changeset 53 bdc64aa9b954
parent 39 wlanutilities/wlanwizard/t_wlanwizard/stubs/wlanqtutils.h@7b3e49e4608a
child 60 822a45792fdd
permissions -rw-r--r--
201033
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description:
hgs
parents:
diff changeset
    15
*/
hgs
parents:
diff changeset
    16
hgs
parents:
diff changeset
    17
#ifndef STUB_WLANQTUTILS_H
hgs
parents:
diff changeset
    18
#define STUB_WLANQTUTILS_H
hgs
parents:
diff changeset
    19
hgs
parents:
diff changeset
    20
#include <QObject>
hgs
parents:
diff changeset
    21
#include <QSharedPointer>
hgs
parents:
diff changeset
    22
#include <QStringList>
hgs
parents:
diff changeset
    23
#include <QTest>
hgs
parents:
diff changeset
    24
hgs
parents:
diff changeset
    25
#include "wlanqtutilscommon.h"
hgs
parents:
diff changeset
    26
#include "wlanqtutilsap.h"
hgs
parents:
diff changeset
    27
hgs
parents:
diff changeset
    28
class WlanQtUtilsIap;
hgs
parents:
diff changeset
    29
class WlanQtUtilsWlanIap;
hgs
parents:
diff changeset
    30
hgs
parents:
diff changeset
    31
class WLANQTUTILITIESDLL_EXPORT WlanQtUtils : public QObject
hgs
parents:
diff changeset
    32
{
hgs
parents:
diff changeset
    33
    Q_OBJECT
hgs
parents:
diff changeset
    34
    friend class WlanQtUtilsContext;
hgs
parents:
diff changeset
    35
public:
hgs
parents:
diff changeset
    36
    //! "None" IAP ID value (e.g. for "not found" cases)
hgs
parents:
diff changeset
    37
    static const int IapIdNone = -1;
hgs
parents:
diff changeset
    38
    
39
hgs
parents: 31
diff changeset
    39
    /*!
hgs
parents: 31
diff changeset
    40
        WLAN connection status.
hgs
parents: 31
diff changeset
    41
        Remember to update traces/trace.properties when modifying this enum.
hgs
parents: 31
diff changeset
    42
    */
hgs
parents: 31
diff changeset
    43
    enum ConnStatus {
hgs
parents: 31
diff changeset
    44
        ConnStatusNone = 0,         //!< Reserved.
hgs
parents: 31
diff changeset
    45
        ConnStatusConnecting,       //!< Connecting.
hgs
parents: 31
diff changeset
    46
        ConnStatusConnected,        //!< Connected.
hgs
parents: 31
diff changeset
    47
        ConnStatusDisconnected      //!< Disconnected.
hgs
parents: 31
diff changeset
    48
    };
hgs
parents: 31
diff changeset
    49
    
hgs
parents: 31
diff changeset
    50
    /*!
hgs
parents: 31
diff changeset
    51
        WLAN scan status
hgs
parents: 31
diff changeset
    52
        Remember to update traces/trace.properties when modifying this enum.
hgs
parents: 31
diff changeset
    53
    */
hgs
parents: 31
diff changeset
    54
    enum ScanStatus {
hgs
parents: 31
diff changeset
    55
        ScanStatusOk = 0,           //!< Scan succeeded.
hgs
parents: 31
diff changeset
    56
        ScanStatusCancelled,        //!< Scan was cancelled.
hgs
parents: 31
diff changeset
    57
        ScanStatusError             //!< Scan failed.
hgs
parents: 31
diff changeset
    58
    };
hgs
parents: 31
diff changeset
    59
    
hgs
parents: 31
diff changeset
    60
    /*! 
hgs
parents: 31
diff changeset
    61
        Internet Connectivity Test status.
hgs
parents: 31
diff changeset
    62
        Remember to update traces/trace.properties when modifying this enum.
hgs
parents: 31
diff changeset
    63
    */        
hgs
parents: 31
diff changeset
    64
    enum IctStatus {
hgs
parents: 31
diff changeset
    65
        IctPassed = 0,              //!< Normal ICT passed.
hgs
parents: 31
diff changeset
    66
        IctHotspotPassed,           //!< Hotspot ICT passed.
hgs
parents: 31
diff changeset
    67
        IctCancelled,               //!< ICT was cancelled.
hgs
parents: 31
diff changeset
    68
        IctFailed                   //!< ICT failed.
hgs
parents: 31
diff changeset
    69
    }; 
hgs
parents: 31
diff changeset
    70
31
hgs
parents:
diff changeset
    71
public:
hgs
parents:
diff changeset
    72
    WlanQtUtils();
hgs
parents:
diff changeset
    73
    
hgs
parents:
diff changeset
    74
    ~WlanQtUtils();
hgs
parents:
diff changeset
    75
   
hgs
parents:
diff changeset
    76
    void availableWlanAps( QList<QSharedPointer<WlanQtUtilsAp> > &wlanApList);   
hgs
parents:
diff changeset
    77
    
hgs
parents:
diff changeset
    78
    int createIap(const WlanQtUtilsAp *wlanAp);
hgs
parents:
diff changeset
    79
hgs
parents:
diff changeset
    80
    bool updateIap(int iapId, const WlanQtUtilsAp *wlanAp);
hgs
parents:
diff changeset
    81
hgs
parents:
diff changeset
    82
    void deleteIap(int iapId);
hgs
parents:
diff changeset
    83
hgs
parents:
diff changeset
    84
    void connectIap(int iapId, bool runIct = false);
hgs
parents:
diff changeset
    85
    
hgs
parents:
diff changeset
    86
    int connectedWlanId();
hgs
parents:
diff changeset
    87
hgs
parents:
diff changeset
    88
    void disconnectIap(int iapId);
hgs
parents:
diff changeset
    89
    
hgs
parents:
diff changeset
    90
    int activeIap();
hgs
parents:
diff changeset
    91
    
hgs
parents:
diff changeset
    92
    void scanWlanAps();
hgs
parents:
diff changeset
    93
   
hgs
parents:
diff changeset
    94
    void scanWlanDirect(const QString &ssid);
hgs
parents:
diff changeset
    95
hgs
parents:
diff changeset
    96
    void stopWlanScan();
hgs
parents:
diff changeset
    97
hgs
parents:
diff changeset
    98
signals:
hgs
parents:
diff changeset
    99
    
39
hgs
parents: 31
diff changeset
   100
    void wlanScanApReady(int scanStatus);
31
hgs
parents:
diff changeset
   101
   
39
hgs
parents: 31
diff changeset
   102
    void wlanScanDirectReady(int scanStatus);
31
hgs
parents:
diff changeset
   103
    
hgs
parents:
diff changeset
   104
    void wlanNetworkOpened(int iapId);
hgs
parents:
diff changeset
   105
hgs
parents:
diff changeset
   106
    void wlanNetworkClosed(int iapId, int reason);
hgs
parents:
diff changeset
   107
39
hgs
parents: 31
diff changeset
   108
    void ictResult(int iapId, int result);
31
hgs
parents:
diff changeset
   109
hgs
parents:
diff changeset
   110
private: // Return values for all methods.
39
hgs
parents: 31
diff changeset
   111
    
hgs
parents: 31
diff changeset
   112
    void emitScanApsReady();
hgs
parents: 31
diff changeset
   113
    
31
hgs
parents:
diff changeset
   114
    QList<QSharedPointer<WlanQtUtilsAp> > mScanWlanAps;
hgs
parents:
diff changeset
   115
    QList<QSharedPointer<WlanQtUtilsAp> > mScanWlanDirect;
hgs
parents:
diff changeset
   116
    QList<QSharedPointer<WlanQtUtilsAp> > *mScanResult;
hgs
parents:
diff changeset
   117
    QString mScanWlanDirectSsid;
hgs
parents:
diff changeset
   118
    int mCreateWlanIapReturn;
hgs
parents:
diff changeset
   119
    bool mUpdateWlanIapReturn;
hgs
parents:
diff changeset
   120
    
hgs
parents:
diff changeset
   121
    int mWlanNetworkOpenedIapId;
hgs
parents:
diff changeset
   122
    int mWlanNetworkActiveIapId;
hgs
parents:
diff changeset
   123
    int mWlanNetworkClosedIapId;
39
hgs
parents: 31
diff changeset
   124
    int mWlanNetworkClosedReason;
hgs
parents: 31
diff changeset
   125
    
hgs
parents: 31
diff changeset
   126
    int mActiveWlanIapReturn;
31
hgs
parents:
diff changeset
   127
    
hgs
parents:
diff changeset
   128
    int mIctResultIapId;
39
hgs
parents: 31
diff changeset
   129
    WlanQtUtils::IctStatus mIctResultResults;
hgs
parents: 31
diff changeset
   130
31
hgs
parents:
diff changeset
   131
    bool mConnectionSuccess;
hgs
parents:
diff changeset
   132
    
hgs
parents:
diff changeset
   133
    QStringList mCalledMethods;
hgs
parents:
diff changeset
   134
    
hgs
parents:
diff changeset
   135
    WlanQtUtilsAp *mWlanAp;
39
hgs
parents: 31
diff changeset
   136
    
hgs
parents: 31
diff changeset
   137
    bool mEmitScanApReady;
hgs
parents: 31
diff changeset
   138
    
hgs
parents: 31
diff changeset
   139
    int mScanApStatus;
hgs
parents: 31
diff changeset
   140
    int mScanDirectStatus;
31
hgs
parents:
diff changeset
   141
};
hgs
parents:
diff changeset
   142
hgs
parents:
diff changeset
   143
#endif /* WLANQTUTILS_H */
hgs
parents:
diff changeset
   144
hgs
parents:
diff changeset
   145
// End of File