class MPEG::File::FilePrivate
{
public:
- FilePrivate() :
- ID3v2FrameFactory(ID3v2::FrameFactory::instance()),
+ FilePrivate(ID3v2::FrameFactory *frameFactory = ID3v2::FrameFactory::instance()) :
+ ID3v2FrameFactory(frameFactory),
ID3v2Tag(0),
ID3v2Location(-1),
ID3v2OriginalSize(0),
}
}
+MPEG::File::File(const char *file, ID3v2::FrameFactory *frameFactory,
+ bool readProperties, Properties::ReadStyle propertiesStyle) :
+ TagLib::File(file)
+{
+ d = new FilePrivate(frameFactory);
+ if(isOpen()) {
+ d->tag = new MPEGTag(this);
+ read(readProperties, propertiesStyle);
+ }
+}
+
MPEG::File::~File()
{
delete d;
File(const char *file, bool readProperties = true,
Properties::ReadStyle propertiesStyle = Properties::Average);
+ /*!
+ * Contructs an MPEG file from \a file. If \a readProperties is true the
+ * file's audio properties will also be read using \a propertiesStyle. If
+ * false, \a propertiesStyle is ignored. The frames will be created using
+ * \a frameFactory.
+ */
+ // BIC: merge with the above constructor
+ File(const char *file, ID3v2::FrameFactory *frameFactory,
+ bool readProperties = true,
+ Properties::ReadStyle propertiesStyle = Properties::Average);
+
/*!
* Destroys this instance of the File.
*/