app_api_table_i.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #include <stdbool.h>
  2. #include <cli/cli.h>
  3. #include <lib/print/wrappers.h>
  4. #include <lib/toolbox/args.h>
  5. #include <memset_s.h>
  6. #include "services/crypto/crypto_facade.h"
  7. #include "ui/scene_director.h"
  8. #include "services/config/config.h"
  9. #include "cli/cli_helpers.h"
  10. #include "workers/bt_type_code/bt_type_code.h"
  11. static constexpr auto app_api_table = sort(create_array_t<sym_entry>(
  12. API_METHOD(memset_s, errno_t, (void*, rsize_t, int, rsize_t)),
  13. API_METHOD(totp_scene_director_activate_scene, void, (PluginState* const, Scene)),
  14. API_METHOD(totp_scene_director_force_redraw, void, (PluginState* const)),
  15. API_METHOD(totp_config_file_update_timezone_offset, bool, (const PluginState*)),
  16. API_METHOD(totp_config_file_reset, void, (PluginState* const)),
  17. API_METHOD(
  18. totp_config_get_token_iterator_context,
  19. TokenInfoIteratorContext*,
  20. (const PluginState*)),
  21. API_METHOD(totp_config_file_backup, char*, (const PluginState*)),
  22. API_METHOD(
  23. totp_config_file_update_encryption,
  24. bool,
  25. (PluginState*, uint8_t, const uint8_t*, uint8_t)),
  26. API_METHOD(totp_config_file_update_automation_method, bool, (const PluginState*)),
  27. API_METHOD(totp_config_file_update_notification_method, bool, (const PluginState*)),
  28. API_METHOD(totp_token_info_iterator_get_total_count, size_t, (const TokenInfoIteratorContext*)),
  29. API_METHOD(
  30. totp_token_info_iterator_get_current_token_index,
  31. size_t,
  32. (const TokenInfoIteratorContext*)),
  33. API_METHOD(totp_token_info_iterator_go_to, bool, (TokenInfoIteratorContext*, size_t)),
  34. API_METHOD(
  35. totp_token_info_iterator_get_current_token,
  36. const TokenInfo*,
  37. (const TokenInfoIteratorContext*)),
  38. API_METHOD(
  39. totp_token_info_iterator_add_new_token,
  40. TotpIteratorUpdateTokenResult,
  41. (TokenInfoIteratorContext*, TOTP_ITERATOR_UPDATE_TOKEN_ACTION, const void*)),
  42. API_METHOD(
  43. totp_token_info_iterator_update_current_token,
  44. TotpIteratorUpdateTokenResult,
  45. (TokenInfoIteratorContext*, TOTP_ITERATOR_UPDATE_TOKEN_ACTION, const void*)),
  46. API_METHOD(
  47. totp_token_info_iterator_move_current_token_info,
  48. bool,
  49. (TokenInfoIteratorContext*, size_t)),
  50. API_METHOD(
  51. totp_token_info_iterator_remove_current_token_info,
  52. bool,
  53. (TokenInfoIteratorContext*)),
  54. API_METHOD(token_info_get_algo_as_cstr, const char*, (const TokenInfo*)),
  55. API_METHOD(token_info_set_algo_from_str, bool, (TokenInfo*, const FuriString*)),
  56. API_METHOD(token_info_set_digits_from_int, bool, (TokenInfo*, uint8_t)),
  57. API_METHOD(token_info_set_duration_from_int, bool, (TokenInfo*, uint8_t)),
  58. API_METHOD(token_info_set_automation_feature_from_str, bool, (TokenInfo*, const FuriString*)),
  59. API_METHOD(
  60. token_info_set_secret,
  61. bool,
  62. (TokenInfo*, const char*, size_t, PlainTokenSecretEncoding, const CryptoSettings*)),
  63. API_METHOD(totp_crypto_check_key_slot, bool, (uint8_t)),
  64. API_METHOD(totp_bt_type_code_worker_free, void, (TotpBtTypeCodeWorkerContext*)),
  65. API_METHOD(token_info_set_token_type_from_str, bool, (TokenInfo*, const FuriString*)),
  66. API_METHOD(token_info_set_token_counter_from_str, bool, (TokenInfo*, const FuriString*)),
  67. API_METHOD(token_info_get_type_as_cstr, const char*, (const TokenInfo*))));