memspyui/ui/avkon/inc/MemSpyViewThreadInfoItemMemoryTracking.h
branchRCL_3
changeset 21 b3cee849fa46
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 MEMSPYVIEWTHREADINFOITEMMEMORYTRACKING_H
       
    19 #define MEMSPYVIEWTHREADINFOITEMMEMORYTRACKING_H
       
    20 
       
    21 // System includes
       
    22 #include <coecntrl.h>
       
    23 #include <aknlists.h>
       
    24 
       
    25 // Engine includes
       
    26 #include <memspy/engine/memspyengineprocessmemorytracker.h>
       
    27 
       
    28 // User includes
       
    29 #include "MemSpyViewThreadInfoItemGeneric.h"
       
    30 
       
    31 // Classes referenced
       
    32 class CMemSpyEngineProcessMemoryTracker;
       
    33 
       
    34 
       
    35 class CMemSpyViewThreadInfoItemMemoryTracking : public CMemSpyViewThreadInfoItemGeneric, public MMemSpyEngineProcessMemoryTrackerObserver
       
    36     {
       
    37 public:
       
    38     CMemSpyViewThreadInfoItemMemoryTracking( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyThreadInfoContainer& aContainer );
       
    39     void ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune = NULL );
       
    40 
       
    41 public: // From CMemSpyViewBase
       
    42     TMemSpyViewType ViewType() const;
       
    43     CMemSpyViewBase* PrepareParentViewL();
       
    44     CMemSpyViewBase* PrepareChildViewL();
       
    45     TBool HandleCommandL( TInt aCommand );
       
    46     TInt IndexByViewType( TMemSpyViewType aType );
       
    47     void HandleListBoxItemActionedL( TInt aIndex );
       
    48     void RefreshL();
       
    49     void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
    50 
       
    51 public: // Menu framework
       
    52     TUint MenuCascadeResourceId() const { return R_MEMSPY_MENUPANE_MEMORY_TRACKING; }
       
    53     TInt MenuCascadeCommandId() const { return EMemSpyCmdMemoryTracking; }
       
    54 
       
    55 private: // From MMemSpyEngineProcessMemoryTrackerObserver
       
    56     void HandleMemoryTrackingStartedL();
       
    57     void HandleMemoryTrackingStoppedL();
       
    58     void HandleMemoryChangedL( const TProcessId& aPid, const TMemSpyDriverProcessInspectionInfo& aCurrentInfo, const TMemSpyDriverProcessInspectionInfo& aHWMInfoIncShared, const TMemSpyDriverProcessInspectionInfo& aHWMInfoExcShared );
       
    59 
       
    60 private: // Command handlers
       
    61     void OnCmdTrackingStartL();
       
    62     void OnCmdTrackingStopL();
       
    63     void OnCmdHWMResetL();
       
    64     void OnCmdTotalWithSharedMemL();
       
    65     void OnCmdTotalWithoutSharedMemL();
       
    66     };
       
    67 
       
    68 
       
    69 class CMemSpyViewThreadInfoItemMemoryTrackingCurrent : public CMemSpyViewThreadInfoItemGeneric, public MMemSpyEngineProcessMemoryTrackerObserver
       
    70     {
       
    71 public:
       
    72     CMemSpyViewThreadInfoItemMemoryTrackingCurrent( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyThreadInfoContainer& aContainer );
       
    73     void ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune = NULL );
       
    74 
       
    75 public: // From CMemSpyViewBase
       
    76     TMemSpyViewType ViewType() const;
       
    77     CMemSpyViewBase* PrepareParentViewL();
       
    78     void RefreshL();
       
    79     void SetListBoxModelL();
       
    80 
       
    81 private: // From MMemSpyEngineProcessMemoryTrackerObserver
       
    82     void HandleMemoryTrackingStartedL() { }
       
    83     void HandleMemoryTrackingStoppedL() { }
       
    84     void HandleMemoryChangedL( const TProcessId& aPid, const TMemSpyDriverProcessInspectionInfo& aCurrentInfo, const TMemSpyDriverProcessInspectionInfo& aHWMInfoIncShared, const TMemSpyDriverProcessInspectionInfo& aHWMInfoExcShared );
       
    85     };
       
    86 
       
    87 
       
    88 
       
    89 class CMemSpyViewThreadInfoItemMemoryTrackingHWM : public CMemSpyViewThreadInfoItemGeneric, public MMemSpyEngineProcessMemoryTrackerObserver
       
    90     {
       
    91 public:
       
    92     CMemSpyViewThreadInfoItemMemoryTrackingHWM( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyThreadInfoContainer& aContainer );
       
    93     void ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune = NULL );
       
    94 
       
    95 public: // From CMemSpyViewBase
       
    96     TMemSpyViewType ViewType() const;
       
    97     CMemSpyViewBase* PrepareParentViewL();
       
    98     TBool HandleCommandL( TInt aCommand );
       
    99     void RefreshL();
       
   100     void SetListBoxModelL();
       
   101 
       
   102 private: // From MMemSpyEngineProcessMemoryTrackerObserver
       
   103     void HandleMemoryTrackingStartedL() { }
       
   104     void HandleMemoryTrackingStoppedL() { }
       
   105     void HandleMemoryChangedL( const TProcessId& aPid, const TMemSpyDriverProcessInspectionInfo& aCurrentInfo, const TMemSpyDriverProcessInspectionInfo& aHWMInfoIncShared, const TMemSpyDriverProcessInspectionInfo& aHWMInfoExcShared );
       
   106 
       
   107 public: // Menu framework
       
   108     TUint MenuCascadeResourceId() const { return R_MEMSPY_MENUPANE_MEMORY_TRACKING_HWM; }
       
   109     TInt MenuCascadeCommandId() const { return EMemSpyCmdMemoryTrackingHWM; }
       
   110 
       
   111 private: // Command handlers
       
   112     void OnCmdHWMResetL();
       
   113     };
       
   114     
       
   115 
       
   116 
       
   117 
       
   118 class CMemSpyViewThreadInfoItemMemoryTrackingPeak : public CMemSpyViewThreadInfoItemGeneric, public MMemSpyEngineProcessMemoryTrackerObserver
       
   119     {
       
   120 public:
       
   121     CMemSpyViewThreadInfoItemMemoryTrackingPeak( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyThreadInfoContainer& aContainer );
       
   122     void ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune = NULL );
       
   123 
       
   124 public: // From CMemSpyViewBase
       
   125     TMemSpyViewType ViewType() const;
       
   126     CMemSpyViewBase* PrepareParentViewL();
       
   127     TBool HandleCommandL( TInt aCommand );
       
   128     void RefreshL();
       
   129     void SetListBoxModelL();
       
   130 
       
   131 private: // From MMemSpyEngineProcessMemoryTrackerObserver
       
   132     void HandleMemoryTrackingStartedL() { }
       
   133     void HandleMemoryTrackingStoppedL() { }
       
   134     void HandleMemoryChangedL( const TProcessId& aPid, const TMemSpyDriverProcessInspectionInfo& aCurrentInfo, const TMemSpyDriverProcessInspectionInfo& aHWMInfoIncShared, const TMemSpyDriverProcessInspectionInfo& aHWMInfoExcShared );
       
   135     };
       
   136 
       
   137 #endif