os/persistentdata/persistentstorage/centralrepository/convtool/src/CentRepConvTool.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2005-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 __CENTREPCONVTOOL_H__
    17 #define __CENTREPCONVTOOL_H__
    18 
    19 #include <e32base.h>
    20 #include <f32file.h>
    21 #include "consoleprint.h"
    22 #include "shrepos.h"
    23 
    24 const TInt KPrivatePathSize = 24;
    25 
    26 // class CCentRepConvTool - parse the command line args to 
    27 //     generate the input and output filenames. Then use objects
    28 //     of centrep server to do the convertion.
    29 class CCentRepConvTool : public CBase
    30 	{
    31 public:
    32 
    33 	// By default error msgs wait for user ack. Test code should set
    34 	// the bool to false.
    35 	static CCentRepConvTool* NewL(const TDesC& aCmd, RFs& aFs, TBool aWaitForAck);
    36 	virtual ~CCentRepConvTool();
    37     void ProcessCmdL();
    38 	void SetOutputMode(TBool aWaitForAck);
    39 
    40 private:	
    41 	CCentRepConvTool(const TDesC& aCmd, RFs& aFs);
    42 	void ConstructL(TBool aWaitForAck);
    43 	void ParseCmdLineL(TPtrC& aInputPath, TPtrC& aOutputPath);
    44 	void VerifyInputPathL();
    45 	void VerifyOutputPathL();
    46 	void DoConversionL();
    47 	void ExternalizeToCreL();
    48 	TBool InOthersPrivatePath(const TDesC& aFullPathName);
    49 
    50 private:
    51 	TPtrC iCmd;
    52 	RFs&  iFs;
    53 	CConsolePrint* iScrnOutput;
    54 	TParse iInputPath;
    55 	TParse iOutputPath;
    56 	CSharedRepository* iCentRepShrepos;
    57 	TBool iTextToBin;
    58 	TUid  iRepUid;
    59 	TBuf<KPrivatePathSize> iMyDataCage;
    60 	TBuf<KMaxDriveName + 1> iDefaultPath;
    61 	};
    62 
    63 #endif // __CENTREPCONVTOOL_H__