wlanutilities/wlanentryplugin/inc/wlanstatusinfo.h
changeset 31 e8f4211554fb
parent 19 10810c91db26
equal deleted inserted replaced
30:ab513c8439db 31:e8f4211554fb
     1 /*
     1 /*
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009 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".
     8  *
     8 *
     9  * Initial Contributors:
     9 * Initial Contributors:
    10  * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11  *
    11 *
    12  * Contributors:
    12 * Contributors:
    13  *
    13 *
    14  * Description:
    14 * Description: 
    15  * 
    15 * WLAN Status Info wrapper for WLAN entry plugin.
    16  */
    16 */
    17 
    17 
    18 #ifndef WLANSTATUSINFO_H
    18 #ifndef WLANSTATUSINFO_H
    19 #define WLANSTATUSINFO_H
    19 #define WLANSTATUSINFO_H
    20 
    20 
    21 // System includes
    21 // System includes
    25 // User includes
    25 // User includes
    26 
    26 
    27 // Forward declarations
    27 // Forward declarations
    28 
    28 
    29 class WlanQtUtils;
    29 class WlanQtUtils;
       
    30 class XQSettingsManager;
    30 
    31 
    31 // External data types
    32 // External data types
    32 
    33 
    33 // Constants
    34 // Constants
    34 
    35 
    40     
    41     
    41 public:
    42 public:
    42 
    43 
    43     // Data types
    44     // Data types
    44 
    45 
    45     /**
    46     /*!
    46      * WLAN Status value.
    47      * WLAN Status value.
    47      */
    48      */
    48     enum {
    49     enum {
    49         /** WLAN is configured OFF. */
    50         //! WLAN is configured OFF.
    50         WlanStatusOff = 0,
    51         WlanStatusOff = 0,
    51         /** No WLAN connections. */
    52         //! No WLAN connections.
    52         WlanStatusIdle,
    53         WlanStatusIdle,
    53         /** WLAN IAP is connected. */
    54         //! WLAN IAP is connected.
    54         WlanStatusConnected,
    55         WlanStatusConnected,
    55     };
    56     };
    56 
    57 
    57     explicit WlanStatusInfo(QObject *parent = 0);
    58     explicit WlanStatusInfo(QObject *parent = 0);
    58     
    59     
    59     ~WlanStatusInfo();
    60     ~WlanStatusInfo();
    60 
    61 
    61     int status();
    62     int status() const;
    62 
    63 
    63     QString statusText();
    64     QString statusText() const;
    64 
    65 
    65 signals:
    66 signals:
    66 
    67 
    67     /**
    68     /**
    68      * Signal that informs that the WLAN status has changed.
    69      * Signal that informs that the WLAN status has changed.
    77 
    78 
    78 private:
    79 private:
    79 
    80 
    80     Q_DISABLE_COPY(WlanStatusInfo)
    81     Q_DISABLE_COPY(WlanStatusInfo)
    81 
    82 
       
    83     bool isWlanOn() const;
       
    84 
    82 private slots:
    85 private slots:
    83 
    86 
    84     void updateStatus();
    87     void updateStatus();
    85 
    88 
    86 private: // data
    89 private: // data
    87 
    90 
    88     WlanQtUtils *mWlanQtUtils;      // WlanQtUtils instance.
    91     //! WlanQtUtils instance.
    89     QString mStatusText;            // WLAN status text.
    92     WlanQtUtils *mWlanQtUtils;
    90     int mStatus;                    // WLAN status value WlanStatus*.
    93     
       
    94     //! Settings manager for platform settings reading, writing & status changes.
       
    95     XQSettingsManager *mSettingsManager;
       
    96     
       
    97     //! WLAN status text.
       
    98     QString mStatusText;
       
    99     
       
   100     //! WLAN status value WlanStatus*.
       
   101     int mStatus;
    91 
   102 
    92     // Friend classes
   103     // Friend classes
    93 
       
    94 };
   104 };
    95 
   105 
    96 #endif // WLANSTATUSINFO_H
   106 #endif // WLANSTATUSINFO_H