2019-04-30 11:12:30 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class AuthSession;
|
|
|
|
|
|
|
|
namespace Main {
|
|
|
|
|
|
|
|
class Account final {
|
|
|
|
public:
|
|
|
|
explicit Account(const QString &dataName);
|
2019-06-05 20:41:51 +00:00
|
|
|
~Account();
|
|
|
|
|
|
|
|
Account(const Account &other) = delete;
|
|
|
|
Account &operator=(const Account &other) = delete;
|
2019-04-30 11:12:30 +00:00
|
|
|
|
|
|
|
[[nodiscard]] bool sessionExists() const;
|
|
|
|
[[nodiscard]] AuthSession &session();
|
|
|
|
[[nodiscard]] rpl::producer<AuthSession*> sessionValue() const;
|
2019-06-05 20:41:51 +00:00
|
|
|
[[nodiscard]] rpl::producer<AuthSession*> sessionChanges() const;
|
2019-04-30 11:12:30 +00:00
|
|
|
|
|
|
|
[[nodiscard]] MTP::Instance *mtp();
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Main
|