Changeset View
Changeset View
Standalone View
Standalone View
src/client/client.hpp
| Show First 20 Lines • Show All 578 Lines • ▼ Show 20 Lines | #endif | ||||
| * Get all supported versions. | * Get all supported versions. | ||||
| * | * | ||||
| * @return A lager::reader of a array contains all supported versions. | * @return A lager::reader of a array contains all supported versions. | ||||
| * | * | ||||
| * See https://spec.matrix.org/v1.14/#specification-versions | * See https://spec.matrix.org/v1.14/#specification-versions | ||||
| */ | */ | ||||
| auto supportVersions() const -> lager::reader<immer::array<std::string>>; | auto supportVersions() const -> lager::reader<immer::array<std::string>>; | ||||
| /** | |||||
| * Mark a room as a direct chat by send the m.direct account data. | |||||
| * @return A Promise that resolves when the account data | |||||
| * has been set, or when there is an error. | |||||
| */ | |||||
| PromiseT addDirectRoom(std::string userId, std::string roomId) const; | |||||
| private: | private: | ||||
| void syncForever(std::optional<int> retryTime = std::nullopt) const; | void syncForever(std::optional<int> retryTime = std::nullopt) const; | ||||
| const lager::reader<SdkModel> &sdkCursor() const; | const lager::reader<SdkModel> &sdkCursor() const; | ||||
| lager::reader<ClientModel> clientCursor() const; | lager::reader<ClientModel> clientCursor() const; | ||||
| std::optional<lager::reader<SdkModel>> m_sdk; | std::optional<lager::reader<SdkModel>> m_sdk; | ||||
| std::optional<lager::reader<ClientModel>> m_client; | std::optional<lager::reader<ClientModel>> m_client; | ||||
| ContextT m_ctx; | ContextT m_ctx; | ||||
| std::optional<DepsT> m_deps; | std::optional<DepsT> m_deps; | ||||
| KAZV_DECLARE_THREAD_ID(); | KAZV_DECLARE_THREAD_ID(); | ||||
| KAZV_DECLARE_EVENT_LOOP_THREAD_ID_KEEPER(m_deps.has_value() ? &lager::get<EventLoopThreadIdKeeper &>(m_deps.value()) : 0); | KAZV_DECLARE_EVENT_LOOP_THREAD_ID_KEEPER(m_deps.has_value() ? &lager::get<EventLoopThreadIdKeeper &>(m_deps.value()) : 0); | ||||
| }; | }; | ||||
| } | } | ||||