genericservices/httputils/Test/Integration/TestFileUriSuite/TestFileUriServer.h
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     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__FILE_URI_SERVER_H__
       
    17 #define __TEST__FILE_URI_SERVER_H__
       
    18 
       
    19 // Epoc Include
       
    20 // For accessing TEF classes 
       
    21 #include <testexecuteserverbase.h>
       
    22 
       
    23 /*@{*/
       
    24 // Literal constants for INI file field-names
       
    25 _LIT(KIniFileName, 			"filename"			);
       
    26 _LIT(KIniFileUri, 			"fileuri"			);
       
    27 _LIT(KIniExpectedFileName, 	"expectedfilename"	);
       
    28 _LIT(KIniExpectedFileUri, 	"expectedfileuri"	);
       
    29 _LIT(KIniFileType, 			"filetype"			);
       
    30 _LIT(KIniCharacterSet, 		"characterset"		);
       
    31 _LIT(KIniDrive, 			"drive"				);
       
    32 /*@}*/
       
    33 
       
    34 /*@{*/
       
    35 // Literal constants used by some test steps
       
    36 _LIT(KFileTypePrivate, 		"private"			);
       
    37 _LIT(KFileTypePublic, 		"public"			);
       
    38 _LIT(KExtMedia, 			"ext-media"			);
       
    39 _LIT(KDrivePlaceHolder, 	"<drive>"			);
       
    40 _LIT(KDriveSeparator, 		":"					);
       
    41 _LIT(KBackSlash, 			"\\"				);
       
    42 /*@}*/
       
    43 
       
    44 // constants used
       
    45 const TInt KCharSet8		= 8 ;
       
    46 const TInt KCharSet16		= 16;
       
    47 const TInt KLetterA 		= 97; 	// ASCII of 'a'
       
    48 
       
    49 /**
       
    50 The test server. 
       
    51 @internalTechnology
       
    52 */
       
    53 class CTestFileUriServer : public CTestServer
       
    54 	{
       
    55 public:
       
    56 	// Construction
       
    57 	static	CTestFileUriServer* 	NewL();
       
    58 	
       
    59 	// Base class pure virtual
       
    60 	virtual CTestStep* 				CreateTestStep(const TDesC& aStepName);
       
    61 	
       
    62 	// Common static functions used by the test steps
       
    63 	static	void 					GetDriveNumber(const TDesC& aDrive, TDriveNumber& aDriveNum);
       
    64 	static 	TInt 					IsRemovableDrive(const TDriveNumber& aDrive, TBool& aResult);
       
    65 	static	HBufC16*				CheckAndFillDriveNameL(const TPtrC& aFileUri, const TPtrC& aDrive);
       
    66 	static	TInt 					FirstRemovableDriveWithSameFileName(const TDesC& aFileName, TBuf<1>& aCorrectDrive);
       
    67 	
       
    68 	static	TInt 					CreateFullyQualifiedName(const TPtrC& aRelativeName, const TPtrC& aDrive, TFileName& aFullyQualifiedName);
       
    69 	
       
    70 	private:
       
    71 	// Private function
       
    72 	static 	TInt 					PopulateRemovableDrivesBuf(const RFs& aFs);
       
    73 	
       
    74 	private:
       
    75 	// To idebtify the removable drive letters
       
    76 	static TBuf<KMaxDrives> 		iRemovableDrives;
       
    77 	};
       
    78 
       
    79 #endif		// __TEST__FILE_URI_SERVER_H__
       
    80