version.c 812 B

123456789101112131415161718192021222324252627
  1. #include <flipper_application/flipper_application.h>
  2. #include "../../cli_helpers.h"
  3. #include "../../cli_plugin_interface.h"
  4. #include "../../../version.h"
  5. static void handle(PluginState* plugin_state, FuriString* args, Cli* cli) {
  6. UNUSED(args);
  7. UNUSED(cli);
  8. UNUSED(plugin_state);
  9. TOTP_CLI_PRINTF(
  10. "%" PRIu8 ".%" PRIu8 ".%" PRIu8 "\r\n",
  11. TOTP_APP_VERSION_MAJOR,
  12. TOTP_APP_VERSION_MINOR,
  13. TOTP_APP_VERSION_PATCH);
  14. }
  15. static const CliPlugin plugin = {.name = "TOTP CLI Plugin: Version", .handle = &handle};
  16. static const FlipperAppPluginDescriptor plugin_descriptor = {
  17. .appid = PLUGIN_APP_ID,
  18. .ep_api_version = PLUGIN_API_VERSION,
  19. .entry_point = &plugin,
  20. };
  21. const FlipperAppPluginDescriptor* totp_cli_version_plugin_ep() {
  22. return &plugin_descriptor;
  23. }