tdesktop/Telegram/SourceFiles/iv/iv_instance.h

54 lines
1.0 KiB
C
Raw Normal View History

/*
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
namespace Main {
class Session;
class SessionShow;
} // namespace Main
namespace Iv {
class Data;
class Shown;
class Instance final {
public:
Instance();
~Instance();
void show(
std::shared_ptr<Main::SessionShow> show,
not_null<Data*> data,
bool local);
[[nodiscard]] bool hasActiveWindow(
not_null<Main::Session*> session) const;
2023-12-01 14:47:24 +00:00
bool closeActive();
bool minimizeActive();
void closeAll();
[[nodiscard]] rpl::lifetime &lifetime();
private:
2023-12-04 19:06:44 +00:00
void processOpenChannel(const QString &context);
void processJoinChannel(const QString &context);
std::unique_ptr<Shown> _shown;
2023-12-04 19:06:44 +00:00
Main::Session *_shownSession = nullptr;
base::flat_set<not_null<Main::Session*>> _tracking;
2023-12-04 19:06:44 +00:00
base::flat_set<not_null<ChannelData*>> _joining;
rpl::lifetime _lifetime;
};
} // namespace Iv