/* 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; } // namespace Main namespace Data { struct CloudTheme { uint64 id = 0; uint64 accessHash = 0; QString slug; QString title; DocumentData *document = nullptr; bool creator = false; }; class CloudThemes final { public: explicit CloudThemes(not_null session); [[nodiscard]] static QString Format(); void refresh(); [[nodiscard]] rpl::producer<> updated() const; [[nodiscard]] const std::vector &list() const; private: void parseThemes(const QVector &list); const not_null _session; int32 _hash = 0; mtpRequestId _requestId = 0; std::vector _list; rpl::event_stream<> _updates; }; } // namespace Data