Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QUsbStorageGadget class is used to enable mass storage class of USB gadgets. More...
#include <QUsbStorageGadget>
Inherits QUsbGadget.
Inherited by QUsbStorageGadgetProvider.
The QUsbStorageGadget class is used to enable mass storage class of USB gadgets.
The QUsbStorageGadget class is used to configure the USB gadget hardware as a USB mass storage device.
The following code will export the block device, /dev/sda.
QUsbStorageGadget *storage = QUsbStorageGadget; if (gadget->available()) { connect(gadget, SIGNAL(activated()), this, SLOT(storageActivated())); gadget->setBackingStore(QStringList() << "/dev/sda"); gadget->activate(); }
Warning: Filesystem drivers in most operating systems expect exclusive access to the underlying block device. Any modification to the on disk data structures that do not go through the filesystem layer can result in data losses and system crashes. Therefore it is important that the backing store block devices are unmounted prior to activating the USB storage gadget.
See also QUsbManager and UsbGadgetTask.
Constructs a new QUsbStorageGadget object in group and attach it to parent. If mode is Client, then the object is constructed in client mode and group may be empty to indicate that the default group should be used.
Adds device path to the list of backing stores.
Returns the list of devices that will be used as the backing store.
See also setBackingStore().
Removes device path from the list of backing stores.
Sets the list of backing store devices to paths.
See also backingStore().
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |