save cooldown for tox profile (10sec after last) and save on exit

This commit is contained in:
2024-03-12 12:39:06 +01:00
parent dc081ae2aa
commit aaf8c6adc1
3 changed files with 10 additions and 5 deletions

View File

@ -22,6 +22,7 @@ class ToxClient : public ToxDefaultImpl, public ToxEventProviderBase {
std::string _tox_profile_path;
std::string _tox_profile_password;
bool _tox_profile_dirty {true}; // set in callbacks
float _save_heat {0.f};
public:
//ToxClient(/*const CommandLine& cl*/);
@ -34,7 +35,7 @@ class ToxClient : public ToxDefaultImpl, public ToxEventProviderBase {
void setDirty(void) { _tox_profile_dirty = true; }
// returns false when we shoul stop the program
bool iterate(void);
bool iterate(float time_delta);
void stop(void); // let it know it should exit
void setToxProfilePath(const std::string& new_path) { _tox_profile_path = new_path; }