32
|
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 OBEXSERVAPITEST_H
|
|
21 |
#define OBEXSERVAPITEST_H
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include <StifLogger.h>
|
|
25 |
#include <TestScripterInternal.h>
|
|
26 |
#include <StifTestModule.h>
|
|
27 |
#include <ObexUtilsMessageHandler.h>
|
|
28 |
#include "testlogger.h"
|
|
29 |
|
|
30 |
|
|
31 |
// FORWARD DECLARATIONS
|
|
32 |
class CObexServAPItest;
|
|
33 |
|
|
34 |
|
|
35 |
// CLASS DECLARATION
|
|
36 |
|
|
37 |
/**
|
|
38 |
* CObexServAPItest test class for STIF Test Framework TestScripter.
|
|
39 |
*/
|
|
40 |
NONSHARABLE_CLASS(CObexServAPItest) : public CScriptBase
|
|
41 |
{
|
|
42 |
public: // Constructors and destructor
|
|
43 |
|
|
44 |
/**
|
|
45 |
* Two-phased constructor.
|
|
46 |
*/
|
|
47 |
static CObexServAPItest* NewL( CTestModuleIf& aTestModuleIf );
|
|
48 |
|
|
49 |
/**
|
|
50 |
* Destructor.
|
|
51 |
*/
|
|
52 |
virtual ~CObexServAPItest();
|
|
53 |
|
|
54 |
public: // New functions
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
public: // Functions from base classes
|
|
59 |
|
|
60 |
/**
|
|
61 |
* From CScriptBase Runs a script line.
|
|
62 |
* @since ?Series60_version
|
|
63 |
* @param aItem Script line containing method name and parameters
|
|
64 |
* @return Symbian OS error code
|
|
65 |
*/
|
|
66 |
virtual TInt RunMethodL( CStifItemParser& aItem );
|
|
67 |
|
|
68 |
|
|
69 |
|
|
70 |
private:
|
|
71 |
|
|
72 |
/**
|
|
73 |
* C++ default constructor.
|
|
74 |
*/
|
|
75 |
CObexServAPItest( CTestModuleIf& aTestModuleIf );
|
|
76 |
|
|
77 |
/**
|
|
78 |
* By default Symbian 2nd phase constructor is private.
|
|
79 |
*/
|
|
80 |
void ConstructL();
|
|
81 |
|
|
82 |
// Prohibit copy constructor if not deriving from CBase.
|
|
83 |
// ?classname( const ?classname& );
|
|
84 |
// Prohibit assigment operator if not deriving from CBase.
|
|
85 |
// ?classname& operator=( const ?classname& );
|
|
86 |
|
|
87 |
/**
|
|
88 |
* Frees all resources allocated from test methods.
|
|
89 |
* @since ?Series60_version
|
|
90 |
*/
|
|
91 |
void Delete();
|
|
92 |
|
|
93 |
void TestCompleted( TInt aErr, const TUint8* aFunc, const TDesC& aArg );
|
|
94 |
|
|
95 |
/**
|
|
96 |
* Test methods are listed below.
|
|
97 |
*/
|
|
98 |
|
|
99 |
/**
|
|
100 |
* Test code for getting file system status.
|
|
101 |
* @since ?Series60_version
|
|
102 |
* @param aItem Script line containing parameters.
|
|
103 |
* @return Symbian OS error code.
|
|
104 |
*/
|
|
105 |
virtual TInt GetFileSystemStatusL( CStifItemParser& aItem );
|
|
106 |
|
|
107 |
/**
|
|
108 |
* Test code for getting mmc file system status.
|
|
109 |
* @since ?Series60_version
|
|
110 |
* @param aItem Script line containing parameters.
|
|
111 |
* @return Symbian OS error code.
|
|
112 |
*/
|
|
113 |
virtual TInt GetMmcFileSystemStatusL( CStifItemParser& aItem );
|
|
114 |
|
|
115 |
/**
|
|
116 |
* Test code for getting message center drive.
|
|
117 |
* @since ?Series60_version
|
|
118 |
* @param aItem Script line containing parameters.
|
|
119 |
* @return Symbian OS error code.
|
|
120 |
*/
|
|
121 |
virtual TInt GetMessageCentreDriveL( CStifItemParser& aItem );
|
|
122 |
|
|
123 |
/**
|
|
124 |
* Test code for creating Default MTM services.
|
|
125 |
* @since ?Series60_version
|
|
126 |
* @param aItem Script line containing parameters.
|
|
127 |
* @return Symbian OS error code.
|
|
128 |
*/
|
|
129 |
virtual TInt CreateDefaultMtmServiceL( CStifItemParser& aItem );
|
|
130 |
|
|
131 |
/**
|
|
132 |
* Test code for Getting CenRep key. .
|
|
133 |
* @since ?Series60_version
|
|
134 |
* @param aItem Script line containing parameters.
|
|
135 |
* @return Symbian OS error code.
|
|
136 |
*/
|
|
137 |
virtual TInt GetCenRepKeyIntValueL( CStifItemParser& aItem );
|
|
138 |
|
|
139 |
/**
|
|
140 |
* Test code for Getting PubSub key.
|
|
141 |
* @since ?Series60_version
|
|
142 |
* @param aItem Script line containing parameters.
|
|
143 |
* @return Symbian OS error code.
|
|
144 |
*/
|
|
145 |
virtual TInt GetPubSubKeyIntValueL( CStifItemParser& aItem );
|
|
146 |
|
|
147 |
/**
|
|
148 |
* Test code for Creating outbox entry.
|
|
149 |
* @since ?Series60_version
|
|
150 |
* @param aItem Script line containing parameters.
|
|
151 |
* @return Symbian OS error code.
|
|
152 |
*/
|
|
153 |
virtual TInt CreateOutBoxEntryL( CStifItemParser& aItem );
|
|
154 |
|
|
155 |
/**
|
|
156 |
* Test code for removing outbox entry.
|
|
157 |
* @since ?Series60_version
|
|
158 |
* @param aItem Script line containing parameters.
|
|
159 |
* @return Symbian OS error code.
|
|
160 |
*/
|
|
161 |
virtual TInt RemoveOutBoxEntryL( CStifItemParser& aItem );
|
|
162 |
|
|
163 |
/**
|
|
164 |
* Test code for save received file to inbox.
|
|
165 |
* @since ?Series60_version
|
|
166 |
* @param aItem Script line containing parameters.
|
|
167 |
* @return Symbian OS error code.
|
|
168 |
*/
|
|
169 |
virtual TInt SaveObjToInboxL( CStifItemParser& aItem );
|
|
170 |
|
|
171 |
/**
|
|
172 |
* Test code for creating entry to inbox.
|
|
173 |
* @since ?Series60_version
|
|
174 |
* @param aItem Script line containing parameters.
|
|
175 |
* @return Symbian OS error code.
|
|
176 |
*/
|
|
177 |
virtual TInt CreateEntryToInboxL( CStifItemParser& aItem );
|
|
178 |
|
|
179 |
/**
|
|
180 |
* Test code for creating entry to inbox.
|
|
181 |
* @since ?Series60_version
|
|
182 |
* @param aItem Script line containing parameters.
|
|
183 |
* @return Symbian OS error code.
|
|
184 |
*/
|
|
185 |
virtual TInt SaveRFileObjectToInboxL( CStifItemParser& aItem );
|
|
186 |
|
|
187 |
/**
|
|
188 |
* Test code for removing entry to inbox.
|
|
189 |
* @since ?Series60_version
|
|
190 |
* @param aItem Script line containing parameters.
|
|
191 |
* @return Symbian OS error code.
|
|
192 |
*/
|
|
193 |
virtual TInt RemoveObjectL( CStifItemParser& aItem );
|
|
194 |
|
|
195 |
TInt CObexServAPItest::GetCenRepKeyStringValueL( CStifItemParser& aItem );
|
|
196 |
TInt CObexServAPItest::CreateReceiveBufferAndRFileL( CStifItemParser& aItem );
|
|
197 |
TInt CObexServAPItest::SaveFileToFileSystemL( CStifItemParser& aItem );
|
|
198 |
TInt CObexServAPItest::AddEntryToInboxL( CStifItemParser& aItem );
|
|
199 |
TInt CObexServAPItest::UpdateEntryAttachmentL( CStifItemParser& aItem );
|
|
200 |
TInt CObexServAPItest::RemoveTemporaryRFileL( CStifItemParser& aItem );
|
|
201 |
|
|
202 |
private: // Data
|
|
203 |
|
|
204 |
/**
|
|
205 |
* A dummy class for opening CMsvSession.
|
|
206 |
*/
|
|
207 |
class CDummySessionObserver : public CBase , public MMsvSessionObserver
|
|
208 |
{
|
|
209 |
public:
|
|
210 |
void HandleSessionEventL( TMsvSessionEvent/*aEvent*/,
|
|
211 |
TAny* /*aArg1*/,
|
|
212 |
TAny* /*aArg2*/,
|
|
213 |
TAny* /*aArg3*/ ) {};
|
|
214 |
};
|
|
215 |
|
|
216 |
|
|
217 |
|
|
218 |
TMsvId iMessageServerIndex;
|
|
219 |
CObexBufObject* iObexObject;
|
|
220 |
RFs iRFs;
|
|
221 |
RFile iFile;
|
|
222 |
CBufFlat* iBuf;
|
|
223 |
CObexTestLogger* iTestLogger;
|
|
224 |
TFileName iCenRepFolder;
|
|
225 |
TFileName iTempFullPathFilename;
|
|
226 |
};
|
|
227 |
|
|
228 |
#endif // OBEXSERVAPITEST_H
|
|
229 |
|
|
230 |
// End of File
|