diff options
Diffstat (limited to 'src/serialport/qserialport_p.h')
-rw-r--r-- | src/serialport/qserialport_p.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/serialport/qserialport_p.h b/src/serialport/qserialport_p.h index b0955aef..7348aed6 100644 --- a/src/serialport/qserialport_p.h +++ b/src/serialport/qserialport_p.h @@ -104,7 +104,6 @@ struct serial_struct { QT_BEGIN_NAMESPACE -class QWinOverlappedIoNotifier; class QTimer; class QSocketNotifier; @@ -182,7 +181,6 @@ public: bool setDcb(DCB *dcb); bool getDcb(DCB *dcb); - OVERLAPPED *waitForNotified(QDeadlineTimer deadline); qint64 queuedBytesCount(QSerialPort::Direction direction) const; @@ -192,10 +190,15 @@ public: bool startAsyncCommunication(); bool _q_startAsyncWrite(); - void _q_notified(DWORD numberOfBytes, DWORD errorCode, OVERLAPPED *overlapped); + void handleNotification(DWORD bytesTransferred, DWORD errorCode, + OVERLAPPED *overlapped); void emitReadyRead(); + static void CALLBACK ioCompletionRoutine( + DWORD errorCode, DWORD bytesTransfered, + OVERLAPPED *overlappedBase); + DCB restoredDcb; COMMTIMEOUTS currentCommTimeouts; COMMTIMEOUTS restoredCommTimeouts; @@ -205,11 +208,12 @@ public: bool communicationStarted = false; bool writeStarted = false; bool readStarted = false; - QWinOverlappedIoNotifier *notifier = nullptr; + qint64 writeBytesTransferred = 0; + qint64 readBytesTransferred = 0; QTimer *startAsyncWriteTimer = nullptr; - OVERLAPPED communicationOverlapped; - OVERLAPPED readCompletionOverlapped; - OVERLAPPED writeCompletionOverlapped; + class Overlapped *communicationCompletionOverlapped = nullptr; + class Overlapped *readCompletionOverlapped = nullptr; + class Overlapped *writeCompletionOverlapped = nullptr; DWORD triggeredEventMask = 0; #elif defined(Q_OS_UNIX) |