dolphin.h 621 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include "helpers/dolphin_deed.h"
  3. typedef struct Dolphin Dolphin;
  4. typedef struct {
  5. uint32_t icounter;
  6. uint32_t butthurt;
  7. uint64_t timestamp;
  8. } DolphinStats;
  9. /** Deed complete notification. Call it on deed completion.
  10. * See dolphin_deed.h for available deeds. In futures it will become part of assets.
  11. * Thread safe, async
  12. */
  13. void dolphin_deed(Dolphin* dolphin, DolphinDeed deed);
  14. /** Retrieve dolphin stats
  15. * Thread safe, blocking
  16. */
  17. DolphinStats dolphin_stats(Dolphin* dolphin);
  18. /** Flush dolphin queue and save state
  19. * Thread safe, blocking
  20. */
  21. void dolphin_flush(Dolphin* dolphin);