add request/invite handling

This commit is contained in:
Green Sky 2023-07-29 19:45:37 +02:00
parent 5397fcc5c2
commit 65d253afea
No known key found for this signature in database
3 changed files with 11 additions and 0 deletions

View File

@ -13,6 +13,12 @@ namespace Contact::Components {
struct TagSelfStrong {};
struct TagBig {};
struct RequestIncoming {
bool name = false;
bool password = false;
};
struct TagRequestOutgoing {};
// self counterpart
struct Self {
Contact3 self;

View File

@ -15,6 +15,8 @@ constexpr entt::id_type entt::type_hash<x>::value() noexcept { \
DEFINE_COMP_ID(Contact::Components::TagSelfWeak)
DEFINE_COMP_ID(Contact::Components::TagSelfStrong)
DEFINE_COMP_ID(Contact::Components::TagBig)
DEFINE_COMP_ID(Contact::Components::RequestIncoming)
DEFINE_COMP_ID(Contact::Components::TagRequestOutgoing)
DEFINE_COMP_ID(Contact::Components::Self)
DEFINE_COMP_ID(Contact::Components::Parent)
DEFINE_COMP_ID(Contact::Components::ParentOf)

View File

@ -23,5 +23,8 @@ struct ContactModel3I {
//virtual Contact3Handle toPersistent(void) = 0;
//virtual Contact3Handle toEphemeral(void) = 0;
// accept incoming request
virtual void acceptRequest(Contact3 c, std::string_view self_name, std::string_view password) { (void)c,(void)self_name,(void)password; }
};