sl@0: // Copyright (c) 2005-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 __CENTREPCONVTOOL_H__ sl@0: #define __CENTREPCONVTOOL_H__ sl@0: sl@0: #include sl@0: #include sl@0: #include "consoleprint.h" sl@0: #include "shrepos.h" sl@0: sl@0: const TInt KPrivatePathSize = 24; sl@0: sl@0: // class CCentRepConvTool - parse the command line args to sl@0: // generate the input and output filenames. Then use objects sl@0: // of centrep server to do the convertion. sl@0: class CCentRepConvTool : public CBase sl@0: { sl@0: public: sl@0: sl@0: // By default error msgs wait for user ack. Test code should set sl@0: // the bool to false. sl@0: static CCentRepConvTool* NewL(const TDesC& aCmd, RFs& aFs, TBool aWaitForAck); sl@0: virtual ~CCentRepConvTool(); sl@0: void ProcessCmdL(); sl@0: void SetOutputMode(TBool aWaitForAck); sl@0: sl@0: private: sl@0: CCentRepConvTool(const TDesC& aCmd, RFs& aFs); sl@0: void ConstructL(TBool aWaitForAck); sl@0: void ParseCmdLineL(TPtrC& aInputPath, TPtrC& aOutputPath); sl@0: void VerifyInputPathL(); sl@0: void VerifyOutputPathL(); sl@0: void DoConversionL(); sl@0: void ExternalizeToCreL(); sl@0: TBool InOthersPrivatePath(const TDesC& aFullPathName); sl@0: sl@0: private: sl@0: TPtrC iCmd; sl@0: RFs& iFs; sl@0: CConsolePrint* iScrnOutput; sl@0: TParse iInputPath; sl@0: TParse iOutputPath; sl@0: CSharedRepository* iCentRepShrepos; sl@0: TBool iTextToBin; sl@0: TUid iRepUid; sl@0: TBuf iMyDataCage; sl@0: TBuf iDefaultPath; sl@0: }; sl@0: sl@0: #endif // __CENTREPCONVTOOL_H__