sl@0: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __TEST__FILE_URI_SERVER_H__ sl@0: #define __TEST__FILE_URI_SERVER_H__ sl@0: sl@0: // Epoc Include sl@0: // For accessing TEF classes sl@0: #include sl@0: sl@0: /*@{*/ sl@0: // Literal constants for INI file field-names sl@0: _LIT(KIniFileName, "filename" ); sl@0: _LIT(KIniFileUri, "fileuri" ); sl@0: _LIT(KIniExpectedFileName, "expectedfilename" ); sl@0: _LIT(KIniExpectedFileUri, "expectedfileuri" ); sl@0: _LIT(KIniFileType, "filetype" ); sl@0: _LIT(KIniCharacterSet, "characterset" ); sl@0: _LIT(KIniDrive, "drive" ); sl@0: /*@}*/ sl@0: sl@0: /*@{*/ sl@0: // Literal constants used by some test steps sl@0: _LIT(KFileTypePrivate, "private" ); sl@0: _LIT(KFileTypePublic, "public" ); sl@0: _LIT(KExtMedia, "ext-media" ); sl@0: _LIT(KDrivePlaceHolder, "" ); sl@0: _LIT(KDriveSeparator, ":" ); sl@0: _LIT(KBackSlash, "\\" ); sl@0: /*@}*/ sl@0: sl@0: // constants used sl@0: const TInt KCharSet8 = 8 ; sl@0: const TInt KCharSet16 = 16; sl@0: const TInt KLetterA = 97; // ASCII of 'a' sl@0: sl@0: /** sl@0: The test server. sl@0: @internalTechnology sl@0: */ sl@0: class CTestFileUriServer : public CTestServer sl@0: { sl@0: public: sl@0: // Construction sl@0: static CTestFileUriServer* NewL(); sl@0: sl@0: // Base class pure virtual sl@0: virtual CTestStep* CreateTestStep(const TDesC& aStepName); sl@0: sl@0: // Common static functions used by the test steps sl@0: static void GetDriveNumber(const TDesC& aDrive, TDriveNumber& aDriveNum); sl@0: static TInt IsRemovableDrive(const TDriveNumber& aDrive, TBool& aResult); sl@0: static HBufC16* CheckAndFillDriveNameL(const TPtrC& aFileUri, const TPtrC& aDrive); sl@0: static TInt FirstRemovableDriveWithSameFileName(const TDesC& aFileName, TBuf<1>& aCorrectDrive); sl@0: sl@0: static TInt CreateFullyQualifiedName(const TPtrC& aRelativeName, const TPtrC& aDrive, TFileName& aFullyQualifiedName); sl@0: sl@0: private: sl@0: // Private function sl@0: static TInt PopulateRemovableDrivesBuf(const RFs& aFs); sl@0: sl@0: private: sl@0: // To idebtify the removable drive letters sl@0: static TBuf iRemovableDrives; sl@0: }; sl@0: sl@0: #endif // __TEST__FILE_URI_SERVER_H__ sl@0: