4#include <QtCore/qglobal.h>
5#define CONFIG_SOCKETNOTIFIER 1
6#define CONFIG_TCPSOCKET 0
8 #define CONFIG_THREAD 1
9#elif defined(Q_OS_LINUX)
10 #define CONFIG_THREAD (!CONFIG_SOCKETNOTIFIER && !CONFIG_TCPSOCKET)
13 #elif CONFIG_SOCKETNOTIFIER
14 class QSocketNotifier;
17#define CONFIG_THREAD 1
18#include <DiskArbitration/DiskArbitration.h>
20#define CONFIG_THREAD 0
24#define zDebug(fmt, ...) qDebug("%s: " #fmt, __FUNCTION__, ##__VA_ARGS__)
26#define zDebug(fmt, ...)
30#include <qt_windows.h>
32#include <QtCore/QBuffer>
34#include <QtCore/QList>
35#include <QtCore/QThread>
73 void parseDeviceInfo();
82 #if defined(Q_OS_LINUX)
84 void parseLine(
const QByteArray& line);
86 QTcpSocket* tcp_socket;
87 #elif CONFIG_SOCKETNOTIFIER
88 QSocketNotifier* socket_notifier;
93 #elif defined(Q_OS_WIN32)
95 #elif defined(Q_OS_WINCE)
97 HANDLE mNotificationHandle;
101 DASessionRef mSession;
#define CONFIG_THREAD
Definition DeviceWatcher_p.h:20
Definition DeviceWatcher.h:9
Definition DeviceWatcher_p.h:45
QList< QObject * > event_receivers
Definition DeviceWatcher_p.h:70
void emitDeviceAction(const QString &dev, const QString &action)
Definition DeviceWatcher.cpp:81
virtual ~DeviceWatcherPrivate()
void emitDeviceChanged(const QString &dev)
Definition DeviceWatcher.cpp:69
DeviceWatcherPrivate(QObject *parent=0)
Definition DeviceWatcher_p.h:48
void emitDeviceAdded(const QString &dev)
Definition DeviceWatcher.cpp:63
void setWatcher(DeviceWatcher *w)
Definition DeviceWatcher_p.h:60
void emitDeviceRemoved(const QString &dev)
Definition DeviceWatcher.cpp:75