type-code-common.h 668 B

1234567891011121314151617181920
  1. #pragma once
  2. #include <stdint.h>
  3. #include "../types/token_info.h"
  4. typedef bool (*TOTP_AUTOMATION_KEY_HANDLER)(uint16_t key);
  5. /**
  6. * @brief Executes token input automation using given key press\release handlers
  7. * @param key_press_fn key press handler
  8. * @param key_release_fn key release handler
  9. * @param code_buffer code buffer to be typed
  10. * @param code_buffer_size code buffer size
  11. * @param features automation features
  12. */
  13. void totp_type_code_worker_execute_automation(
  14. TOTP_AUTOMATION_KEY_HANDLER key_press_fn,
  15. TOTP_AUTOMATION_KEY_HANDLER key_release_fn,
  16. const char* code_buffer,
  17. uint8_t code_buffer_size,
  18. TokenAutomationFeature features);