You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.1 KiB
C++

//
// G A M E.O.N.E - LOW LEVEL LIB V1.0
// Copyright (C) 2001 LEVEL ONE ENTERTAINMENT,
// Licensed under the terms of LGPL.
//:---------------------------------------------------------------------------
//:Description
//
// LOW LEVEL FILELOAD DRIVER INCLUDE FILE
//
//:---------------------------------------------------------------------------
#ifndef _STREAM_READHOOK_H
#define _STREAM_READHOOK_H
#include "llstream.h"
typedef int (*ReadHookPtr)(char * curFilename, int totalbytes, int totalfiles, int percentcomplete, void *userPtr );
class CReadHookModule : public CStreamModule
{
public:
CReadHookModule(int blocksize, ReadHookPtr hookcallback, void *uPtr );
virtual ~CReadHookModule();
virtual int read(void *ioBuf, int iNum);
virtual int ioCtl( char *iCmd, void *ioOption );// send a command down the stream
int m_blocksize;
int m_totalfiles;
int m_totalbytes;
CStreamModule * Clone();
void SetCallback(ReadHookPtr callback){ m_callback = callback; }
private:
ReadHookPtr m_callback;
void* m_userPtr;
char* m_curFile;
};
#endif // _STREAM_READHOOK_H