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_SILENCE_PARSER   0x00002000
 
#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 COMMAND_LINE_STATUS_PRINT_LAST   -2999
 
#define CommandLineSwitchStart(_arg)
 
#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 const COMMAND_LINE_ARGUMENT_ACommandLineFindArgumentA (const COMMAND_LINE_ARGUMENT_A *options, LPCSTR Name)
 
WINPR_API const COMMAND_LINE_ARGUMENT_WCommandLineFindArgumentW (const COMMAND_LINE_ARGUMENT_W *options, LPCWSTR Name)
 
WINPR_API const COMMAND_LINE_ARGUMENT_ACommandLineFindNextArgumentA (const COMMAND_LINE_ARGUMENT_A *argument)
 
WINPR_API char ** CommandLineParseCommaSeparatedValues (const char *list, size_t *count)
 
WINPR_API char ** CommandLineParseCommaSeparatedValuesEx (const char *name, const char *list, size_t *count)
 
WINPR_API char * CommandLineToCommaSeparatedValues (int argc, char *argv[])
 
WINPR_API char * CommandLineToCommaSeparatedValuesEx (int argc, char *argv[], const char *filters[], size_t number)
 

Macro Definition Documentation

◆ BoolValueFalse

#define BoolValueFalse   ((LPSTR)0)

◆ BoolValueTrue

#define BoolValueTrue   ((LPSTR)1)

◆ COMMAND_LINE_ADVANCED

#define COMMAND_LINE_ADVANCED   0x00000100

◆ COMMAND_LINE_ARGUMENT

#define COMMAND_LINE_ARGUMENT   COMMAND_LINE_ARGUMENT_A

◆ COMMAND_LINE_ARGUMENT_PRESENT

#define COMMAND_LINE_ARGUMENT_PRESENT   0x80000000

◆ COMMAND_LINE_ERROR

#define COMMAND_LINE_ERROR   -1000

◆ COMMAND_LINE_ERROR_LAST

#define COMMAND_LINE_ERROR_LAST   -1999

◆ COMMAND_LINE_ERROR_MEMORY

#define COMMAND_LINE_ERROR_MEMORY   -1006

◆ COMMAND_LINE_ERROR_MISSING_ARGUMENT

#define COMMAND_LINE_ERROR_MISSING_ARGUMENT   -1004

◆ COMMAND_LINE_ERROR_MISSING_VALUE

#define COMMAND_LINE_ERROR_MISSING_VALUE   -1003

◆ COMMAND_LINE_ERROR_NO_KEYWORD

#define COMMAND_LINE_ERROR_NO_KEYWORD   -1001

◆ COMMAND_LINE_ERROR_UNEXPECTED_SIGIL

#define COMMAND_LINE_ERROR_UNEXPECTED_SIGIL   -1005

◆ COMMAND_LINE_ERROR_UNEXPECTED_VALUE

#define COMMAND_LINE_ERROR_UNEXPECTED_VALUE   -1002

◆ COMMAND_LINE_IGN_UNKNOWN_KEYWORD

#define COMMAND_LINE_IGN_UNKNOWN_KEYWORD   0x00001000

◆ COMMAND_LINE_INPUT_FLAG_MASK

#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.

◆ COMMAND_LINE_OUTPUT_FLAG_MASK

#define COMMAND_LINE_OUTPUT_FLAG_MASK   0xFFFF0000

◆ COMMAND_LINE_PRINT

#define COMMAND_LINE_PRINT   0x00000200

◆ COMMAND_LINE_PRINT_BUILDCONFIG

#define COMMAND_LINE_PRINT_BUILDCONFIG   0x00001000

◆ COMMAND_LINE_PRINT_HELP

#define COMMAND_LINE_PRINT_HELP   0x00000400

◆ COMMAND_LINE_PRINT_VERSION

#define COMMAND_LINE_PRINT_VERSION   0x00000800

◆ COMMAND_LINE_SEPARATOR_COLON

#define COMMAND_LINE_SEPARATOR_COLON   0x00000100

◆ COMMAND_LINE_SEPARATOR_EQUAL

#define COMMAND_LINE_SEPARATOR_EQUAL   0x00000200

◆ COMMAND_LINE_SEPARATOR_SPACE

#define COMMAND_LINE_SEPARATOR_SPACE   0x00000400

◆ COMMAND_LINE_SIGIL_DASH

#define COMMAND_LINE_SIGIL_DASH   0x00000004

◆ COMMAND_LINE_SIGIL_DOUBLE_DASH

#define COMMAND_LINE_SIGIL_DOUBLE_DASH   0x00000008

◆ COMMAND_LINE_SIGIL_ENABLE_DISABLE

#define COMMAND_LINE_SIGIL_ENABLE_DISABLE   0x00000020

◆ COMMAND_LINE_SIGIL_NONE

#define COMMAND_LINE_SIGIL_NONE   0x00000001

◆ COMMAND_LINE_SIGIL_NOT_ESCAPED

#define COMMAND_LINE_SIGIL_NOT_ESCAPED   0x00000040

◆ COMMAND_LINE_SIGIL_PLUS_MINUS

#define COMMAND_LINE_SIGIL_PLUS_MINUS   0x00000010

◆ COMMAND_LINE_SIGIL_SLASH

#define COMMAND_LINE_SIGIL_SLASH   0x00000002

◆ COMMAND_LINE_SILENCE_PARSER

#define COMMAND_LINE_SILENCE_PARSER   0x00002000

◆ COMMAND_LINE_STATUS_PRINT

#define COMMAND_LINE_STATUS_PRINT   -2001

◆ COMMAND_LINE_STATUS_PRINT_BUILDCONFIG

#define COMMAND_LINE_STATUS_PRINT_BUILDCONFIG   -2004

◆ COMMAND_LINE_STATUS_PRINT_HELP

#define COMMAND_LINE_STATUS_PRINT_HELP   -2002

◆ COMMAND_LINE_STATUS_PRINT_LAST

#define COMMAND_LINE_STATUS_PRINT_LAST   -2999

◆ COMMAND_LINE_STATUS_PRINT_VERSION

#define COMMAND_LINE_STATUS_PRINT_VERSION   -2003

◆ COMMAND_LINE_VALUE_BOOL

#define COMMAND_LINE_VALUE_BOOL   0x00000008

◆ COMMAND_LINE_VALUE_FLAG

#define COMMAND_LINE_VALUE_FLAG   0x00000001

◆ COMMAND_LINE_VALUE_OPTIONAL

#define COMMAND_LINE_VALUE_OPTIONAL   0x00000004

◆ COMMAND_LINE_VALUE_PRESENT

#define COMMAND_LINE_VALUE_PRESENT   0x40000000

◆ COMMAND_LINE_VALUE_REQUIRED

#define COMMAND_LINE_VALUE_REQUIRED   0x00000002

◆ CommandLineClearArguments

#define CommandLineClearArguments   CommandLineClearArgumentsA

◆ CommandLineFindArgument

#define CommandLineFindArgument   CommandLineFindArgumentA

◆ CommandLineParseArguments

#define CommandLineParseArguments   CommandLineParseArgumentsA

◆ CommandLineSwitchCase

#define CommandLineSwitchCase (   _arg,
  _name 
)    else if (strcmp(_arg->Name, _name) == 0)

◆ CommandLineSwitchDefault

#define CommandLineSwitchDefault (   _arg)    else

◆ CommandLineSwitchEnd

#define CommandLineSwitchEnd (   _arg)

◆ CommandLineSwitchStart

#define CommandLineSwitchStart (   _arg)
Value:
if (0) \
{ \
}

Typedef Documentation

◆ COMMAND_LINE_POST_FILTER_FN_A

typedef int(* COMMAND_LINE_POST_FILTER_FN_A) (void *context, COMMAND_LINE_ARGUMENT_A *arg)

◆ COMMAND_LINE_POST_FILTER_FN_W

typedef int(* COMMAND_LINE_POST_FILTER_FN_W) (void *context, COMMAND_LINE_ARGUMENT_W *arg)

◆ COMMAND_LINE_PRE_FILTER_FN_A

typedef int(* COMMAND_LINE_PRE_FILTER_FN_A) (void *context, int index, int argc, LPSTR *argv)

◆ COMMAND_LINE_PRE_FILTER_FN_W

typedef int(* COMMAND_LINE_PRE_FILTER_FN_W) (void *context, int index, int argc, LPWSTR *argv)

Function Documentation

◆ CommandLineClearArgumentsA()

WINPR_API int CommandLineClearArgumentsA ( COMMAND_LINE_ARGUMENT_A options)
Here is the caller graph for this function:

◆ CommandLineClearArgumentsW()

WINPR_API int CommandLineClearArgumentsW ( COMMAND_LINE_ARGUMENT_W options)

◆ CommandLineFindArgumentA()

WINPR_API const COMMAND_LINE_ARGUMENT_A* CommandLineFindArgumentA ( const COMMAND_LINE_ARGUMENT_A options,
LPCSTR  Name 
)
Here is the caller graph for this function:

◆ CommandLineFindArgumentW()

WINPR_API const COMMAND_LINE_ARGUMENT_W* CommandLineFindArgumentW ( const COMMAND_LINE_ARGUMENT_W options,
LPCWSTR  Name 
)
Here is the call graph for this function:

◆ CommandLineFindNextArgumentA()

WINPR_API const COMMAND_LINE_ARGUMENT_A* CommandLineFindNextArgumentA ( const COMMAND_LINE_ARGUMENT_A argument)
Here is the caller graph for this function:

◆ CommandLineParseArgumentsA()

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 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CommandLineParseArgumentsW()

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 
)

◆ CommandLineParseCommaSeparatedValues()

WINPR_API char** CommandLineParseCommaSeparatedValues ( const char *  list,
size_t *  count 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CommandLineParseCommaSeparatedValuesEx()

WINPR_API char** CommandLineParseCommaSeparatedValuesEx ( const char *  name,
const char *  list,
size_t *  count 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CommandLineToCommaSeparatedValues()

WINPR_API char* CommandLineToCommaSeparatedValues ( int  argc,
char *  argv[] 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CommandLineToCommaSeparatedValuesEx()

WINPR_API char* CommandLineToCommaSeparatedValuesEx ( int  argc,
char *  argv[],
const char *  filters[],
size_t  number 
)
Here is the call graph for this function:
Here is the caller graph for this function: