1 #ifndef QDEVICEWATCHER_P_H
2 #define QDEVICEWATCHER_P_H
22 #include <QtCore/qglobal.h>
23 #define CONFIG_SOCKETNOTIFIER 1
24 #define CONFIG_TCPSOCKET 0 //QtNetwork
26 #if defined(Q_OS_WINCE)
27 # define CONFIG_THREAD 1
28 #elif defined(Q_OS_LINUX)
29 # define CONFIG_THREAD (!CONFIG_SOCKETNOTIFIER && !CONFIG_TCPSOCKET)
30 #elif defined Q_OS_MAC //OSX or MACX
31 # define CONFIG_THREAD 1
32 # include <DiskArbitration/DiskArbitration.h>
34 # define CONFIG_THREAD 0
38 # define WIN32_LEAN_AND_MEAN
39 # include <qt_windows.h>
41 # include <QtCore/QBuffer>
43 #include <QtCore/QList>
44 #include <QtCore/QThread>
57 #endif //CONFIG_THREAD
77 void emitDeviceAdded(
const QString& dev);
78 void emitDeviceChanged(
const QString& dev);
79 void emitDeviceRemoved(
const QString& dev);
80 void emitDeviceAction(
const QString& dev,
const QString& action);
85 void parseDeviceInfo();
93 #endif //CONFIG_THREAD
94 #if defined(Q_OS_LINUX)
96 void parseLine(
const QByteArray &line);
98 class QTcpSocket *tcp_socket;
99 # elif CONFIG_SOCKETNOTIFIER
100 class QSocketNotifier *socket_notifier;
105 #elif defined(Q_OS_WIN32)
107 #elif defined(Q_OS_WINCE)
109 HANDLE mNotificationHandle;
113 DASessionRef mSession;
117 #endif // QDEVICEWATCHER_P_H
#define TTK_MODULE_EXPORT
The class of the device watcher.
QDeviceWatcherPrivate(QObject *parent=nullptr)
The class of the device watcher private.
void setWatcher(QDeviceWatcher *w)
QObjectList event_receivers