sysstatemgmt/systemstatereferenceplugins/custcmd/src/cmdcoopsysselftest.cpp
changeset 0 4e1aa6a622a0
child 76 cb32bcc88bad
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent
       
    19  @released
       
    20 */
       
    21 
       
    22 #include "cmdcoopsysselftest.h"
       
    23 
       
    24 CCustomCmdCoopSysSelfTest* CCustomCmdCoopSysSelfTest::NewL()
       
    25 	{
       
    26 	CCustomCmdCoopSysSelfTest* self = new (ELeave) CCustomCmdCoopSysSelfTest();
       
    27 	return self;
       
    28 	}
       
    29 
       
    30 CCustomCmdCoopSysSelfTest::CCustomCmdCoopSysSelfTest()
       
    31 	{
       
    32 	}
       
    33 
       
    34 CCustomCmdCoopSysSelfTest::~CCustomCmdCoopSysSelfTest()
       
    35 	{
       
    36 	}
       
    37 
       
    38 TInt CCustomCmdCoopSysSelfTest::Initialize(CSsmCustomCommandEnv* /*aCmdEnv*/)
       
    39 	{
       
    40 	//Connect RSsmStateAdaptation
       
    41 	return iSsmStateAdaptation.Connect();
       
    42 	}
       
    43 
       
    44 void CCustomCmdCoopSysSelfTest::Close()
       
    45 	{
       
    46 	//Cancel the request if there is any
       
    47 	iSsmStateAdaptation.RequestCancel();
       
    48 
       
    49 	//Close RSsmStateAdaptation
       
    50 	iSsmStateAdaptation.Close();
       
    51 	}
       
    52 
       
    53 void CCustomCmdCoopSysSelfTest::Release()
       
    54 	{
       
    55 	delete this;
       
    56 	}
       
    57 
       
    58 void CCustomCmdCoopSysSelfTest::Execute(const TDesC8& /*aParams*/, TRequestStatus& aStatus)
       
    59 	{
       
    60 	//Request coop system to perform self test
       
    61 	iSsmStateAdaptation.RequestCoopSysSelfTest(aStatus);
       
    62 	}
       
    63 
       
    64 void CCustomCmdCoopSysSelfTest::ExecuteCancel()
       
    65 	{
       
    66 	//Cancel the request if there is any
       
    67 	iSsmStateAdaptation.RequestCancel();
       
    68 	}