Remove deprecated FileRef::create() method

In order to achieve this, the TagLib_File type of the C bindings is now
a FileRef and no longer a File. The support for the .oga extension has been
ported to FileRef(), so that taglib_file_new() should still behave the
same, but additionally also support content based file type detection.
This commit is contained in:
Urs Fleisch
2023-10-21 15:24:44 +02:00
parent 8d98ebf24b
commit 0db487bf61
4 changed files with 46 additions and 140 deletions

View File

@ -104,7 +104,6 @@ class TestFileRef : public CppUnit::TestFixture
CPPUNIT_TEST(testDSF);
CPPUNIT_TEST(testDSDIFF);
CPPUNIT_TEST(testUnsupported);
CPPUNIT_TEST(testCreate);
CPPUNIT_TEST(testAudioProperties);
CPPUNIT_TEST(testDefaultFileExtensions);
CPPUNIT_TEST(testFileResolver);
@ -354,23 +353,6 @@ public:
CPPUNIT_ASSERT(f2.isNull());
}
void testCreate()
{
// This is deprecated. But worth it to test.
File *f = FileRef::create(TEST_FILE_PATH_C("empty_vorbis.oga"));
CPPUNIT_ASSERT(dynamic_cast<Ogg::Vorbis::File*>(f));
delete f;
f = FileRef::create(TEST_FILE_PATH_C("xing.mp3"));
CPPUNIT_ASSERT(dynamic_cast<MPEG::File*>(f));
delete f;
f = FileRef::create(TEST_FILE_PATH_C("test.xm"));
CPPUNIT_ASSERT(dynamic_cast<XM::File*>(f));
delete f;
}
void testAudioProperties()
{
FileRef f(TEST_FILE_PATH_C("xing.mp3"));