|
1 // Copyright (c) 2004-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 "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 #ifndef __TEST_GET_FILENAME_FROM_URI_STEP_H__ |
|
17 #define __TEST_GET_FILENAME_FROM_URI_STEP_H__ |
|
18 |
|
19 // User Include |
|
20 #include "TestFileUriServer.h" |
|
21 |
|
22 /** |
|
23 The test step that tests GetFileNameL method, that obtains the |
|
24 file-path and name, for a URI specified in the ini file. |
|
25 @internalTechnology |
|
26 */ |
|
27 class CTestGetFileNameFromUriStep : public CTestStep |
|
28 { |
|
29 public: |
|
30 CTestGetFileNameFromUriStep(); |
|
31 |
|
32 // TEF pure virtual |
|
33 virtual enum TVerdict doTestStepL(); |
|
34 |
|
35 private: |
|
36 void DoTestL(const TPtrC& aFileUri, const TPtrC& aExpectedFileName, const TPtrC& aFileType, TPtrC& aDrive, const TInt& aCharacterSet); |
|
37 |
|
38 template <class TUriParserType, class HBufCType> |
|
39 void ExtractFileNameAndCompareL(TUriParserType& uriParser8Or16, HBufCType*& fileUri8Or16, const TPtrC& aFileUri, const TFileName& aFullyQualifiedName, const TPtrC& aFileType, const TBool& aFileNotFound); |
|
40 |
|
41 TInt CreateFullyQualifiedName(const TPtrC& aRelativeName, const TPtrC& aDrive, TFileName& aFullyQualifiedName); |
|
42 |
|
43 }; |
|
44 |
|
45 /*@{*/ |
|
46 // Literal constant defined for identifying step name |
|
47 _LIT(KTestGetFileNameFromUriStep, "TestGetFileNameFromUriStep"); |
|
48 /*@}*/ |
|
49 |
|
50 #endif // __TEST_GET_FILENAME_FROM_URI_STEP_H__ |