mirror of
https://github.com/taglib/taglib.git
synced 2026-07-22 11:20:54 -04:00
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).
This commit is contained in:
@@ -86,6 +86,7 @@ namespace TagLib {
|
||||
|
||||
private:
|
||||
class StringHandlerPrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<StringHandlerPrivate> d;
|
||||
};
|
||||
|
||||
@@ -201,6 +202,7 @@ namespace TagLib {
|
||||
|
||||
private:
|
||||
class TagPrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<TagPrivate> d;
|
||||
};
|
||||
} // namespace ID3v1
|
||||
|
||||
@@ -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<AttachedPictureFramePrivate> d;
|
||||
|
||||
private:
|
||||
|
||||
@@ -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<ChapterFramePrivate> d;
|
||||
};
|
||||
} // namespace ID3v2
|
||||
|
||||
@@ -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<CommentsFramePrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -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<EventTimingCodesFramePrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -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<GeneralEncapsulatedObjectFramePrivate> d;
|
||||
};
|
||||
} // namespace ID3v2
|
||||
|
||||
@@ -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<OwnershipFramePrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -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<PodcastFramePrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -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<PopularimeterFramePrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -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<PrivateFramePrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -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<RelativeVolumeFramePrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -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<SynchronizedLyricsFramePrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -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<TableOfContentsFramePrivate> d;
|
||||
};
|
||||
} // namespace ID3v2
|
||||
|
||||
@@ -223,6 +223,7 @@ namespace TagLib {
|
||||
*/
|
||||
PropertyMap makeTMCLProperties() const;
|
||||
class TextIdentificationFramePrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<TextIdentificationFramePrivate> d;
|
||||
};
|
||||
|
||||
@@ -318,6 +319,7 @@ namespace TagLib {
|
||||
void checkFields();
|
||||
|
||||
class UserTextIdentificationFramePrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<UserTextIdentificationFramePrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -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<UniqueFileIdentifierFramePrivate> d;
|
||||
};
|
||||
} // namespace ID3v2
|
||||
|
||||
@@ -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<UnknownFramePrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -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<UnsynchronizedLyricsFramePrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ namespace TagLib {
|
||||
|
||||
private:
|
||||
class UrlLinkFramePrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<UrlLinkFramePrivate> d;
|
||||
};
|
||||
|
||||
@@ -182,6 +183,7 @@ namespace TagLib {
|
||||
|
||||
private:
|
||||
class UserUrlLinkFramePrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<UserUrlLinkFramePrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ namespace TagLib {
|
||||
|
||||
private:
|
||||
class ExtendedHeaderPrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<ExtendedHeaderPrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ namespace TagLib {
|
||||
|
||||
private:
|
||||
class FooterPrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<FooterPrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -264,6 +264,7 @@ namespace TagLib {
|
||||
private:
|
||||
class FramePrivate;
|
||||
friend class FramePrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<FramePrivate> d;
|
||||
};
|
||||
|
||||
@@ -427,6 +428,7 @@ namespace TagLib {
|
||||
|
||||
private:
|
||||
class HeaderPrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<HeaderPrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -178,6 +178,7 @@ namespace TagLib {
|
||||
static FrameFactory factory;
|
||||
|
||||
class FrameFactoryPrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<FrameFactoryPrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -167,6 +167,7 @@ namespace TagLib {
|
||||
|
||||
private:
|
||||
class HeaderPrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<HeaderPrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ namespace TagLib {
|
||||
|
||||
private:
|
||||
class Latin1StringHandlerPrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<Latin1StringHandlerPrivate> d;
|
||||
};
|
||||
|
||||
@@ -395,6 +396,7 @@ namespace TagLib {
|
||||
|
||||
private:
|
||||
class TagPrivate;
|
||||
TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
|
||||
std::unique_ptr<TagPrivate> d;
|
||||
};
|
||||
|
||||
|
||||
@@ -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<FilePrivate> d;
|
||||
};
|
||||
} // namespace MPEG
|
||||
|
||||
@@ -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<HeaderPrivate> d;
|
||||
};
|
||||
} // namespace MPEG
|
||||
|
||||
@@ -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<PropertiesPrivate> d;
|
||||
};
|
||||
} // namespace MPEG
|
||||
|
||||
@@ -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<XingHeaderPrivate> d;
|
||||
};
|
||||
} // namespace MPEG
|
||||
|
||||
Reference in New Issue
Block a user