ginebra2/SystemNetworkImpl.h
changeset 5 0f2326c2a325
child 6 1c3b8676e58c
equal deleted inserted replaced
1:b0dd75e285d2 5:0f2326c2a325
       
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 *
       
     5 * This program is free software: you can redistribute it and/or modify
       
     6 * it under the terms of the GNU Lesser General Public License as published by
       
     7 * the Free Software Foundation, version 2.1 of the License.
       
     8 *
       
     9 * This program is distributed in the hope that it will be useful,
       
    10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    12 * GNU Lesser General Public License for more details.
       
    13 *
       
    14 * You should have received a copy of the GNU Lesser General Public License
       
    15 * along with this program.  If not,
       
    16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
       
    17 *
       
    18 * Description:
       
    19 *  This file defines the SystemNetworkImpl class.
       
    20 */
       
    21 #ifndef SYSTEMNETWORKIMPLEMENTOR_H
       
    22 #define SYSTEMNETWORKIMPLEMENTOR_H
       
    23 
       
    24 #include <QObject>
       
    25 #include <QString>
       
    26 #include <qsysteminfo.h>
       
    27 #ifdef QT_MOBILITY_BEARER_MANAGEMENT
       
    28 #include "WebNetworkConnectionManagerSingleton.h"
       
    29 #endif // QT_MOBILITY_BEARER_MANAGEMENT
       
    30 #include "NetworkDelegate.h"
       
    31 
       
    32 QTM_USE_NAMESPACE
       
    33 
       
    34 namespace GVA {
       
    35 
       
    36 class SystemNetworkImpl : public NetworkImpl
       
    37 {
       
    38       Q_OBJECT
       
    39 public:
       
    40     SystemNetworkImpl();
       
    41     ~SystemNetworkImpl();
       
    42 
       
    43     virtual QString getNetworkName() const;
       
    44     virtual int getNetworkSignalStrength() const;
       
    45 
       
    46 private slots:
       
    47       void handleNetworkModeChanged(QSystemNetworkInfo::NetworkMode mode);
       
    48       void handleNetworkSignalStrengthChanged(QSystemNetworkInfo::NetworkMode mode, int strength);
       
    49       void handleNetworkNameChanged(QSystemNetworkInfo::NetworkMode mode, const QString& name);
       
    50       void handleNetworkStatusChanged(QSystemNetworkInfo::NetworkMode mode,
       
    51         QSystemNetworkInfo::NetworkStatus status);
       
    52 
       
    53 private:
       
    54       QSystemNetworkInfo *m_networkInfo;
       
    55       QSystemNetworkInfo::NetworkMode m_currentMode;
       
    56 };
       
    57 
       
    58 } // GVA
       
    59 
       
    60 #endif // SYSTEMNETWORKIMPLEMENTOR_H