cli_common_helpers.h 569 B

1234567891011121314151617
  1. #pragma once
  2. #include <cli/cli.h>
  3. #include "../../types/plugin_state.h"
  4. #define TOTP_CLI_ARG(arg) "<" arg ">"
  5. #define TOTP_CLI_OPTIONAL_PARAM(param) "[" param "]"
  6. #define TOTP_CLI_OPTIONAL_PARAM_MARK "[OPTIONAL]"
  7. #define TOTP_CLI_PRINTF(format, ...) \
  8. _Pragma(STRINGIFY(GCC diagnostic push)); \
  9. _Pragma(STRINGIFY(GCC diagnostic ignored "-Wdouble-promotion")); \
  10. printf(format, ##__VA_ARGS__); \
  11. _Pragma(STRINGIFY(GCC diagnostic pop));
  12. void totp_cli_print_invalid_arguments();
  13. bool totp_cli_ensure_authenticated(PluginState* plugin_state, Cli* cli);