fsm.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* Motenpoche
  2. *
  3. * (c) 2023 Daniele Lacamera <root@danielinux.net>
  4. *
  5. *
  6. * Motenpoche is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * Motenpoche is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  19. *
  20. */
  21. #ifndef VAULT_FSM_H
  22. #define VAULT_FSM_H
  23. enum vault_state {
  24. VAULT_OFF = 0,
  25. VAULT_TOFU,
  26. VAULT_BOOTUP,
  27. VAULT_VERIFY_PASSPHRASE,
  28. VAULT_VERIFY_FAILED,
  29. /* From here on: Authenticated */
  30. VAULT_MAIN_MENU,
  31. VAULT_SETTINGS_MENU,
  32. VAULT_SERVICE_LIST
  33. };
  34. void fsm_set(enum vault_state st);
  35. enum vault_state fsm_get(void);
  36. void fsm_event_task(void);
  37. #endif