|
1 /* |
|
2 * Copyright (c) 2008-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 "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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 /** |
|
20 @file |
|
21 @test |
|
22 @internalComponent |
|
23 */ |
|
24 |
|
25 #ifndef __TSTSTESTSUITESERVER_H__ |
|
26 #define __TSTSTESTSUITESERVER_H__ |
|
27 #include <test/testexecuteserverbase.h> |
|
28 #include <f32file.h> |
|
29 #include <usif/sts/sts.h> |
|
30 #include "testutilclientswi.h" |
|
31 |
|
32 using namespace Usif; |
|
33 |
|
34 class CStsTestServer : public CTestServer |
|
35 { |
|
36 public: |
|
37 //general test framework related stuff |
|
38 static CStsTestServer* NewL(); |
|
39 virtual CTestStep* CreateTestStep(const TDesC& aStepName); |
|
40 ~CStsTestServer(); |
|
41 |
|
42 //STS specific functions |
|
43 TStsTransactionId CreateTransactionL(TInt aPos); |
|
44 void OpenTransactionL(TInt aPos, TStsTransactionId aTransactionID); |
|
45 void CloseTransactionL(TInt aPos); |
|
46 void RegisterNewL(TInt aPos, const TDesC& aFileName); |
|
47 void CreateNewL(TInt aPos, const TDesC& aFileName, RFile &aFile, TUint aFileMode); |
|
48 void RemoveL(TInt aPos, const TDesC& aFileName); |
|
49 void RegisterTemporaryL(TInt aPos, const TDesC& aFileName); |
|
50 void CreateTemporaryL(TInt aPos, const TDesC& aFileName, RFile &aFile, TUint aFileMode); |
|
51 void OverwriteL(TInt aPos, const TDesC& aFileName, RFile &aFile, TUint aFileMode); |
|
52 void CommitL(TInt aPos); |
|
53 void RollBackL(TInt aPos); |
|
54 void RollbackAllPendingL(TInt aPos); |
|
55 |
|
56 TStsTransactionId GetTransactionIDL(TInt aPos); |
|
57 |
|
58 RTestUtilSessionSwi& GetTestUtil() {return iTestutil;} |
|
59 |
|
60 private: |
|
61 RStsSession& GetSessionL(TInt aPos); |
|
62 void ConstructL(); |
|
63 |
|
64 private: |
|
65 static const TInt maxNumberOfSessions=10; |
|
66 RStsSession iSessions[maxNumberOfSessions]; |
|
67 RTestUtilSessionSwi iTestutil; //for file manipulation in protected directories as well |
|
68 }; |
|
69 #endif |