Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qfilesystemwatcher_kqueue_p.h
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5#ifndef QFILESYSTEMWATCHER_KQUEUE_P_H
6#define QFILESYSTEMWATCHER_KQUEUE_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
20
21#include <QtCore/qhash.h>
22#include <QtCore/qmutex.h>
23#include <QtCore/qsocketnotifier.h>
24#include <QtCore/qthread.h>
25
27struct kevent;
28
29QT_BEGIN_NAMESPACE
30
31class QKqueueFileSystemWatcherEngine : public QFileSystemWatcherEngine
32{
33 Q_OBJECT
34public:
35 ~QKqueueFileSystemWatcherEngine();
36
37 static QKqueueFileSystemWatcherEngine *create(QObject *parent);
38
39 QStringList addPaths(const QStringList &paths, QStringList *files,
40 QStringList *directories) override;
41 QStringList removePaths(const QStringList &paths, QStringList *files,
42 QStringList *directories) override;
43
44private Q_SLOTS:
45 void readFromKqueue();
46
47private:
48 QKqueueFileSystemWatcherEngine(int kqfd, QObject *parent);
49
50 int kqfd;
51
52 QHash<QString, int> pathToID;
53 QHash<int, QString> idToPath;
54 QSocketNotifier notifier;
55};
56
57QT_END_NAMESPACE
58
59#endif // QFILESYSTEMWATCHER_KQUEUE_P_H
QT_REQUIRE_CONFIG(animation)
QT_REQUIRE_CONFIG(filesystemwatcher)