1/*---------------------------------------------------------------------------* 2 * ESR_CommandLine.h * 3 * * 4 * Copyright 2007, 2008 Nuance Communciations, Inc. * 5 * * 6 * Licensed under the Apache License, Version 2.0 (the 'License'); * 7 * you may not use this file except in compliance with the License. * 8 * * 9 * You may obtain a copy of the License at * 10 * http://www.apache.org/licenses/LICENSE-2.0 * 11 * * 12 * Unless required by applicable law or agreed to in writing, software * 13 * distributed under the License is distributed on an 'AS IS' BASIS, * 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 15 * See the License for the specific language governing permissions and * 16 * limitations under the License. * 17 * * 18 *---------------------------------------------------------------------------*/ 19 20#ifndef __ESR_COMMANDLINE_H 21#define __ESR_COMMANDLINE_H 22 23 24 25#include "ESR_ReturnCode.h" 26#include "ESR_SharedPrefix.h" 27#include "ptypes.h" 28 29/** 30 * @addtogroup ESR_CommandLineModule ESR_CommandLine API functions 31 * ESR_Session interface functions. 32 * 33 * @{ 34 */ 35 36/** 37 * Returns value of command-line argument. 38 * 39 * @param argc Number of arguments 40 * @param argv Value of arguments 41 * @param key Name of command-line argument to look up 42 * @param value [out] Value of the argument 43 * @param len [in/out] Length of value argument. If the return code is ESR_BUFFER_OVERFLOW, 44 * the required length is returned in this variable. 45 * @return ESR_BUFFER_OVERFLOW if value buffer is not large enough to contain result; 46 * ESR_NO_MATCH_ERROR if the specified command-line option could not be fonud 47 */ 48ESR_SHARED_API ESR_ReturnCode ESR_CommandLineGetValue(int argc, const LCHAR* argv[], 49 LCHAR* key, LCHAR* value, 50 size_t* len); 51 52/** 53 * @} 54 */ 55 56 57#endif /* __ESR_COMMANDLINE_H */ 58