perfapps/memspyui/ui/avkon/inc/MemSpyViewHeapTracking.h
changeset 48 da3ec8478e66
child 53 819e59dfc032
equal deleted inserted replaced
47:11fa016241a4 48:da3ec8478e66
       
     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 class RMemSpySession;
       
    35 
       
    36 
       
    37 class CMemSpyViewHeapTracking : public CMemSpyViewBase, public MMemSpyEngineHelperSysMemTrackerObserver
       
    38     {
       
    39 public:
       
    40 	CMemSpyViewHeapTracking( RMemSpySession& aSession, MMemSpyViewObserver& aObserver );
       
    41     ~CMemSpyViewHeapTracking();
       
    42     void ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune = NULL );
       
    43 
       
    44 public: // From CMemSpyViewBase
       
    45     void RefreshL();
       
    46     TMemSpyViewType ViewType() const;
       
    47     CMemSpyViewBase* PrepareParentViewL();
       
    48     CMemSpyViewBase* PrepareChildViewL();
       
    49 
       
    50 public:
       
    51     static TInt AsyncStopTimerCallback( TAny* aParam );
       
    52 
       
    53 private: // From CMemSpyViewBase
       
    54     void SetListBoxModelL();
       
    55 
       
    56 private: // From MMemSpyEngineHelperSysMemTrackerObserver
       
    57     void HandleCyclesResetL();
       
    58     void HandleCycleStartedL( const CMemSpyEngineHelperSysMemTrackerCycle& aCycle );
       
    59     void HandleCycleFinishedL( const CMemSpyEngineHelperSysMemTrackerCycle& aCycle );
       
    60     
       
    61 private: // Internal methods
       
    62     TInt IndexByViewType( TMemSpyViewType aType );
       
    63     void SetConfigByModeL( TMemSpyEngineHelperSysMemTrackerConfig::TMemSpyEngineSysMemTrackerMode aMode, TMemSpyEngineHelperSysMemTrackerConfig& aConfig );
       
    64     TInt AsyncStopTimerCallback();
       
    65     void GetSwmtConfig( TMemSpyEngineHelperSysMemTrackerConfig& aConfig );
       
    66     void SetSwmtConfig( TMemSpyEngineHelperSysMemTrackerConfig& aConfig );
       
    67 
       
    68 private: // Enum
       
    69     enum TMemSpyViewHeapTrackingState
       
    70         {
       
    71         EMemSpyViewHeapTrackingStateIdle = 0,
       
    72         EMemSpyViewHeapTrackingStateTimerOn,
       
    73         EMemSpyViewHeapTrackingStateSingleOn        
       
    74         };
       
    75 
       
    76 private: // Data
       
    77     TMemSpyEngineHelperSysMemTrackerConfig iOriginalConfig;
       
    78     TMemSpyViewHeapTrackingState iState;
       
    79     CAsyncCallBack* iStopTimerCallBack;
       
    80     };
       
    81 
       
    82 
       
    83 #endif