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. uint8_t focus_stages_completed;
  9. } FlippPomodoroStatistics;
  10. /** @brief Allocate and initialize a new FlippPomodoroStatistics
  11. *
  12. * This function allocates a new FlippPomodoroStatistics structure, initializes its members
  13. * and returns a pointer to it.
  14. *
  15. * @return A pointer to a new FlippPomodoroStatistics structure
  16. */
  17. FlippPomodoroStatistics* flipp_pomodoro_statistics__new();
  18. /** @brief Get the number of completed focus stages
  19. *
  20. * This function retrieves the number of completed focus stages in a FlippPomodoroStatistics structure.
  21. *
  22. * @param statistics A pointer to a FlippPomodoroStatistics structure
  23. * @return The number of completed focus stages
  24. */
  25. uint8_t flipp_pomodoro_statistics__get_focus_stages_completed(FlippPomodoroStatistics* statistics);
  26. /** @brief Increase the number of completed focus stages
  27. *
  28. * This function increases the count of the completed focus stages by one in a FlippPomodoroStatistics structure.
  29. *
  30. * @param statistics A pointer to a FlippPomodoroStatistics structure
  31. */
  32. void flipp_pomodoro_statistics__increase_focus_stages_completed(
  33. 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);