Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QCommDeviceSession class provides facilities to initiate a device session. More...
#include <QCommDeviceSession>
Inherits QObject.
The QCommDeviceSession class provides facilities to initiate a device session.
The QCommDeviceSession class provides facilities to initiate a new session on a hardware device. The system will attempt to keep the device open for the duration of the open session, unless the user explicitly shuts it down or another unexpected event occurs.
Sessions are thus used by applications to give a hint to the device manager that the device is currently in use. E.g. a client that is trying to send a vCard over bluetooth to a remote device would wrap all Bluetooth related operations by using the QCommDeviceSession object with a given Bluetooth device.
See also QCommDeviceController.
Constant | Value | Description |
---|---|---|
QCommDeviceSession::Block | 0 | Block, not using the event loop. |
QCommDeviceSession::BlockWithEventLoop | 1 | Block, but using the event loop. |
Constructs a new QCommDeviceSession object. The he deviceId specifies the device id. This is usually equivalent to the hardware device id of the device. E.g. irdaX for Infrared devices and hciX for Bluetooth devices.
The parent parameter is passed to the QObject constructor.
See also deviceId().
Destructor.
Returns the id of the device.
Closes the current session.
See also startSession() and sessionClosed().
Returns a new session for device given by deviceId. The type of wait to use (blocking or recursive event loop) is specified by type. The parent is used to specify the QObject parent of the created session.
If the session could not be established, a NULL is returned.
This signal is emitted whenever the session has been terminated (perhaps forcefully)
See also endSession().
This signal is emitted when there was a problem opening the device session.
See also startSession().
This signal is emitted whenever a session has been opened successfully and it is safe to use the device.
See also startSession().
Attempts to initiate a session. Once the session is established, the sessionOpen() signal will be sent. Otherwise sessionFailed() signal will be sent.
See also sessionOpen(), sessionFailed(), and endSession().
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |