#ifndef CLI_JSON #define CLI_JSON #include #include #include #include namespace TagParser { class MediaFileInfo; class Tag; class TagValue; } namespace Cli { namespace Json { struct TagValue : ReflectiveRapidJSON::JsonSerializable { TagValue(const TagParser::TagValue &tagValue, RAPIDJSON_NAMESPACE::Document::AllocatorType &allocator); const char *kind = "undefined"; const std::string mimeType; struct ValueAllowedToMove : RAPIDJSON_NAMESPACE::Value { } value; }; struct TargetInfo : ReflectiveRapidJSON::JsonSerializable { using IdContainerType = TagParser::TagTarget::IdContainerType; TargetInfo(const TagParser::TagTarget &tagTarget, RAPIDJSON_NAMESPACE::Document::AllocatorType &allocator); std::uint64_t level; std::string levelName; IdContainerType tracks; IdContainerType chapters; IdContainerType editions; IdContainerType attachments; }; struct TagInfo : ReflectiveRapidJSON::JsonSerializable { TagInfo(const TagParser::Tag &tag, RAPIDJSON_NAMESPACE::Document::AllocatorType &allocator); std::string_view format; TargetInfo target; std::unordered_map> fields; }; struct FileInfo : ReflectiveRapidJSON::JsonSerializable { FileInfo(const TagParser::MediaFileInfo &mediaFileInfo, RAPIDJSON_NAMESPACE::Document::AllocatorType &allocator); std::string fileName; std::size_t size; std::string_view mimeType; std::vector tags; std::string formatSummary; CppUtilities::TimeSpan duration; }; } } #endif // CLI_JSON