wlanutilities/wlanindicatorplugin/inc/wlanindicatorpluginimplementation.h
branchRCL_3
changeset 24 63be7eb3fc78
parent 23 b852595f5cbe
child 25 f28ada11abbf
equal deleted inserted replaced
23:b852595f5cbe 24:63be7eb3fc78
     1 /*
       
     2 * Copyright (c) 2008 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:  Defines the CWlanIndicatorPluginImplementation class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CWLANINDICATORPLUGINIMPLEMENTATION_H
       
    21 #define CWLANINDICATORPLUGINIMPLEMENTATION_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <AknIndicatorPlugin.h> // CAknIndicatorPlugin
       
    25 #include <rconnmon.h>
       
    26 
       
    27 //  FORWARD DECLARATIONS
       
    28 class CCoeEnv;
       
    29 
       
    30 /**
       
    31 *  WLAN Indicator Plug-in implementation
       
    32 *
       
    33 *  @since 5.0
       
    34 */
       
    35 class CWlanIndicatorPluginImplementation : public CAknIndicatorPlugin
       
    36                                          
       
    37     {
       
    38         
       
    39     public:  // Constructors and destructor
       
    40 
       
    41         /**
       
    42         * Two-phased constructor.
       
    43         */
       
    44         static CWlanIndicatorPluginImplementation* NewL();
       
    45 
       
    46         /**
       
    47         * Destructor.
       
    48         */
       
    49         ~CWlanIndicatorPluginImplementation();
       
    50         
       
    51 
       
    52     private: // From CAknIndicatorPlugin
       
    53         
       
    54         /**
       
    55          * @see CAknIndicatorPlugin
       
    56          */
       
    57         void HandleIndicatorTapL( const TInt aUid );
       
    58 
       
    59         /**
       
    60          * @see CAknIndicatorPlugin
       
    61          */
       
    62         HBufC* TextL( const TInt aUid, TInt& aTextType );        
       
    63     
       
    64     
       
    65     private:
       
    66 
       
    67         /**
       
    68         * C++ default constructor.
       
    69         */
       
    70         CWlanIndicatorPluginImplementation();
       
    71 
       
    72         /**
       
    73         * By default Symbian 2nd phase constructor is private.
       
    74         */
       
    75         void ConstructL();
       
    76         
       
    77 
       
    78     private: // new functions
       
    79 
       
    80         /**
       
    81         * Creates text for the case "wlan networks available"
       
    82         * @return Descriptor for the "wlan available" case
       
    83         */
       
    84         HBufC* CreateWlanNetworksFoundTextL();
       
    85         
       
    86         /**
       
    87         * Creates text for the "connected" case (open or secure).
       
    88         * @return Descriptor containing the "'myNetwork' connected" text
       
    89         */
       
    90         HBufC* CreateWlanConnectedTextL();
       
    91                      
       
    92         /**
       
    93          * Finds the WLAN connection name.
       
    94          * @return Descriptor containing the name of the connected WLAN nw.
       
    95          */
       
    96         HBufC* ConnectionNameL();
       
    97         
       
    98         /** Finds the WLAN connection id
       
    99          * @return WLAN connection id
       
   100          */
       
   101         TUint FindWlanBearerConnectedL(); 
       
   102         
       
   103         /** Checks if the given connection is WLAN
       
   104          * @param Id of the active connection
       
   105          */
       
   106         TBool CheckIfWlan( TUint aConnectionId ); 
       
   107         
       
   108         /**
       
   109          * Launches WlanSniffer application.
       
   110          */
       
   111         void LaunchWlanSnifferL();        
       
   112         
       
   113 
       
   114     private: // data
       
   115     
       
   116         /**
       
   117          * Ref
       
   118          */
       
   119         CCoeEnv* iCoeEnv;
       
   120         
       
   121         /**
       
   122          * Resource file offset in CoeEnv's resource file list
       
   123          */
       
   124         TInt iResource;
       
   125         
       
   126         /**
       
   127          * Owned. Used for getting connection info
       
   128          */
       
   129         RConnectionMonitor iConnMonitor;
       
   130         
       
   131     };
       
   132 
       
   133 #endif      // CWLANINDICATORPLUGINIMPLEMENTATION_H
       
   134 
       
   135 // End of File