Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QUsbManager Class Reference
[QtBaseModule]

The QUsbManager class managers all available USB gadgets providers. More...

    #include <QUsbManager>

Inherits QAbstractIpcInterfaceGroupManager.

Public Functions

Signals

Additional Inherited Members


Detailed Description

The QUsbManager class managers all available USB gadgets providers.

See also QUsbGadget and UsbGadgetTask.


Member Function Documentation

QUsbManager::QUsbManager ( QObject * parent = 0 )

Constructs a new QUsbManager object and attach it to parent. The prefered method of constructing a QUsbManager object is with the instance().

QUsbManager::~QUsbManager ()

Destructor.

QList<QUsbGadget *> QUsbManager::activeGadgets ()

Returns list of the active gadgets.

It is the callers responsibility to free the memory used by the QUsbGadgets in the list.

bool QUsbManager::cableConnected () const

Returns true if the USB cable is connected.

This corresponds to the value space location /Hardware/UsbGadget/cableConnected.

See also cableConnectedChanged().

void QUsbManager::cableConnectedChanged ( bool connected )   [signal]

This signal is emitted when the connection state of the USB cable changes.

connected will be set to true when the USB cable is connected, false otherwise.

See also cableConnected().

bool QUsbManager::canActivate ( const QByteArray & gadget )

Returns true if the gadget can be loaded. That is if no other gadget is currently active, or a compatible composite configuration would result if gadget is loaded.

Typically only a single gadget driver can be loaded at a time. However, some hardware supports loading multple gadget drivers at the same time resulting in a composite gadget. Valid composite gadget configurations are defined in the Trolltech/Usb.conf configuration file. The PeripheralController/CompositeGadgets configuration setting lists the group names that define valid composite gadget configurations. The Gadgets setting under each composite group specifies which gadget drivers form the composite configuration.

For example, the following configuration file defines two composite gadget configurations. The first with the Ethernet and Storage gadgets and the second with the Ethernet and Serial gadgets.

    [PeripheralController]
    SupportedGadgets="Ethernet,Storage,Serial"
    CompositeGadgets="Composite0,Composite1"

    [Ethernet]
    ...

    [Storage]
    ...

    [Serial]
    ...

    [Composite0]
    Gadgets="Ethernet,Storage"

    [Composite1]
    Gadgets="Ethernet,Serial"

void QUsbManager::deactivateAborted ()   [signal]

This signal is emitted if a gadget fails to deactivate.

See also deactivateGadgets().

void QUsbManager::deactivateCompleted ()   [signal]

This signal is emitted when all gadgets that have been deactivated through this manager object are deactivated.

See also deactivateGadgets().

void QUsbManager::deactivateGadgets ()

Deactivates all active gadgets. The deactivateCompleted() signal is emitted once all gadgets are deactivated. If a gadget fails to deactivate the deactivateAborted() signal is emitted.


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3