wlanutilities/wlanindicatorplugin/inc/wlanindicatorpluginimplementation.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:20:32 +0100
branchRCL_3
changeset 25 f28ada11abbf
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201029 Kit: 201035

/*
* Copyright (c) 2008 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:  Defines the CWlanIndicatorPluginImplementation class
*
*/



#ifndef CWLANINDICATORPLUGINIMPLEMENTATION_H
#define CWLANINDICATORPLUGINIMPLEMENTATION_H

//  INCLUDES
#include <AknIndicatorPlugin.h> // CAknIndicatorPlugin
#include <rconnmon.h>

//  FORWARD DECLARATIONS
class CCoeEnv;

/**
*  WLAN Indicator Plug-in implementation
*
*  @since 5.0
*/
class CWlanIndicatorPluginImplementation : public CAknIndicatorPlugin
                                         
    {
        
    public:  // Constructors and destructor

        /**
        * Two-phased constructor.
        */
        static CWlanIndicatorPluginImplementation* NewL();

        /**
        * Destructor.
        */
        ~CWlanIndicatorPluginImplementation();
        

    private: // From CAknIndicatorPlugin
        
        /**
         * @see CAknIndicatorPlugin
         */
        void HandleIndicatorTapL( const TInt aUid );

        /**
         * @see CAknIndicatorPlugin
         */
        HBufC* TextL( const TInt aUid, TInt& aTextType );        
    
    
    private:

        /**
        * C++ default constructor.
        */
        CWlanIndicatorPluginImplementation();

        /**
        * By default Symbian 2nd phase constructor is private.
        */
        void ConstructL();
        

    private: // new functions

        /**
        * Creates text for the case "wlan networks available"
        * @return Descriptor for the "wlan available" case
        */
        HBufC* CreateWlanNetworksFoundTextL();
        
        /**
        * Creates text for the "connected" case (open or secure).
        * @return Descriptor containing the "'myNetwork' connected" text
        */
        HBufC* CreateWlanConnectedTextL();
                     
        /**
         * Finds the WLAN connection name.
         * @return Descriptor containing the name of the connected WLAN nw.
         */
        HBufC* ConnectionNameL();
        
        /** Finds the WLAN connection id
         * @return WLAN connection id
         */
        TUint FindWlanBearerConnectedL(); 
        
        /** Checks if the given connection is WLAN
         * @param Id of the active connection
         */
        TBool CheckIfWlan( TUint aConnectionId ); 
        
        /**
         * Launches WlanSniffer application.
         */
        void LaunchWlanSnifferL();        
        

    private: // data
    
        /**
         * Ref
         */
        CCoeEnv* iCoeEnv;
        
        /**
         * Resource file offset in CoeEnv's resource file list
         */
        TInt iResource;
        
        /**
         * Owned. Used for getting connection info
         */
        RConnectionMonitor iConnMonitor;
        
    };

#endif      // CWLANINDICATORPLUGINIMPLEMENTATION_H

// End of File