|
1 /*------------------------------------------------------------------ |
|
2 - |
|
3 * Software Name : UserEmulator |
|
4 * Version : v4.2.1309 |
|
5 * |
|
6 * Copyright (c) 2009 France Telecom. All rights reserved. |
|
7 * This software is distributed under the License |
|
8 * "Eclipse Public License - v 1.0" the text of which is available |
|
9 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
10 * |
|
11 * Initial Contributors: |
|
12 * France Telecom |
|
13 * |
|
14 * Contributors: |
|
15 *------------------------------------------------------------------ |
|
16 - |
|
17 * File Name: Settings.h |
|
18 * |
|
19 * Created: 13/08/2009 |
|
20 * Author(s): Marcell Kiss, Reshma Sandeep Das |
|
21 * |
|
22 * Description: |
|
23 * This class is used for storing the settings information of the application |
|
24 *------------------------------------------------------------------ |
|
25 - |
|
26 * |
|
27 */ |
|
28 #ifndef SETTINGS_H |
|
29 #define SETTINGS_H |
|
30 |
|
31 //System Includes |
|
32 #include <e32base.h> // CBase |
|
33 #include <e32def.h> // TBool |
|
34 #include <aknapp.h> |
|
35 #include <s32stor.h> // CDictionaryStore |
|
36 #include <aknsettingitemlist.h> // CAknSettingItemList |
|
37 |
|
38 // User Includes |
|
39 #include "Constants.h" |
|
40 |
|
41 //Forward declarations |
|
42 class CApaApplication; |
|
43 |
|
44 //Constants |
|
45 #define KPATHLEN 512 |
|
46 |
|
47 _LIT(KDefaultPath,"C:\\Data\\TestScripts\\"); |
|
48 _LIT(KDefaultLogPath,"C:\\Data\\Logs\\UserEmulator\\UserEmulator.csv"); |
|
49 |
|
50 typedef TBuf<KBuffer256> TRandomTestAppID; |
|
51 |
|
52 /** |
|
53 * CSettings |
|
54 * This class is used for storing the settings information of the application |
|
55 */ |
|
56 class CSettings : public CBase |
|
57 { |
|
58 public: |
|
59 /** |
|
60 * Constructor |
|
61 * @param aApp Reference to CApaApplication class |
|
62 * @param aEikonEnv Reference to CEikonEnv class |
|
63 */ |
|
64 CSettings(CApaApplication& aApp, CEikonEnv* aEikonEnv); |
|
65 |
|
66 /** |
|
67 * ConstructL |
|
68 */ |
|
69 void ConstructL(); |
|
70 |
|
71 /** |
|
72 * Function to Load the User Emulator settings |
|
73 */ |
|
74 void LoadL(); |
|
75 |
|
76 /** |
|
77 * Function to Store the User Emulator settings |
|
78 */ |
|
79 void StoreL(); |
|
80 |
|
81 /** |
|
82 * Function to validate the correct drive |
|
83 * @param aPath Script/Log file path |
|
84 */ |
|
85 TInt CheckDrive(const TDesC& aPath); |
|
86 |
|
87 /** |
|
88 * Function to validate the scripts or log file path |
|
89 * @param aPath Script/Log file path |
|
90 */ |
|
91 TBool CheckPathL(const TDesC& aPath); |
|
92 |
|
93 public: |
|
94 /** |
|
95 * Scripts path |
|
96 */ |
|
97 TBuf<KPATHLEN> iScriptsPath; |
|
98 /** |
|
99 * Log file path |
|
100 */ |
|
101 TBuf<KPATHLEN> iLogPath; |
|
102 /** |
|
103 * Log status ON/OFF |
|
104 */ |
|
105 TBool iLogStatus; |
|
106 /** |
|
107 * Random test Status |
|
108 * ON : Run random test on the specified App UIDs |
|
109 * OFF: Run random test on all applications under application Menu |
|
110 */ |
|
111 TBool iRandomTestAppIdStatus; |
|
112 /** |
|
113 * Application UID |
|
114 */ |
|
115 TRandomTestAppID iRandomTestAppID; |
|
116 |
|
117 /** |
|
118 * Main screen size |
|
119 */ |
|
120 TRect iAppRect; |
|
121 private: |
|
122 /** |
|
123 * CApaApplication instance |
|
124 */ |
|
125 CApaApplication& iApp; |
|
126 /** |
|
127 * CEikEnv handle |
|
128 */ |
|
129 CEikonEnv* iEEnv; |
|
130 }; |
|
131 #endif |
|
132 |