From 4aed2c8219774f5d797760606b8489a92ddc5163 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kcontrol/usbview/usbdevices.h | 75 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 kcontrol/usbview/usbdevices.h (limited to 'kcontrol/usbview/usbdevices.h') diff --git a/kcontrol/usbview/usbdevices.h b/kcontrol/usbview/usbdevices.h new file mode 100644 index 000000000..853df02b3 --- /dev/null +++ b/kcontrol/usbview/usbdevices.h @@ -0,0 +1,75 @@ +/*************************************************************************** + * Copyright (C) 2001 by Matthias Hoelzer-Kluepfel * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +#ifndef __USB_DEVICES_H__ +#define __USB_DEVICES_H__ + + +#include +#include + +#ifdef Q_OS_FREEBSD +#include +#endif + +class USBDB; + + +class USBDevice +{ +public: + + USBDevice(); + + void parseLine(QString line); + void parseSysDir(int bus, int parent, int level, QString line); + + int level() { return _level; }; + int device() { return _device; }; + int parent() { return _parent; }; + int bus() { return _bus; }; + QString product(); + + QString dump(); + + static QPtrList &devices() { return _devices; }; + static USBDevice *find(int bus, int device); + static bool parse(QString fname); + static bool parseSys(QString fname); + + +private: + + static QPtrList _devices; + + static USBDB *_db; + + int _bus, _level, _parent, _port, _count, _device, _channels, _power; + float _speed; + + QString _manufacturer, _product, _serial; + + int _bwTotal, _bwUsed, _bwPercent, _bwIntr, _bwIso; + bool _hasBW; + + unsigned int _verMajor, _verMinor, _class, _sub, _prot, _maxPacketSize, _configs; + QString _className; + + unsigned int _vendorID, _prodID, _revMajor, _revMinor; + +#ifdef Q_OS_FREEBSD + void collectData( int fd, int level, usb_device_info &di, int parent ); + QStringList _devnodes; +#endif +}; + + +#endif -- cgit v1.2.1