diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Matrix.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp index 3d3c4b2..6a876d0 100644 --- a/plugins/Matrix.hpp +++ b/plugins/Matrix.hpp @@ -423,11 +423,14 @@ namespace QuickMedia { PluginResult upload_file(RoomData *room, const std::string &filepath, UploadInfo &file_info, UploadInfo &thumbnail_info, std::string &err_msg); void add_room(std::unique_ptr<RoomData> room); void remove_room(const std::string &room_id); + void set_invite(const std::string &room_id, Invite invite); + // Returns true if an invite for |room_id| exists + bool remove_invite(const std::string &room_id); DownloadResult download_json(rapidjson::Document &result, const std::string &url, std::vector<CommandArg> additional_args, bool use_browser_useragent = false, std::string *err_msg = nullptr) const; private: std::vector<std::unique_ptr<RoomData>> rooms; std::unordered_map<std::string, size_t> room_data_by_id; // value is an index into |rooms| - std::mutex room_data_mutex; + std::recursive_mutex room_data_mutex; std::string user_id; std::string username; std::string access_token; @@ -436,8 +439,10 @@ namespace QuickMedia { std::string next_batch; std::unordered_map<std::string, Invite> invites; + std::mutex invite_mutex; std::thread sync_thread; bool sync_running = false; + MatrixDelegate *delegate = nullptr; }; }
\ No newline at end of file |