-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathasyncio.h
46 lines (32 loc) · 892 Bytes
/
asyncio.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
** CAsyncIOCallback
**
** implements IOCallback derived class to enable libmatroska to read from
** file via IAsyncReader interface.
**
*/
#ifndef _ASYNCIOCALLBACK_H_
#define _ASYNCIOCALLBACK_H_
#include <streams.h>
#include "KaxConfig.h"
#include "IOCallback.h"
using namespace LIBEBML_NAMESPACE;
START_LIBMATROSKA_NAMESPACE
class CAsyncIOCb : public IOCallback
{
private:
int64 m_offs, m_size;
BOOL m_open;
IAsyncReader *m_pReader;
public:
CAsyncIOCb(IAsyncReader *pReader);
virtual uint32 read(void*Buffer,size_t Size);
virtual size_t write(const void*Buffer,size_t Size);
// virtual void readFully(void*Buffer,size_t Size);
void writeFully(const void*Buffer,size_t Size);
virtual void close();
virtual void setFilePointer(int64 Offset, seek_mode Mode=seek_beginning);
virtual uint64 getFilePointer();
};
END_LIBMATROSKA_NAMESPACE
#endif _ASYNCIOCALLBACK_H_