memspyui/ui/avkon/inc/MemSpyUiUtils.h
changeset 51 b048e15729d6
parent 44 5db69f4c3d06
child 52 36d60d12b4af
equal deleted inserted replaced
44:5db69f4c3d06 51:b048e15729d6
     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 MEMSPYUIUTILS_H
       
    19 #define MEMSPYUIUTILS_H
       
    20 
       
    21 // System includes
       
    22 #include <e32std.h>
       
    23 #include <e32const.h>
       
    24 
       
    25 // Engine includes
       
    26 #include <memspy/engine/memspyengineutils.h>
       
    27 #include <memspy/engine/memspyengineobjectthreadinfoobjects.h>
       
    28 
       
    29 typedef TBuf<20> TMemSpySizeText;
       
    30 
       
    31 _LIT( KTab, "\t" );
       
    32 
       
    33 //ThreadInfoItemList view types
       
    34 _LIT( KTypeUnknown, "Unknown Type" );
       
    35 _LIT( KGeneral, "General" );
       
    36 _LIT( KHeap, "Heap" );
       
    37 _LIT( KStack, "Stack" );
       
    38 _LIT( KChunks, "Chunks" );
       
    39 _LIT( KCodeSegs, "Code Segments" );
       
    40 _LIT( KOpenFiles, "Open Files" );
       
    41 _LIT( KActiveObjects, "Active Objects" );
       
    42 _LIT( KThreadHandlers, "Handlers to other Threads" );
       
    43 _LIT( KProcessHandlers, "Handlers to other Processes" );
       
    44 _LIT( KServers, "Servers running in Thread" );
       
    45 _LIT( KConnections, "Client <> Server Connections" );
       
    46 _LIT( KSemaphores, "Semaphores" );
       
    47 _LIT( KThreadReferences, "References in Thread" );
       
    48 _LIT( KProcessReferences, "References in Process" );
       
    49 _LIT( KMutexes, "Mutexes" );
       
    50 _LIT( KTimers, "Timers" );
       
    51 _LIT( KDD, "Logical DD Channels" );
       
    52 _LIT( KChangeNotif, "Change Notifiers" );
       
    53 _LIT( KUndertakers, "Undertakers" );
       
    54 _LIT( KLogicalDrivers, "Logical Device Drivers" );
       
    55 _LIT( KPhysicalDrivers, "Physical Device Drivers" );	
       
    56 
       
    57 //Kernel Object types
       
    58 _LIT( KTypeThread, "Thread" );
       
    59 _LIT( KTypeProcess, "Process" );
       
    60 _LIT( KTypeChunk, "Chunk" );
       
    61 _LIT( KTypeLibrary, "Library" );
       
    62 _LIT( KTypeSemaphore, "Semaphore" );
       
    63 _LIT( KTypeMutex, "Mutex" );
       
    64 _LIT( KTypeTimer, "Timer" );
       
    65 _LIT( KTypeServer, "Server" );
       
    66 _LIT( KTypeSession, "Session" );
       
    67 _LIT( KTypeLogicalDevice, "Logical Device" );
       
    68 _LIT( KTypePhysicalDevice, "Physical Device" );
       
    69 _LIT( KTypeLogicalChannel, "Logical Channel" );
       
    70 _LIT( KTypeChangeNotifier, "Change Notifier" );
       
    71 _LIT( KTypeUndertaker, "Undertaker" );
       
    72 _LIT( KTypeMsgQueue, "Msg. Queue" );
       
    73 _LIT( KTypePropertyRef, "Property Ref." );
       
    74 _LIT( KTypeCondVar, "Conditional Var." );
       
    75 
       
    76 
       
    77 class MemSpyUiUtils : public MemSpyEngineUtils
       
    78     {
       
    79 public:
       
    80     static void Format( TDes& aBuf, TInt aResourceId, ...);
       
    81     static void GetErrorText( TDes& aBuf, TInt aError );
       
    82     static HBufC* FormatItem( const TDesC& aCaption );
       
    83     static TDesC& ThreadInfoItemNameByType( TMemSpyThreadInfoItemType aType );
       
    84     static void AppendPriority( TDes& aDes, TProcessPriority aPriority );
       
    85     static void AppendExitInfo( TDes& aDes, TExitType aType, TInt aExitReason, const TDesC& aExitCategory  );
       
    86     static void AppendExitType( TDes& aDes, TExitType aType );
       
    87     
       
    88     //for Kernel Objects
       
    89     static TPtrC TypeAsString( TMemSpyDriverContainerType aType );
       
    90     static TMemSpySizeText FormatSizeText( const TInt64& aValue, TInt aDecimalPlaces, TBool aExtraRounding = EFalse );
       
    91     };
       
    92 
       
    93 
       
    94 
       
    95 
       
    96 #endif