mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-13 12:11:38 -06:00
3.13
This commit is contained in:
55
7zip/Common/FileStreams.h
Executable file
55
7zip/Common/FileStreams.h
Executable file
@@ -0,0 +1,55 @@
|
||||
// FileStreams.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __FILESTREAMS_H
|
||||
#define __FILESTREAMS_H
|
||||
|
||||
#include "Windows/FileIO.h"
|
||||
|
||||
#include "../IStream.h"
|
||||
#include "Common/MyCom.h"
|
||||
|
||||
class CInFileStream:
|
||||
public IInStream,
|
||||
public IStreamGetSize,
|
||||
public CMyUnknownImp
|
||||
{
|
||||
public:
|
||||
NWindows::NFile::NIO::CInFile File;
|
||||
CInFileStream() {}
|
||||
bool Open(LPCTSTR fileName);
|
||||
#ifndef _UNICODE
|
||||
bool Open(LPCWSTR fileName);
|
||||
#endif
|
||||
|
||||
MY_UNKNOWN_IMP1(IStreamGetSize)
|
||||
|
||||
STDMETHOD(Read)(void *data, UINT32 size, UINT32 *processedSize);
|
||||
STDMETHOD(ReadPart)(void *data, UINT32 size, UINT32 *processedSize);
|
||||
STDMETHOD(Seek)(INT64 offset, UINT32 seekOrigin, UINT64 *newPosition);
|
||||
|
||||
STDMETHOD(GetSize)(UINT64 *size);
|
||||
};
|
||||
|
||||
class COutFileStream:
|
||||
public IOutStream,
|
||||
public CMyUnknownImp
|
||||
{
|
||||
public:
|
||||
NWindows::NFile::NIO::COutFile File;
|
||||
COutFileStream() {}
|
||||
bool Open(LPCTSTR fileName);
|
||||
#ifndef _UNICODE
|
||||
bool Open(LPCWSTR fileName);
|
||||
#endif
|
||||
|
||||
MY_UNKNOWN_IMP
|
||||
|
||||
STDMETHOD(Write)(const void *data, UINT32 size, UINT32 *processedSize);
|
||||
STDMETHOD(WritePart)(const void *data, UINT32 size, UINT32 *processedSize);
|
||||
STDMETHOD(Seek)(INT64 offset, UINT32 seekOrigin, UINT64 *newPosition);
|
||||
STDMETHOD(SetSize)(INT64 newSize);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user