FreeRDP
winpr/include/winpr/cmdline.h File Reference
#include <winpr/winpr.h>
#include <winpr/wtypes.h>
This graph shows which files directly or indirectly include this file:

Data Structures

struct  COMMAND_LINE_ARGUMENT_A
 
struct  COMMAND_LINE_ARGUMENT_W
 

Macros

#define COMMAND_LINE_INPUT_FLAG_MASK   0x0000FFFF
 
#define COMMAND_LINE_OUTPUT_FLAG_MASK   0xFFFF0000
 
#define COMMAND_LINE_VALUE_FLAG   0x00000001
 
#define COMMAND_LINE_VALUE_REQUIRED   0x00000002
 
#define COMMAND_LINE_VALUE_OPTIONAL   0x00000004
 
#define COMMAND_LINE_VALUE_BOOL   0x00000008
 
#define COMMAND_LINE_ADVANCED   0x00000100
 
#define COMMAND_LINE_PRINT   0x00000200
 
#define COMMAND_LINE_PRINT_HELP   0x00000400
 
#define COMMAND_LINE_PRINT_VERSION   0x00000800
 
#define COMMAND_LINE_PRINT_BUILDCONFIG   0x00001000
 
#define COMMAND_LINE_ARGUMENT_PRESENT   0x80000000
 
#define COMMAND_LINE_VALUE_PRESENT   0x40000000
 
#define COMMAND_LINE_SIGIL_NONE   0x00000001
 
#define COMMAND_LINE_SIGIL_SLASH   0x00000002
 
#define COMMAND_LINE_SIGIL_DASH   0x00000004
 
#define COMMAND_LINE_SIGIL_DOUBLE_DASH   0x00000008
 
#define COMMAND_LINE_SIGIL_PLUS_MINUS   0x00000010
 
#define COMMAND_LINE_SIGIL_ENABLE_DISABLE   0x00000020
 
#define COMMAND_LINE_SIGIL_NOT_ESCAPED   0x00000040
 
#define COMMAND_LINE_SEPARATOR_COLON   0x00000100
 
#define COMMAND_LINE_SEPARATOR_EQUAL   0x00000200
 
#define COMMAND_LINE_SEPARATOR_SPACE   0x00000400
 
#define COMMAND_LINE_IGN_UNKNOWN_KEYWORD   0x00001000
 
#define COMMAND_LINE_ERROR   -1000
 
#define COMMAND_LINE_ERROR_NO_KEYWORD   -1001
 
#define COMMAND_LINE_ERROR_UNEXPECTED_VALUE   -1002
 
#define COMMAND_LINE_ERROR_MISSING_VALUE   -1003
 
#define COMMAND_LINE_ERROR_MISSING_ARGUMENT   -1004
 
#define COMMAND_LINE_ERROR_UNEXPECTED_SIGIL   -1005
 
#define COMMAND_LINE_ERROR_MEMORY   -1006
 
#define COMMAND_LINE_ERROR_LAST   -1999
 
#define COMMAND_LINE_STATUS_PRINT   -2001
 
#define COMMAND_LINE_STATUS_PRINT_HELP   -2002
 
#define COMMAND_LINE_STATUS_PRINT_VERSION   -2003
 
#define COMMAND_LINE_STATUS_PRINT_BUILDCONFIG   -2004
 
#define CommandLineSwitchStart(_arg)   if (0) { }
 
#define CommandLineSwitchCase(_arg, _name)   else if (strcmp(_arg->Name, _name) == 0)
 
#define CommandLineSwitchDefault(_arg)   else
 
#define CommandLineSwitchEnd(_arg)
 
#define BoolValueTrue   ((LPSTR) 1)
 
#define BoolValueFalse   ((LPSTR) 0)
 
#define COMMAND_LINE_ARGUMENT   COMMAND_LINE_ARGUMENT_A
 
#define CommandLineClearArguments   CommandLineClearArgumentsA
 
#define CommandLineParseArguments   CommandLineParseArgumentsA
 
#define CommandLineFindArgument   CommandLineFindArgumentA
 

Typedefs

typedef int(* COMMAND_LINE_PRE_FILTER_FN_A) (void *context, int index, int argc, LPSTR *argv)
 
typedef int(* COMMAND_LINE_PRE_FILTER_FN_W) (void *context, int index, int argc, LPWSTR *argv)
 
typedef int(* COMMAND_LINE_POST_FILTER_FN_A) (void *context, COMMAND_LINE_ARGUMENT_A *arg)
 
typedef int(* COMMAND_LINE_POST_FILTER_FN_W) (void *context, COMMAND_LINE_ARGUMENT_W *arg)
 

Functions

WINPR_API int CommandLineClearArgumentsA (COMMAND_LINE_ARGUMENT_A *options)
 
WINPR_API int CommandLineClearArgumentsW (COMMAND_LINE_ARGUMENT_W *options)
 
WINPR_API int CommandLineParseArgumentsA (int argc, LPSTR *argv, COMMAND_LINE_ARGUMENT_A *options, DWORD flags, void *context, COMMAND_LINE_PRE_FILTER_FN_A preFilter, COMMAND_LINE_POST_FILTER_FN_A postFilter)
 
WINPR_API int CommandLineParseArgumentsW (int argc, LPWSTR *argv, COMMAND_LINE_ARGUMENT_W *options, DWORD flags, void *context, COMMAND_LINE_PRE_FILTER_FN_W preFilter, COMMAND_LINE_POST_FILTER_FN_W postFilter)
 
WINPR_API COMMAND_LINE_ARGUMENT_A * CommandLineFindArgumentA (COMMAND_LINE_ARGUMENT_A *options, LPCSTR Name)
 
WINPR_API COMMAND_LINE_ARGUMENT_W * CommandLineFindArgumentW (COMMAND_LINE_ARGUMENT_W *options, LPCWSTR Name)
 
WINPR_API COMMAND_LINE_ARGUMENT_A * CommandLineFindNextArgumentA (COMMAND_LINE_ARGUMENT_A *argument)
 

Macro Definition Documentation

#define BoolValueFalse   ((LPSTR) 0)
#define BoolValueTrue   ((LPSTR) 1)
#define COMMAND_LINE_ADVANCED   0x00000100
#define COMMAND_LINE_ARGUMENT   COMMAND_LINE_ARGUMENT_A
#define COMMAND_LINE_ARGUMENT_PRESENT   0x80000000
#define COMMAND_LINE_ERROR   -1000
#define COMMAND_LINE_ERROR_LAST   -1999
#define COMMAND_LINE_ERROR_MEMORY   -1006
#define COMMAND_LINE_ERROR_MISSING_ARGUMENT   -1004
#define COMMAND_LINE_ERROR_MISSING_VALUE   -1003
#define COMMAND_LINE_ERROR_NO_KEYWORD   -1001
#define COMMAND_LINE_ERROR_UNEXPECTED_SIGIL   -1005
#define COMMAND_LINE_ERROR_UNEXPECTED_VALUE   -1002
#define COMMAND_LINE_IGN_UNKNOWN_KEYWORD   0x00001000
#define COMMAND_LINE_INPUT_FLAG_MASK   0x0000FFFF

WinPR: Windows Portable Runtime Command-Line Utils

Copyright 2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

#define COMMAND_LINE_OUTPUT_FLAG_MASK   0xFFFF0000
#define COMMAND_LINE_PRINT   0x00000200
#define COMMAND_LINE_PRINT_BUILDCONFIG   0x00001000
#define COMMAND_LINE_PRINT_HELP   0x00000400
#define COMMAND_LINE_PRINT_VERSION   0x00000800
#define COMMAND_LINE_SEPARATOR_COLON   0x00000100
#define COMMAND_LINE_SEPARATOR_EQUAL   0x00000200
#define COMMAND_LINE_SEPARATOR_SPACE   0x00000400
#define COMMAND_LINE_SIGIL_DASH   0x00000004
#define COMMAND_LINE_SIGIL_DOUBLE_DASH   0x00000008
#define COMMAND_LINE_SIGIL_ENABLE_DISABLE   0x00000020
#define COMMAND_LINE_SIGIL_NONE   0x00000001
#define COMMAND_LINE_SIGIL_NOT_ESCAPED   0x00000040
#define COMMAND_LINE_SIGIL_PLUS_MINUS   0x00000010
#define COMMAND_LINE_SIGIL_SLASH   0x00000002
#define COMMAND_LINE_STATUS_PRINT   -2001
#define COMMAND_LINE_STATUS_PRINT_BUILDCONFIG   -2004
#define COMMAND_LINE_STATUS_PRINT_HELP   -2002
#define COMMAND_LINE_STATUS_PRINT_VERSION   -2003
#define COMMAND_LINE_VALUE_BOOL   0x00000008
#define COMMAND_LINE_VALUE_FLAG   0x00000001
#define COMMAND_LINE_VALUE_OPTIONAL   0x00000004
#define COMMAND_LINE_VALUE_PRESENT   0x40000000
#define COMMAND_LINE_VALUE_REQUIRED   0x00000002
#define CommandLineClearArguments   CommandLineClearArgumentsA
#define CommandLineFindArgument   CommandLineFindArgumentA
#define CommandLineParseArguments   CommandLineParseArgumentsA
#define CommandLineSwitchCase (   _arg,
  _name 
)    else if (strcmp(_arg->Name, _name) == 0)
#define CommandLineSwitchDefault (   _arg)    else
#define CommandLineSwitchEnd (   _arg)
#define CommandLineSwitchStart (   _arg)    if (0) { }

Typedef Documentation

typedef int(* COMMAND_LINE_POST_FILTER_FN_A) (void *context, COMMAND_LINE_ARGUMENT_A *arg)
typedef int(* COMMAND_LINE_POST_FILTER_FN_W) (void *context, COMMAND_LINE_ARGUMENT_W *arg)
typedef int(* COMMAND_LINE_PRE_FILTER_FN_A) (void *context, int index, int argc, LPSTR *argv)
typedef int(* COMMAND_LINE_PRE_FILTER_FN_W) (void *context, int index, int argc, LPWSTR *argv)

Function Documentation

WINPR_API int CommandLineClearArgumentsA ( COMMAND_LINE_ARGUMENT_A *  options)

Here is the caller graph for this function:

WINPR_API int CommandLineClearArgumentsW ( COMMAND_LINE_ARGUMENT_W *  options)
WINPR_API COMMAND_LINE_ARGUMENT_A* CommandLineFindArgumentA ( COMMAND_LINE_ARGUMENT_A *  options,
LPCSTR  Name 
)

Here is the caller graph for this function:

WINPR_API COMMAND_LINE_ARGUMENT_W* CommandLineFindArgumentW ( COMMAND_LINE_ARGUMENT_W *  options,
LPCWSTR  Name 
)

Here is the call graph for this function:

WINPR_API COMMAND_LINE_ARGUMENT_A* CommandLineFindNextArgumentA ( COMMAND_LINE_ARGUMENT_A *  argument)

Here is the caller graph for this function:

WINPR_API int CommandLineParseArgumentsA ( int  argc,
LPSTR *  argv,
COMMAND_LINE_ARGUMENT_A *  options,
DWORD  flags,
void context,
COMMAND_LINE_PRE_FILTER_FN_A  preFilter,
COMMAND_LINE_POST_FILTER_FN_A  postFilter 
)

WinPR: Windows Portable Runtime Command-Line Utils

Copyright 2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Command-line syntax: some basic concepts: https://pythonconquerstheuniverse.wordpress.com/2010/07/25/command-line-syntax-some-basic-concepts/ Command-Line Syntax:

<sigil><keyword><separator>

<sigil>: '/' or '-' or ('+' | '-')

<keyword>: option, named argument, flag

<separator>: ':' or '='

: argument value

Here is the caller graph for this function:

WINPR_API int CommandLineParseArgumentsW ( int  argc,
LPWSTR *  argv,
COMMAND_LINE_ARGUMENT_W *  options,
DWORD  flags,
void context,
COMMAND_LINE_PRE_FILTER_FN_W  preFilter,
COMMAND_LINE_POST_FILTER_FN_W  postFilter 
)