Clone
ixen <ixen@copyhandler.com>
committed
on 21 Oct 16
Fixed problem with asking multiple times for retries of the same batch of failed buffers (only for reading data at this point). Fixed issue … Show more
Fixed problem with asking multiple times for retries of the same batch of failed buffers (only for reading data at this point). Fixed issue with pausing and resuming task after refactoring of buffer ordering. (CH-270)

Show less

ParallelizeReaderWriter + 4 more
src/libchcore/TOverlappedDataBuffer.h (+1 -0)
41 41
42 42                 // interface methods
43 43                 // buffer size management
44 44                 void ReinitializeBuffer(size_t stNewBufferSize);
45 45                 LPVOID GetBufferPtr();
46 46
47 47                 size_t GetBufferSize() const { return m_stBufferSize; }
48 48
49 49                 // members
50 50                 DWORD GetRequestedDataSize() const { return m_dwRequestedDataSize; }
51 51                 void SetRequestedDataSize(DWORD dwRequestedSize) { m_dwRequestedDataSize = dwRequestedSize; }
52 52
53 53                 DWORD GetRealDataSize() const { return m_dwRealDataSize; }
54 54                 void SetRealDataSize(DWORD dwRealDataSize) { m_dwRealDataSize = dwRealDataSize; }
55 55
56 56                 void SetLastPart(bool bLastPart) { m_bLastPart = bLastPart; }
57 57                 bool IsLastPart() const { return m_bLastPart; }
58 58
59 59                 DWORD GetErrorCode() const { return m_dwErrorCode; }
60 60                 void SetErrorCode(DWORD dwErrorCode) { m_dwErrorCode = dwErrorCode; }
  61                 bool HasError() const { return m_dwErrorCode != ERROR_SUCCESS; }
61 62
62 63                 // OVERLAPPED interface
63 64                 ULONG_PTR GetStatusCode() const { return Internal; }
64 65                 void SetStatusCode(ULONG_PTR ulStatusCode) { Internal = ulStatusCode; }
65 66
66 67                 void SetBytesTransferred(ULONG_PTR ulBytes) { InternalHigh = ulBytes; }
67 68                 ULONG_PTR GetBytesTransferred() const { return InternalHigh; }
68 69
69 70                 unsigned long long GetFilePosition() const { return (unsigned long long)OffsetHigh << 32 | Offset; }
70 71                 void SetFilePosition(unsigned long long ullPosition) { OffsetHigh = (DWORD)(ullPosition >> 32); Offset = (DWORD)ullPosition; }
71 72
72 73                 void* GetParam() const { return m_pParam; }
73 74                 void SetParam(void* pParam) { m_pParam = pParam; }
74 75
75 76                 // composite initialization
76 77                 void InitForRead(unsigned long long ullPosition, DWORD dwRequestedSize);
77 78                 void InitForWrite();
78 79                 void Reset();
79 80
80 81         private: