totato/src/auto_dirty.hpp

27 lines
833 B
C++
Raw Permalink Normal View History

2023-12-01 02:48:18 +01:00
#pragma once
#include <solanaceae/toxcore/tox_event_interface.hpp>
// fwd
class ToxClient;
// sets ToxClient dirty on some events
class AutoDirty : public ToxEventI {
ToxClient& _tc;
2024-10-25 13:04:12 +02:00
ToxEventProviderI::SubscriptionReference _tep_sr;
2023-12-01 02:48:18 +01:00
public:
AutoDirty(ToxClient& tc);
protected: // tox events
bool onToxEvent(const Tox_Event_Self_Connection_Status* e) override;
bool onToxEvent(const Tox_Event_Friend_Connection_Status* e) override;
bool onToxEvent(const Tox_Event_Friend_Request* e) override;
bool onToxEvent(const Tox_Event_Group_Invite* e) override;
bool onToxEvent(const Tox_Event_Group_Self_Join* e) override;
bool onToxEvent(const Tox_Event_Group_Peer_Join* e) override;
bool onToxEvent(const Tox_Event_Group_Peer_Exit* e) override;
bool onToxEvent(const Tox_Event_Conference_Invite* e) override;
};