1 /*
2 This file is part of Telegram Desktop,
3 the official desktop application for the Telegram messaging service.
4 
5 For license and copyright information please follow this link:
6 https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
7 */
8 #pragma once
9 
10 #include "base/binary_guard.h"
11 
12 class DocumentData;
13 class HistoryItem;
14 
15 namespace Window {
16 class SessionController;
17 } // namespace Window
18 
19 namespace Data {
20 
21 class DocumentMedia;
22 
23 [[nodiscard]] QString FileExtension(const QString &filepath);
24 // [[nodiscard]] bool IsValidMediaFile(const QString &filepath);
25 [[nodiscard]] bool IsExecutableName(const QString &filepath);
26 [[nodiscard]] bool IsIpRevealingName(const QString &filepath);
27 base::binary_guard ReadBackgroundImageAsync(
28 	not_null<Data::DocumentMedia*> media,
29 	FnMut<QImage(QImage)> postprocess,
30 	FnMut<void(QImage&&)> done);
31 
32 void ResolveDocument(
33 	Window::SessionController *controller,
34 	not_null<DocumentData*> document,
35 	HistoryItem *item);
36 
37 } // namespace Data
38