#include "id3v2_shim.hpp" namespace taglib_shim { std::unique_ptr Tag_frameList(const TagLib::ID3v2::Tag& tag) { return std::make_unique(tag.frameList()); } std::unique_ptr> FrameList_to_vector(const TagLib::ID3v2::FrameList& list) { auto frames = std::make_unique>(); for (const auto& frame : list) { frames->push_back(FramePointer{frame}); } return frames; } const TagLib::ID3v2::TextIdentificationFrame* Frame_asTextIdentification(const TagLib::ID3v2::Frame* frame) { return dynamic_cast(frame); } const TagLib::ID3v2::UserTextIdentificationFrame* Frame_asUserTextIdentification(const TagLib::ID3v2::Frame* frame) { return dynamic_cast(frame); } const TagLib::ID3v2::AttachedPictureFrame* Frame_asAttachedPicture(const TagLib::ID3v2::Frame* frame) { return dynamic_cast(frame); } std::unique_ptr Frame_id(const TagLib::ID3v2::Frame& frame) { return std::make_unique(frame.frameID()); } std::unique_ptr AttachedPictureFrame_picture(const TagLib::ID3v2::AttachedPictureFrame& frame) { return std::make_unique(frame.picture()); } uint32_t AttachedPictureFrame_type(const TagLib::ID3v2::AttachedPictureFrame& frame) { return static_cast(frame.type()); } std::unique_ptr TextIdentificationFrame_fieldList(const TagLib::ID3v2::TextIdentificationFrame& frame) { return std::make_unique(frame.fieldList()); } std::unique_ptr UserTextIdentificationFrame_fieldList(const TagLib::ID3v2::UserTextIdentificationFrame& frame) { return std::make_unique(frame.fieldList()); } }