|
1 // Copyright (c) 2005-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 __GRAPHICSTESTUTILS_H__ |
|
23 #define __GRAPHICSTESTUTILS_H__ |
|
24 |
|
25 #include <e32std.h> |
|
26 |
|
27 typedef TUint8 TWipeItems; |
|
28 |
|
29 _LIT(KTestServerName,"!GraphicsTestUtilsServer"); |
|
30 _LIT(KTestServerImg,"GraphicsTestUtilsServer"); // EXE name |
|
31 |
|
32 |
|
33 enum TSmlProfileTransportType |
|
34 { |
|
35 ELocalTransport, |
|
36 ENetworkTransport, |
|
37 }; |
|
38 |
|
39 class RSmlTestUtils : public RSessionBase |
|
40 { |
|
41 public: |
|
42 IMPORT_C TInt Connect(); |
|
43 IMPORT_C void SetDevIdL(const TDesC8& aDevId); |
|
44 IMPORT_C void GetDevIdL(TDes8& aDevId); |
|
45 IMPORT_C TInt WipeDataStoreL(TWipeItems aItemsToClean); |
|
46 IMPORT_C TInt RenameDirectoryL(const TDesC16& aSrc,const TDesC16& aDest); |
|
47 IMPORT_C TInt CreateDirectoryL(const TDesC& aPath); |
|
48 IMPORT_C TInt DeleteDirectoryL(const TDesC& aPath); |
|
49 IMPORT_C TInt CreateFileL(const TDesC& aPath); |
|
50 IMPORT_C TInt DeleteFileUsingWildcardL(const TDesC& aPath); |
|
51 IMPORT_C TInt DeleteFileL(const TDesC& aPath); |
|
52 IMPORT_C TInt CopyFileL(const TDesC& aSrc,const TDesC& aDest); |
|
53 IMPORT_C TInt ReplaceFileL(const TDesC& aName,TUint aFileMode); |
|
54 IMPORT_C TInt IsFilePresent(const TDesC& aName, TBool &aPresent); |
|
55 IMPORT_C TInt GetAtt( const TDesC &aName, TUint &aAttValue ); |
|
56 IMPORT_C TInt SetAtt( const TDesC &aName, TUint aSetAttMask, TUint aClearAttMask ); |
|
57 IMPORT_C void SetHomeTimeL(const TTime aTime); |
|
58 IMPORT_C TInt SetReadOnly(const TDesC& aName,TUint aSetAttMask); |
|
59 IMPORT_C TInt CopyDirectoryL(const TDesC& aSource,const TDesC& aTarget); |
|
60 IMPORT_C TInt ChangeFilePermissionL(const TDesC& aPath); |
|
61 |
|
62 }; |
|
63 |
|
64 enum TSmlTestUtilsService //Services provided by the SmlTestUtils server |
|
65 { |
|
66 EChangeDevId, |
|
67 EGetDevId, |
|
68 EWipeDataStore, |
|
69 ECreateDir, |
|
70 ERenameDir, |
|
71 EDeleteDir, |
|
72 ECreateFile, |
|
73 EDeleteFile, |
|
74 EDeleteFileUsingWildcard, |
|
75 ECreateDSJob, |
|
76 EStopDSJob, |
|
77 ECreateDSProfile, |
|
78 ESetHomeTime, |
|
79 ECopyFile, |
|
80 EReplaceFile, |
|
81 EIsFilePresent, |
|
82 ESetReadOnly, |
|
83 EGetAttributes, |
|
84 ESetAttributes, |
|
85 ECopyDirectory, |
|
86 EChangeFilePermission, |
|
87 |
|
88 }; |
|
89 |
|
90 enum TStoreType //Types of store that can be deleted using WipeDataStoreL() |
|
91 { |
|
92 ECenRep = 0x01, |
|
93 ELocalSDS = 0x02, |
|
94 EDMTree = 0x04, |
|
95 ECenRepFiles = 0x08,// Deletes all the cen rep data files. This is a lengthy and volatile operation |
|
96 // and should be used with caution. Note that this is not covered by "EAll" |
|
97 // and should be called explicitly |
|
98 ESDS = ELocalSDS | ECenRep, |
|
99 EAll = 0xff |
|
100 }; |
|
101 |
|
102 #endif |