memspyui/include/MemSpyAppUi.h
branchRCL_3
changeset 21 b3cee849fa46
parent 20 48060abbbeaf
child 22 fad26422216a
equal deleted inserted replaced
20:48060abbbeaf 21:b3cee849fa46
     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 MEMSPYAPPUI_H
       
    19 #define MEMSPYAPPUI_H
       
    20 
       
    21 // System includes
       
    22 #include <eikapp.h>
       
    23 #include <eikdoc.h>
       
    24 #include <e32std.h>
       
    25 #include <coeccntx.h>
       
    26 #include <aknappui.h>
       
    27 #include <coecobs.h>
       
    28 
       
    29 // User includes
       
    30 #include "MemSpyDeviceWideOperationDialog.h"
       
    31 #include "MemSpyContainerObserver.h"
       
    32 #include <memspy/engine/memspyengineobserver.h>
       
    33 
       
    34 // Classes referenced
       
    35 class CEikMenuBar;
       
    36 class CMemSpyEngine;
       
    37 class CMemSpyContainer;
       
    38 class CMemSpyDocument;
       
    39 
       
    40 
       
    41 class CMemSpyAppUi : public CAknAppUi, public MMemSpyContainerObserver, public MCoeControlObserver, public MMemSpyEngineObserver, public MMemSpyDeviceWideOperationDialogObserver
       
    42     {
       
    43 public:
       
    44     CMemSpyAppUi( CMemSpyEngine& aEngine );
       
    45     ~CMemSpyAppUi();
       
    46     void ConstructL();
       
    47 
       
    48 public: // API
       
    49     CMemSpyDocument& MemSpyDocument();
       
    50     const CMemSpyDocument& MemSpyDocument() const;
       
    51     inline CMemSpyContainer& Container() { return *iAppContainer; }
       
    52 
       
    53 private: // From Avkon
       
    54     void HandleStatusPaneSizeChange();
       
    55 
       
    56 private: // From MCoeControlObserver
       
    57     void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);
       
    58 
       
    59 private: // From MEikMenuObserver
       
    60     void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
    61 
       
    62 private: // From CEikAppUi
       
    63 	void HandleForegroundEventL(TBool aForeground);
       
    64     void HandleCommandL(TInt aCommand);
       
    65     TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
       
    66 
       
    67 private: // From MMemSpyContainerObserver
       
    68     void HandleThreadSelectedL( const CMemSpyThread& aThread );
       
    69 
       
    70 private: // From MMemSpyEngineObserver
       
    71     void HandleMemSpyEngineEventL( MMemSpyEngineObserver::TEvent aEvent, TAny* aContext );
       
    72 
       
    73 private: // From MMemSpyDeviceWideOperationDialogObserver
       
    74     void DWOperationStarted();
       
    75     void DWOperationCancelled();
       
    76     void DWOperationCompleted();
       
    77 
       
    78 private: // Internal methods
       
    79     void UpdateCBAL();
       
    80     void InitiateMemSpyClientServerOperationL( TInt aOpCode );
       
    81     void SetViewServerTimeOutStatus( TBool aEnabled );
       
    82     
       
    83 private: // Command handlers
       
    84     void OnCmdBackL();
       
    85     void OnCmdExitL();
       
    86     void OnCmdOpenL();
       
    87     void OnCmdAboutL();
       
    88 
       
    89     // Output
       
    90     void OnCmdOutputToDebugL();
       
    91     void OnCmdOutputToFileL();
       
    92  
       
    93     // Phone-information
       
    94     void OnCmdPhoneInformationOperationL( CMemSpyDeviceWideOperations::TOperation aOp );
       
    95     void OnCmdPhoneInformationOperationKernelContainersL();
       
    96     
       
    97     // Automatic capture
       
    98     void OnCmdAutoCaptureToggleL();
       
    99     void OnCmdAutoCaptureRetryTimeL();
       
   100     void OnCmdAutoCaptureOperationTypeL();
       
   101 
       
   102     // Misc
       
   103     void OnCmdToolsBitmapsSaveToMemoryCardL();
       
   104     void OnCmdToolsSendToBackgroundL();
       
   105     void OnCmdToolsBringToForegroundL();
       
   106 
       
   107 private: // Auto capture related
       
   108     static TInt AutoCaptureCallBack( TAny* aSelf );
       
   109     void AutoCaptureCallBackL();
       
   110 
       
   111 private: // Member data
       
   112     CMemSpyEngine& iEngine;
       
   113     CMemSpyContainer* iAppContainer;
       
   114     
       
   115     // For phone information dialog
       
   116     TBool iRunningDeviceWideOperation;
       
   117     
       
   118     // For auto-capture
       
   119     TInt iAutoCaptureTimerPeriod;
       
   120     CMemSpyDeviceWideOperations::TOperation iAutoCaptureOperationType;
       
   121     CPeriodic* iAutoCaptureTimer;
       
   122     };
       
   123 
       
   124 
       
   125 
       
   126 #endif