interface versions

This commit is contained in:
Green Sky 2024-01-18 00:29:55 +01:00
parent 3df9125877
commit fa4298d790
No known key found for this signature in database
3 changed files with 8 additions and 0 deletions

View File

@ -62,6 +62,8 @@ struct ToxEventI {
// defines the interface where to subscribe
struct ToxEventProviderI {
static constexpr const char* version {"1"};
virtual ~ToxEventProviderI(void) {}
// TODO: unsub
virtual void subscribe(ToxEventI* object, const Tox_Event_Type event_type) = 0;

View File

@ -14,6 +14,8 @@
// defines the full interface for tox
// HACK: raw
struct ToxI_raw {
static constexpr const char* version {"6"};
virtual ~ToxI_raw(void) {}
// TODO: tox version
@ -177,6 +179,8 @@ struct ToxI_raw {
// HACK: work around zppbits inability to pass string_view as parameter ( https://github.com/eyalz800/zpp_bits/issues/107 )
struct ToxI : public ToxI_raw {
static constexpr const char* version {ToxI_raw::version};
Tox_Err_Set_Info toxSelfSetName_str(const std::string& name) {
return toxSelfSetName(name);
}

View File

@ -4,6 +4,8 @@
// defines the private interface for tox
struct ToxPrivateI {
static constexpr const char* version {"1"};
virtual ~ToxPrivateI(void) {}
virtual uint16_t toxDHTGetNumCloselist(void) = 0;