add invite to contact interface and lift version to account for this

This commit is contained in:
Green Sky
2025-08-04 01:02:02 +02:00
parent 5adf5bf9da
commit fdbe643958
2 changed files with 7 additions and 1 deletions

View File

@@ -27,5 +27,11 @@ struct ContactModel4I {
// delete
// triggers a destroy event on c
virtual bool leave(Contact4 c, std::string_view reason) = 0;
// invite c to to (as you speak it)
// eg on tox, only firends can be invited
virtual bool invite(Contact4 c, Contact4 to) = 0;
// might be called rapidly from ui code
virtual bool canInvite(Contact4 c, Contact4 to) = 0;
};

View File

@@ -25,7 +25,7 @@ struct ContactStore4EventI {
using ContactStore4EventProviderI = EventProviderI<ContactStore4EventI>;
struct ContactStore4I : public ContactStore4EventProviderI{
static constexpr const char* version {"1"};
static constexpr const char* version {"2"};
virtual ContactRegistry4& registry(void) = 0;
virtual ContactHandle4 contactHandle(const Contact4 c) = 0;