wlanutilities/wlanlogin/ictswlanlogininterface/inc/ictswlanlogininterface.h
branchRCL_3
changeset 25 f28ada11abbf
parent 24 63be7eb3fc78
equal deleted inserted replaced
24:63be7eb3fc78 25:f28ada11abbf
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0""
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 * Entry library for launching Wlan Login application.
       
    16 */
       
    17 
       
    18 #ifndef ICTSWLANLOGININTERFACE_H
       
    19 #define ICTSWLANLOGININTERFACE_H
       
    20 
       
    21 // System includes
       
    22 #include <QObject>
       
    23 #include <QUrl>
       
    24 #include <xqappmgr.h>
       
    25 
       
    26 
       
    27 // User includes
       
    28 #include "ictsqtwrapper.h"
       
    29 
       
    30 // Forward declarations
       
    31 
       
    32 // External data types
       
    33 
       
    34 // Constants
       
    35 
       
    36 // Library's export macro definitions
       
    37 #ifdef BUILD_ICTSWLANLOGININTERFACE_DLL
       
    38 #define ICTSWLANLOGININTERFACEDLL_EXPORT Q_DECL_EXPORT
       
    39 #else
       
    40 #define ICTSWLANLOGININTERFACEDLL_EXPORT Q_DECL_IMPORT
       
    41 #endif
       
    42 
       
    43 // Class declaration
       
    44 class ICTSWLANLOGININTERFACEDLL_EXPORT IctsWlanLoginInterface: public QObject
       
    45 {
       
    46     Q_OBJECT
       
    47 
       
    48 public:
       
    49     
       
    50     // Data types
       
    51     
       
    52     /*!
       
    53         Internet connectivity test result type
       
    54     */  
       
    55     enum ictsResultType {
       
    56         IctsPassed = 0,     //!< Internet connectivity test passed
       
    57         IctsHotspotPassed,  //!< Internet connectivity test passed against hotspot access point
       
    58         IctsCanceled,       //!< Internet connectivity test was cancelled due to user action
       
    59         IctsFailed          //!< internet connectivity test failed
       
    60     };
       
    61     
       
    62     IctsWlanLoginInterface(QObject *parent);
       
    63 
       
    64     ~IctsWlanLoginInterface();
       
    65 
       
    66 public:
       
    67      
       
    68     void start(int iapId, int netId);
       
    69 
       
    70     void stop();
       
    71 
       
    72 public slots:
       
    73 
       
    74     void handleConnectivityTestResult(IctsWrapper::ConnectivityTestResult result, QUrl redirectUrl);
       
    75 
       
    76 signals:
       
    77 
       
    78     /*!
       
    79         Signal that informs about ICTS result.
       
    80         
       
    81         @param [in] ictsResult ICTS result (IctsWlanLoginInterface::ictsResultType).
       
    82     */
       
    83     void ictsResult(int ictsResult);
       
    84     
       
    85     void hotspotCase();
       
    86     
       
    87 private slots:
       
    88 
       
    89     void handleOk(const QVariant &result);
       
    90 
       
    91     void handleError(int errorCode);
       
    92      
       
    93 private: // functions
       
    94 
       
    95     void wlanLoginAppStart(int iapId, int netId, QUrl url);
       
    96     
       
    97 private: // data
       
    98     
       
    99     IctsWrapper* mIctsWrapper;       //!< Icts wrapper instance
       
   100     XQApplicationManager* mAiwMgr;   //!< Application interworking manager    
       
   101     XQAiwRequest* mAsyncRequest;     //!< Pointer to async AIW Request
       
   102     int mIapId;                      //!< IAP identifier
       
   103     int mNetId;                      //!< Network identifier
       
   104         
       
   105     // Friend classes
       
   106 };
       
   107 
       
   108 #endif // ICTSWLANLOGININTERFACE_H