/* * Copyright (c) 2024 Auxio Project * JVMMetadataBuilder.h is part of Auxio. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef AUXIO_JVMMETADATABUILDER_H #define AUXIO_JVMMETADATABUILDER_H #include #include #include #include "taglib/id3v1tag.h" #include "taglib/id3v2tag.h" #include "taglib/xiphcomment.h" #include "taglib/mp4tag.h" #include "taglib/audioproperties.h" #include "JVMTagMap.h" class JVMMetadataBuilder { public: JVMMetadataBuilder(JNIEnv *env); void setMimeType(const std::string_view type); void setId3v1(TagLib::ID3v1::Tag &tag); void setId3v2(TagLib::ID3v2::Tag &tag); void setXiph(TagLib::Ogg::XiphComment &tag); void setMp4(TagLib::MP4::Tag &tag); void setFlacPictures(TagLib::List &pics); void setProperties(TagLib::AudioProperties *properties); jobject build(); private: JNIEnv *env; std::string_view mimeType; std::optional cover; TagLib::AudioProperties *properties; JVMTagMap id3v2; JVMTagMap xiph; JVMTagMap mp4; }; #endif //AUXIO_JVMMETADATABUILDER_H