1 /***************************************************************************
2 * Copyright (C) 2001 by Matthias Hoelzer-Kluepfel <mhk@caldera.de> *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
9 ***************************************************************************/
11 #ifndef __USB_DEVICES_H__
12 #define __USB_DEVICES_H__
17 #if defined(__DragonFly__)
18 #include <bus/usb/usb.h>
19 #include <QStringList>
20 #elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD)
21 #include <dev/usb/usb.h>
22 #include <QStringList>
34 void parseLine(const QString
&line
);
35 void parseSysDir(int bus
, int parent
, int level
, const QString
&line
);
53 static QList
<USBDevice
*> &devices() {
56 static USBDevice
*find(int bus
, int device
);
57 static bool parse(const QString
& fname
);
58 static bool parseSys(const QString
& fname
);
62 static QList
<USBDevice
*> _devices
;
66 int _bus
, _level
, _parent
, _port
, _count
, _device
, _channels
, _power
;
69 QString _manufacturer
, _product
, _serial
;
71 int _bwTotal
, _bwUsed
, _bwPercent
, _bwIntr
, _bwIso
;
74 unsigned int _verMajor
, _verMinor
, _class
, _sub
, _prot
, _maxPacketSize
, _configs
;
77 unsigned int _vendorID
, _prodID
, _revMajor
, _revMinor
;
79 #if defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD)
80 void collectData( int fd
, int level
, usb_device_info
&di
, int parent
);
81 QStringList _devnodes
;