flipp_pomodoro_statistics.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #pragma once
  2. #include <furi_hal.h>
  3. /** @brief FlippPomodoroStatistics structure
  4. *
  5. * This structure is used to keep track of completed focus stages.
  6. */
  7. typedef struct
  8. {
  9. uint8_t focus_stages_completed;
  10. } FlippPomodoroStatistics;
  11. /** @brief Allocate and initialize a new FlippPomodoroStatistics
  12. *
  13. * This function allocates a new FlippPomodoroStatistics structure, initializes its members
  14. * and returns a pointer to it.
  15. *
  16. * @return A pointer to a new FlippPomodoroStatistics structure
  17. */
  18. FlippPomodoroStatistics *flipp_pomodoro_statistics__new();
  19. /** @brief Get the number of completed focus stages
  20. *
  21. * This function retrieves the number of completed focus stages in a FlippPomodoroStatistics structure.
  22. *
  23. * @param statistics A pointer to a FlippPomodoroStatistics structure
  24. * @return The number of completed focus stages
  25. */
  26. uint8_t flipp_pomodoro_statistics__get_focus_stages_completed(FlippPomodoroStatistics *statistics);
  27. /** @brief Increase the number of completed focus stages
  28. *
  29. * This function increases the count of the completed focus stages by one in a FlippPomodoroStatistics structure.
  30. *
  31. * @param statistics A pointer to a FlippPomodoroStatistics structure
  32. */
  33. void flipp_pomodoro_statistics__increase_focus_stages_completed(FlippPomodoroStatistics *statistics);
  34. /** @brief Free a FlippPomodoroStatistics structure
  35. *
  36. * This function frees the memory used by a FlippPomodoroStatistics structure.
  37. *
  38. * @param statistics A pointer to a FlippPomodoroStatistics structure
  39. */
  40. void flipp_pomodoro_statistics__destroy(FlippPomodoroStatistics *state);