First public contribution.
2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
21 #if (!defined __CAF_STEP_H__)
22 #define __CAF_STEP_H__
23 #include <test/testexecutestepbase.h>
26 class CApaDataRecognizerType;
29 //Base class used to provide utility functions availble to test step classes
30 class CCAFStep : public CTestStep
37 * Convert a 16-bit descriptor to an 8-bit descriptor
38 * A new HBufC8 is allocated to store the new version of the descriptor
39 * @param source a descriptor derived from TDesC16
40 * @return a new HBufC8 with a copy of the data in source
42 HBufC8* ConvertDes16toHBufC8LC(TDesC& source);
45 * Convert a 8-bit descriptor to an 16-bit descriptor
46 * A new HBufC16 is allocated to store the new version of the descriptor
47 * @param source a descriptor derived from TDesC8
48 * @return a new HBufC16 with a copy of the data in source
50 HBufC16* ConvertDes8toHBufC16LC(TDesC8& source);
52 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
55 * Utility method which creates dummy header data for WMDRM operations.
56 * @return A new HBufC8 allocated which contains the header data.
58 HBufC8* CreateWmdrmHeaderLC();
60 #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
63 * Load CAFRECOGNIZER.MDL and create an instance of CApaCafRecognizer that can be used
66 void LoadCafRecognizerL();
69 * Delete the instance of CApaCafRecognizer and unload the CAFRECOGNIZER.MDL library
71 void UnLoadCafRecognizer();
74 * Implementation of CTestStep virtual functions, create and install a CActiveScheduler
76 virtual TVerdict doTestStepPreambleL();
79 * Implementation of CTestStep virtual functions, uninstalls and removes the CActiveScheduler
81 virtual TVerdict doTestStepPostambleL();
84 TInt Delete(const TDesC& aFile);
88 * Open the file and read data into the buffer up until the length of the buffer
89 * aBuffer.Length() will be set to the length of data read
90 * @param aFileName the file to read from
91 * @param aBuffer the buffer to read into
93 void ReadBufferL(TDesC16& aFileName, TDes8& aBuffer);
95 /* Starts the Apparc server (for use by CSupplier tests)
97 void StartApparcServerL();
99 CApaDataRecognizerType *iRecognizer;
101 /** Is called to initialise the following parameters
103 void InitialiseFileHandleParametersL();
109 TInt iExpectedResult;
112 CActiveScheduler *iActiveScheduler;