epoc32/include/test/testexecuteclient.h
branchSymbian3
changeset 4 837f303aceeb
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
       
     1 /*
       
     2 * Copyright (c) 2005-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 /**
       
    20  @file TestExecuteClient.h
       
    21 */
       
    22 
       
    23 #if !(defined __TESTEXECUTE_CLIENT_H__)
       
    24 #define __TESTEXECUTE_CLIENT_H__
       
    25 
       
    26 #include <e32base.h>
       
    27 #include <test/tefexportconst.h>
       
    28 #include <test/blockitems.h>
       
    29 
       
    30 enum
       
    31 	{
       
    32 	EConnectServer,
       
    33 	EOpenTestStep,
       
    34 	ERunTestStep,
       
    35 	EAbortTestStep,
       
    36 	ECloseTestStep,
       
    37 	EOpenTestBlock,
       
    38 	ERunTestBlock
       
    39 	};
       
    40 
       
    41 class RTestServ : public RSessionBase
       
    42 /**
       
    43 @publishedPartner
       
    44 @test
       
    45 */
       
    46 	{
       
    47 public:
       
    48 	IMPORT_C TInt Connect(const TDesC& aServerName, TBool aDebugMode = EFalse);
       
    49 	IMPORT_C const TDesC& ServerName() const;
       
    50 protected:
       
    51 private:
       
    52 	RLibrary iLibrary;
       
    53 	TBuf<KMaxTestExecuteNameLength> iServerName;
       
    54 	TVersion Version() const;
       
    55 	};
       
    56 
       
    57 class RTestSession : public RSubSessionBase
       
    58 /**
       
    59 @publishedPartner
       
    60 @test
       
    61 */
       
    62 	{
       
    63 public:
       
    64 	IMPORT_C TInt Open(RTestServ& aServ, const TDesC& aStepName, TBool aSharedData = EFalse);
       
    65 	IMPORT_C void RunTestStep(const TDesC& aCommandString, TDes& aPanicString, TRequestStatus& aStatus);
       
    66 	IMPORT_C TInt AbortTestStep();
       
    67 	IMPORT_C void Close();
       
    68 	IMPORT_C TInt Open(RTestServ& aServ, TBool aSharedData = EFalse);
       
    69 	IMPORT_C void RunTestBlock(const TDesC& aCommandString, TDes& aPanicString, TDes8& aBlockArray, TRequestStatus& aStatus);
       
    70 	inline	RTestSession() : iBlockArrayPtr((TUint8*)(NULL),0) {}
       
    71 	
       
    72 protected:
       
    73 private:
       
    74 	TPtr8	iBlockArrayPtr;
       
    75 	};
       
    76 
       
    77 #endif