memspyui/ui/avkon/inc/MemSpyViewHeapTracking.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 MEMSPYVIEWHEAPTRACKING_H
       
    19 #define MEMSPYVIEWHEAPTRACKING_H
       
    20 
       
    21 // System includes
       
    22 #include <hal.h>
       
    23 #include <coecntrl.h>
       
    24 #include <aknlists.h>
       
    25 
       
    26 // Engine includes
       
    27 #include <memspy/engine/memspyenginehelpersysmemtrackerconfig.h>
       
    28 #include <memspy/engine/memspyenginehelpersysmemtrackerobserver.h>
       
    29 
       
    30 // User includes
       
    31 #include "MemSpyViewBase.h"
       
    32 
       
    33 // Classes referenced
       
    34 
       
    35 
       
    36 class CMemSpyViewHeapTracking : public CMemSpyViewBase, public MMemSpyEngineHelperSysMemTrackerObserver
       
    37     {
       
    38 public:
       
    39     CMemSpyViewHeapTracking( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver );
       
    40     ~CMemSpyViewHeapTracking();
       
    41     void ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune = NULL );
       
    42 
       
    43 public: // From CMemSpyViewBase
       
    44     void RefreshL();
       
    45     TMemSpyViewType ViewType() const;
       
    46     CMemSpyViewBase* PrepareParentViewL();
       
    47     CMemSpyViewBase* PrepareChildViewL();
       
    48 
       
    49 public:
       
    50     static TInt AsyncStopTimerCallback( TAny* aParam );
       
    51 
       
    52 private: // From CMemSpyViewBase
       
    53     void SetListBoxModelL();
       
    54 
       
    55 private: // From MMemSpyEngineHelperSysMemTrackerObserver
       
    56     void HandleCyclesResetL();
       
    57     void HandleCycleStartedL( const CMemSpyEngineHelperSysMemTrackerCycle& aCycle );
       
    58     void HandleCycleFinishedL( const CMemSpyEngineHelperSysMemTrackerCycle& aCycle );
       
    59     
       
    60 private: // Internal methods
       
    61     TInt IndexByViewType( TMemSpyViewType aType );
       
    62     void SetConfigByModeL( TMemSpyEngineHelperSysMemTrackerConfig::TMemSpyEngineSysMemTrackerMode aMode, TMemSpyEngineHelperSysMemTrackerConfig& aConfig );
       
    63     TInt AsyncStopTimerCallback();
       
    64 
       
    65 private: // Enum
       
    66     enum TMemSpyViewHeapTrackingState
       
    67         {
       
    68         EMemSpyViewHeapTrackingStateIdle = 0,
       
    69         EMemSpyViewHeapTrackingStateTimerOn,
       
    70         EMemSpyViewHeapTrackingStateSingleOn        
       
    71         };
       
    72 
       
    73 private: // Data
       
    74     TMemSpyEngineHelperSysMemTrackerConfig iOriginalConfig;
       
    75     TMemSpyViewHeapTrackingState iState;
       
    76     CAsyncCallBack* iStopTimerCallBack;
       
    77     };
       
    78 
       
    79 
       
    80 #endif