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

QIrRemoteDeviceWatcher Class Reference

The QIrRemoteDeviceWatcher class watches for remote devices. More...

    #include <QIrRemoteDeviceWatcher>

Inherits QObject.

Public Functions

Signals

Additional Inherited Members


Detailed Description

The QIrRemoteDeviceWatcher class watches for remote devices.

QIrRemoteDeviceWatcher can be used to wait for remote infrared devices to come into range, and notify the user. Using this class, a system can alert the user that another infrared device is available for communication.


Member Function Documentation

QIrRemoteDeviceWatcher::QIrRemoteDeviceWatcher ( QObject * parent = 0 )

Constructs a remote device watcher. The parent parameter specifies the object's parent.

QIrRemoteDeviceWatcher::~QIrRemoteDeviceWatcher ()

Destroys the device watcher.

void QIrRemoteDeviceWatcher::deviceFound ()   [signal]

This signal is emitted whenever a new infrared device comes into range.

bool QIrRemoteDeviceWatcher::watch ( int ms, QIr::DeviceClasses classes = QIr::All )

Starts a watch for remote devices. The ms parameter specifies the maximum time to watch, and the classes parameter specifies the filter of the types of devices we're interested in.

NOTE: Due to the underlying system implementation, this function is blocking and will not return until a device has been found or the timeout has elapsed.

The function will return false if the watch could not be started or an error occurred, and true otherwise. In case a new device was found within the specified timeout, the deviceFound() signal will be emitted and this function will return true.

This function is designed to be called repeatedly in a loop. It is designed to be used as a low-power, passive watcher of remote devices, such that a user can be notified when a new device has come into range.

See also deviceFound().


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3