From c9486731d95246b6701a9247385f3344fa7456b6 Mon Sep 17 00:00:00 2001 From: Urs Fleisch Date: Sun, 10 Dec 2023 17:03:40 +0100 Subject: [PATCH] Fix MSVC warning needs to have dll-interface (#1185) Unfortunately, MSVC exports everything (not only public members) when __declspec(dllexport) is set at the class level via TAGLIB_EXPORT, which leads to many "needs to have dll-interface to be used by clients" 4251 warnings issued by MSVC, because the std::unique_ptr pimpls are exported too. As it is not possible to "unexport" private members, such a warning has to be explicitly suppressed for these cases or all public and protected class member now have to be exported for classes derived from a template (StringList, ByteVectorList, PropertyMap). --- CMakeLists.txt | 7 ------ taglib/ape/apefile.h | 1 + taglib/ape/apefooter.h | 1 + taglib/ape/apeitem.h | 1 + taglib/ape/apeproperties.h | 1 + taglib/ape/apetag.h | 1 + taglib/asf/asfattribute.h | 1 + taglib/asf/asffile.h | 1 + taglib/asf/asfpicture.h | 1 + taglib/asf/asfproperties.h | 1 + taglib/asf/asftag.h | 1 + taglib/audioproperties.h | 1 + taglib/dsdiff/dsdiffdiintag.h | 1 + taglib/dsdiff/dsdifffile.h | 1 + taglib/dsdiff/dsdiffproperties.h | 1 + taglib/dsf/dsffile.h | 1 + taglib/dsf/dsfproperties.h | 1 + taglib/fileref.h | 3 +++ taglib/flac/flacfile.h | 1 + taglib/flac/flacmetadatablock.h | 1 + taglib/flac/flacpicture.h | 1 + taglib/flac/flacproperties.h | 1 + taglib/flac/flacunknownmetadatablock.h | 1 + taglib/it/itfile.h | 1 + taglib/it/itproperties.h | 1 + taglib/mod/modfile.h | 1 + taglib/mod/modfilebase.h | 1 + taglib/mod/modproperties.h | 1 + taglib/mod/modtag.h | 1 + taglib/mp4/mp4atom.h | 2 ++ taglib/mp4/mp4coverart.h | 1 + taglib/mp4/mp4file.h | 1 + taglib/mp4/mp4item.h | 1 + taglib/mp4/mp4itemfactory.h | 1 + taglib/mp4/mp4properties.h | 1 + taglib/mp4/mp4tag.h | 1 + taglib/mpc/mpcfile.h | 1 + taglib/mpc/mpcproperties.h | 1 + taglib/mpeg/id3v1/id3v1tag.h | 2 ++ .../mpeg/id3v2/frames/attachedpictureframe.h | 1 + taglib/mpeg/id3v2/frames/chapterframe.h | 1 + taglib/mpeg/id3v2/frames/commentsframe.h | 1 + .../mpeg/id3v2/frames/eventtimingcodesframe.h | 1 + .../frames/generalencapsulatedobjectframe.h | 1 + taglib/mpeg/id3v2/frames/ownershipframe.h | 1 + taglib/mpeg/id3v2/frames/podcastframe.h | 1 + taglib/mpeg/id3v2/frames/popularimeterframe.h | 1 + taglib/mpeg/id3v2/frames/privateframe.h | 1 + .../mpeg/id3v2/frames/relativevolumeframe.h | 1 + .../id3v2/frames/synchronizedlyricsframe.h | 1 + .../mpeg/id3v2/frames/tableofcontentsframe.h | 1 + .../id3v2/frames/textidentificationframe.h | 2 ++ .../id3v2/frames/uniquefileidentifierframe.h | 1 + taglib/mpeg/id3v2/frames/unknownframe.h | 1 + .../id3v2/frames/unsynchronizedlyricsframe.h | 1 + taglib/mpeg/id3v2/frames/urllinkframe.h | 2 ++ taglib/mpeg/id3v2/id3v2extendedheader.h | 1 + taglib/mpeg/id3v2/id3v2footer.h | 1 + taglib/mpeg/id3v2/id3v2frame.h | 2 ++ taglib/mpeg/id3v2/id3v2framefactory.h | 1 + taglib/mpeg/id3v2/id3v2header.h | 1 + taglib/mpeg/id3v2/id3v2tag.h | 2 ++ taglib/mpeg/mpegfile.h | 1 + taglib/mpeg/mpegheader.h | 1 + taglib/mpeg/mpegproperties.h | 1 + taglib/mpeg/xingheader.h | 1 + taglib/ogg/flac/oggflacfile.h | 1 + taglib/ogg/oggfile.h | 1 + taglib/ogg/oggpage.h | 1 + taglib/ogg/oggpageheader.h | 1 + taglib/ogg/opus/opusfile.h | 1 + taglib/ogg/opus/opusproperties.h | 1 + taglib/ogg/speex/speexfile.h | 1 + taglib/ogg/speex/speexproperties.h | 1 + taglib/ogg/vorbis/vorbisfile.h | 1 + taglib/ogg/vorbis/vorbisproperties.h | 1 + taglib/ogg/xiphcomment.h | 1 + taglib/riff/aiff/aifffile.h | 1 + taglib/riff/aiff/aiffproperties.h | 1 + taglib/riff/rifffile.h | 1 + taglib/riff/wav/infotag.h | 2 ++ taglib/riff/wav/wavfile.h | 1 + taglib/riff/wav/wavproperties.h | 1 + taglib/s3m/s3mfile.h | 1 + taglib/s3m/s3mproperties.h | 1 + taglib/tag.h | 1 + taglib/taglib_export.h | 15 +++++++++++ taglib/toolkit/tbytevector.h | 1 + taglib/toolkit/tbytevectorlist.h | 10 +++++++- taglib/toolkit/tbytevectorstream.h | 1 + taglib/toolkit/tdebuglistener.h | 1 + taglib/toolkit/tfile.h | 1 + taglib/toolkit/tfilestream.h | 1 + taglib/toolkit/tiostream.h | 2 ++ taglib/toolkit/tpropertymap.h | 25 ++++++++++++++++++- taglib/toolkit/tstring.h | 1 + taglib/toolkit/tstringlist.h | 14 ++++++++++- taglib/toolkit/tvariant.h | 1 + taglib/trueaudio/trueaudiofile.h | 1 + taglib/trueaudio/trueaudioproperties.h | 1 + taglib/wavpack/wavpackfile.h | 1 + taglib/wavpack/wavpackproperties.h | 1 + taglib/xm/xmfile.h | 1 + taglib/xm/xmproperties.h | 1 + 104 files changed, 170 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4055c0a6..8aca8cb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,13 +61,6 @@ if(MSVC) string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") endforeach(flag_var) endif() - # Disable warnings for internal invocations of API functions - # that have been marked with TAGLIB_DEPRECATED - # https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4996 - # Also disable C4910: '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation - # and C4251: needs to have dll-interface to be used by clients. - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /wd4910 /wd4251") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996 /wd4910 /wd4251") endif() # Read version information from file taglib/toolkit/taglib.h into variables diff --git a/taglib/ape/apefile.h b/taglib/ape/apefile.h index 72eedf64..134e5fa2 100644 --- a/taglib/ape/apefile.h +++ b/taglib/ape/apefile.h @@ -227,6 +227,7 @@ namespace TagLib { void read(bool readProperties); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace APE diff --git a/taglib/ape/apefooter.h b/taglib/ape/apefooter.h index 7db6ce85..89b10d2c 100644 --- a/taglib/ape/apefooter.h +++ b/taglib/ape/apefooter.h @@ -164,6 +164,7 @@ namespace TagLib { private: class FooterPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/ape/apeitem.h b/taglib/ape/apeitem.h index c5799c23..094e3fa4 100644 --- a/taglib/ape/apeitem.h +++ b/taglib/ape/apeitem.h @@ -195,6 +195,7 @@ namespace TagLib { private: class ItemPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace APE diff --git a/taglib/ape/apeproperties.h b/taglib/ape/apeproperties.h index ec284a12..f61f0e0a 100644 --- a/taglib/ape/apeproperties.h +++ b/taglib/ape/apeproperties.h @@ -108,6 +108,7 @@ namespace TagLib { void analyzeOld(File *file); class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace APE diff --git a/taglib/ape/apetag.h b/taglib/ape/apetag.h index 485f5035..a4d03c4f 100644 --- a/taglib/ape/apetag.h +++ b/taglib/ape/apetag.h @@ -202,6 +202,7 @@ namespace TagLib { private: class TagPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace APE diff --git a/taglib/asf/asfattribute.h b/taglib/asf/asfattribute.h index 72cff8ae..0b7f2cd6 100644 --- a/taglib/asf/asfattribute.h +++ b/taglib/asf/asfattribute.h @@ -197,6 +197,7 @@ namespace TagLib ByteVector render(const String &name, int kind = 0) const; class AttributePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::shared_ptr d; }; } // namespace ASF diff --git a/taglib/asf/asffile.h b/taglib/asf/asffile.h index 4bba13dd..5da96dc1 100644 --- a/taglib/asf/asffile.h +++ b/taglib/asf/asffile.h @@ -129,6 +129,7 @@ namespace TagLib { void read(); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace ASF diff --git a/taglib/asf/asfpicture.h b/taglib/asf/asfpicture.h index c379359e..bb0bd6c7 100644 --- a/taglib/asf/asfpicture.h +++ b/taglib/asf/asfpicture.h @@ -172,6 +172,7 @@ namespace TagLib private: class PicturePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::shared_ptr d; }; } // namespace ASF diff --git a/taglib/asf/asfproperties.h b/taglib/asf/asfproperties.h index 95b88fee..2440ba3a 100644 --- a/taglib/asf/asfproperties.h +++ b/taglib/asf/asfproperties.h @@ -154,6 +154,7 @@ namespace TagLib { private: class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace ASF diff --git a/taglib/asf/asftag.h b/taglib/asf/asftag.h index 35ffe81d..d1150de3 100644 --- a/taglib/asf/asftag.h +++ b/taglib/asf/asftag.h @@ -211,6 +211,7 @@ namespace TagLib { private: class TagPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace ASF diff --git a/taglib/audioproperties.h b/taglib/audioproperties.h index ee2b5de4..482b9691 100644 --- a/taglib/audioproperties.h +++ b/taglib/audioproperties.h @@ -126,6 +126,7 @@ namespace TagLib { private: class AudioPropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/dsdiff/dsdiffdiintag.h b/taglib/dsdiff/dsdiffdiintag.h index 124a4da6..62a7b735 100644 --- a/taglib/dsdiff/dsdiffdiintag.h +++ b/taglib/dsdiff/dsdiffdiintag.h @@ -137,6 +137,7 @@ namespace TagLib { private: class TagPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace DIIN diff --git a/taglib/dsdiff/dsdifffile.h b/taglib/dsdiff/dsdifffile.h index dbfaa25b..4871423d 100644 --- a/taglib/dsdiff/dsdifffile.h +++ b/taglib/dsdiff/dsdifffile.h @@ -283,6 +283,7 @@ namespace TagLib { unsigned int leadingPadding = 0); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace DSDIFF diff --git a/taglib/dsdiff/dsdiffproperties.h b/taglib/dsdiff/dsdiffproperties.h index b7aaf29d..6e6ce068 100644 --- a/taglib/dsdiff/dsdiffproperties.h +++ b/taglib/dsdiff/dsdiffproperties.h @@ -70,6 +70,7 @@ namespace TagLib { private: class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace DSDIFF diff --git a/taglib/dsf/dsffile.h b/taglib/dsf/dsffile.h index 0264cb05..2372bd42 100644 --- a/taglib/dsf/dsffile.h +++ b/taglib/dsf/dsffile.h @@ -127,6 +127,7 @@ namespace TagLib { void read(AudioProperties::ReadStyle propertiesStyle); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace DSF diff --git a/taglib/dsf/dsfproperties.h b/taglib/dsf/dsfproperties.h index 3bd977ec..f3ba730e 100644 --- a/taglib/dsf/dsfproperties.h +++ b/taglib/dsf/dsfproperties.h @@ -63,6 +63,7 @@ namespace TagLib { void read(const ByteVector &data); class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace DSF diff --git a/taglib/fileref.h b/taglib/fileref.h index 316555f6..2804e5cc 100644 --- a/taglib/fileref.h +++ b/taglib/fileref.h @@ -116,6 +116,7 @@ namespace TagLib { audioPropertiesStyle = AudioProperties::Average) const = 0; private: class FileTypeResolverPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; @@ -137,6 +138,7 @@ namespace TagLib { audioPropertiesStyle = AudioProperties::Average) const = 0; private: class StreamTypeResolverPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; @@ -379,6 +381,7 @@ namespace TagLib { void parse(IOStream *stream, bool readAudioProperties, AudioProperties::ReadStyle audioPropertiesStyle); class FileRefPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::shared_ptr d; }; diff --git a/taglib/flac/flacfile.h b/taglib/flac/flacfile.h index 8bdd1ff5..bb2c3a22 100644 --- a/taglib/flac/flacfile.h +++ b/taglib/flac/flacfile.h @@ -324,6 +324,7 @@ namespace TagLib { void scan(); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace FLAC diff --git a/taglib/flac/flacmetadatablock.h b/taglib/flac/flacmetadatablock.h index 2c68df34..e69a6b04 100644 --- a/taglib/flac/flacmetadatablock.h +++ b/taglib/flac/flacmetadatablock.h @@ -63,6 +63,7 @@ namespace TagLib { private: class MetadataBlockPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace FLAC diff --git a/taglib/flac/flacpicture.h b/taglib/flac/flacpicture.h index 665af875..eb2a630e 100644 --- a/taglib/flac/flacpicture.h +++ b/taglib/flac/flacpicture.h @@ -152,6 +152,7 @@ namespace TagLib { private: class PicturePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/flac/flacproperties.h b/taglib/flac/flacproperties.h index 85cdefe3..2effd60d 100644 --- a/taglib/flac/flacproperties.h +++ b/taglib/flac/flacproperties.h @@ -101,6 +101,7 @@ namespace TagLib { void read(const ByteVector &data, offset_t streamLength); class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace FLAC diff --git a/taglib/flac/flacunknownmetadatablock.h b/taglib/flac/flacunknownmetadatablock.h index 2f07ac58..d50354d4 100644 --- a/taglib/flac/flacunknownmetadatablock.h +++ b/taglib/flac/flacunknownmetadatablock.h @@ -69,6 +69,7 @@ namespace TagLib { private: class UnknownMetadataBlockPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace FLAC diff --git a/taglib/it/itfile.h b/taglib/it/itfile.h index b4821dcd..c7f340d2 100644 --- a/taglib/it/itfile.h +++ b/taglib/it/itfile.h @@ -88,6 +88,7 @@ namespace TagLib { void read(bool readProperties); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace IT diff --git a/taglib/it/itproperties.h b/taglib/it/itproperties.h index 05d459be..1d118b43 100644 --- a/taglib/it/itproperties.h +++ b/taglib/it/itproperties.h @@ -93,6 +93,7 @@ namespace TagLib { private: class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace IT diff --git a/taglib/mod/modfile.h b/taglib/mod/modfile.h index 860cfcaa..f7cd13c9 100644 --- a/taglib/mod/modfile.h +++ b/taglib/mod/modfile.h @@ -102,6 +102,7 @@ namespace TagLib { void read(bool readProperties); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace Mod diff --git a/taglib/mod/modfilebase.h b/taglib/mod/modfilebase.h index 374eedc8..75fceab1 100644 --- a/taglib/mod/modfilebase.h +++ b/taglib/mod/modfilebase.h @@ -63,6 +63,7 @@ namespace TagLib { bool readU32B(unsigned long &number); private: class FileBasePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace Mod diff --git a/taglib/mod/modproperties.h b/taglib/mod/modproperties.h index 03e1ef3f..0cd5384e 100644 --- a/taglib/mod/modproperties.h +++ b/taglib/mod/modproperties.h @@ -54,6 +54,7 @@ namespace TagLib { private: class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace Mod diff --git a/taglib/mod/modtag.h b/taglib/mod/modtag.h index b2bca87e..974b1caf 100644 --- a/taglib/mod/modtag.h +++ b/taglib/mod/modtag.h @@ -182,6 +182,7 @@ namespace TagLib { private: class TagPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace Mod diff --git a/taglib/mp4/mp4atom.h b/taglib/mp4/mp4atom.h index a365c4a4..cad6cab6 100644 --- a/taglib/mp4/mp4atom.h +++ b/taglib/mp4/mp4atom.h @@ -94,6 +94,7 @@ namespace TagLib { private: class AtomPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; @@ -112,6 +113,7 @@ namespace TagLib { private: class AtomsPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace MP4 diff --git a/taglib/mp4/mp4coverart.h b/taglib/mp4/mp4coverart.h index b6d5af83..24425365 100644 --- a/taglib/mp4/mp4coverart.h +++ b/taglib/mp4/mp4coverart.h @@ -70,6 +70,7 @@ namespace TagLib { private: class CoverArtPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::shared_ptr d; }; diff --git a/taglib/mp4/mp4file.h b/taglib/mp4/mp4file.h index ad708909..c29c9d89 100644 --- a/taglib/mp4/mp4file.h +++ b/taglib/mp4/mp4file.h @@ -164,6 +164,7 @@ namespace TagLib { void read(bool readProperties); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace MP4 diff --git a/taglib/mp4/mp4item.h b/taglib/mp4/mp4item.h index 1c6de582..50eb0f4a 100644 --- a/taglib/mp4/mp4item.h +++ b/taglib/mp4/mp4item.h @@ -81,6 +81,7 @@ namespace TagLib { private: class ItemPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::shared_ptr d; }; diff --git a/taglib/mp4/mp4itemfactory.h b/taglib/mp4/mp4itemfactory.h index e908b347..4e209336 100644 --- a/taglib/mp4/mp4itemfactory.h +++ b/taglib/mp4/mp4itemfactory.h @@ -247,6 +247,7 @@ namespace TagLib { static ItemFactory factory; class ItemFactoryPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mp4/mp4properties.h b/taglib/mp4/mp4properties.h index baafab77..c6ba57a6 100644 --- a/taglib/mp4/mp4properties.h +++ b/taglib/mp4/mp4properties.h @@ -91,6 +91,7 @@ namespace TagLib { void read(File *file, Atoms *atoms); class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace MP4 diff --git a/taglib/mp4/mp4tag.h b/taglib/mp4/mp4tag.h index e0e9f7ca..c1da3362 100644 --- a/taglib/mp4/mp4tag.h +++ b/taglib/mp4/mp4tag.h @@ -129,6 +129,7 @@ namespace TagLib { void addItem(const String &name, const Item &value); class TagPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace MP4 diff --git a/taglib/mpc/mpcfile.h b/taglib/mpc/mpcfile.h index a7de62c5..66c22961 100644 --- a/taglib/mpc/mpcfile.h +++ b/taglib/mpc/mpcfile.h @@ -222,6 +222,7 @@ namespace TagLib { void read(bool readProperties); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace MPC diff --git a/taglib/mpc/mpcproperties.h b/taglib/mpc/mpcproperties.h index b39bf4c6..f304a88c 100644 --- a/taglib/mpc/mpcproperties.h +++ b/taglib/mpc/mpcproperties.h @@ -123,6 +123,7 @@ namespace TagLib { void readSV8(File *file, offset_t streamLength); class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace MPC diff --git a/taglib/mpeg/id3v1/id3v1tag.h b/taglib/mpeg/id3v1/id3v1tag.h index 56cdbedd..8a780f14 100644 --- a/taglib/mpeg/id3v1/id3v1tag.h +++ b/taglib/mpeg/id3v1/id3v1tag.h @@ -86,6 +86,7 @@ namespace TagLib { private: class StringHandlerPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; @@ -201,6 +202,7 @@ namespace TagLib { private: class TagPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace ID3v1 diff --git a/taglib/mpeg/id3v2/frames/attachedpictureframe.h b/taglib/mpeg/id3v2/frames/attachedpictureframe.h index e5d53cfb..490dbb07 100644 --- a/taglib/mpeg/id3v2/frames/attachedpictureframe.h +++ b/taglib/mpeg/id3v2/frames/attachedpictureframe.h @@ -172,6 +172,7 @@ namespace TagLib { void parseFields(const ByteVector &data) override; ByteVector renderFields() const override; class AttachedPictureFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; private: diff --git a/taglib/mpeg/id3v2/frames/chapterframe.h b/taglib/mpeg/id3v2/frames/chapterframe.h index 2e659f12..ea4a6767 100644 --- a/taglib/mpeg/id3v2/frames/chapterframe.h +++ b/taglib/mpeg/id3v2/frames/chapterframe.h @@ -242,6 +242,7 @@ namespace TagLib { ChapterFrame(const ID3v2::Header *tagHeader, const ByteVector &data, Header *h); class ChapterFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace ID3v2 diff --git a/taglib/mpeg/id3v2/frames/commentsframe.h b/taglib/mpeg/id3v2/frames/commentsframe.h index 2c8741e6..0c341228 100644 --- a/taglib/mpeg/id3v2/frames/commentsframe.h +++ b/taglib/mpeg/id3v2/frames/commentsframe.h @@ -172,6 +172,7 @@ namespace TagLib { CommentsFrame(const ByteVector &data, Header *h); class CommentsFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/frames/eventtimingcodesframe.h b/taglib/mpeg/id3v2/frames/eventtimingcodesframe.h index e044102b..8dc8f864 100644 --- a/taglib/mpeg/id3v2/frames/eventtimingcodesframe.h +++ b/taglib/mpeg/id3v2/frames/eventtimingcodesframe.h @@ -178,6 +178,7 @@ namespace TagLib { EventTimingCodesFrame(const ByteVector &data, Header *h); class EventTimingCodesFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h b/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h index d042b986..9d0b76c6 100644 --- a/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h +++ b/taglib/mpeg/id3v2/frames/generalencapsulatedobjectframe.h @@ -177,6 +177,7 @@ namespace TagLib { GeneralEncapsulatedObjectFrame(const ByteVector &data, Header *h); class GeneralEncapsulatedObjectFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace ID3v2 diff --git a/taglib/mpeg/id3v2/frames/ownershipframe.h b/taglib/mpeg/id3v2/frames/ownershipframe.h index 711808cf..dddbfd04 100644 --- a/taglib/mpeg/id3v2/frames/ownershipframe.h +++ b/taglib/mpeg/id3v2/frames/ownershipframe.h @@ -149,6 +149,7 @@ namespace TagLib { OwnershipFrame(const ByteVector &data, Header *h); class OwnershipFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/frames/podcastframe.h b/taglib/mpeg/id3v2/frames/podcastframe.h index 293e61b9..c63e8fa9 100644 --- a/taglib/mpeg/id3v2/frames/podcastframe.h +++ b/taglib/mpeg/id3v2/frames/podcastframe.h @@ -75,6 +75,7 @@ namespace TagLib { PodcastFrame(const ByteVector &data, Header *h); class PodcastFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/frames/popularimeterframe.h b/taglib/mpeg/id3v2/frames/popularimeterframe.h index 2b8474ba..e7a57822 100644 --- a/taglib/mpeg/id3v2/frames/popularimeterframe.h +++ b/taglib/mpeg/id3v2/frames/popularimeterframe.h @@ -131,6 +131,7 @@ namespace TagLib { PopularimeterFrame(const ByteVector &data, Header *h); class PopularimeterFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/frames/privateframe.h b/taglib/mpeg/id3v2/frames/privateframe.h index 9feb7603..b8002573 100644 --- a/taglib/mpeg/id3v2/frames/privateframe.h +++ b/taglib/mpeg/id3v2/frames/privateframe.h @@ -103,6 +103,7 @@ namespace TagLib { PrivateFrame(const ByteVector &data, Header *h); class PrivateFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/frames/relativevolumeframe.h b/taglib/mpeg/id3v2/frames/relativevolumeframe.h index a8eb3289..f2b0aace 100644 --- a/taglib/mpeg/id3v2/frames/relativevolumeframe.h +++ b/taglib/mpeg/id3v2/frames/relativevolumeframe.h @@ -219,6 +219,7 @@ namespace TagLib { RelativeVolumeFrame(const ByteVector &data, Header *h); class RelativeVolumeFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/frames/synchronizedlyricsframe.h b/taglib/mpeg/id3v2/frames/synchronizedlyricsframe.h index 849f3bd9..f231c1c1 100644 --- a/taglib/mpeg/id3v2/frames/synchronizedlyricsframe.h +++ b/taglib/mpeg/id3v2/frames/synchronizedlyricsframe.h @@ -225,6 +225,7 @@ namespace TagLib { SynchronizedLyricsFrame(const ByteVector &data, Header *h); class SynchronizedLyricsFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/frames/tableofcontentsframe.h b/taglib/mpeg/id3v2/frames/tableofcontentsframe.h index 9d895e54..0c12c20d 100644 --- a/taglib/mpeg/id3v2/frames/tableofcontentsframe.h +++ b/taglib/mpeg/id3v2/frames/tableofcontentsframe.h @@ -251,6 +251,7 @@ namespace TagLib { TableOfContentsFrame(const ID3v2::Header *tagHeader, const ByteVector &data, Header *h); class TableOfContentsFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace ID3v2 diff --git a/taglib/mpeg/id3v2/frames/textidentificationframe.h b/taglib/mpeg/id3v2/frames/textidentificationframe.h index 4657ba20..0d175456 100644 --- a/taglib/mpeg/id3v2/frames/textidentificationframe.h +++ b/taglib/mpeg/id3v2/frames/textidentificationframe.h @@ -223,6 +223,7 @@ namespace TagLib { */ PropertyMap makeTMCLProperties() const; class TextIdentificationFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; @@ -318,6 +319,7 @@ namespace TagLib { void checkFields(); class UserTextIdentificationFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h b/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h index bcf835f7..a17f8ee1 100644 --- a/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h +++ b/taglib/mpeg/id3v2/frames/uniquefileidentifierframe.h @@ -115,6 +115,7 @@ namespace TagLib { UniqueFileIdentifierFrame(const ByteVector &data, Header *h); class UniqueFileIdentifierFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace ID3v2 diff --git a/taglib/mpeg/id3v2/frames/unknownframe.h b/taglib/mpeg/id3v2/frames/unknownframe.h index 05b9c9e2..233d7f6e 100644 --- a/taglib/mpeg/id3v2/frames/unknownframe.h +++ b/taglib/mpeg/id3v2/frames/unknownframe.h @@ -72,6 +72,7 @@ namespace TagLib { UnknownFrame(const ByteVector &data, Header *h); class UnknownFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h b/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h index 6ba90d23..c71a788f 100644 --- a/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h +++ b/taglib/mpeg/id3v2/frames/unsynchronizedlyricsframe.h @@ -172,6 +172,7 @@ namespace TagLib { UnsynchronizedLyricsFrame(const ByteVector &data, Header *h); class UnsynchronizedLyricsFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/frames/urllinkframe.h b/taglib/mpeg/id3v2/frames/urllinkframe.h index 6c2d85eb..2b10ae45 100644 --- a/taglib/mpeg/id3v2/frames/urllinkframe.h +++ b/taglib/mpeg/id3v2/frames/urllinkframe.h @@ -85,6 +85,7 @@ namespace TagLib { private: class UrlLinkFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; @@ -182,6 +183,7 @@ namespace TagLib { private: class UserUrlLinkFramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/id3v2extendedheader.h b/taglib/mpeg/id3v2/id3v2extendedheader.h index 9d5bd102..2113b8a3 100644 --- a/taglib/mpeg/id3v2/id3v2extendedheader.h +++ b/taglib/mpeg/id3v2/id3v2extendedheader.h @@ -85,6 +85,7 @@ namespace TagLib { private: class ExtendedHeaderPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/id3v2footer.h b/taglib/mpeg/id3v2/id3v2footer.h index 94dc434b..8f1e5fa3 100644 --- a/taglib/mpeg/id3v2/id3v2footer.h +++ b/taglib/mpeg/id3v2/id3v2footer.h @@ -74,6 +74,7 @@ namespace TagLib { private: class FooterPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/id3v2frame.h b/taglib/mpeg/id3v2/id3v2frame.h index 6527a8e2..ed1c2177 100644 --- a/taglib/mpeg/id3v2/id3v2frame.h +++ b/taglib/mpeg/id3v2/id3v2frame.h @@ -264,6 +264,7 @@ namespace TagLib { private: class FramePrivate; friend class FramePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; @@ -427,6 +428,7 @@ namespace TagLib { private: class HeaderPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/id3v2framefactory.h b/taglib/mpeg/id3v2/id3v2framefactory.h index f41f60a6..13c4aed9 100644 --- a/taglib/mpeg/id3v2/id3v2framefactory.h +++ b/taglib/mpeg/id3v2/id3v2framefactory.h @@ -178,6 +178,7 @@ namespace TagLib { static FrameFactory factory; class FrameFactoryPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/id3v2header.h b/taglib/mpeg/id3v2/id3v2header.h index 5ea58df9..1c6313c9 100644 --- a/taglib/mpeg/id3v2/id3v2header.h +++ b/taglib/mpeg/id3v2/id3v2header.h @@ -167,6 +167,7 @@ namespace TagLib { private: class HeaderPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/id3v2/id3v2tag.h b/taglib/mpeg/id3v2/id3v2tag.h index d3f9b81b..3cf4fb73 100644 --- a/taglib/mpeg/id3v2/id3v2tag.h +++ b/taglib/mpeg/id3v2/id3v2tag.h @@ -80,6 +80,7 @@ namespace TagLib { private: class Latin1StringHandlerPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; @@ -395,6 +396,7 @@ namespace TagLib { private: class TagPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/mpeg/mpegfile.h b/taglib/mpeg/mpegfile.h index 41fd9863..1e53911a 100644 --- a/taglib/mpeg/mpegfile.h +++ b/taglib/mpeg/mpegfile.h @@ -328,6 +328,7 @@ namespace TagLib { offset_t findID3v2(Properties::ReadStyle readStyle); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace MPEG diff --git a/taglib/mpeg/mpegheader.h b/taglib/mpeg/mpegheader.h index 33a13b4f..41260e9c 100644 --- a/taglib/mpeg/mpegheader.h +++ b/taglib/mpeg/mpegheader.h @@ -193,6 +193,7 @@ namespace TagLib { void parse(File *file, offset_t offset, bool checkLength); class HeaderPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::shared_ptr d; }; } // namespace MPEG diff --git a/taglib/mpeg/mpegproperties.h b/taglib/mpeg/mpegproperties.h index a3812cc0..3b7c7e6e 100644 --- a/taglib/mpeg/mpegproperties.h +++ b/taglib/mpeg/mpegproperties.h @@ -133,6 +133,7 @@ namespace TagLib { void read(File *file, ReadStyle readStyle); class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace MPEG diff --git a/taglib/mpeg/xingheader.h b/taglib/mpeg/xingheader.h index 83a4f665..25e664c5 100644 --- a/taglib/mpeg/xingheader.h +++ b/taglib/mpeg/xingheader.h @@ -112,6 +112,7 @@ namespace TagLib { void parse(const ByteVector &data); class XingHeaderPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace MPEG diff --git a/taglib/ogg/flac/oggflacfile.h b/taglib/ogg/flac/oggflacfile.h index 4d40f4ff..4d4d4d51 100644 --- a/taglib/ogg/flac/oggflacfile.h +++ b/taglib/ogg/flac/oggflacfile.h @@ -160,6 +160,7 @@ namespace TagLib { ByteVector xiphCommentData(); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace FLAC diff --git a/taglib/ogg/oggfile.h b/taglib/ogg/oggfile.h index f7773bf5..eed0edba 100644 --- a/taglib/ogg/oggfile.h +++ b/taglib/ogg/oggfile.h @@ -118,6 +118,7 @@ namespace TagLib { void writePacket(unsigned int i, const ByteVector &packet); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/ogg/oggpage.h b/taglib/ogg/oggpage.h index e9b9499b..4fc9f5a4 100644 --- a/taglib/ogg/oggpage.h +++ b/taglib/ogg/oggpage.h @@ -211,6 +211,7 @@ namespace TagLib { private: class PagePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace Ogg diff --git a/taglib/ogg/oggpageheader.h b/taglib/ogg/oggpageheader.h index fbc28f13..b177c55d 100644 --- a/taglib/ogg/oggpageheader.h +++ b/taglib/ogg/oggpageheader.h @@ -223,6 +223,7 @@ namespace TagLib { ByteVector lacingValues() const; class PageHeaderPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/ogg/opus/opusfile.h b/taglib/ogg/opus/opusfile.h index a209bef8..0d8a8975 100644 --- a/taglib/ogg/opus/opusfile.h +++ b/taglib/ogg/opus/opusfile.h @@ -128,6 +128,7 @@ namespace TagLib { void read(bool readProperties); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace Opus diff --git a/taglib/ogg/opus/opusproperties.h b/taglib/ogg/opus/opusproperties.h index 8c4c7910..45523efc 100644 --- a/taglib/ogg/opus/opusproperties.h +++ b/taglib/ogg/opus/opusproperties.h @@ -105,6 +105,7 @@ namespace TagLib { void read(File *file); class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace Opus diff --git a/taglib/ogg/speex/speexfile.h b/taglib/ogg/speex/speexfile.h index e3176fe2..771e9ab2 100644 --- a/taglib/ogg/speex/speexfile.h +++ b/taglib/ogg/speex/speexfile.h @@ -128,6 +128,7 @@ namespace TagLib { void read(bool readProperties); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace Speex diff --git a/taglib/ogg/speex/speexproperties.h b/taglib/ogg/speex/speexproperties.h index a2beba47..1911f986 100644 --- a/taglib/ogg/speex/speexproperties.h +++ b/taglib/ogg/speex/speexproperties.h @@ -100,6 +100,7 @@ namespace TagLib { void read(File *file); class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace Speex diff --git a/taglib/ogg/vorbis/vorbisfile.h b/taglib/ogg/vorbis/vorbisfile.h index 64fd25d4..c69a5a21 100644 --- a/taglib/ogg/vorbis/vorbisfile.h +++ b/taglib/ogg/vorbis/vorbisfile.h @@ -137,6 +137,7 @@ namespace TagLib { void read(bool readProperties); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace Vorbis diff --git a/taglib/ogg/vorbis/vorbisproperties.h b/taglib/ogg/vorbis/vorbisproperties.h index 7241f7bd..5934df05 100644 --- a/taglib/ogg/vorbis/vorbisproperties.h +++ b/taglib/ogg/vorbis/vorbisproperties.h @@ -121,6 +121,7 @@ namespace TagLib { void read(File *file); class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace Vorbis diff --git a/taglib/ogg/xiphcomment.h b/taglib/ogg/xiphcomment.h index 2edbde2d..39ee6447 100644 --- a/taglib/ogg/xiphcomment.h +++ b/taglib/ogg/xiphcomment.h @@ -262,6 +262,7 @@ namespace TagLib { private: class XiphCommentPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace Ogg diff --git a/taglib/riff/aiff/aifffile.h b/taglib/riff/aiff/aifffile.h index a9288708..0a0cee35 100644 --- a/taglib/riff/aiff/aifffile.h +++ b/taglib/riff/aiff/aifffile.h @@ -156,6 +156,7 @@ namespace TagLib { friend class Properties; class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace AIFF diff --git a/taglib/riff/aiff/aiffproperties.h b/taglib/riff/aiff/aiffproperties.h index a81236ab..72cdc563 100644 --- a/taglib/riff/aiff/aiffproperties.h +++ b/taglib/riff/aiff/aiffproperties.h @@ -121,6 +121,7 @@ namespace TagLib { void read(File *file); class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace AIFF diff --git a/taglib/riff/rifffile.h b/taglib/riff/rifffile.h index b68be4a6..78ed38e4 100644 --- a/taglib/riff/rifffile.h +++ b/taglib/riff/rifffile.h @@ -153,6 +153,7 @@ namespace TagLib { void updateGlobalSize(); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace RIFF diff --git a/taglib/riff/wav/infotag.h b/taglib/riff/wav/infotag.h index 1935e4d1..db506e42 100644 --- a/taglib/riff/wav/infotag.h +++ b/taglib/riff/wav/infotag.h @@ -80,6 +80,7 @@ namespace TagLib { private: class StringHandlerPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; @@ -194,6 +195,7 @@ namespace TagLib { private: class TagPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace Info diff --git a/taglib/riff/wav/wavfile.h b/taglib/riff/wav/wavfile.h index f4a2dcb8..cfb4de80 100644 --- a/taglib/riff/wav/wavfile.h +++ b/taglib/riff/wav/wavfile.h @@ -207,6 +207,7 @@ namespace TagLib { friend class Properties; class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace WAV diff --git a/taglib/riff/wav/wavproperties.h b/taglib/riff/wav/wavproperties.h index ea0acad6..21a8c6e6 100644 --- a/taglib/riff/wav/wavproperties.h +++ b/taglib/riff/wav/wavproperties.h @@ -109,6 +109,7 @@ namespace TagLib { void read(File *file); class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace WAV diff --git a/taglib/s3m/s3mfile.h b/taglib/s3m/s3mfile.h index 6dfa14b2..690d397f 100644 --- a/taglib/s3m/s3mfile.h +++ b/taglib/s3m/s3mfile.h @@ -104,6 +104,7 @@ namespace TagLib { void read(bool readProperties); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace S3M diff --git a/taglib/s3m/s3mproperties.h b/taglib/s3m/s3mproperties.h index eaad0c32..d6c74d28 100644 --- a/taglib/s3m/s3mproperties.h +++ b/taglib/s3m/s3mproperties.h @@ -80,6 +80,7 @@ namespace TagLib { private: class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace S3M diff --git a/taglib/tag.h b/taglib/tag.h index ab9e0475..24d73c4e 100644 --- a/taglib/tag.h +++ b/taglib/tag.h @@ -244,6 +244,7 @@ namespace TagLib { private: class TagPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace TagLib diff --git a/taglib/taglib_export.h b/taglib/taglib_export.h index 737ae644..7a96cc94 100644 --- a/taglib/taglib_export.h +++ b/taglib/taglib_export.h @@ -40,4 +40,19 @@ #define TAGLIB_EXPORT #endif +#if defined _MSC_VER && !defined TAGLIB_STATIC +/*! + * Suppress MSVC C4251 warning for next statement. + * Unfortunately, MSVC exports everything (not only public members) when + * __declspec(dllexport) is set at the class level via TAGLIB_EXPORT, which + * leads to many "needs to have dll-interface to be used by clients" C4251 + * warnings issued by MSVC, because the std::unique_ptr pimpls are + * exported too. This macro can be used before private STL fields to suppress + * such warnings. +*/ +#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE _Pragma("warning(suppress: 4251)") +#else +#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE +#endif + #endif diff --git a/taglib/toolkit/tbytevector.h b/taglib/toolkit/tbytevector.h index 6f0f7cb5..d607aedd 100644 --- a/taglib/toolkit/tbytevector.h +++ b/taglib/toolkit/tbytevector.h @@ -644,6 +644,7 @@ namespace TagLib { private: class ByteVectorPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace TagLib diff --git a/taglib/toolkit/tbytevectorlist.h b/taglib/toolkit/tbytevectorlist.h index c81f6f19..4760943b 100644 --- a/taglib/toolkit/tbytevectorlist.h +++ b/taglib/toolkit/tbytevectorlist.h @@ -38,18 +38,20 @@ namespace TagLib { * A List specialization with some handy features useful for ByteVectors. */ - class TAGLIB_EXPORT ByteVectorList : public List + class ByteVectorList : public List { public: /*! * Construct an empty ByteVectorList. */ + TAGLIB_EXPORT ByteVectorList(); /*! * Destroys this ByteVectorList instance. */ + TAGLIB_EXPORT ~ByteVectorList(); /*! @@ -57,20 +59,25 @@ namespace TagLib { * implicitly shared, this method is lightweight and suitable for * pass-by-value usage. */ + TAGLIB_EXPORT ByteVectorList(const ByteVectorList &l); /*! * Construct a ByteVectorList with the contents of the braced initializer list. */ + TAGLIB_EXPORT ByteVectorList(std::initializer_list init); + TAGLIB_EXPORT ByteVectorList &operator=(const ByteVectorList &); + TAGLIB_EXPORT ByteVectorList &operator=(std::initializer_list init); /*! * Convert the ByteVectorList to a ByteVector separated by \a separator. By * default a space is used. */ + TAGLIB_EXPORT ByteVector toByteVector(const ByteVector &separator = " ") const; /*! @@ -80,6 +87,7 @@ namespace TagLib { * is 2 then a maximum of 1 match will be found and the vector will be split * on that match. */ + TAGLIB_EXPORT static ByteVectorList split(const ByteVector &v, const ByteVector &pattern, int byteAlign = 1, int max = 0); private: diff --git a/taglib/toolkit/tbytevectorstream.h b/taglib/toolkit/tbytevectorstream.h index 4a2893d3..10efe860 100644 --- a/taglib/toolkit/tbytevectorstream.h +++ b/taglib/toolkit/tbytevectorstream.h @@ -140,6 +140,7 @@ namespace TagLib { private: class ByteVectorStreamPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/toolkit/tdebuglistener.h b/taglib/toolkit/tdebuglistener.h index 96220106..52f30e68 100644 --- a/taglib/toolkit/tdebuglistener.h +++ b/taglib/toolkit/tdebuglistener.h @@ -56,6 +56,7 @@ namespace TagLib private: class DebugListenerPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/toolkit/tfile.h b/taglib/toolkit/tfile.h index 4c64b8a0..8347b6b9 100644 --- a/taglib/toolkit/tfile.h +++ b/taglib/toolkit/tfile.h @@ -319,6 +319,7 @@ namespace TagLib { private: class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/toolkit/tfilestream.h b/taglib/toolkit/tfilestream.h index 1c2b7077..3a7618eb 100644 --- a/taglib/toolkit/tfilestream.h +++ b/taglib/toolkit/tfilestream.h @@ -154,6 +154,7 @@ namespace TagLib { private: class FileStreamPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/toolkit/tiostream.h b/taglib/toolkit/tiostream.h index 6f2878ac..6d9698b4 100644 --- a/taglib/toolkit/tiostream.h +++ b/taglib/toolkit/tiostream.h @@ -48,6 +48,7 @@ namespace TagLib { String toString() const; private: + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE const std::wstring m_wname; }; #else @@ -162,6 +163,7 @@ namespace TagLib { private: class IOStreamPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; diff --git a/taglib/toolkit/tpropertymap.h b/taglib/toolkit/tpropertymap.h index 98242008..5030176d 100644 --- a/taglib/toolkit/tpropertymap.h +++ b/taglib/toolkit/tpropertymap.h @@ -115,16 +115,19 @@ namespace TagLib { * */ - class TAGLIB_EXPORT PropertyMap: public SimplePropertyMap + class PropertyMap: public SimplePropertyMap { public: using Iterator = SimplePropertyMap::Iterator; using ConstIterator = SimplePropertyMap::ConstIterator; + TAGLIB_EXPORT PropertyMap(); + TAGLIB_EXPORT PropertyMap(const PropertyMap &m); + TAGLIB_EXPORT PropertyMap &operator=(const PropertyMap &other); /*! @@ -132,8 +135,10 @@ namespace TagLib { * entries from \a m that have valid keys. * Invalid keys will be appended to the unsupportedData() list. */ + TAGLIB_EXPORT PropertyMap(const SimplePropertyMap &m); + TAGLIB_EXPORT ~PropertyMap(); /*! @@ -142,6 +147,7 @@ namespace TagLib { * The returned value indicates success, i.e. whether \a key is a * valid key. */ + TAGLIB_EXPORT bool insert(const String &key, const StringList &values); /*! @@ -150,21 +156,25 @@ namespace TagLib { * The returned value indicates success, i.e. whether \a key is a * valid key. */ + TAGLIB_EXPORT bool replace(const String &key, const StringList &values); /*! * Find the first occurrence of \a key. */ + TAGLIB_EXPORT Iterator find(const String &key); /*! * Find the first occurrence of \a key. */ + TAGLIB_EXPORT ConstIterator find(const String &key) const; /*! * Returns true if the map contains values for \a key. */ + TAGLIB_EXPORT bool contains(const String &key) const; /*! @@ -172,16 +182,19 @@ namespace TagLib { * and the values coincide for that keys. Does not take * the unsupportedData list into account. */ + TAGLIB_EXPORT bool contains(const PropertyMap &other) const; /*! * Erase the \a key and its values from the map. */ + TAGLIB_EXPORT PropertyMap &erase(const String &key); /*! * Erases from this map all keys that appear in \a other. */ + TAGLIB_EXPORT PropertyMap &erase(const PropertyMap &other); /*! @@ -190,6 +203,7 @@ namespace TagLib { * are appended to that of the first. * The unsupportedData() lists are concatenated as well. */ + TAGLIB_EXPORT PropertyMap &merge(const PropertyMap &other); /*! @@ -198,6 +212,7 @@ namespace TagLib { * If the map does not contain \a key, it returns defaultValue. * If no defaultValue is specified, it returns an empty string list. */ + TAGLIB_EXPORT StringList value(const String &key, const StringList &defaultValue = StringList()) const; @@ -207,6 +222,7 @@ namespace TagLib { * \note: If \a key is not contained in the map, an empty * StringList is returned without error. */ + TAGLIB_EXPORT const StringList &operator[](const String &key) const; /*! @@ -216,16 +232,19 @@ namespace TagLib { * StringList is returned. You can also directly add entries * by using this function as an lvalue. */ + TAGLIB_EXPORT StringList &operator[](const String &key); /*! * Returns true if and only if \a other has the same contents as this map. */ + TAGLIB_EXPORT bool operator==(const PropertyMap &other) const; /*! * Returns false if and only \a other has the same contents as this map. */ + TAGLIB_EXPORT bool operator!=(const PropertyMap &other) const; /*! @@ -237,6 +256,7 @@ namespace TagLib { * those unsupported elements if you call File::setProperties() with the * same PropertyMap as argument. */ + TAGLIB_EXPORT const StringList &unsupportedData() const; /*! @@ -244,13 +264,16 @@ namespace TagLib { * * \see unsupportedData() */ + TAGLIB_EXPORT void addUnsupportedData(const String &key); /*! * Removes all entries which have an empty value list. */ + TAGLIB_EXPORT void removeEmpty(); + TAGLIB_EXPORT String toString() const; private: diff --git a/taglib/toolkit/tstring.h b/taglib/toolkit/tstring.h index a9e34160..5a4326e1 100644 --- a/taglib/toolkit/tstring.h +++ b/taglib/toolkit/tstring.h @@ -517,6 +517,7 @@ namespace TagLib { private: class StringPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::shared_ptr d; }; } // namespace TagLib diff --git a/taglib/toolkit/tstringlist.h b/taglib/toolkit/tstringlist.h index 0396cde0..31f19dc2 100644 --- a/taglib/toolkit/tstringlist.h +++ b/taglib/toolkit/tstringlist.h @@ -42,13 +42,14 @@ namespace TagLib { * string operations. */ - class TAGLIB_EXPORT StringList : public List + class StringList : public List { public: /*! * Constructs an empty StringList. */ + TAGLIB_EXPORT StringList(); /*! @@ -56,19 +57,24 @@ namespace TagLib { * implicitly shared, this method is lightweight and suitable for * pass-by-value usage. */ + TAGLIB_EXPORT StringList(const StringList &l); /*! * Construct a StringList with the contents of the braced initializer list. */ + TAGLIB_EXPORT StringList(std::initializer_list init); + TAGLIB_EXPORT StringList &operator=(const StringList &); + TAGLIB_EXPORT StringList &operator=(std::initializer_list init); /*! * Constructs a StringList with \a s as a member. */ + TAGLIB_EXPORT StringList(const String &s); /*! @@ -77,34 +83,40 @@ namespace TagLib { * \note This should only be used with the 8-bit codecs Latin1 and UTF8, when * used with other codecs it will simply print a warning and exit. */ + TAGLIB_EXPORT StringList(const ByteVectorList &bl, String::Type t = String::Latin1); /*! * Destroys this StringList instance. */ + TAGLIB_EXPORT ~StringList(); /*! * Concatenate the list of strings into one string separated by \a separator. */ + TAGLIB_EXPORT String toString(const String &separator = " ") const; /*! * Appends \a s to the end of the list and returns a reference to the * list. */ + TAGLIB_EXPORT StringList &append(const String &s); /*! * Appends all of the values in \a l to the end of the list and returns a * reference to the list. */ + TAGLIB_EXPORT StringList &append(const StringList &l); /*! * Splits the String \a s into several strings at \a pattern. This will not include * the pattern in the returned strings. */ + TAGLIB_EXPORT static StringList split(const String &s, const String &pattern); private: diff --git a/taglib/toolkit/tvariant.h b/taglib/toolkit/tvariant.h index 9f34fc20..deff0ddd 100644 --- a/taglib/toolkit/tvariant.h +++ b/taglib/toolkit/tvariant.h @@ -176,6 +176,7 @@ namespace TagLib { private: friend std::ostream& ::operator<<(std::ostream &s, const TagLib::Variant &v); class VariantPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::shared_ptr d; }; diff --git a/taglib/trueaudio/trueaudiofile.h b/taglib/trueaudio/trueaudiofile.h index 7b95b00e..ae2574e3 100644 --- a/taglib/trueaudio/trueaudiofile.h +++ b/taglib/trueaudio/trueaudiofile.h @@ -243,6 +243,7 @@ namespace TagLib { void read(bool readProperties); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace TrueAudio diff --git a/taglib/trueaudio/trueaudioproperties.h b/taglib/trueaudio/trueaudioproperties.h index 80f14ca3..31c6de46 100644 --- a/taglib/trueaudio/trueaudioproperties.h +++ b/taglib/trueaudio/trueaudioproperties.h @@ -112,6 +112,7 @@ namespace TagLib { void read(const ByteVector &data, offset_t streamLength); class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace TrueAudio diff --git a/taglib/wavpack/wavpackfile.h b/taglib/wavpack/wavpackfile.h index d0847391..779287a2 100644 --- a/taglib/wavpack/wavpackfile.h +++ b/taglib/wavpack/wavpackfile.h @@ -215,6 +215,7 @@ namespace TagLib { void read(bool readProperties); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace WavPack diff --git a/taglib/wavpack/wavpackproperties.h b/taglib/wavpack/wavpackproperties.h index 3999e62a..2319ff2a 100644 --- a/taglib/wavpack/wavpackproperties.h +++ b/taglib/wavpack/wavpackproperties.h @@ -112,6 +112,7 @@ namespace TagLib { unsigned int seekFinalIndex(File *file, offset_t streamLength); class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace WavPack diff --git a/taglib/xm/xmfile.h b/taglib/xm/xmfile.h index e1c487ca..b365e9a3 100644 --- a/taglib/xm/xmfile.h +++ b/taglib/xm/xmfile.h @@ -104,6 +104,7 @@ namespace TagLib { void read(bool readProperties); class FilePrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace XM diff --git a/taglib/xm/xmproperties.h b/taglib/xm/xmproperties.h index dba8cbb3..cca58da2 100644 --- a/taglib/xm/xmproperties.h +++ b/taglib/xm/xmproperties.h @@ -71,6 +71,7 @@ namespace TagLib { private: class PropertiesPrivate; + TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE std::unique_ptr d; }; } // namespace XM