1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-03 21:07:36 +02:00
Files
audacity/src/FileIO.h
Paul Licameli 406b23cae7 More uses of AUDACITY_DLL_API...
... in many places where the function call will later need to be between
modules (or libraries, or the executable) and the annotation will be a necessity
to keep the linkage working on Windows.

That's all that this sweeping commit does.
2021-05-10 10:46:55 -04:00

51 lines
920 B
C++

/**********************************************************************
Audacity: A Digital Audio Editor
FileIO.h
Leland Lucius
**********************************************************************/
#ifndef __AUDACITY_FILEIO__
#define __AUDACITY_FILEIO__
#include "MemoryX.h"
class wxInputStream;
class wxOutputStream;
class wxFFileOutputStream;
class wxFileNameWrapper;
class AUDACITY_DLL_API FileIO
{
public:
typedef enum FileIOMode
{
Input,
Output
} FileIOMode;
public:
FileIO(const wxFileNameWrapper & name, FileIOMode mode);
// Calls Close()
~FileIO();
bool IsOpened();
bool Close();
wxInputStream & Read(void *buffer, size_t size);
wxOutputStream & Write(const void *buffer, size_t size);
private:
FileIOMode mMode;
std::unique_ptr<wxInputStream> mInputStream;
std::unique_ptr<wxFFileOutputStream> mOutputStream;
bool mOpen;
};
#endif