mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Make it possible to actually pass a IOStream instance to File
This commit is contained in:
parent
b53a577e38
commit
8b59bb5957
@ -69,33 +69,32 @@ struct FileNameHandle : public std::string
|
||||
class File::FilePrivate
|
||||
{
|
||||
public:
|
||||
FilePrivate(FileName fileName);
|
||||
FilePrivate(IOStream *stream);
|
||||
|
||||
IOStream *stream;
|
||||
bool valid;
|
||||
static const uint bufferSize = 1024;
|
||||
};
|
||||
|
||||
File::FilePrivate::FilePrivate(FileName fileName) :
|
||||
stream(0),
|
||||
File::FilePrivate::FilePrivate(IOStream *stream) :
|
||||
stream(stream),
|
||||
valid(true)
|
||||
{
|
||||
stream = new FileStream(fileName);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
File::File(FileName file)
|
||||
File::File(FileName fileName)
|
||||
{
|
||||
d = new FilePrivate(file);
|
||||
IOStream *stream = new FileStream(fileName);
|
||||
d = new FilePrivate(stream);
|
||||
}
|
||||
|
||||
File::File(IOStream *stream)
|
||||
{
|
||||
d = new FilePrivate(""); // TODO
|
||||
d->stream = stream;
|
||||
d = new FilePrivate(stream);
|
||||
}
|
||||
|
||||
File::~File()
|
||||
|
Loading…
Reference in New Issue
Block a user