1 /* |
|
2 * Copyright (c) 2002-2004 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 |
|
21 #ifndef NOTIFY_H |
|
22 #define NOTIFY_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <stiflogger.h> |
|
26 #include <testscripterinternal.h> |
|
27 #include <stiftestmodule.h> |
|
28 #include "core.h" |
|
29 |
|
30 |
|
31 // CONSTANTS |
|
32 |
|
33 // MACROS |
|
34 |
|
35 // Logging path |
|
36 _LIT( KNotifyLogPath, "\\logs\\testframework\\Notify\\" ); |
|
37 // Log file |
|
38 _LIT( KNotifyLogFile, "Notify.txt" ); |
|
39 |
|
40 |
|
41 // FORWARD DECLARATIONS |
|
42 class CNotify; |
|
43 class CCore; |
|
44 |
|
45 |
|
46 // CLASS DECLARATION |
|
47 class CNotify : public CScriptBase |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 */ |
|
54 static CNotify* NewL( CTestModuleIf& aTestModuleIf ); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 virtual ~CNotify(); |
|
60 |
|
61 |
|
62 public: // Functions from base classes |
|
63 |
|
64 /** |
|
65 * From CScriptBase Runs a script line. |
|
66 * @since Series60_version 2.8 |
|
67 * @param aItem Script line containing method name and parameters |
|
68 * @return Symbian OS error code |
|
69 */ |
|
70 TInt RunMethodL( CStifItemParser& aItem ); |
|
71 |
|
72 /** |
|
73 * Handles async calls |
|
74 * @since Series60_version 2.8 |
|
75 * @param aItem Script line containing method name and parameters |
|
76 * @return Symbian OS error code |
|
77 */ |
|
78 TInt UseObjectAddress( CStifItemParser& aItem ); |
|
79 |
|
80 protected: // New functions |
|
81 |
|
82 /** |
|
83 * Directs script call to correct functions |
|
84 * @since Series60_version 2.8 |
|
85 * @param aCount number of functions |
|
86 * @return Pointer to stif function info |
|
87 */ |
|
88 const TStifFunctionInfo* RunMethodCases( TInt& aCount ); |
|
89 |
|
90 private: |
|
91 |
|
92 /** |
|
93 * C++ default constructor. |
|
94 */ |
|
95 CNotify( CTestModuleIf& aTestModuleIf ); |
|
96 |
|
97 /** |
|
98 * By default Symbian 2nd phase constructor is private. |
|
99 */ |
|
100 void ConstructL(); |
|
101 |
|
102 /** |
|
103 * Frees all resources allocated from test methods. |
|
104 * @since ?Series60_version |
|
105 */ |
|
106 void Delete(); |
|
107 |
|
108 /** |
|
109 * Core functions, enumerates |
|
110 * @since Series60_version 2.8 |
|
111 * @param aItem reference to descriptor holding data |
|
112 * @return enumral from core class |
|
113 */ |
|
114 CCore::TNotifyList MapScriptToEnum( const TDesC& aItem ); |
|
115 |
|
116 public: // Data |
|
117 |
|
118 //Pointer to logger |
|
119 CStifLogger* iNotifyLog; |
|
120 |
|
121 private: // Data |
|
122 |
|
123 |
|
124 /** |
|
125 * TBoolean hold information async call / cancellation |
|
126 * when true request is called |
|
127 * when false cancel request is called |
|
128 */ |
|
129 TBool iRequest; |
|
130 |
|
131 //Pointer to core |
|
132 CCore* iCore; |
|
133 |
|
134 //TNotifyList variable from core class |
|
135 CCore::TNotifyList iNotify; |
|
136 |
|
137 public: // Friend classes |
|
138 //?friend_class_declaration; |
|
139 protected: // Friend classes |
|
140 //?friend_class_declaration; |
|
141 private: // Friend classes |
|
142 //?friend_class_declaration; |
|
143 |
|
144 }; |
|
145 |
|
146 #endif // NOTIFY_H |
|
147 |
|
148 // End of File |
|