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