wlanutilities/wlansniffer/aihelper/inc/wsfaihelperappui.h
branchRCL_3
changeset 24 63be7eb3fc78
parent 23 b852595f5cbe
child 25 f28ada11abbf
equal deleted inserted replaced
23:b852595f5cbe 24:63be7eb3fc78
     1 /*
       
     2 * Copyright (c) 2007-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:  Class header for CWsfAiHelperAppUi
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_WSFAIHELPERAPPUI_H
       
    20 #define C_WSFAIHELPERAPPUI_H
       
    21 
       
    22 //  EXTERNAL INCLUDES
       
    23 #include <aknViewAppUi.h>
       
    24 #include <AknWaitDialog.h>
       
    25 
       
    26 //  INTERNAL INCLUDES
       
    27 #include "wsfmodelobserver.h"
       
    28 #include "wsfstatechangeobserver.h"
       
    29 
       
    30 
       
    31 //  FORWARD DECLARATIONS
       
    32 class TWsfWlanInfo;
       
    33 class CWsfAiHelperDocument;
       
    34 
       
    35 
       
    36 //  CLASS DEFINITION
       
    37 /**
       
    38  * An instance of class CWsfApHelperAppUi is the UserInterface part of 
       
    39  * the AVKON application framework
       
    40  * 
       
    41  * @since S60 5.0
       
    42  * @lib wsfaihelper.exe
       
    43  */
       
    44 NONSHARABLE_CLASS( CWsfAiHelperAppUi ): public CAknViewAppUi,    
       
    45                                         public MWsfModelObserver, 
       
    46                                         public MWsfStateChangeObserver
       
    47     {
       
    48     public:
       
    49         /**
       
    50          * Second-phase constructor.
       
    51          * @since S60 5.0
       
    52          */
       
    53         void ConstructL();
       
    54 
       
    55         /**
       
    56          * Constructor
       
    57          * @since S60 5.0
       
    58          */
       
    59          CWsfAiHelperAppUi();
       
    60     
       
    61          /**
       
    62           * Destructor
       
    63           * @since S60 5.0
       
    64           */
       
    65         ~CWsfAiHelperAppUi();
       
    66     
       
    67     
       
    68     public: // from CAknAppUi
       
    69         /**
       
    70          * Handle user menu selections
       
    71          * @since S60 5.0
       
    72          * @param aCommand The enumerated code for the option selected
       
    73          */
       
    74         void HandleCommandL( TInt aCommand );
       
    75     
       
    76         
       
    77         /**
       
    78          * Processes shell commands.
       
    79          * @since S60 5.0
       
    80          * @param aCommand The shell command sent to the application
       
    81          * @param aDocumentName The name of the document as specified on 
       
    82          *                      the command line.
       
    83          * @param aTail Command line tail
       
    84          * @return Whether the final value of aDocumentName represents 
       
    85          *         an existing file
       
    86          */ 
       
    87         TBool ProcessCommandParametersL( TApaCommand aCommand,
       
    88                                          TFileName& aDocumentName,
       
    89                                          const TDesC8& aTail );
       
    90 
       
    91 
       
    92     public:     // new methods
       
    93         /**
       
    94          * Returns the handle of application document instance
       
    95          * @since S60 5.0
       
    96          * @return Pointer to the document. Ownership not passed.
       
    97          */ 
       
    98         CWsfAiHelperDocument* Doc();
       
    99     
       
   100         /**
       
   101         * Called when the filename to be opened has been resolved
       
   102         * @since S60 5.0
       
   103         */
       
   104         void NotifyFileName();
       
   105         
       
   106         /**
       
   107         * Sends Helper To Background
       
   108         * @since S60 5.2
       
   109         */
       
   110         void SendHelperToBackground();
       
   111     
       
   112         
       
   113     public: // from MWsfModelObserver
       
   114     
       
   115         /**
       
   116          * Called if the launch has been completed successfully
       
   117          * @since S60 5.0 
       
   118          */
       
   119         void BrowserLaunchCompleteL();
       
   120         
       
   121         /**
       
   122          * Called if the browser launch failed for some reason
       
   123          * @since S60 5.0 
       
   124          * @param aError error code
       
   125          */
       
   126         void BrowserLaunchFailed( TInt aError );
       
   127 
       
   128         /**
       
   129         * Called when the previously launched browser exits
       
   130         * @since S60 5.0
       
   131         */
       
   132         void BrowserExitL();
       
   133         
       
   134         /**
       
   135         * Notification that connection is going to be created
       
   136         * @since S60 5.0
       
   137         * @param aIapId The IAP id of the connection being created
       
   138         */
       
   139         void ConnectingL( TUint32 aIapId );
       
   140 
       
   141         /**
       
   142         * Notification that the connection creation process ended
       
   143         * @since S60 5.0
       
   144         * @param aResult The result of the connection creation
       
   145         */
       
   146         void ConnectingFinishedL( TInt aResult );
       
   147         
       
   148 
       
   149     public:     // from MWsfStateChangeObserver
       
   150         /**
       
   151         * The current wlan data has changed and it is ready to be retrieved
       
   152         * @since S60 5.0
       
   153         */
       
   154         void WlanListChangedL();
       
   155 
       
   156         /**
       
   157         * Engine error occured
       
   158         * @since S60 5.0
       
   159         * @param aError System wide error code
       
   160         */
       
   161         void NotifyEngineError( TInt aError );
       
   162 
       
   163         /**
       
   164         * Scanning has been disabled
       
   165         * @since S60 5.0
       
   166         */
       
   167         void ScanDisabledL();
       
   168 
       
   169         /**
       
   170         * Scanning has been enabled
       
   171         * @since S60 5.0
       
   172         */
       
   173         void ScanEnabledL();
       
   174         
       
   175         /**
       
   176         * A WLAN connection has been established
       
   177         * @since S60 5.0
       
   178         */
       
   179         void WlanConnectionActivatedL();
       
   180 
       
   181         /**
       
   182         * A WLAN connection has been closed
       
   183         * @since S60 5.0
       
   184         */
       
   185         void WlanConnectionClosedL();   
       
   186         
       
   187         /**
       
   188         * Connection creation process finished
       
   189         * @since S60 5.2
       
   190         * @param aError System wide error code
       
   191         */
       
   192         void ConnectionCreationProcessFinishedL( TInt aError );
       
   193         
       
   194     private:    // new methods
       
   195     
       
   196         /**
       
   197          * Called when application launch has been completed
       
   198          * @since S60 5.0
       
   199          * @param aObject Pointer to this object
       
   200          * @return Zero value means not be called again.(Stops timer)
       
   201          */
       
   202         static TInt LaunchCompletedL( TAny* aObject );
       
   203         
       
   204         /**
       
   205         * Cleanup function to release the key events suppressing
       
   206         * @since S60 5.0
       
   207         * @param aPtr Pointer for this class
       
   208         */
       
   209         static void ReleaseSuppressingKeyEventsL( TAny* aPtr );
       
   210     
       
   211         
       
   212     private:    // data
       
   213         /**
       
   214          * Used to begin accesspoint creation when app launching has completed
       
   215          * (owned)
       
   216          */ 
       
   217         CIdle* iIdle;
       
   218 
       
   219         /**
       
   220          * Indicates whether keypress events are suppressed
       
   221          */
       
   222         TBool iSuppressingKeyEvents;
       
   223         
       
   224         /**
       
   225          * IAP creation return value
       
   226          */
       
   227         TInt iResult;
       
   228     };
       
   229 
       
   230 
       
   231 #endif // C_WSFAIHELPERAPPUI_H
       
   232