// // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 // // 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/DialogId.h" #include "td/telegram/files/FileId.h" #include "td/telegram/StoryContentType.h" #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" #include "td/utils/common.h" #include "td/utils/Status.h" namespace td { class Td; class StoryContent { public: StoryContent() = default; StoryContent(const StoryContent &) = default; StoryContent &operator=(const StoryContent &) = default; StoryContent(StoryContent &&) = default; StoryContent &operator=(StoryContent &&) = default; virtual StoryContentType get_type() const = 0; virtual ~StoryContent() = default; }; unique_ptr get_story_content(Td *td, telegram_api::object_ptr &&media_ptr, DialogId owner_dialog_id); Result> get_input_story_content( Td *td, td_api::object_ptr &&input_story_content, DialogId owner_dialog_id); telegram_api::object_ptr get_story_content_input_media( Td *td, const StoryContent *content, telegram_api::object_ptr input_file); void merge_story_contents(Td *td, const StoryContent *old_content, StoryContent *new_content, DialogId dialog_id, bool need_merge_files, bool &is_content_changed, bool &need_update); unique_ptr copy_story_content(const StoryContent *content); unique_ptr dup_story_content(Td *td, const StoryContent *content); td_api::object_ptr get_story_content_object(Td *td, const StoryContent *content); FileId get_story_content_any_file_id(const Td *td, const StoryContent *content); vector get_story_content_file_ids(const Td *td, const StoryContent *content); int32 get_story_content_duration(const Td *td, const StoryContent *content); } // namespace td