1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-25 16:48:44 +02:00
audacity/src/FileIO.h
martynshaw99 4ce2643d5f Remove the
// Indentation settings for Vim and Emacs
etc. lines from all files, as Campbell's patch (except for other changes to Languages.cpp)
2013-09-24 00:14:37 +00:00

54 lines
1014 B
C++

/**********************************************************************
Audacity: A Digital Audio Editor
FileIO.h
Leland Lucius
**********************************************************************/
#ifndef __AUDACITY_FILEIO__
#define __AUDACITY_FILEIO__
#include <wx/object.h>
#include <wx/wfstream.h>
#include <wx/protocol/ftp.h>
class FileIO
{
public:
typedef enum FileIOMode
{
Input,
Output
} FileIOMode;
public:
FileIO(const wxString name, FileIOMode mode);
~FileIO();
bool IsOpened();
void Close();
wxInputStream & Read(void *buffer, size_t size);
wxOutputStream & Write(const void *buffer, size_t size);
// On the Mac, this sets the file type and creator. It does nothing on
// other platforms.
void SetCatalogInfo();
void SetCatalogInfo(wxUint32 type);
private:
wxString mName;
FileIOMode mMode;
wxURI mUri;
wxFTP *mFtp;
wxInputStream *mInputStream;
wxOutputStream *mOutputStream;
bool mOpen;
};
#endif