#pragma once #include #include #include #include namespace fs = std::filesystem; using json = nlohmann::json; struct mail; template static const bool ptr_cmp(T* left, T* right) { return *left < *right; }; typedef std::set)*> maillist; class user { public: user(fs::path user_data_json); user(std::string name, fs::path user_dir); ~user(); void addMail(mail* mail); void sendMail(mail* mail, std::vector recipients); mail* getMail(u_int id); maillist getMails() { return this->mails; }; void saveToFile(); private: fs::path file_location; json user_data; std::string name; maillist mails; };