2019-07-17 16:34:39 +02: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
|
|
|
|
|
2021-08-31 14:50:49 +03:00
|
|
|
namespace Main {
|
|
|
|
class Session;
|
|
|
|
} // namespace Main
|
|
|
|
|
2019-07-17 16:34:39 +02:00
|
|
|
class History;
|
2020-03-06 16:12:03 +04:00
|
|
|
class PhotoData;
|
2019-07-17 16:34:39 +02:00
|
|
|
class DocumentData;
|
2020-06-12 18:09:04 +04:00
|
|
|
struct FileLoadResult;
|
2019-07-17 16:34:39 +02:00
|
|
|
|
2021-03-28 13:44:06 +03:00
|
|
|
namespace MTP {
|
|
|
|
class Error;
|
|
|
|
} // namespace MTP
|
2020-09-11 09:23:30 +03:00
|
|
|
|
|
|
|
namespace Data {
|
|
|
|
class LocationPoint;
|
|
|
|
} // namespace Data
|
2019-07-17 16:34:39 +02:00
|
|
|
|
|
|
|
namespace Api {
|
|
|
|
|
2019-08-12 13:11:34 +01:00
|
|
|
struct MessageToSend;
|
2020-07-06 13:58:18 +04:00
|
|
|
struct SendAction;
|
2019-07-17 16:34:39 +02:00
|
|
|
|
2021-08-23 03:04:03 +03:00
|
|
|
void SendWebDocument(
|
2021-12-07 19:18:08 +03:00
|
|
|
MessageToSend &&message,
|
2021-08-23 03:04:03 +03:00
|
|
|
not_null<DocumentData*> document,
|
|
|
|
Fn<void()> doneCallback = nullptr,
|
|
|
|
bool forwarding = false);
|
|
|
|
|
2019-07-17 16:34:39 +02:00
|
|
|
void SendExistingDocument(
|
2021-11-18 11:03:03 +04:00
|
|
|
MessageToSend &&message,
|
2020-09-11 09:23:30 +03:00
|
|
|
not_null<DocumentData*> document,
|
|
|
|
Fn<void()> doneCallback = nullptr,
|
|
|
|
bool forwarding = false);
|
2019-07-17 16:34:39 +02:00
|
|
|
|
|
|
|
void SendExistingPhoto(
|
2021-11-18 11:03:03 +04:00
|
|
|
MessageToSend &&message,
|
2020-09-11 09:23:30 +03:00
|
|
|
not_null<PhotoData*> photo,
|
|
|
|
Fn<void()> doneCallback = nullptr,
|
|
|
|
bool forwarding = false);
|
2019-07-17 16:34:39 +02:00
|
|
|
|
2021-03-29 04:16:22 +03:00
|
|
|
bool SendDice(
|
2021-12-07 19:18:08 +03:00
|
|
|
MessageToSend &message,
|
2021-03-30 16:32:09 +03:00
|
|
|
Fn<void(const MTPUpdates &, mtpRequestId)> doneCallback = nullptr,
|
2021-03-29 04:16:22 +03:00
|
|
|
bool forwarding = false);
|
2020-03-06 16:12:03 +04:00
|
|
|
|
2020-05-17 12:09:20 +03:00
|
|
|
void FillMessagePostFlags(
|
|
|
|
const SendAction &action,
|
|
|
|
not_null<PeerData*> peer,
|
2021-07-28 14:55:02 +03:00
|
|
|
MessageFlags &flags);
|
2020-05-17 12:09:20 +03:00
|
|
|
|
2020-06-12 18:09:04 +04:00
|
|
|
void SendConfirmedFile(
|
|
|
|
not_null<Main::Session*> session,
|
2021-03-09 12:11:40 +03:00
|
|
|
const std::shared_ptr<FileLoadResult> &file);
|
2020-06-12 18:09:04 +04:00
|
|
|
|
2020-09-11 09:23:30 +03:00
|
|
|
void SendLocationPoint(
|
|
|
|
const Data::LocationPoint &data,
|
|
|
|
const SendAction &action,
|
|
|
|
Fn<void()> done,
|
2021-03-28 13:44:06 +03:00
|
|
|
Fn<void(const MTP::Error &error)> fail);
|
2020-09-11 09:23:30 +03:00
|
|
|
|
2019-07-17 16:34:39 +02:00
|
|
|
} // namespace Api
|