Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QAbstractCommDeviceManager class manages power state of a communications device. More...
#include <QAbstractCommDeviceManager>
Inherits QObject.
Inherited by IrPowerService.
The QAbstractCommDeviceManager class manages power state of a communications device.
The QAbstractCommDeviceManager implements functionality necessary to provide device session functionality for a communications device. It also controls the power and state of a communications device.
QAbstractCommDeviceManager manages the device availability for all applications which are use the communications device. The applications must use the QCommDeviceSession class to notify the manager that they are or will be using the communications device. If a session is activated and the device is not in a correct state (e.g. turned off), the device is brought up automatically. Once all sessions are closed, the device can be brought down automatically if required to conserve power.
This class is part of the Qt Extended server and cannot be used by other Qt Extended applications.
See also QCommDeviceSession and QCommDeviceController.
Constructs a QAbstractCommDeviceManager. The path argument contains the UNIX socket path for the manager to listen on. This should usually be in Qt Extended temp directory. The devId contains the unique device identifier, e.g. irda0 or hci0. The parent contains the QObject parent.
See also serverPath() and deviceId().
Destructor.
Clients should reimplement this method to bring down the device. If the operation is successful, clients should emit the downStatus signal. If an error occurred, the downStatus signal should be emitted with error set to true.
See also downStatus().
Clients should reimplement this method to bring up the device. If the operation is successful, clients should emit the upStatus signal. If an error occurred, the upStatus signal should be emitted with error set to true.
See also upStatus().
Returns the unique device id of the device this manager is responsible for.
See also serverPath().
Clients should emit this signal whenever the bringDown operation is successful or has failed. If the operation succeeds, the error parameter should be set to false. Otherwise the error paramter should be set to true and the msg paramter can contain an optional error message.
See also bringDown().
Returns true if the manager is started, false otherwise.
Clients should reimplement this method to return true if the device is currently available, and false otherwise.
See also bringUp() and bringDown().
Returns the UNIX server socket path of the device.
See also deviceId().
Returns true if there are applications using this device.
This method is called whenever a bring down request is processed by the device manager. It can be used by clients to specialize the logic of whether a device should be brought down. E.g. there are several applications that are using the device (e.g. there are several sessions open), and bringing up the device might interfere with these sessions. The default implementation returns true if there are no active sessions, and false otherwise.
The socket parameter holds the socket of the peer who is requesting the device be brought down.
NOTE: It is safe to start a new EventLoop inside this method.
This method is called whenever a new session request is processed by the device manager. It can be used by clients to specialize the logic of whether a given peer has the ability to start a session utilizing the device. The socket parameter holds the socket of the peer.
The default implementation returns false if Qt Extended is in plane mode; otherwise, it returns true.
See also QPhoneProfileManager::planeMode().
Returns if able to start the manager; otherwise returns false.
See also isStarted() and stop().
Stops the manager.
See also isStarted() and start().
Clients should emit this signal whenever the bringUp operation is successful or has failed. If the operation succeeds, the error parameter should be set to false. Otherwise the error paramter should be set to true and the msg paramter can contain an optional error message.
See also bringUp().
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |