usbmgmt/usbmgrtest/t_ncm/src/exitcommand.cpp
branchRCL_3
changeset 16 012cc2ee6408
parent 15 f92a4f87e424
equal deleted inserted replaced
15:f92a4f87e424 16:012cc2ee6408
     1 /*
       
     2 * Copyright (c) 2002-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 /** @file
       
    19  @internalComponent
       
    20  @test
       
    21  */
       
    22 
       
    23 #include "exitcommand.h"
       
    24 #include "ncmtestconsole.h"
       
    25 
       
    26 _LIT(KExitCommandDescription, "Exit");
       
    27 
       
    28 CExitCommand* CExitCommand::NewL(CUsbNcmConsole& aTestConsole, TUint aKey)
       
    29 	{
       
    30 	LOG_STATIC_FUNC_ENTRY
       
    31 	
       
    32 	CExitCommand* self = new(ELeave) CExitCommand(aTestConsole, aKey);
       
    33 	CleanupStack::PushL(self);
       
    34 	self->ConstructL();
       
    35 	CleanupStack::Pop(self);
       
    36 	return self;
       
    37 	}
       
    38 CExitCommand::~CExitCommand()
       
    39 	{
       
    40 	}
       
    41 
       
    42 CExitCommand::CExitCommand(CUsbNcmConsole& aTestConsole, TUint aKey)
       
    43 	: CNcmCommandBase(EPriorityStandard, aTestConsole, aKey)
       
    44 	{
       
    45 	}
       
    46 
       
    47 void CExitCommand::ConstructL()
       
    48 	{
       
    49 	SetDescription(KExitCommandDescription());
       
    50 	}
       
    51 
       
    52 void CExitCommand::DoCommandL()
       
    53 	{
       
    54 	LOG_FUNC
       
    55 	__FLOG_STATIC0(KSubSys, KLogComponent , _L8("CExitCommand::DoCommandL - Stop scheduler"));
       
    56 	
       
    57 	//Quit the main console
       
    58 	iTestConsole.Stop();
       
    59 	}
       
    60 
       
    61