Debian Codegraph @

src/serialport/qwinoverlappedionotifier_p.h

raw symbols SCIP
1 // Copyright (C) 2016 The Qt Company Ltd.
2 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4 #ifndef QWINOVERLAPPEDIONOTIFIER_P_H
5 #define QWINOVERLAPPEDIONOTIFIER_P_H
6
7 //
8 // W A R N I N G
9 // -------------
10 //
11 // This file is not part of the Qt API. It exists purely as an
12 // implementation detail. This header file may change from version to
13 // version without notice, or even be removed.
14 //
15 // We mean it.
16 //
17
18 #include <QtCore/private/qglobal_p.h>
19 #include <qobject.h>
20 #include <qdeadlinetimer.h>
21
22 typedef struct _OVERLAPPED OVERLAPPED;
23
24 QT_BEGIN_NAMESPACE
25
26 class QWinOverlappedIoNotifierPrivate;
27
28 class QWinOverlappedIoNotifier : public QObject
29 {
30 Q_OBJECT
31 Q_DISABLE_COPY(QWinOverlappedIoNotifier)
32 Q_DECLARE_PRIVATE(QWinOverlappedIoNotifier)
33 Q_PRIVATE_SLOT(d_func(), void _q_notified())
34 friend class QWinIoCompletionPort;
35 public:
36 QWinOverlappedIoNotifier(QObject *parent = 0);
37 ~QWinOverlappedIoNotifier();
38
39 void setHandle(Qt::HANDLE h);
40 Qt::HANDLE handle() const;
41
42 void setEnabled(bool enabled);
43 OVERLAPPED *waitForAnyNotified(QDeadlineTimer deadline);
44 bool waitForNotified(QDeadlineTimer deadline, OVERLAPPED *overlapped);
45
46 Q_SIGNALS:
47 void notified(quint32 numberOfBytes, quint32 errorCode, OVERLAPPED *overlapped);
48 #if !defined(Q_QDOC)
49 void _q_notify();
50 #endif
51 };
52
53 QT_END_NAMESPACE
54
55 #endif // QWINOVERLAPPEDIONOTIFIER_P_H