2020-12-18 23:15:29 +03:00
|
|
|
#pragma once
|
|
|
|
|
2021-09-28 12:40:39 +03:00
|
|
|
#include "helpers/dolphin_deed.h"
|
2020-12-18 23:15:29 +03:00
|
|
|
|
|
|
|
typedef struct Dolphin Dolphin;
|
|
|
|
|
2021-09-30 22:50:58 +03:00
|
|
|
typedef struct {
|
|
|
|
uint32_t icounter;
|
|
|
|
uint32_t butthurt;
|
2021-10-07 16:32:37 +03:00
|
|
|
uint64_t timestamp;
|
2021-09-30 22:50:58 +03:00
|
|
|
} DolphinStats;
|
2021-09-28 12:40:39 +03:00
|
|
|
|
2021-09-30 22:50:58 +03:00
|
|
|
/** Deed complete notification. Call it on deed completion.
|
2020-12-18 23:15:29 +03:00
|
|
|
* See dolphin_deed.h for available deeds. In futures it will become part of assets.
|
2021-09-30 22:50:58 +03:00
|
|
|
* Thread safe, async
|
2020-12-18 23:15:29 +03:00
|
|
|
*/
|
|
|
|
void dolphin_deed(Dolphin* dolphin, DolphinDeed deed);
|
2021-09-28 12:40:39 +03:00
|
|
|
|
2021-09-30 22:50:58 +03:00
|
|
|
/** Retrieve dolphin stats
|
|
|
|
* Thread safe, blocking
|
2021-09-28 12:40:39 +03:00
|
|
|
*/
|
2021-09-30 22:50:58 +03:00
|
|
|
DolphinStats dolphin_stats(Dolphin* dolphin);
|
2021-09-28 12:40:39 +03:00
|
|
|
|
2021-09-30 22:50:58 +03:00
|
|
|
/** Flush dolphin queue and save state
|
|
|
|
* Thread safe, blocking
|
2021-09-28 12:40:39 +03:00
|
|
|
*/
|
2021-09-30 22:50:58 +03:00
|
|
|
void dolphin_flush(Dolphin* dolphin);
|