sysstatemgmt/systemstatemgr/test/testapps/inc/ssmtestprocgoodsession.h
changeset 0 4e1aa6a622a0
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  @test
       
    19  @internalComponent - Internal Symbian test code
       
    20 */
       
    21 
       
    22 #ifndef __SSMTESTPROCGOODSESSION_H
       
    23 #define __SSMTESTPROCGOODSESSION_H
       
    24 
       
    25 #include <e32std.h>
       
    26 #include <startup.hrh>
       
    27 #include "ssmtestapps.h"
       
    28 
       
    29 /** If KTestProcGood is launched with this command line parameter, it will start a CServer2 */
       
    30 _LIT(KLaunchServerCommandLineOption, "-server");
       
    31 
       
    32 /** If KTestProcGood is launched with this command line parameter, it will not rendevouz */
       
    33 _LIT(KTestProcGoodNoRendevouz, "-norv");
       
    34 
       
    35 /** If KTestProcGood is launched with this command line parameter, it will exit with reason 
       
    36 KErrAbort immediately after rendevouz */
       
    37 _LIT(KFailAfterRendevouzCommandLineOption, "-failafterrv");
       
    38 
       
    39 enum TMessages
       
    40 	{
       
    41 	EMonitorSelf,
       
    42 	ECancelMonitor,
       
    43 	EShutDown
       
    44 	};
       
    45 
       
    46 class RTestProcGoodSession : public RSessionBase
       
    47 	{
       
    48 public:
       
    49 	//from RSessionBase
       
    50 	inline TInt Connect()
       
    51 		{
       
    52 		return RSessionBase::CreateSession(KTestProcGood, TVersion(0,0,0));
       
    53 		}
       
    54 	inline TInt MonitorSelf(TRecoveryMethod aRecoveryMethod)
       
    55 		{
       
    56 		return SendReceive(EMonitorSelf, TIpcArgs((TInt)aRecoveryMethod));
       
    57 		} //lint !e1762
       
    58 	inline TInt CancelMonitor()
       
    59 		{
       
    60 		return SendReceive(ECancelMonitor, TIpcArgs(TIpcArgs::ENothing));
       
    61 		} //lint !e1762
       
    62 	inline TInt ShutDown()
       
    63 		{
       
    64 		return SendReceive(EShutDown, TIpcArgs(TIpcArgs::ENothing));
       
    65 		} //lint !e1762
       
    66 	};
       
    67 
       
    68 #endif // __SSMTESTPROCGOODSESSION_H