Update contrib.
1 // Copyright (c) 2004-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // TCmdProcessorFactory class.
19 #include "cn_bin2txt.h"
20 #include "cn_txt2bin.h"
23 Factory method for CCmdProcessor interface implementations.
24 It creates and returns either CSPExport or CSPImport instance, depending on
25 the value of aCmdLinePrm.iAction data member.
26 @param aFs File server session object reference.
27 @param aCmdLinePrm It contains parsed command line arguments.
28 @return A pointer to just created CCmdProcessor interface implementation.
29 @leave CSPBin2Txt::NewLC() and CSPTxt2Bin::NewLC() leaving error codes.
34 CCmdProcessor* TCmdProcessorFactory::NewLC(RFs& aFs, const TCmdLinePrm& aCmdLinePrm)
36 CCmdProcessor* proc = NULL;
37 if(aCmdLinePrm.iAction == TCmdLinePrm::EBin2Txt)
39 proc = CSPBin2Txt::NewLC(aFs, aCmdLinePrm);
41 else if(aCmdLinePrm.iAction == TCmdLinePrm::ETxt2Bin)
43 proc = CSPTxt2Bin::NewLC(aFs, aCmdLinePrm);