diff -r 000000000000 -r 4e1aa6a622a0 sysstatemgmt/systemstatemgr/test/testapps/inc/ssmtestprocgoodsession.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sysstatemgmt/systemstatemgr/test/testapps/inc/ssmtestprocgoodsession.h Tue Feb 02 00:53:00 2010 +0200 @@ -0,0 +1,68 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +/** + @file + @test + @internalComponent - Internal Symbian test code +*/ + +#ifndef __SSMTESTPROCGOODSESSION_H +#define __SSMTESTPROCGOODSESSION_H + +#include +#include +#include "ssmtestapps.h" + +/** If KTestProcGood is launched with this command line parameter, it will start a CServer2 */ +_LIT(KLaunchServerCommandLineOption, "-server"); + +/** If KTestProcGood is launched with this command line parameter, it will not rendevouz */ +_LIT(KTestProcGoodNoRendevouz, "-norv"); + +/** If KTestProcGood is launched with this command line parameter, it will exit with reason +KErrAbort immediately after rendevouz */ +_LIT(KFailAfterRendevouzCommandLineOption, "-failafterrv"); + +enum TMessages + { + EMonitorSelf, + ECancelMonitor, + EShutDown + }; + +class RTestProcGoodSession : public RSessionBase + { +public: + //from RSessionBase + inline TInt Connect() + { + return RSessionBase::CreateSession(KTestProcGood, TVersion(0,0,0)); + } + inline TInt MonitorSelf(TRecoveryMethod aRecoveryMethod) + { + return SendReceive(EMonitorSelf, TIpcArgs((TInt)aRecoveryMethod)); + } //lint !e1762 + inline TInt CancelMonitor() + { + return SendReceive(ECancelMonitor, TIpcArgs(TIpcArgs::ENothing)); + } //lint !e1762 + inline TInt ShutDown() + { + return SendReceive(EShutDown, TIpcArgs(TIpcArgs::ENothing)); + } //lint !e1762 + }; + +#endif // __SSMTESTPROCGOODSESSION_H