2023-07-21 17:13:59 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "./contact_model3.hpp"
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
// fwd
|
|
|
|
struct ContactModel3I;
|
|
|
|
|
|
|
|
namespace Contact::Components {
|
2023-07-22 22:36:47 +02:00
|
|
|
|
2023-07-21 17:13:59 +02:00
|
|
|
struct TagSelfWeak {};
|
|
|
|
struct TagSelfStrong {};
|
|
|
|
struct TagBig {};
|
|
|
|
|
|
|
|
// self counterpart
|
|
|
|
struct Self {
|
|
|
|
Contact3 self;
|
|
|
|
};
|
|
|
|
|
2023-07-22 23:10:07 +02:00
|
|
|
// tier 1
|
|
|
|
struct Parent {
|
2023-07-21 17:13:59 +02:00
|
|
|
Contact3 parent;
|
|
|
|
};
|
|
|
|
|
2023-07-22 23:10:07 +02:00
|
|
|
// TODO: maybe rename to children
|
2023-07-21 17:13:59 +02:00
|
|
|
struct ParentOf {
|
|
|
|
std::vector<Contact3> subs;
|
|
|
|
};
|
|
|
|
|
|
|
|
// TODO: this is very hacky
|
|
|
|
// maybe refwrapper?
|
|
|
|
using ContactModel = ContactModel3I*;
|
|
|
|
|
|
|
|
struct Name {
|
|
|
|
std::string name;
|
|
|
|
};
|
|
|
|
|
|
|
|
// (display)alias
|
|
|
|
|
|
|
|
// avatar
|
|
|
|
// status
|
|
|
|
|
|
|
|
struct ConnectionState {
|
|
|
|
enum State {
|
|
|
|
disconnected,
|
|
|
|
direct, // tox udp-direct?
|
|
|
|
cloud, // tox tcp-relayed / most messengers ?
|
|
|
|
} state = disconnected;
|
|
|
|
};
|
|
|
|
|
|
|
|
// status message
|
|
|
|
struct StatusMessage {
|
|
|
|
std::string msg;
|
|
|
|
};
|
|
|
|
|
|
|
|
// last seen (not disconnected?)
|
|
|
|
|
2023-07-22 22:36:47 +02:00
|
|
|
} // Contact::Components
|
2023-07-21 17:13:59 +02:00
|
|
|
|
|
|
|
#include "./components_id.inl"
|
|
|
|
|