|
1 // Copyright (c) 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 the License "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 #include <e32def.h> |
|
18 #include <e32property.h> |
|
19 |
|
20 #define __E32TEST_EXTENSION__ |
|
21 #include <e32test.h> |
|
22 |
|
23 |
|
24 #include "rfsydebug.h" |
|
25 |
|
26 |
|
27 static const TUid KFsyPropertyCat={0x10210EB3}; |
|
28 |
|
29 extern RTest test; |
|
30 |
|
31 |
|
32 RFsyDebug::RFsyDebug(TInt aDriveNo) |
|
33 : iDriveNo(aDriveNo) |
|
34 { |
|
35 //-- define a propery which will control mount process in the fsy. |
|
36 //-- The property key is a drive number being tested |
|
37 |
|
38 _LIT_SECURITY_POLICY_PASS(KTestPropPolicy); |
|
39 TInt res = RProperty::Define(KFsyPropertyCat, |
|
40 iDriveNo, |
|
41 RProperty::EInt, |
|
42 KTestPropPolicy, |
|
43 KTestPropPolicy); |
|
44 |
|
45 test(res == KErrNone || res == KErrAlreadyExists); |
|
46 } |
|
47 |
|
48 RFsyDebug::~RFsyDebug() |
|
49 { |
|
50 TInt res = RProperty::Delete(KFsyPropertyCat, iDriveNo); |
|
51 test_KErrNone(res); |
|
52 } |
|
53 |
|
54 /** set a debug property value, which then will be read by FAT fsy */ |
|
55 void RFsyDebug::Set(TUint32 aFlags) |
|
56 { |
|
57 TInt res = RProperty::Set(KFsyPropertyCat, iDriveNo, aFlags); |
|
58 test_KErrNone(res); |
|
59 } |
|
60 |
|
61 |
|
62 void RFsyDebug::DisableAll() |
|
63 { |
|
64 TInt res = RProperty::Set(KFsyPropertyCat, iDriveNo, static_cast<TInt>(KMntProp_DisableALL)); |
|
65 test_KErrNone(res); |
|
66 } |
|
67 |
|
68 |