1.1 --- a/epoc32/include/bacline.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/bacline.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,72 @@
1.4 -bacline.h
1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +#ifndef __BACLINE_H
1.21 +#define __BACLINE_H
1.22 +
1.23 +#ifndef __E32BASE_H
1.24 +#include <e32base.h>
1.25 +#endif
1.26 +
1.27 +/**
1.28 +Not available until Platform 003
1.29 +@internalComponent
1.30 +*/
1.31 +typedef TBuf<0x100> TBaCommand;
1.32 +
1.33 +class CCommandLineArguments : public CBase
1.34 +/** Parses command line arguments.
1.35 +
1.36 +The class provides functions to access the arguments that are supplied when
1.37 +a program is launched as a new process.
1.38 +
1.39 +The program name is returned as argument 0. Other arguments are returned as
1.40 +arguments 1, 2 etc.
1.41 +
1.42 +The Count() function indicates how many arguments there are, including the
1.43 +program name. Arguments may be quoted to contain blanks and quotes.
1.44 +
1.45 +The command line arguments and process name occupy 256 characters each. In
1.46 +order to minimise the space used throughout the lifetime of a program, it
1.47 +is recommended that the program parse the arguments shortly after initialisation,
1.48 +save the argument values appropriately, and then destroy the CCommandLineArguments
1.49 +object.
1.50 +
1.51 +The main use of this class is in parsing the arguments of WINC command-line
1.52 +utilities.
1.53 +
1.54 +This class is not intended for user derivation
1.55 +@publishedAll
1.56 +@released
1.57 +*/
1.58 + {
1.59 +public:
1.60 + // construct/destruct
1.61 + IMPORT_C static CCommandLineArguments* NewLC();
1.62 + IMPORT_C static CCommandLineArguments* NewL();
1.63 + IMPORT_C ~CCommandLineArguments();
1.64 + // extract
1.65 + IMPORT_C TPtrC Arg(TInt aArg) const;
1.66 + IMPORT_C TInt Count() const;
1.67 +private:
1.68 + CCommandLineArguments();
1.69 + void ConstructL();
1.70 +private:
1.71 + CArrayFixFlat<TPtrC>* iArgs;
1.72 + HBufC* iCommandLine;
1.73 + TFileName iFileName;
1.74 + };
1.75 +
1.76 +#endif