perfapps/memspyui/ui/avkon/inc/MemSpyViewThreads.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 MEMSPYVIEWTHREADS_H
       
    19 #define MEMSPYVIEWTHREADS_H
       
    20 
       
    21 // System includes
       
    22 #include <coecntrl.h>
       
    23 #include <aknlists.h>
       
    24 #include <e32const.h>
       
    25 
       
    26 // User includes
       
    27 #include "MemSpyViewBase.h"
       
    28 
       
    29 #include <memspy/api/memspyapithread.h>
       
    30 
       
    31 // Classes referenced
       
    32 class CMemSpyProcess;
       
    33 class CMemSpyThread;
       
    34 class RMemSpySession;
       
    35 
       
    36 class CMemSpyViewThreads : public CMemSpyViewBase
       
    37     {
       
    38 public:
       
    39     //CMemSpyViewThreads( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyProcess& aProcess );
       
    40 	CMemSpyViewThreads( RMemSpySession& aSession, MMemSpyViewObserver& aObserver, TProcessId aId, TThreadId aThreadId );
       
    41     ~CMemSpyViewThreads();
       
    42     void ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune = NULL );
       
    43 
       
    44 public: // API
       
    45     //const CMemSpyProcess& Process() const;
       
    46     //CMemSpyThread& CurrentThread();
       
    47     TProcessId Process() const;
       
    48     TThreadId CurrentThread();
       
    49 
       
    50 public: // Menu framework
       
    51     TUint MenuCascadeResourceId() const { return R_MEMSPY_MENUPANE_THREAD; }
       
    52     TInt MenuCascadeCommandId() const { return EMemSpyCmdThread; }
       
    53     void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
    54 
       
    55 public: // From CMemSpyViewBase
       
    56     void RefreshL();
       
    57     TMemSpyViewType ViewType() const;
       
    58     CMemSpyViewBase* PrepareParentViewL();
       
    59     CMemSpyViewBase* PrepareChildViewL();
       
    60     TBool HandleCommandL( TInt aCommand );
       
    61 
       
    62 private: // Command handlers
       
    63     void OnCmdEndKillL();
       
    64     void OnCmdEndTerminateL();
       
    65     void OnCmdEndPanicL();
       
    66     void OnCmdSetPriorityL( TInt aCommand );
       
    67     void OnCmdInfoHandlesL();
       
    68 
       
    69 private: // From CMemSpyViewBase
       
    70     void SetListBoxModelL();
       
    71     void HandleListBoxItemActionedL( TInt aCurrentIndex );
       
    72     void HandleListBoxItemSelectedL( TInt aCurrentIndex );    
       
    73     void AppendPriority( TDes& aDes, TThreadPriority aPriority );
       
    74 
       
    75 private: // Member data
       
    76     //CMemSpyProcess& iParentProcess;
       
    77     //CMemSpyThread* iCurrentThread;
       
    78     TThreadId iCurrentThreadId;
       
    79     TProcessId iParentProcessId;
       
    80     
       
    81     RArray<CMemSpyApiThread*> iThreads;
       
    82     CDesCArrayFlat* iModel;
       
    83     };
       
    84 
       
    85 
       
    86 #endif