nettools/conntest/inc/ConnTestAppUi.h
changeset 0 857a3e953887
child 35 304daf3cbbe0
equal deleted inserted replaced
-1:000000000000 0:857a3e953887
       
     1 /*
       
     2 * Copyright (c) 2006 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: The application UI class for ConnTest
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CONNTESTAPPUI_H
       
    19 #define CONNTESTAPPUI_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <eikapp.h>
       
    23 #include <eikdoc.h>
       
    24 #include <e32std.h>
       
    25 #include <coeccntx.h>
       
    26 #include <aknViewAppUi.h>
       
    27 #include <akntabgrp.h>
       
    28 #include <aknnavide.h>
       
    29 
       
    30 #include "conntest.hrh"
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class CConnTestContainer;
       
    34 class CConnTestView;
       
    35 class CAknWarningNote;
       
    36 class CIpdumpEngine;
       
    37 class CSendUi;
       
    38 class CSettingData;
       
    39 class CCustomPrefsData;
       
    40 
       
    41 // CONSTANTS
       
    42 //const ?type ?constant_var = ?constant;
       
    43 
       
    44 /**
       
    45 * Application UI class.
       
    46 * Provides support for the following features:
       
    47 * - EIKON control architecture
       
    48 * - view architecture
       
    49 * - status pane
       
    50 * 
       
    51 */
       
    52 class CConnTestAppUi : public CAknViewAppUi
       
    53 {
       
    54 public: // // Constructors and destructor
       
    55     
       
    56     /**
       
    57     * Symbian default constructor.
       
    58     */      
       
    59     void ConstructL();
       
    60     
       
    61     /**
       
    62     * Constructor.
       
    63     */      
       
    64     CConnTestAppUi(
       
    65         TFixedArray<CSettingData*, KConnTestViews>& aSettings,
       
    66         TFixedArray<CCustomPrefsData*, KConnTestViews>& aCustomPrefs);
       
    67     
       
    68     /**
       
    69     * Destructor.
       
    70     */      
       
    71     ~CConnTestAppUi();
       
    72     
       
    73 public: // New functions
       
    74     
       
    75     /**
       
    76     * Is the IP logging on
       
    77     * @return the logging state, ETrue = logging, EFalse = not logging
       
    78     */
       
    79     TBool IsLogging();
       
    80     
       
    81 public: // Functions from base classes
       
    82     
       
    83 protected: //From CAknViewAppUi
       
    84 
       
    85     /**
       
    86     * Handles the status pane size changes
       
    87     */
       
    88     void HandleStatusPaneSizeChange(); 
       
    89     
       
    90 private:
       
    91     // From MEikMenuObserver
       
    92     void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
       
    93     
       
    94 private:
       
    95     
       
    96     /**
       
    97     * From CEikAppUi, takes care of command handling.
       
    98     * @param aCommand command to be handled
       
    99     */
       
   100     void HandleCommandL(TInt aCommand);
       
   101     
       
   102     /**
       
   103     * From CEikAppUi, handles key events.
       
   104     * @param aKeyEvent Event to handled.
       
   105     * @param aType Type of the key event. 
       
   106     * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). 
       
   107     */
       
   108     virtual TKeyResponse HandleKeyEventL(
       
   109         const TKeyEvent& aKeyEvent,TEventCode aType);
       
   110 
       
   111 private: // new methods
       
   112 	/**
       
   113 	* ParallelGet initiates HTTP Get over socket for every view
       
   114 	* @param amount of gets if possible
       
   115 	*/
       
   116     void ParallelGetL(TInt aCount);
       
   117     
       
   118     /**
       
   119     * Launches a CSendUi for the log file
       
   120     */
       
   121     void SendLogFileL();    
       
   122     
       
   123     /**
       
   124     * Starts the ip packet logging
       
   125     */
       
   126     void StartIpLoggingL();
       
   127     
       
   128     /**
       
   129     * Stops the ip packet logging
       
   130     */
       
   131     void StopIpLoggingL();
       
   132     
       
   133 private: //Data
       
   134 	RPointerArray<CConnTestView>	iConnTestViews; // just for parallel get
       
   135     CAknNavigationControlContainer* iNaviPane;
       
   136     CAknTabGroup*                   iTabGroup;
       
   137     CAknNavigationDecorator*        iDecoratedTabGroup;
       
   138     TFixedArray<CSettingData*, KConnTestViews>&  iSettingDataArray;
       
   139     TFixedArray<CCustomPrefsData*, KConnTestViews>&  iCustomPrefsDataArray;
       
   140     CAknWarningNote* iWarningDialog; // notice, currently used: ->ExecuteLD, so deleted automatically
       
   141     CIpdumpEngine* iIpdumpEngine; // Only 1 dump engine/app, thus appui owns it
       
   142     CSendUi* iSendUi; // For sending the log
       
   143 };
       
   144 
       
   145 #endif
       
   146 
       
   147 // End of File