diff -r fc7b30ed2058 -r 05bc53fe583b connectionmonitoring/indicatorobserver/inc/indicatorobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectionmonitoring/indicatorobserver/inc/indicatorobserver.h Tue Aug 31 15:35:44 2010 +0300 @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ + +#ifndef INDICATOROBSERVER_H +#define INDICATOROBSERVER_H + +#include + +#include +#include +#include + +class XQSettingsManager; +class HbIndicator; + +QTM_USE_NAMESPACE + +const int wlanNotConnected = 0; +const int wlanConnected = 1; + +const QString bearerWLAN = "WLAN"; +const QString bearer2G = "2G"; +const QString bearerWCDMA = "WCDMA"; +const QString bearerHSPA = "HSPA"; +const QString bearerCDMA2000 = "CDMA2000"; + +class IndicatorObserver : public QCoreApplication + { + Q_OBJECT + +public: + IndicatorObserver(int argc, char* argv[]); + + virtual ~IndicatorObserver(); + + void initializeIndicators(); + + void findActiveConfigurations(); + + void updateWlanIndicator(); + + void updateCellularIndicator(); + + void activateCellularIndicatorPlugin(QList list); + + void deactivateCellularIndicatorPlugin(); + + void activateWlanIndicatorPlugin(QList list); + + void deactivateWlanIndicatorPlugin(); + +private slots: + void updateWlanRadioStatus(const XQSettingsKey &key, const QVariant &value); + + void handleConfigurationChanged(const QNetworkConfiguration& config); + + void userActivateCellularIndicator(const QString &type, const QVariantMap &data); + + void userActivateWlanIndicator(const QString &type, const QVariantMap &data); + +private: + /*! + Pointer to network configuration manager + */ + QNetworkConfigurationManager* mNetConfigurationManager; + + /*! + Pointer to settings manager for reading PS keys + */ + XQSettingsManager *mSettingsManager; + + /*! + Pointer to a list of active cellular configurations + */ + QList* mActiveCellularConfigurations; + + /*! + Pointer to a list of active WLAN configurations + */ + QList* mActiveWlanConfigurations; + + /*! + Indicates whether WLAN radio is switched on + */ + bool mWlanEnabled; + + /*! + Indicates whether WLAN radio is forced off + */ + bool mWlanForceDisabled; + + /*! + Indicates whether WLAN indicator plugin is activated + */ + bool mWlanIndicatorIsActivated; + + /*! + Indicates whether cellular indicator plugin is activated + */ + bool mCellularIndicatorIsActivated; + + /*! + Pointer to the WLAN indicator + */ + HbIndicator *mWlanIndicator; + + /*! + Pointer to the cellular indicator + */ + HbIndicator *mCellularIndicator; + + friend class ObserverTester; + + }; + +#endif + +// End of File