|
gwenhywfar
4.99.8beta
|
#include <gwenhywfar/gwenhywfarapi.h>#include <gwenhywfar/types.h>#include <gwenhywfar/buffer.h>#include <gwenhywfar/db.h>
Go to the source code of this file.
Data Structures | |
| struct | GWEN_ARGS |
Macros | |
| #define | GWEN_ARGS_FLAGS_HAS_ARGUMENT 0x00000001 |
| #define | GWEN_ARGS_FLAGS_HELP 0x00000004 |
| #define | GWEN_ARGS_FLAGS_LAST 0x00000002 |
| #define | GWEN_ARGS_MODE_ALLOW_FREEPARAM 0x00000001 |
| #define | GWEN_ARGS_MODE_STOP_AT_FREEPARAM 0x00000002 |
| #define | GWEN_ARGS_RESULT_ERROR (-1) |
| #define | GWEN_ARGS_RESULT_HELP (-2) |
Typedefs | |
| typedef struct GWEN_ARGS | GWEN_ARGS |
Enumerations | |
| enum | GWEN_ARGS_OUTTYPE { GWEN_ArgsOutType_Txt =0, GWEN_ArgsOutType_Html } |
| enum | GWEN_ARGS_TYPE { GWEN_ArgsType_Char =0, GWEN_ArgsType_Int } |
Functions | |
| GWENHYWFAR_API int | GWEN_Args_Check (int argc, char **argv, int startAt, uint32_t mode, const GWEN_ARGS *args, GWEN_DB_NODE *db) |
| GWENHYWFAR_API int | GWEN_Args_ShortUsage (const GWEN_ARGS *args, GWEN_BUFFER *ubuf, GWEN_ARGS_OUTTYPE ot) |
| GWENHYWFAR_API int | GWEN_Args_Usage (const GWEN_ARGS *args, GWEN_BUFFER *ubuf, GWEN_ARGS_OUTTYPE ot) |
| #define GWEN_ARGS_FLAGS_HAS_ARGUMENT 0x00000001 |
Definition at line 50 of file src/base/args.h.
Referenced by activateKey(), add2Archive(), changePin(), checkArchive(), checkTree(), createArchive(), createToken(), cryptWithNew(), cryptWithNew2(), cryptWithOld(), extractArchive(), genKey(), GWEN_Args_Check(), GWEN_Args_UsageTXT(), hashTree(), listArchive(), main(), mkArchiveKey(), releaseFillIn(), setKey(), setSignSeq(), showKey(), showPasswords(), showUser(), signArchive(), signWithNew(), signWithOld(), updateToken(), and verifyArchive().
| #define GWEN_ARGS_FLAGS_HELP 0x00000004 |
Definition at line 52 of file src/base/args.h.
Referenced by activateKey(), add2Archive(), changePin(), checkArchive(), checkTree(), createArchive(), createToken(), cryptWithNew(), cryptWithNew2(), cryptWithOld(), extractArchive(), genKey(), GWEN_Args_Check(), hashTree(), listArchive(), main(), mkArchiveKey(), releaseFillIn(), setKey(), setSignSeq(), showKey(), showPasswords(), showUser(), signArchive(), signWithNew(), signWithOld(), updateToken(), and verifyArchive().
| #define GWEN_ARGS_FLAGS_LAST 0x00000002 |
Definition at line 51 of file src/base/args.h.
Referenced by activateKey(), add2Archive(), changePin(), checkArchive(), checkTree(), createArchive(), createToken(), cryptWithNew(), cryptWithNew2(), cryptWithOld(), extractArchive(), genKey(), GWEN_Args_Check(), GWEN_Args_UsageTXT(), hashTree(), listArchive(), main(), mkArchiveKey(), releaseFillIn(), setKey(), setSignSeq(), showKey(), showPasswords(), showUser(), signArchive(), signWithNew(), signWithOld(), updateToken(), and verifyArchive().
| #define GWEN_ARGS_MODE_ALLOW_FREEPARAM 0x00000001 |
Definition at line 54 of file src/base/args.h.
Referenced by activateKey(), add2Archive(), changePin(), checkArchive(), checkTree(), createArchive(), createToken(), cryptWithNew(), cryptWithNew2(), cryptWithOld(), extractArchive(), genKey(), GWEN_Args_Check(), hashTree(), listArchive(), main(), mkArchiveKey(), releaseFillIn(), setKey(), setSignSeq(), showKey(), showPasswords(), showUser(), signArchive(), signWithNew(), signWithOld(), updateToken(), and verifyArchive().
| #define GWEN_ARGS_MODE_STOP_AT_FREEPARAM 0x00000002 |
Definition at line 55 of file src/base/args.h.
Referenced by GWEN_Args_Check(), and main().
| #define GWEN_ARGS_RESULT_ERROR (-1) |
Definition at line 57 of file src/base/args.h.
Referenced by activateKey(), add2Archive(), changePin(), checkArchive(), checkTree(), createArchive(), createToken(), cryptWithNew(), cryptWithNew2(), cryptWithOld(), extractArchive(), genKey(), GWEN_Args_Check(), hashTree(), listArchive(), main(), mkArchiveKey(), releaseFillIn(), setKey(), setSignSeq(), showKey(), showPasswords(), showUser(), signArchive(), signWithNew(), signWithOld(), updateToken(), and verifyArchive().
| #define GWEN_ARGS_RESULT_HELP (-2) |
Definition at line 58 of file src/base/args.h.
Referenced by activateKey(), add2Archive(), changePin(), checkArchive(), checkTree(), createArchive(), createToken(), cryptWithNew(), cryptWithNew2(), cryptWithOld(), extractArchive(), genKey(), GWEN_Args_Check(), hashTree(), listArchive(), main(), mkArchiveKey(), releaseFillIn(), setKey(), setSignSeq(), showKey(), showPasswords(), showUser(), signArchive(), signWithNew(), signWithOld(), updateToken(), and verifyArchive().
Definition at line 36 of file src/base/args.h.
| enum GWEN_ARGS_OUTTYPE |
| Enumerator | |
|---|---|
| GWEN_ArgsOutType_Txt | |
| GWEN_ArgsOutType_Html | |
Definition at line 67 of file src/base/args.h.
| enum GWEN_ARGS_TYPE |
| Enumerator | |
|---|---|
| GWEN_ArgsType_Char | |
| GWEN_ArgsType_Int | |
Definition at line 61 of file src/base/args.h.
| GWENHYWFAR_API int GWEN_Args_Check | ( | int | argc, |
| char ** | argv, | ||
| int | startAt, | ||
| uint32_t | mode, | ||
| const GWEN_ARGS * | args, | ||
| GWEN_DB_NODE * | db | ||
| ) |
This function parses the given argument list. Known options are stored within the given DB under their respective name. Free parameters (which are arguments without leading "-"'s) are stored in the variable "params" of the given db.
Definition at line 45 of file src/base/args.c.
References DBG_DEBUG, DBG_ERROR, DBG_INFO, GWEN_ARGS::flags, GWEN_ARGS_FLAGS_HAS_ARGUMENT, GWEN_ARGS_FLAGS_HELP, GWEN_ARGS_FLAGS_LAST, GWEN_ARGS_MODE_ALLOW_FREEPARAM, GWEN_ARGS_MODE_STOP_AT_FREEPARAM, GWEN_ARGS_RESULT_ERROR, GWEN_ARGS_RESULT_HELP, GWEN_ArgsType_Char, GWEN_ArgsType_Int, GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_Buffer_Reset(), GWEN_DB_FLAGS_DEFAULT, GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_GetIntValue(), GWEN_DB_Group_free(), GWEN_DB_Group_new(), GWEN_DB_SetCharValue(), GWEN_DB_SetIntValue(), GWEN_Gui_ReadString(), GWEN_LOGDOMAIN, GWEN_ARGS::longOption, GWEN_ARGS::maxNum, GWEN_ARGS::minNum, GWEN_ARGS::name, GWEN_ARGS::shortOption, and GWEN_ARGS::type.
Referenced by activateKey(), add2Archive(), changePin(), checkArchive(), checkTree(), createArchive(), createToken(), cryptWithNew(), cryptWithNew2(), cryptWithOld(), extractArchive(), genKey(), hashTree(), listArchive(), main(), mkArchiveKey(), releaseFillIn(), setKey(), setSignSeq(), showKey(), showPasswords(), showUser(), signArchive(), signWithNew(), signWithOld(), updateToken(), and verifyArchive().


| GWENHYWFAR_API int GWEN_Args_ShortUsage | ( | const GWEN_ARGS * | args, |
| GWEN_BUFFER * | ubuf, | ||
| GWEN_ARGS_OUTTYPE | ot | ||
| ) |
Currently unimplemented; does nothing and returns zero.
| GWENHYWFAR_API int GWEN_Args_Usage | ( | const GWEN_ARGS * | args, |
| GWEN_BUFFER * | ubuf, | ||
| GWEN_ARGS_OUTTYPE | ot | ||
| ) |
Print a "usage" message into the given GWEN_BUFFER ubuf. The message lists all available options. The GWEN_ARGS_OUTTYPE argument is supposed to offer either text or html as output format, but currently only text is implemented.
Definition at line 435 of file src/base/args.c.
References DBG_ERROR, GWEN_Args_UsageHTML(), GWEN_Args_UsageTXT(), GWEN_ArgsOutType_Html, GWEN_ArgsOutType_Txt, and GWEN_LOGDOMAIN.
Referenced by activateKey(), add2Archive(), changePin(), checkArchive(), checkTree(), createArchive(), createToken(), cryptWithNew(), cryptWithNew2(), cryptWithOld(), extractArchive(), genKey(), hashTree(), listArchive(), main(), mkArchiveKey(), releaseFillIn(), setKey(), setSignSeq(), showKey(), showPasswords(), showUser(), signArchive(), signWithNew(), signWithOld(), updateToken(), and verifyArchive().


1.8.6