wlanutilities/wlanindicatorplugin/inc/wlanindicatorplugin.h
branchRCL_3
changeset 25 f28ada11abbf
parent 24 63be7eb3fc78
equal deleted inserted replaced
24:63be7eb3fc78 25:f28ada11abbf
     1 /*
       
     2  * Copyright (c) 2009 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:
       
    15  * 
       
    16  */
       
    17 
       
    18 #ifndef WLANINDICATORPLUGIN_H
       
    19 #define WLANINDICATORPLUGIN_H
       
    20 
       
    21 #include <QtCore/QVariant>
       
    22 #include <QtCore/QProcess>
       
    23 #include <hbindicatorplugininterface.h>
       
    24 #include <hbindicatorinterface.h>
       
    25 #include <QSharedPointer>
       
    26 
       
    27 // Forward declarations
       
    28 class HbTranslator;
       
    29 
       
    30 const int wlanNotConnected = 0;
       
    31 const int wlanConnected = 1;
       
    32 
       
    33 class WlanIndicatorPlugin : public HbIndicatorInterface, public HbIndicatorPluginInterface
       
    34 {
       
    35     Q_OBJECT
       
    36     Q_INTERFACES(HbIndicatorPluginInterface)
       
    37     
       
    38 #ifdef WLANINDICATOR_UT    
       
    39     friend class WlanIndicatorUtCases;
       
    40 #endif
       
    41     
       
    42 public:
       
    43     WlanIndicatorPlugin();
       
    44     ~WlanIndicatorPlugin();
       
    45 
       
    46 public:
       
    47     //from HbIndicatorPluginInterface
       
    48     QStringList indicatorTypes() const;
       
    49     bool accessAllowed(const QString &indicatorType,
       
    50                        const QVariantMap &securityInfo ) const;
       
    51     HbIndicatorInterface* createIndicator(const QString &indicatorType);
       
    52     int error() const;
       
    53 public:
       
    54     //from HbIndicatorInterface
       
    55     bool handleClientRequest (RequestType type, const QVariant &parameter);
       
    56     bool handleInteraction (InteractionType type); 
       
    57     QVariant indicatorData(int role) const;
       
    58 
       
    59 private:
       
    60     
       
    61     Q_DISABLE_COPY(WlanIndicatorPlugin)
       
    62     QStringList mIndicatorTypes;  // Type of indicator
       
    63     int mError;                   // Indicator error
       
    64     QVariant mParameter;          // Used to contain the status of wlan    
       
    65     QProcess process;             // Process to start external programs
       
    66     QSharedPointer<HbTranslator> mTranslator; // Translator for the localisation Text Id's
       
    67 };
       
    68 #endif //WLANINDICATORPLUGIN_H