| 1 | // Copyright (C) 2024 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 | // |
| 5 | // W A R N I N G |
| 6 | // ------------- |
| 7 | // |
| 8 | // This file is not part of the Qt API. It exists purely as an |
| 9 | // implementation detail. This header file may change from version to |
| 10 | // version without notice, or even be removed. |
| 11 | // |
| 12 | // We mean it. |
| 13 | // |
| 14 | |
| 15 | #ifndef QAUTORESETEVENT_LINUX_P_H |
| 16 | #define QAUTORESETEVENT_LINUX_P_H |
| 17 | |
| 18 | #include <QtCore/qsocketnotifier.h> |
| 19 | #include <QtMultimedia/qtmultimediaexports.h> |
| 20 | |
| 21 | QT_BEGIN_NAMESPACE |
| 22 | |
| 23 | namespace QtPrivate { |
| 24 | |
| 25 | class Q_MULTIMEDIA_EXPORT QAutoResetEventEventFD : public QObject |
| 26 | { |
| 27 | Q_OBJECT |
| 28 | |
| 29 | public: |
| 30 | explicit QAutoResetEventEventFD(QObject *parent = nullptr); |
| 31 | |
| 32 | ~QAutoResetEventEventFD(); |
| 33 | |
| 34 | bool isValid() const { return m_fd != -1; } |
| 35 | void set(); |
| 36 | |
| 37 | Q_SIGNALS: |
| 38 | void activated(); |
| 39 | |
| 40 | private: |
| 41 | QSocketNotifier m_notifier; |
| 42 | int m_fd = -1; |
| 43 | }; |
| 44 | |
| 45 | } // namespace QtPrivate |
| 46 | |
| 47 | QT_END_NAMESPACE |
| 48 | |
| 49 | #endif // QAUTORESETEVENT_LINUX_P_H |
| 50 | |