wlanutilities/wlanqtutilities/wrapper/inc/wlanqtutilsesockwrapper.h
changeset 38 2dc6da6fb431
parent 19 10810c91db26
equal deleted inserted replaced
29:dbe86d96ce5b 38:2dc6da6fb431
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:
    14 * Description:
    15 * This is a header file for EsockWrapper class.
    15 * Wrapper for Symbian Esock library.
    16 */
    16 */
    17 
    17 
    18 #ifndef ESOCKWRAPPER_H_
    18 #ifndef WLANQTUTILSESOCKWRAPPER_H
    19 #define ESOCKWRAPPER_H_
    19 #define WLANQTUTILSESOCKWRAPPER_H
       
    20 
       
    21 // System includes
    20 
    22 
    21 #include <QObject>
    23 #include <QObject>
       
    24 #include <QScopedPointer>
    22 
    25 
    23 QT_BEGIN_HEADER
    26 // User includes
    24 
    27 
    25 QT_BEGIN_NAMESPACE
    28 // Forward declarations
    26 
    29 
    27 class EsockWrapperPrivate;
    30 class WlanQtUtilsEsockWrapperPrivate;
    28 
    31 
    29 /**
    32 // External data types
    30  * Wrapper for connection handling.
    33 
    31  */
    34 // Constants
    32 class EsockWrapper: public QObject
    35 
       
    36 // Class declaration
       
    37 
       
    38 class WlanQtUtilsEsockWrapper: public QObject
    33 {
    39 {
    34     Q_OBJECT
    40     Q_OBJECT
    35     
    41     
    36 public:
    42 public:
    37     
    43     
    38     /**
    44     // Data types
    39      * Default constructor
    45 
    40      */
    46     WlanQtUtilsEsockWrapper(QObject *parent = 0);
    41     EsockWrapper(QObject *parent = 0);
       
    42     
    47     
    43     /**
    48     ~WlanQtUtilsEsockWrapper();
    44      * Destructor.
       
    45      */
       
    46     ~EsockWrapper();
       
    47     
    49     
    48 public:
    50     void updateConnection(bool isOpened, int platformStatusCode);
    49 
    51 
    50     /**
    52     int lastStatusCode();
    51      * 
    53 
    52      */
    54 signals:
    53     void updateConnection(bool isOpened);
    55 
       
    56     void connectionStatusFromWrapper(bool isOpened);
    54 
    57 
    55 public slots:
    58 public slots:
       
    59 
       
    60     void connectIap(int iapId);
       
    61 
       
    62     void disconnectIap();
       
    63 
       
    64 protected:
       
    65 
       
    66 protected slots:
       
    67 
       
    68 private:
       
    69 
       
    70 private slots:
       
    71 
       
    72 private: // data
    56     
    73     
    57     /**
    74     //! Private implementation
    58      * Starts connection creation to given IAP.
    75     QScopedPointer<WlanQtUtilsEsockWrapperPrivate> d_ptr;
    59      * 
       
    60      * @param[in] iapId IAP ID.
       
    61      */
       
    62     void connectIap(int iapId);
       
    63     
    76     
    64     /**
    77     //! Platform status code of latest connection creation attempt
    65      * Disconnects connection.
    78     int mLastStatusCode;
    66      */
       
    67     void disconnectIap();
       
    68     
       
    69 signals:
       
    70 
    79 
    71     void connectionStatusFromWrapper(bool isOpened);   
    80     // Friend classes
    72 
       
    73 private: // Data
       
    74     
       
    75     /** Private esock wrapper. */
       
    76     EsockWrapperPrivate *d_ptr;
       
    77 };
    81 };
    78 
    82 
    79 QT_END_HEADER
    83 #endif // WLANQTUTILSESOCKWRAPPER_H
    80 
       
    81 QT_END_NAMESPACE
       
    82 
       
    83 #endif /*ESOCKWRAPPER_H_*/
       
    84 
       
    85 // End of file