This repository has been archived on 2020-05-25. You can view files and clone it, but cannot push or open issues or pull requests.
tdlib-fork/td/telegram/Document.h
levlam 85dd77b02c Initial background support.
GitOrigin-RevId: 14d3a1166f837069c55f40036a633295600524ca
2019-05-07 05:51:56 +03:00

41 lines
1010 B
C++

//
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2019
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#pragma once
#include "td/telegram/files/FileId.h"
#include "td/utils/common.h"
#include "td/utils/StringBuilder.h"
namespace td {
class Td;
struct Document {
// append only
enum class Type : int32 { Unknown, Animation, Audio, General, Sticker, Video, VideoNote, VoiceNote };
Type type = Type::Unknown;
FileId file_id;
Document() = default;
Document(Type type, FileId file_id) : type(type), file_id(file_id) {
}
bool empty() const {
return type == Type::Unknown;
}
vector<FileId> get_file_ids(const Td *td) const;
};
StringBuilder &operator<<(StringBuilder &string_builder, const Document::Type &document_type);
StringBuilder &operator<<(StringBuilder &string_builder, const Document &document);
} // namespace td