Fisheye: Tag d23ed007b8142c6faf6d8cad4a421ac243ef0146 refers to a dead (removed) revision in file `src/libchcore/IOverlappedDataBufferQueue.h'. Fisheye: No comparison available. Pass `N' to diff? Index: src/libchcore/OverlappedCallbacks.cpp =================================================================== diff -u --- src/libchcore/OverlappedCallbacks.cpp (revision 0) +++ src/libchcore/OverlappedCallbacks.cpp (revision d23ed007b8142c6faf6d8cad4a421ac243ef0146) @@ -0,0 +1,63 @@ +// ============================================================================ +// Copyright (C) 2001-2016 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#include "stdafx.h" +#include "OverlappedCallbacks.h" +#include "TOverlappedDataBuffer.h" +#include "TOverlappedReaderWriter.h" + +#define STATUS_END_OF_FILE 0xc0000011 + +namespace chcore +{ + VOID CALLBACK OverlappedReadCompleted(DWORD dwErrorCode, DWORD dwNumberOfBytesTransfered, LPOVERLAPPED lpOverlapped) + { + _ASSERTE(dwNumberOfBytesTransfered == lpOverlapped->InternalHigh); + + TOverlappedDataBuffer* pBuffer = (TOverlappedDataBuffer*)lpOverlapped; + TOverlappedReaderWriter* pQueue = (TOverlappedReaderWriter*)pBuffer->GetParam(); + + // determine if this is the last packet + bool bEof = (dwErrorCode == ERROR_HANDLE_EOF || + pBuffer->GetStatusCode() == STATUS_END_OF_FILE || + (dwErrorCode == ERROR_SUCCESS && dwNumberOfBytesTransfered != pBuffer->GetRequestedDataSize())); + + // reset status code and error code if they pointed out to EOF + if(pBuffer->GetStatusCode() == STATUS_END_OF_FILE) + pBuffer->SetStatusCode(0); + + pBuffer->SetErrorCode(dwErrorCode == ERROR_HANDLE_EOF ? ERROR_SUCCESS : dwErrorCode); + + pBuffer->SetRealDataSize(dwNumberOfBytesTransfered); + pBuffer->SetLastPart(bEof); + + pQueue->AddFullBuffer(pBuffer); + } + + VOID CALLBACK OverlappedWriteCompleted(DWORD dwErrorCode, DWORD dwNumberOfBytesTransfered, LPOVERLAPPED lpOverlapped) + { + _ASSERTE(dwNumberOfBytesTransfered == lpOverlapped->InternalHigh); dwNumberOfBytesTransfered; + + TOverlappedDataBuffer* pBuffer = (TOverlappedDataBuffer*)lpOverlapped; + TOverlappedReaderWriter* pQueue = (TOverlappedReaderWriter*)pBuffer->GetParam(); + + pBuffer->SetErrorCode(dwErrorCode); + + pQueue->AddFinishedBuffer(pBuffer); + } +} Fisheye: tag e96806b7f8ff7ca7e9f4afbea603e6351a3dc3e3 is not in file src/libchcore/OverlappedCallbacks.h Fisheye: Tag d23ed007b8142c6faf6d8cad4a421ac243ef0146 refers to a dead (removed) revision in file `src/libchcore/IOverlappedDataBufferQueue.cpp'. Fisheye: No comparison available. Pass `N' to diff? Index: src/libchcore/TLocalFilesystemFile.cpp =================================================================== diff -u -rb89aea376d35ce4b0d6506f7d04dba73830d9268 -rd23ed007b8142c6faf6d8cad4a421ac243ef0146 --- src/libchcore/TLocalFilesystemFile.cpp (.../TLocalFilesystemFile.cpp) (revision b89aea376d35ce4b0d6506f7d04dba73830d9268) +++ src/libchcore/TLocalFilesystemFile.cpp (.../TLocalFilesystemFile.cpp) (revision d23ed007b8142c6faf6d8cad4a421ac243ef0146) @@ -28,6 +28,7 @@ #include "TFileInfo.h" #include "StreamingHelpers.h" #include "TOverlappedDataBufferQueue.h" +#include "OverlappedCallbacks.h" namespace chcore { Index: src/libchcore/TOverlappedDataBuffer.h =================================================================== diff -u -rb89aea376d35ce4b0d6506f7d04dba73830d9268 -rd23ed007b8142c6faf6d8cad4a421ac243ef0146 --- src/libchcore/TOverlappedDataBuffer.h (.../TOverlappedDataBuffer.h) (revision b89aea376d35ce4b0d6506f7d04dba73830d9268) +++ src/libchcore/TOverlappedDataBuffer.h (.../TOverlappedDataBuffer.h) (revision d23ed007b8142c6faf6d8cad4a421ac243ef0146) @@ -25,11 +25,6 @@ namespace chcore { - class IOverlappedDataBufferQueue; - - VOID CALLBACK OverlappedReadCompleted(DWORD dwErrorCode, DWORD dwNumberOfBytesTransfered, LPOVERLAPPED lpOverlapped); - VOID CALLBACK OverlappedWriteCompleted(DWORD dwErrorCode, DWORD dwNumberOfBytesTransfered, LPOVERLAPPED lpOverlapped); - class TOverlappedDataBuffer : public OVERLAPPED { public: Index: src/libchcore/TOverlappedReaderWriter.cpp =================================================================== diff -u -rb89aea376d35ce4b0d6506f7d04dba73830d9268 -rd23ed007b8142c6faf6d8cad4a421ac243ef0146 --- src/libchcore/TOverlappedReaderWriter.cpp (.../TOverlappedReaderWriter.cpp) (revision b89aea376d35ce4b0d6506f7d04dba73830d9268) +++ src/libchcore/TOverlappedReaderWriter.cpp (.../TOverlappedReaderWriter.cpp) (revision d23ed007b8142c6faf6d8cad4a421ac243ef0146) @@ -23,48 +23,8 @@ #include "ErrorCodes.h" #include -#define STATUS_END_OF_FILE 0xc0000011 - namespace chcore { - /////////////////////////////////////////////////////////////////////////////////// - // class TOverlappedDataBuffer - VOID CALLBACK OverlappedReadCompleted(DWORD dwErrorCode, DWORD dwNumberOfBytesTransfered, LPOVERLAPPED lpOverlapped) - { - _ASSERTE(dwNumberOfBytesTransfered == lpOverlapped->InternalHigh); - - TOverlappedDataBuffer* pBuffer = (TOverlappedDataBuffer*)lpOverlapped; - TOverlappedReaderWriter* pQueue = (TOverlappedReaderWriter*)pBuffer->GetParam(); - - // determine if this is the last packet - bool bEof = (dwErrorCode == ERROR_HANDLE_EOF || - pBuffer->GetStatusCode() == STATUS_END_OF_FILE || - (dwErrorCode == ERROR_SUCCESS && dwNumberOfBytesTransfered != pBuffer->GetRequestedDataSize())); - - // reset status code and error code if they pointed out to EOF - if(pBuffer->GetStatusCode() == STATUS_END_OF_FILE) - pBuffer->SetStatusCode(0); - - pBuffer->SetErrorCode(dwErrorCode == ERROR_HANDLE_EOF ? ERROR_SUCCESS : dwErrorCode); - - pBuffer->SetRealDataSize(dwNumberOfBytesTransfered); - pBuffer->SetLastPart(bEof); - - pQueue->AddFullBuffer(pBuffer); - } - - VOID CALLBACK OverlappedWriteCompleted(DWORD dwErrorCode, DWORD dwNumberOfBytesTransfered, LPOVERLAPPED lpOverlapped) - { - _ASSERTE(dwNumberOfBytesTransfered == lpOverlapped->InternalHigh); - - TOverlappedDataBuffer* pBuffer = (TOverlappedDataBuffer*)lpOverlapped; - TOverlappedReaderWriter* pQueue = (TOverlappedReaderWriter*)pBuffer->GetParam(); - - pBuffer->SetErrorCode(dwErrorCode); - - pQueue->AddFinishedBuffer(pBuffer); - } - bool CompareBufferPositions::operator()(const TOverlappedDataBuffer* pBufferA, const TOverlappedDataBuffer* pBufferB) { return pBufferA->GetBufferOrder() < pBufferB->GetBufferOrder(); Index: src/libchcore/TOverlappedReaderWriter.h =================================================================== diff -u -rb89aea376d35ce4b0d6506f7d04dba73830d9268 -rd23ed007b8142c6faf6d8cad4a421ac243ef0146 --- src/libchcore/TOverlappedReaderWriter.h (.../TOverlappedReaderWriter.h) (revision b89aea376d35ce4b0d6506f7d04dba73830d9268) +++ src/libchcore/TOverlappedReaderWriter.h (.../TOverlappedReaderWriter.h) (revision d23ed007b8142c6faf6d8cad4a421ac243ef0146) @@ -20,7 +20,6 @@ #define __TOVERLAPPEDREADERWRITER_H__ #include "TEvent.h" -#include "IOverlappedDataBufferQueue.h" #include "../liblogger/TLogFileData.h" #include "../liblogger/TLogger.h" #include "TOverlappedDataBufferQueue.h" @@ -34,7 +33,7 @@ bool operator()(const TOverlappedDataBuffer* rBufferA, const TOverlappedDataBuffer* rBufferB); }; - class TOverlappedReaderWriter : public IOverlappedDataBufferQueue + class TOverlappedReaderWriter { public: explicit TOverlappedReaderWriter(const logger::TLogFileDataPtr& spLogFileData, const TOverlappedDataBufferQueuePtr& spBuffers); @@ -44,15 +43,15 @@ TOverlappedReaderWriter& operator=(const TOverlappedReaderWriter&) = delete; // buffer management - virtual void AddEmptyBuffer(TOverlappedDataBuffer* pBuffer) override; - virtual TOverlappedDataBuffer* GetEmptyBuffer() override; + void AddEmptyBuffer(TOverlappedDataBuffer* pBuffer); + TOverlappedDataBuffer* GetEmptyBuffer(); - virtual void AddFullBuffer(TOverlappedDataBuffer* pBuffer) override; - virtual TOverlappedDataBuffer* GetFullBuffer() override; + void AddFullBuffer(TOverlappedDataBuffer* pBuffer); + TOverlappedDataBuffer* GetFullBuffer(); - virtual void AddFinishedBuffer(TOverlappedDataBuffer* pBuffer) override; - virtual TOverlappedDataBuffer* GetFinishedBuffer() override; - virtual void MarkFinishedBufferAsComplete(TOverlappedDataBuffer* pBuffer) override; + void AddFinishedBuffer(TOverlappedDataBuffer* pBuffer); + TOverlappedDataBuffer* GetFinishedBuffer(); + void MarkFinishedBufferAsComplete(TOverlappedDataBuffer* pBuffer); // data source change void DataSourceChanged(); Index: src/libchcore/Tests/TOverlappedDataBufferTests.cpp =================================================================== diff -u -rb89aea376d35ce4b0d6506f7d04dba73830d9268 -rd23ed007b8142c6faf6d8cad4a421ac243ef0146 --- src/libchcore/Tests/TOverlappedDataBufferTests.cpp (.../TOverlappedDataBufferTests.cpp) (revision b89aea376d35ce4b0d6506f7d04dba73830d9268) +++ src/libchcore/Tests/TOverlappedDataBufferTests.cpp (.../TOverlappedDataBufferTests.cpp) (revision d23ed007b8142c6faf6d8cad4a421ac243ef0146) @@ -4,6 +4,7 @@ #include "../TOverlappedDataBuffer.h" #include "../TOverlappedReaderWriter.h" #include "../../liblogger/TLogFileData.h" +#include "../OverlappedCallbacks.h" using namespace chcore; Index: src/libchcore/libchcore.vc140.vcxproj =================================================================== diff -u -rb89aea376d35ce4b0d6506f7d04dba73830d9268 -rd23ed007b8142c6faf6d8cad4a421ac243ef0146 --- src/libchcore/libchcore.vc140.vcxproj (.../libchcore.vc140.vcxproj) (revision b89aea376d35ce4b0d6506f7d04dba73830d9268) +++ src/libchcore/libchcore.vc140.vcxproj (.../libchcore.vc140.vcxproj) (revision d23ed007b8142c6faf6d8cad4a421ac243ef0146) @@ -469,7 +469,6 @@ - @@ -479,6 +478,7 @@ + @@ -606,7 +606,6 @@ - @@ -615,6 +614,7 @@ + Index: src/libchcore/libchcore.vc140.vcxproj.filters =================================================================== diff -u -rb89aea376d35ce4b0d6506f7d04dba73830d9268 -rd23ed007b8142c6faf6d8cad4a421ac243ef0146 --- src/libchcore/libchcore.vc140.vcxproj.filters (.../libchcore.vc140.vcxproj.filters) (revision b89aea376d35ce4b0d6506f7d04dba73830d9268) +++ src/libchcore/libchcore.vc140.vcxproj.filters (.../libchcore.vc140.vcxproj.filters) (revision d23ed007b8142c6faf6d8cad4a421ac243ef0146) @@ -356,9 +356,6 @@ Source Files\Tools\Data Buffer - - Source Files\Tools\Data Buffer - Source Files\Tools @@ -467,6 +464,9 @@ Source Files\Tools\Data Buffer + + Source Files\Tools\Data Buffer + @@ -742,9 +742,6 @@ Source Files\Tools\Data Buffer - - Source Files\Tools\Data Buffer - Source Files\Tools @@ -853,5 +850,8 @@ Tests + + Source Files\Tools\Data Buffer + \ No newline at end of file