wlanutilities/wlanlogin/ictsqtwrapper/inc/ictsqtwrapper.h
branchRCL_3
changeset 24 63be7eb3fc78
equal deleted inserted replaced
23:b852595f5cbe 24:63be7eb3fc78
       
     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: Header file for IctsWrapper class
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef ICTSQTWRAPPER_H
       
    19 #define ICTSQTWRAPPER_H
       
    20 
       
    21 // System includes
       
    22 #include <QObject>
       
    23 #include <QUrl>
       
    24 
       
    25 // User includes
       
    26 
       
    27 // Forward declarations
       
    28 class IctsWrapperPrivate;
       
    29 
       
    30 // External data types
       
    31 // Constants
       
    32 
       
    33 // Library's export macro definitions
       
    34 #ifdef BUILD_ICTSQTWRAPPER_DLL
       
    35 #define ICTSQTWRAPPERDLL_EXPORT Q_DECL_EXPORT
       
    36 #else
       
    37 #define ICTSQTWRAPPERDLL_EXPORT Q_DECL_IMPORT
       
    38 #endif
       
    39 
       
    40 // Class declaration
       
    41 class ICTSQTWRAPPERDLL_EXPORT IctsWrapper: public QObject
       
    42 {
       
    43     Q_OBJECT
       
    44    
       
    45 public:
       
    46     
       
    47     /*!
       
    48         Internet connectivity test result type
       
    49     */ 
       
    50     enum ConnectivityTestResult {
       
    51         ConnectionOk,               //!< Test passed
       
    52         HttpAuthenticationNeeded,   //!< HTTP authentication needed i.e. hotspot AP
       
    53         ConnectionNotOk,            //!< Connection failure
       
    54         Timeout,                    //!< Timeout for HTTP request
       
    55         UnspecifiedError            //!< Unspecified error
       
    56     };
       
    57     
       
    58     IctsWrapper(int iap, int netId, QObject *parent = 0);
       
    59     
       
    60     ~IctsWrapper();
       
    61     
       
    62     void startConnectivityTest();
       
    63     
       
    64     void startPolling(int pollingTime, int pollingInterval);
       
    65     
       
    66     void stopPolling();
       
    67     
       
    68     void emitConnectivityTestResult(IctsWrapper::ConnectivityTestResult result, QUrl redirectUrl);
       
    69     
       
    70     bool isPolling() const;
       
    71       
       
    72 signals:
       
    73 
       
    74     void connectivityTestResult(IctsWrapper::ConnectivityTestResult, QUrl result);
       
    75  
       
    76 private:
       
    77     
       
    78     bool mIsPolling; //!< variable to store whether ICTS polling is ongoing
       
    79     
       
    80     QScopedPointer<IctsWrapperPrivate> d_ptr; //!< Pointer to Symbian private implementation
       
    81 };
       
    82 
       
    83 #endif // ICTSQTWRAPPER_H