memspy/CommandLine/Include/MemSpyCommands.h
branchRCL_3
changeset 59 8ad140f3dd41
parent 49 7fdc9a71d314
equal deleted inserted replaced
49:7fdc9a71d314 59:8ad140f3dd41
    16 */
    16 */
    17 
    17 
    18 #ifndef MEMSPYCOMMANDS_H
    18 #ifndef MEMSPYCOMMANDS_H
    19 #define MEMSPYCOMMANDS_H
    19 #define MEMSPYCOMMANDS_H
    20 
    20 
       
    21 
    21 // Literal constants
    22 // Literal constants
    22 _LIT( KMemSpyCLINewLine, "\r\n" );
    23 _LIT( KMemSpyCmdHeapDump, "CmdHeap_Dump" );
    23 _LIT( KMemSpyCLIName, "MemSpy CommandLineInterpreter" );
    24 _LIT( KMemSpyCmdHeapDumpKernel, "CmdHeap_Dump_Kernel" );
    24 _LIT( KMemSpyCLIInputPrompt, " > %S" );
    25 _LIT( KMemSpyCmdHeapCompact, "CmdHeap_Compact" );
    25 _LIT( KMemSpyCLIWildcardCharacter, "*" );
    26 _LIT( KMemSpyCmdSWMTForceUpdate, "CmdSWMT_ForceUpdate" );
       
    27 _LIT( KMemSpyCmdSWMTReset, "CmdSWMT_Reset" );
       
    28 _LIT( KMemSpyCmdOpenFile, "CmdOpenFile" );
       
    29 _LIT( KMemSpyCmdContainer, "CmdContainer" );
       
    30 _LIT( KMemSpyCmdBitmapsSave, "CmdBitmaps_Save" );
       
    31 _LIT( KMemSpyCmdRamDisableAknIconCache, "CmdRAM_DisableAknIconCache" );
       
    32 _LIT( KMemSpyCmdOutputToFile, "CmdOutput_ToFile" );
       
    33 _LIT( KMemSpyCmdOutputToTrace, "CmdOutput_ToTrace" );
    26 
    34 
    27 // Numerical constants
       
    28 const TInt KMemSpyMaxDisplayLengthThreadName = 48;
       
    29 const TInt KMemSpyMaxDisplayLengthSizeText = 14;
       
    30 const TInt KMemSpyMaxInputBufferLength = 200;
       
    31 
    35 
    32 // Key constants (S60)
    36 _LIT( KMemSpyCmdUiSendToBackground, "CmdUI_Background" );
    33 const TInt KMemSpyUiS60KeyCodeButtonOk = 2000;
    37 _LIT( KMemSpyCmdUiBringToForeground, "CmdUI_Foreground" );
    34 const TInt KMemSpyUiS60KeyCodeButtonCancel = 2001;
       
    35 const TInt KMemSpyUiS60KeyCodeRockerEnter = 63557;
       
    36 
    38 
    37 // Status messages
    39 _LIT( KMemSpyCmdUiExit, "CmdUI_Exit" );
    38 _LIT( KOutputChangeMessage, "Change output mode opetarion in progress" );
       
    39 _LIT( KHeapDumpMessage, "Heap dump opetarion in progress" );
       
    40 _LIT( KSWMTMessage, "System Wide Memory Tracking opetarion in progress" );
       
    41 
    40 
    42 // Help text
    41 _LIT( KMemSpyCmdSWMTTypeHeap,                    "HEAP" );
    43 _LIT( KHelpMessage, "=== MemSpy CommandLineInterpreter Help ===\r\n" );
    42 _LIT( KMemSpyCmdSWMTTypeChunk,                   "CHNK" );
    44 _LIT( KHelpOutputCommand, "Change output mode to trace: 'memspy output trace'\r\n" );
    43 _LIT( KMemSpyCmdSWMTTypeCode,                    "CODE" );
    45 _LIT( KHelpOutputToFileCommand, "Change output mode to trace: 'memspy output file'\r\n" );
    44 _LIT( KMemSpyCmdSWMTTypeStack,                   "STAK" );
    46 _LIT( KHelpHeapDumpCommand, "Heap dump: 'memspy heapdup <all | kernel | user heap filter >'\r\n" );
    45 _LIT( KMemSpyCmdSWMTTypeGlobalData,              "GLOD" );
    47 _LIT( KHelpSwmtCommand, "SWMT: 'memspy swmt <starttimer <value in seconds> | stop timer | dumpnow > <categories>'\r\n" );
    46 _LIT( KMemSpyCmdSWMTTypeRamDrive,                "RAMD" );
    48 _LIT( KHelpKillServerCommand, "Kill server: 'memspy killserver'\r\n" );
    47 _LIT( KMemSpyCmdSWMTTypeOpenFile,                "FILE" );
    49 _LIT( KHelpCommand, "Press 'c' to continue" );
    48 _LIT( KMemSpyCmdSWMTTypeDiskSpace,               "DISK" );
       
    49 _LIT( KMemSpyCmdSWMTTypeHandleGeneric,           "HGEN" );
       
    50 _LIT( KMemSpyCmdSWMTTypeFbserv,                  "FABS" );
       
    51 _LIT( KMemSpyCmdSWMTTypeFileServerCache,         "F32C" );
       
    52 _LIT( KMemSpyCmdSWMTTypeSystemMemory,            "SYSM" );
       
    53 _LIT( KMemSpyCmdSWMTTypeWindowGroup,             "WNDG" );
       
    54 _LIT( KMemSpyCmdSWMTTypeHeapFilter,              "HEAPFilter:" );
    50 
    55 
    51 //new commands
       
    52 
       
    53 //HELP
       
    54 _LIT( KMemSpyCmdHelp1, "-?" );
       
    55 _LIT( KMemSpyCmdHelp2, "-h" );
       
    56 _LIT( KMemSpyCmdHelp3, "-help" );
       
    57 _LIT( KMemSpyCmdHelp4, "--help" );
       
    58 
       
    59 //OUTPUT
       
    60 _LIT( KMemSpyCmdOutput, "output" );
       
    61 _LIT( KMemSpyCmdOutputParameterTrace, "trace" );
       
    62 _LIT( KMemSpyCmdOutputParameterFile, "file" );
       
    63 //<directory> //parameter to be parsed
       
    64 
       
    65 //HEAP DUMP
       
    66 _LIT( KMemSpyCmdHeapDump, "heapdump" );
       
    67 _LIT( KMemSpyCmdHeapDumpParameterAll, "all" ); //default
       
    68 _LIT( KMemSpyCmdHeapDumpParameterKernel, "kernel" ); //kernel heap dump
       
    69 
       
    70 //SWMT
       
    71 _LIT( KMemSpyCmdSwmt, "swmt" );
       
    72 _LIT( KMemSpyCmdSwmtParameterStarttimer, "starttimer" ); //<value in seconds> optionaly
       
    73 _LIT( KMemSpyCmdSwmtParameterStoptimer, "stoptimer" );
       
    74 _LIT( KMemSpyCmdSwmtParameterDumpnow, "dumpnow" );
       
    75 
       
    76 //KILL SERVER
       
    77 _LIT( KMemSpyCmdKillServer, "killserver"); //kills the server in case of it is running
       
    78 
       
    79 //SWMT CATEGORIES (TYPES)
       
    80 _LIT( KMemSpyCmdSWMTTypeHeap,                    "heap" );
       
    81 _LIT( KMemSpyCmdSWMTTypeChunk,                   "chnk" );
       
    82 _LIT( KMemSpyCmdSWMTTypeCode,                    "code" );
       
    83 _LIT( KMemSpyCmdSWMTTypeStack,                   "stak" );
       
    84 _LIT( KMemSpyCmdSWMTTypeGlobalData,              "glob" );
       
    85 _LIT( KMemSpyCmdSWMTTypeRamDrive,                "ramd" );
       
    86 _LIT( KMemSpyCmdSWMTTypeOpenFile,                "file" );
       
    87 _LIT( KMemSpyCmdSWMTTypeDiskSpace,               "disk" );
       
    88 _LIT( KMemSpyCmdSWMTTypeHandleGeneric,           "hgen" );
       
    89 _LIT( KMemSpyCmdSWMTTypeFbserv,                  "fabs" );
       
    90 _LIT( KMemSpyCmdSWMTTypeFileServerCache,         "f32c" );
       
    91 _LIT( KMemSpyCmdSWMTTypeSystemMemory,            "sysm" );
       
    92 _LIT( KMemSpyCmdSWMTTypeWindowGroup,             "wndg" );
       
    93 _LIT( KMemSpyCmdSWMTTypeAll,					 "all"	); //default value, dumps all categories expect heap dumps	
       
    94 #endif
    56 #endif