os/ossrv/genericservices/httputils/Test/Integration/TestFileUriSuite/TestFileUriServer.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericservices/httputils/Test/Integration/TestFileUriSuite/TestFileUriServer.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,80 @@
     1.4 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __TEST__FILE_URI_SERVER_H__
    1.20 +#define __TEST__FILE_URI_SERVER_H__
    1.21 +
    1.22 +// Epoc Include
    1.23 +// For accessing TEF classes 
    1.24 +#include <testexecuteserverbase.h>
    1.25 +
    1.26 +/*@{*/
    1.27 +// Literal constants for INI file field-names
    1.28 +_LIT(KIniFileName, 			"filename"			);
    1.29 +_LIT(KIniFileUri, 			"fileuri"			);
    1.30 +_LIT(KIniExpectedFileName, 	"expectedfilename"	);
    1.31 +_LIT(KIniExpectedFileUri, 	"expectedfileuri"	);
    1.32 +_LIT(KIniFileType, 			"filetype"			);
    1.33 +_LIT(KIniCharacterSet, 		"characterset"		);
    1.34 +_LIT(KIniDrive, 			"drive"				);
    1.35 +/*@}*/
    1.36 +
    1.37 +/*@{*/
    1.38 +// Literal constants used by some test steps
    1.39 +_LIT(KFileTypePrivate, 		"private"			);
    1.40 +_LIT(KFileTypePublic, 		"public"			);
    1.41 +_LIT(KExtMedia, 			"ext-media"			);
    1.42 +_LIT(KDrivePlaceHolder, 	"<drive>"			);
    1.43 +_LIT(KDriveSeparator, 		":"					);
    1.44 +_LIT(KBackSlash, 			"\\"				);
    1.45 +/*@}*/
    1.46 +
    1.47 +// constants used
    1.48 +const TInt KCharSet8		= 8 ;
    1.49 +const TInt KCharSet16		= 16;
    1.50 +const TInt KLetterA 		= 97; 	// ASCII of 'a'
    1.51 +
    1.52 +/**
    1.53 +The test server. 
    1.54 +@internalTechnology
    1.55 +*/
    1.56 +class CTestFileUriServer : public CTestServer
    1.57 +	{
    1.58 +public:
    1.59 +	// Construction
    1.60 +	static	CTestFileUriServer* 	NewL();
    1.61 +	
    1.62 +	// Base class pure virtual
    1.63 +	virtual CTestStep* 				CreateTestStep(const TDesC& aStepName);
    1.64 +	
    1.65 +	// Common static functions used by the test steps
    1.66 +	static	void 					GetDriveNumber(const TDesC& aDrive, TDriveNumber& aDriveNum);
    1.67 +	static 	TInt 					IsRemovableDrive(const TDriveNumber& aDrive, TBool& aResult);
    1.68 +	static	HBufC16*				CheckAndFillDriveNameL(const TPtrC& aFileUri, const TPtrC& aDrive);
    1.69 +	static	TInt 					FirstRemovableDriveWithSameFileName(const TDesC& aFileName, TBuf<1>& aCorrectDrive);
    1.70 +	
    1.71 +	static	TInt 					CreateFullyQualifiedName(const TPtrC& aRelativeName, const TPtrC& aDrive, TFileName& aFullyQualifiedName);
    1.72 +	
    1.73 +	private:
    1.74 +	// Private function
    1.75 +	static 	TInt 					PopulateRemovableDrivesBuf(const RFs& aFs);
    1.76 +	
    1.77 +	private:
    1.78 +	// To idebtify the removable drive letters
    1.79 +	static TBuf<KMaxDrives> 		iRemovableDrives;
    1.80 +	};
    1.81 +
    1.82 +#endif		// __TEST__FILE_URI_SERVER_H__
    1.83 +