memspy/CommandLine/Source/MemSpyCommandLineMain.cpp
branchRCL_3
changeset 21 52e343bb8f80
parent 20 ca8a1b6995f6
equal deleted inserted replaced
20:ca8a1b6995f6 21:52e343bb8f80
    23 #include <f32file.h>
    23 #include <f32file.h>
    24 #include <bacline.h>
    24 #include <bacline.h>
    25 
    25 
    26 // User includes
    26 // User includes
    27 #include "MemSpyCommandLine.h"
    27 #include "MemSpyCommandLine.h"
    28 #include "MemSpyCommands.h"
    28 
    29 
    29 
    30 // ---------------------------------------------------------------------------
    30 // ---------------------------------------------------------------------------
    31 // DoMainL()
    31 // DoMainL()
    32 // 
    32 // 
    33 // 
    33 // 
    36     {
    36     {
    37     // Scheduler
    37     // Scheduler
    38     CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
    38     CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
    39     CActiveScheduler::Install( scheduler );
    39     CActiveScheduler::Install( scheduler );
    40     CleanupStack::PushL( scheduler );
    40     CleanupStack::PushL( scheduler );
    41     
    41 
    42     // Get command line 
    42     // Get command line 
    43     CCommandLineArguments* args = CCommandLineArguments::NewLC();
    43     CCommandLineArguments* args = CCommandLineArguments::NewLC();
    44     
    44 
    45     //--
       
    46     CConsoleBase* console = Console::NewL( KMemSpyCLIName, TSize( KConsFullScreen, KConsFullScreen ) );
       
    47     CleanupStack::PushL( console );
       
    48     //--
       
    49     
       
    50     // Command line manager
    45     // Command line manager
    51     CMemSpyCommandLine* commandLineMgr = CMemSpyCommandLine::NewLC( *console );
    46     CMemSpyCommandLine* commandLineMgr = CMemSpyCommandLine::NewLC();
    52 
    47 
    53     // Play nicely with external processes
    48     // Play nicely with external processes
    54     RProcess::Rendezvous( KErrNone );
    49     RProcess::Rendezvous( KErrNone );
    55 
    50 
    56     // Perform op
    51     // Perform op
    57     commandLineMgr->PerformOpL( *args );  
    52     commandLineMgr->PerformOpL( *args );
    58         
    53 
    59     // Tidy up
    54     // Tidy up
    60     //CleanupStack::PopAndDestroy( 3, scheduler ); // scheduler, args, commandLineMgr
    55     CleanupStack::PopAndDestroy( 3, scheduler ); // scheduler, args, commandLineMgr
    61     CleanupStack::PopAndDestroy( 4 ); // scheduler, args,  console, commandLineMgr
       
    62     }
    56     }
    63    
    57    
    64 
    58 
    65 
    59 
    66 // ---------------------------------------------------------------------------
    60 // ---------------------------------------------------------------------------