u2f_view.h 517 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <gui/view.h>
  3. typedef struct U2fView U2fView;
  4. typedef void (*U2fOkCallback)(InputType type, void* context);
  5. typedef enum {
  6. U2fMsgNotConnected,
  7. U2fMsgIdle,
  8. U2fMsgRegister,
  9. U2fMsgAuth,
  10. U2fMsgSuccess,
  11. U2fMsgError,
  12. } U2fViewMsg;
  13. U2fView* u2f_view_alloc();
  14. void u2f_view_free(U2fView* u2f);
  15. View* u2f_view_get_view(U2fView* u2f);
  16. void u2f_view_set_ok_callback(U2fView* u2f, U2fOkCallback callback, void* context);
  17. void u2f_view_set_state(U2fView* u2f, U2fViewMsg msg);