|
1 /* |
|
2 * Copyright (c) 2002 - 2007 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 "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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef IMCACHE_TEST_H |
|
21 #define IMCACHE_TEST_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <StifLogger.h> |
|
25 #include <TestScripterInternal.h> |
|
26 #include <StifTestModule.h> |
|
27 // imcache |
|
28 #include "mimcacheeventhandler.h" |
|
29 #include "mimcacheeventhandler.h" |
|
30 #include <imcachedefs.h> |
|
31 |
|
32 // CONSTANTS |
|
33 //const ?type ?constant_var = ?constant; |
|
34 |
|
35 // MACROS |
|
36 //#define ?macro ?macro_def |
|
37 // Logging path |
|
38 _LIT( Kimcache_testLogPath, "\\logs\\testframework\\imcache_test\\" ); |
|
39 // Log file |
|
40 _LIT( Kimcache_testLogFile, "imcache_test.txt" ); |
|
41 _LIT( Kimcache_testLogFileWithTitle, "imcache_test_[%S].txt" ); |
|
42 |
|
43 // FUNCTION PROTOTYPES |
|
44 //?type ?function_name(?arg_list); |
|
45 |
|
46 // FORWARD DECLARATIONS |
|
47 //class ?FORWARD_CLASSNAME; |
|
48 class Cimcache_test; |
|
49 class CIMCacheFactory; |
|
50 class MIMCacheEventHandler; |
|
51 |
|
52 // DATA TYPES |
|
53 //enum ?declaration |
|
54 //typedef ?declaration |
|
55 //extern ?data_type; |
|
56 |
|
57 // CLASS DECLARATION |
|
58 |
|
59 /** |
|
60 * Cimcache_test test class for STIF Test Framework TestScripter. |
|
61 * ?other_description_lines |
|
62 * |
|
63 * @lib ?library |
|
64 * @since ?Series60_version |
|
65 */ |
|
66 NONSHARABLE_CLASS(Cimcache_test) : public CScriptBase, |
|
67 public MIMCacheEventHandler |
|
68 { |
|
69 public: // Constructors and destructor |
|
70 |
|
71 /** |
|
72 * Two-phased constructor. |
|
73 */ |
|
74 static Cimcache_test* NewL( CTestModuleIf& aTestModuleIf ); |
|
75 |
|
76 /** |
|
77 * Destructor. |
|
78 */ |
|
79 virtual ~Cimcache_test(); |
|
80 |
|
81 public: // New functions |
|
82 |
|
83 /** |
|
84 * ?member_description. |
|
85 * @since ?Series60_version |
|
86 * @param ?arg1 ?description |
|
87 * @return ?description |
|
88 */ |
|
89 //?type ?member_function( ?type ?arg1 ); |
|
90 |
|
91 public: // Functions from base classes |
|
92 |
|
93 /** |
|
94 * From CScriptBase Runs a script line. |
|
95 * @since ?Series60_version |
|
96 * @param aItem Script line containing method name and parameters |
|
97 * @return Symbian OS error code |
|
98 */ |
|
99 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
100 |
|
101 protected: // New functions |
|
102 |
|
103 /** |
|
104 * ?member_description. |
|
105 * @since ?Series60_version |
|
106 * @param ?arg1 ?description |
|
107 * @return ?description |
|
108 */ |
|
109 //?type ?member_function( ?type ?arg1 ); |
|
110 |
|
111 protected: // Functions from base classes |
|
112 |
|
113 /** |
|
114 * From ?base_class ?member_description |
|
115 */ |
|
116 //?type ?member_function(); |
|
117 |
|
118 private: |
|
119 |
|
120 /** |
|
121 * C++ default constructor. |
|
122 */ |
|
123 Cimcache_test( CTestModuleIf& aTestModuleIf ); |
|
124 |
|
125 /** |
|
126 * By default Symbian 2nd phase constructor is private. |
|
127 */ |
|
128 void ConstructL(); |
|
129 |
|
130 // Prohibit copy constructor if not deriving from CBase. |
|
131 // ?classname( const ?classname& ); |
|
132 // Prohibit assigment operator if not deriving from CBase. |
|
133 // ?classname& operator=( const ?classname& ); |
|
134 |
|
135 /** |
|
136 * Frees all resources allocated from test methods. |
|
137 * @since ?Series60_version |
|
138 */ |
|
139 void Delete(); |
|
140 |
|
141 /** |
|
142 * Test methods are listed below. |
|
143 */ |
|
144 |
|
145 |
|
146 //ADD NEW METHOD DEC HERE |
|
147 //[TestMethods] - Do not remove |
|
148 |
|
149 virtual TInt CreateSameUpdaterL( CStifItemParser& aItem ); |
|
150 |
|
151 virtual TInt CreateDifferentUpdaterL( CStifItemParser& aItem ); |
|
152 |
|
153 virtual TInt CreateSameAccessorL( CStifItemParser& aItem ); |
|
154 |
|
155 virtual TInt CreateDifferentAccessorL( CStifItemParser& aItem ); |
|
156 |
|
157 virtual TInt StartNewConversationL( CStifItemParser& aItem ) ; |
|
158 |
|
159 virtual TInt AppendSendMessageL( CStifItemParser& aItem ) ; |
|
160 |
|
161 virtual TInt AppendRecieveMessageL( CStifItemParser& aItem ) ; |
|
162 |
|
163 virtual TInt FetchExistingMessageL( CStifItemParser& aItem ); |
|
164 |
|
165 virtual TInt DeactivateConversationL( CStifItemParser& aItem ); |
|
166 |
|
167 virtual TInt CloseConversationL( CStifItemParser& aItem ); |
|
168 |
|
169 virtual TInt GetUnreadMsgCountL(CStifItemParser& aItem) ; |
|
170 |
|
171 virtual TInt GetNewMsgNotificationtL(CStifItemParser& aItem) ; |
|
172 |
|
173 virtual TInt ConversationUnExistTestL(CStifItemParser& aItem) ; |
|
174 |
|
175 virtual TInt ConversationExistTestL(CStifItemParser& aItem) ; |
|
176 |
|
177 virtual TInt AppendMessageL( CStifItemParser& aItem); |
|
178 |
|
179 virtual TInt GetAllUnreadMsgCountL( CStifItemParser& aItem); |
|
180 |
|
181 |
|
182 virtual TInt GetChatListTestL( CStifItemParser& aItem); |
|
183 |
|
184 virtual TInt AccessorCloseConversationTestL( CStifItemParser& aItem); |
|
185 |
|
186 |
|
187 |
|
188 public: // MIMCacheEventHandler |
|
189 |
|
190 /** |
|
191 * Gets called when data update is available. |
|
192 * Client can then decide wether to use the old one |
|
193 * or the updated one. |
|
194 * @param aNewMessage, new message details |
|
195 */ |
|
196 void HandleIMCacheEventL(TIMCacheEventType aEvent, TAny* aChatMessage = NULL ) ; |
|
197 |
|
198 |
|
199 protected: // Data |
|
200 // ?one_line_short_description_of_data |
|
201 //?data_declaration; |
|
202 |
|
203 private: // Data |
|
204 |
|
205 CActiveSchedulerWait iWait; |
|
206 |
|
207 TInt iMessageFetch; |
|
208 // ?one_line_short_description_of_data |
|
209 //?data_declaration; |
|
210 |
|
211 // Reserved pointer for future extension |
|
212 //TAny* iReserved; |
|
213 |
|
214 public: // Friend classes |
|
215 //?friend_class_declaration; |
|
216 protected: // Friend classes |
|
217 //?friend_class_declaration; |
|
218 private: // Friend classes |
|
219 //?friend_class_declaration; |
|
220 |
|
221 }; |
|
222 |
|
223 #endif // IMCACHE_TEST_H |
|
224 |
|
225 // End of File |