/
githubmirror
/
xmlsec
Обзор
Документация
Войти
/
githubmirror
/
xmlsec
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
apps/cmdline.h
90 строк
4 KB
lsh123
Update file headers for doxygen, use common copyright header, bump copyright to 2026 (#1122)
07 апр 2026, 04:13
Не верифицирован
07 апр 2026, 04:13
2e557ee
Код
Авторство
О чём код?
/** * XML Security Library (http://www.aleksey.com/xmlsec). * * This is free software; see the Copyright file in the source distribution for precise wording. * * Copyright (C) 2002-2026 Aleksey Sanin <aleksey@aleksey.com>. All Rights Reserved. */ /** * @brief XML Security Library command line utility: command line parsing routines. */ #ifndef __XMLSEC_APPS_CMDLINE_H__ #define __XMLSEC_APPS_CMDLINE_H__ #include <time.h> #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _xmlSecAppCmdLineParam xmlSecAppCmdLineParam, *xmlSecAppCmdLineParamPtr; typedef struct _xmlSecAppCmdLineValue xmlSecAppCmdLineValue, *xmlSecAppCmdLineValuePtr; typedef unsigned int xmlSecAppCmdLineParamTopic; #define xmlSecAppCmdLineParamFlagNone 0x0000 #define xmlSecAppCmdLineParamFlagParamNameValue 0x0001 #define xmlSecAppCmdLineParamFlagMultipleValues 0x0002 #define XMLSEC_STDOUT_FILENAME "-" typedef enum { xmlSecAppCmdLineParamTypeFlag, xmlSecAppCmdLineParamTypeString, xmlSecAppCmdLineParamTypeStringList, xmlSecAppCmdLineParamTypeNumber, xmlSecAppCmdLineParamTypeTime, xmlSecAppCmdLineParamTypeGmtTime } xmlSecAppCmdLineParamType; struct _xmlSecAppCmdLineParam { xmlSecAppCmdLineParamTopic topics; const char* fullName; const char* shortName; const char* help; xmlSecAppCmdLineParamType type; int flags; xmlSecAppCmdLineValuePtr value; }; int xmlSecAppCmdLineParamIsSet (xmlSecAppCmdLineParamPtr param); const char* xmlSecAppCmdLineParamGetString (xmlSecAppCmdLineParamPtr param); const char* xmlSecAppCmdLineParamGetStringList (xmlSecAppCmdLineParamPtr param); int xmlSecAppCmdLineParamGetInt (xmlSecAppCmdLineParamPtr param, int def); time_t xmlSecAppCmdLineParamGetTime (xmlSecAppCmdLineParamPtr param, time_t def); int xmlSecAppCmdLineParamsListParse (xmlSecAppCmdLineParamPtr* params, xmlSecAppCmdLineParamTopic topics, const char** argv, int argc, int pos); void xmlSecAppCmdLineParamsListClean (xmlSecAppCmdLineParamPtr* params); void xmlSecAppCmdLineParamsListPrint (xmlSecAppCmdLineParamPtr* params, xmlSecAppCmdLineParamTopic topic, FILE* output); struct _xmlSecAppCmdLineValue { xmlSecAppCmdLineParamPtr param; int pos; const char* paramNameValue; const char* strValue; const char* strListValue; int intValue; time_t timeValue; xmlSecAppCmdLineValuePtr next; }; xmlSecAppCmdLineValuePtr xmlSecAppCmdLineValueCreate (xmlSecAppCmdLineParamPtr param, int pos); void xmlSecAppCmdLineValueDestroy (xmlSecAppCmdLineValuePtr value); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __XMLSEC_APPS_CMDLINE_H__ */