Changeset View
Changeset View
Standalone View
Standalone View
src/client/client.hpp
| Show First 20 Lines • Show All 240 Lines • ▼ Show 20 Lines | #endif | ||||
| * @param token The access token. | * @param token The access token. | ||||
| * @param deviceId The device id that is paired with `token`. | * @param deviceId The device id that is paired with `token`. | ||||
| * @return A Promise that resolves when the account information is filled in. | * @return A Promise that resolves when the account information is filled in. | ||||
| */ | */ | ||||
| PromiseT tokenLogin(std::string homeserver, std::string username, | PromiseT tokenLogin(std::string homeserver, std::string username, | ||||
| std::string token, std::string deviceId) const; | std::string token, std::string deviceId) const; | ||||
| /** | /** | ||||
| * Login using a login token. | |||||
| * | |||||
| * This will create a new session on the homeserver. | |||||
| * | |||||
| * If the returned Promise resolves successfully, this will | |||||
| * call `startSyncing()`. | |||||
| * | |||||
| * @param homeserver The base url of the homeserver. E.g. `https://tusooa.xyz`. | |||||
| * @param loginToken The login token. | |||||
| * @param deviceName Optionally, a custom device name. If empty, `libkazv` | |||||
| * will be used. | |||||
| * @return A Promise that resolves when logging in successfully, or | |||||
| * when there is an error. | |||||
| */ | |||||
| PromiseT mLoginTokenLogin( | |||||
| std::string homeserver, | |||||
| std::string loginToken, | |||||
| std::optional<std::string> deviceName | |||||
| ) const; | |||||
| /** | |||||
| * Get the `shouldSync` field of current ClientModel. | * Get the `shouldSync` field of current ClientModel. | ||||
| * | * | ||||
| * @return A lager::reader of bool of the `shouldSync` field of the ClientModel | * @return A lager::reader of bool of the `shouldSync` field of the ClientModel | ||||
| */ | */ | ||||
| auto shouldSync() const -> lager::reader<bool>; | auto shouldSync() const -> lager::reader<bool>; | ||||
| /** | /** | ||||
| * Stop syncing and then logout current session. | * Stop syncing and then logout current session. | ||||
| ▲ Show 20 Lines • Show All 397 Lines • Show Last 20 Lines | |||||