os/persistentdata/persistentstorage/centralrepository/convtool/src/CentRepConvTool.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/persistentstorage/centralrepository/convtool/src/CentRepConvTool.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,63 @@
1.4 +// Copyright (c) 2005-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 __CENTREPCONVTOOL_H__
1.20 +#define __CENTREPCONVTOOL_H__
1.21 +
1.22 +#include <e32base.h>
1.23 +#include <f32file.h>
1.24 +#include "consoleprint.h"
1.25 +#include "shrepos.h"
1.26 +
1.27 +const TInt KPrivatePathSize = 24;
1.28 +
1.29 +// class CCentRepConvTool - parse the command line args to
1.30 +// generate the input and output filenames. Then use objects
1.31 +// of centrep server to do the convertion.
1.32 +class CCentRepConvTool : public CBase
1.33 + {
1.34 +public:
1.35 +
1.36 + // By default error msgs wait for user ack. Test code should set
1.37 + // the bool to false.
1.38 + static CCentRepConvTool* NewL(const TDesC& aCmd, RFs& aFs, TBool aWaitForAck);
1.39 + virtual ~CCentRepConvTool();
1.40 + void ProcessCmdL();
1.41 + void SetOutputMode(TBool aWaitForAck);
1.42 +
1.43 +private:
1.44 + CCentRepConvTool(const TDesC& aCmd, RFs& aFs);
1.45 + void ConstructL(TBool aWaitForAck);
1.46 + void ParseCmdLineL(TPtrC& aInputPath, TPtrC& aOutputPath);
1.47 + void VerifyInputPathL();
1.48 + void VerifyOutputPathL();
1.49 + void DoConversionL();
1.50 + void ExternalizeToCreL();
1.51 + TBool InOthersPrivatePath(const TDesC& aFullPathName);
1.52 +
1.53 +private:
1.54 + TPtrC iCmd;
1.55 + RFs& iFs;
1.56 + CConsolePrint* iScrnOutput;
1.57 + TParse iInputPath;
1.58 + TParse iOutputPath;
1.59 + CSharedRepository* iCentRepShrepos;
1.60 + TBool iTextToBin;
1.61 + TUid iRepUid;
1.62 + TBuf<KPrivatePathSize> iMyDataCage;
1.63 + TBuf<KMaxDriveName + 1> iDefaultPath;
1.64 + };
1.65 +
1.66 +#endif // __CENTREPCONVTOOL_H__