AyuGramDesktop/Telegram/SourceFiles/ayu/utils/ayu_mapper.h
2025-07-15 17:47:25 +03:00

21 lines
710 B
C++

// This is the source code of AyuGram for Desktop.
//
// We do not and cannot prevent the use of our code,
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2025
#pragma once
namespace AyuMapper {
template<typename MTPObject>
[[nodiscard]] MTPObject deserializeObject(std::vector<char> serialized);
template<typename MTPObject>
[[nodiscard]] std::vector<char> serializeObject(MTPObject object);
std::pair<std::string, std::vector<char>> serializeTextWithEntities(not_null<HistoryItem*> item);
[[nodiscard]] MTPVector<MTPMessageEntity> deserializeTextWithEntities(std::vector<char> serialized);
int mapItemFlagsToMTPFlags(not_null<HistoryItem*> item);
} // namespace AyuMapper