11 #ifndef __FILESTREAM_H__
12 #define __FILESTREAM_H__
41 const void * pvBuffer,
85 #define ID_FILE_BITMAP_FOOTER 0x33767470 // Signature of the file bitmap footer ('ptv3')
86 #define DEFAULT_BLOCK_SIZE 0x00004000 // Default size of the stream block
87 #define DEFAULT_BUILD_NUMBER 10958 // Build number for newly created partial MPQs
210 #define ENCRYPTED_CHUNK_SIZE 0x40 // Size of one chunk to be decrypted
238 #endif // __FILESTREAM_H__
Definition: FileStream.h:125
struct TBaseProviderData::@2 Http
struct _PART_FILE_HEADER PART_FILE_HEADER
void * UserData
Definition: FileStream.h:199
struct _FILE_BITMAP_FOOTER FILE_BITMAP_FOOTER
STREAM_GETPOS StreamGetPos
Definition: FileStream.h:160
void FileStream_Close(TFileStream *pStream)
Definition: FileStream.cpp:2707
struct TBaseProviderData::@1 Map
DWORD BitmapSize
Definition: FileStream.h:200
STREAM_CLOSE StreamClose
Definition: FileStream.h:161
bool(* STREAM_GETPOS)(struct TFileStream *pStream, ULONGLONG *pByteOffset)
Definition: FileStream.h:55
Definition: FileStream.h:212
DWORD LargeValueHi
Definition: FileStream.h:107
void * HANDLE
Definition: CascPort.h:146
void * FileBitmap
Definition: FileStream.h:198
unsigned long long ULONGLONG
Definition: CascPort.h:144
DWORD * PDWORD
Definition: CascPort.h:151
DWORD BlockOffsLo
Definition: FileStream.h:104
bool(* STREAM_OPEN)(struct TFileStream *pStream, const TCHAR *szFileName, DWORD dwStreamFlags)
Definition: FileStream.h:25
bool FileStream_Replace(TFileStream *pStream, TFileStream *pNewStream)
Definition: FileStream.cpp:2666
DWORD Flags
Definition: FileStream.h:103
STREAM_OPEN BaseOpen
Definition: FileStream.h:169
STREAM_READ BaseRead
Definition: FileStream.h:170
ULONGLONG FileTime
Definition: FileStream.h:131
void(* BLOCK_SAVEMAP)(struct TFileStream *pStream)
Definition: FileStream.h:78
BYTE Key[ENCRYPTED_CHUNK_SIZE]
Definition: FileStream.h:214
TBaseProviderData Base
Definition: FileStream.h:178
size_t FileStream_Prefix(const TCHAR *szFileName, DWORD *pdwProvider)
Definition: FileStream.cpp:2434
char TCHAR
Definition: CascPort.h:148
BLOCK_READ BlockRead
Definition: FileStream.h:164
bool(* BLOCK_CHECK)(struct TFileStream *pStream, ULONGLONG BlockOffset)
Definition: FileStream.h:73
const TCHAR * FileStream_GetFileName(TFileStream *pStream)
Definition: FileStream.cpp:2421
BYTE * LPBYTE
Definition: CascPort.h:152
bool(* STREAM_READ)(struct TFileStream *pStream, ULONGLONG *pByteOffset, void *pvBuffer, DWORD dwBytesToRead)
Definition: FileStream.h:31
void(* STREAM_CLOSE)(struct TFileStream *pStream)
Definition: FileStream.h:60
struct TBaseProviderData::@0 File
STREAM_RESIZE BaseResize
Definition: FileStream.h:172
STREAM_WRITE BaseWrite
Definition: FileStream.h:171
#define bool
Definition: CascPort.h:16
ULONGLONG StreamPos
Definition: FileStream.h:185
struct _FILE_BITMAP_FOOTER * PFILE_BITMAP_FOOTER
TFileStream * FileStream_CreateFile(const TCHAR *szFileName, DWORD dwStreamFlags)
Definition: FileStream.cpp:2328
ULONGLONG FileSize
Definition: FileStream.h:129
void(* STREAM_INIT)(struct TFileStream *pStream)
Definition: FileStream.h:17
Definition: FileStream.h:101
bool FileStream_GetFlags(TFileStream *pStream, PDWORD pdwStreamFlags)
Definition: FileStream.cpp:2649
bool FileStream_Read(TFileStream *pStream, ULONGLONG *pByteOffset, void *pvBuffer, DWORD dwBytesToRead)
Definition: FileStream.cpp:2551
HANDLE hInternet
Definition: FileStream.h:148
STREAM_CLOSE BaseClose
Definition: FileStream.h:175
bool FileStream_Write(TFileStream *pStream, ULONGLONG *pByteOffset, const void *pvBuffer, DWORD dwBytesToWrite)
Definition: FileStream.cpp:2577
bool FileStream_GetSize(TFileStream *pStream, ULONGLONG *pFileSize)
Definition: FileStream.cpp:2595
STREAM_DOWNLOAD_CALLBACK pfnCallback
Definition: FileStream.h:197
TCHAR * szFileName
Definition: FileStream.h:182
DWORD BuildNumber
Definition: FileStream.h:186
bool FileStream_GetTime(TFileStream *pStream, ULONGLONG *pFT)
Definition: FileStream.cpp:2636
STREAM_CREATE BaseCreate
Definition: FileStream.h:168
HANDLE hConnect
Definition: FileStream.h:149
void(WINAPI * STREAM_DOWNLOAD_CALLBACK)(void *pvUserData, ULONGLONG ByteOffset, DWORD dwTotalBytes)
Definition: CascLib.h:159
DWORD IsComplete
Definition: FileStream.h:203
STREAM_GETPOS BaseGetPos
Definition: FileStream.h:174
HANDLE hFile
Definition: FileStream.h:132
bool FileStream_SetSize(TFileStream *pStream, ULONGLONG NewFileSize)
Definition: FileStream.cpp:2607
bool FileStream_SetCallback(TFileStream *pStream, STREAM_DOWNLOAD_CALLBACK pfnCallback, void *pvUserData)
Definition: FileStream.cpp:2517
STREAM_WRITE StreamWrite
Definition: FileStream.h:157
DWORD BlockCount
Definition: FileStream.h:202
bool(* STREAM_RESIZE)(struct TFileStream *pStream, ULONGLONG FileSize)
Definition: FileStream.h:45
TFileStream * pMaster
Definition: FileStream.h:181
STREAM_RESIZE StreamResize
Definition: FileStream.h:158
unsigned int DWORD
Definition: CascPort.h:139
bool(* STREAM_WRITE)(struct TFileStream *pStream, ULONGLONG *pByteOffset, const void *pvBuffer, DWORD dwBytesToWrite)
Definition: FileStream.h:38
bool FileStream_GetPos(TFileStream *pStream, ULONGLONG *pByteOffset)
Definition: FileStream.cpp:2624
bool(* STREAM_GETSIZE)(struct TFileStream *pStream, ULONGLONG *pFileSize)
Definition: FileStream.h:50
LPBYTE pbFile
Definition: FileStream.h:140
DWORD LargeValueLo
Definition: FileStream.h:106
DWORD dwFlags
Definition: FileStream.h:187
STREAM_GETSIZE StreamGetSize
Definition: FileStream.h:159
Definition: FileStream.h:153
struct _PART_FILE_MAP_ENTRY PART_FILE_MAP_ENTRY
DWORD BlockOffsHi
Definition: FileStream.h:105
bool(* BLOCK_READ)(struct TFileStream *pStream, ULONGLONG StartOffset, ULONGLONG EndOffset, LPBYTE BlockBuffer, DWORD BytesNeeded, bool bAvailable)
Definition: FileStream.h:64
DWORD IsModified
Definition: FileStream.h:204
DWORD BlockSize
Definition: FileStream.h:201
BLOCK_CHECK BlockCheck
Definition: FileStream.h:165
unsigned char BYTE
Definition: CascPort.h:136
struct _PART_FILE_HEADER * PPART_FILE_HEADER
ULONGLONG FilePos
Definition: FileStream.h:130
ULONGLONG StreamSize
Definition: FileStream.h:184
Definition: FileStream.h:195
struct _PART_FILE_MAP_ENTRY * PPART_FILE_MAP_ENTRY
STREAM_GETSIZE BaseGetSize
Definition: FileStream.h:173
STREAM_READ StreamRead
Definition: FileStream.h:156
bool(* STREAM_CREATE)(struct TFileStream *pStream)
Definition: FileStream.h:21
TFileStream * FileStream_OpenFile(const TCHAR *szFileName, DWORD dwStreamFlags)
Definition: FileStream.cpp:2384
#define ENCRYPTED_CHUNK_SIZE
Definition: FileStream.h:210