BluezQt::Agent

Search for usage in LXR

BluezQt::Agent Class Referenceabstract

#include <BluezQt/Agent>

Inheritance diagram for BluezQt::Agent:

Public Types

enum  Capability { DisplayOnly = 0, DisplayYesNo = 1, KeyboardOnly = 2, NoInputNoOutput = 3 }
 

Properties

Capability capability
 
- Properties inherited from QObject
 objectName
 

Public Member Functions

 Agent (QObject *parent=nullptr)
 
virtual void authorizeService (DevicePtr device, const QString &uuid, const Request<> &request)
 
virtual void cancel ()
 
virtual Capability capability () const
 
virtual void displayPasskey (DevicePtr device, const QString &passkey, const QString &entered)
 
virtual void displayPinCode (DevicePtr device, const QString &pinCode)
 
virtual QDBusObjectPath objectPath () const =0
 
virtual void release ()
 
virtual void requestAuthorization (DevicePtr device, const Request<> &request)
 
virtual void requestConfirmation (DevicePtr device, const QString &passkey, const Request<> &request)
 
virtual void requestPasskey (DevicePtr device, const Request< quint32 > &request)
 
virtual void requestPinCode (DevicePtr device, const Request< QString > &request)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Detailed Description

Bluetooth agent.

This class represents a Bluetooth agent.

The agent is used in pairing process to do various actions.

Note
The return value of requests will be sent asynchronously with Request class. It is also possible to cancel/reject all requests.

Definition at line 36 of file agent.h.

Member Enumeration Documentation

◆ Capability

The input/output capabilities of Agent.

Definition at line 46 of file agent.h.

Constructor & Destructor Documentation

◆ Agent()

BluezQt::Agent::Agent ( QObject parent = nullptr)
explicit

Creates a new Agent object.

Parameters
parent

Definition at line 13 of file agent.cpp.

Member Function Documentation

◆ authorizeService()

void BluezQt::Agent::authorizeService ( DevicePtr  device,
const QString uuid,
const Request<> &  request 
)
virtual

Requests the agent to authorize a connection/service request.

This method gets called when the Bluetooth daemon needs to authorize a connection/service request.

Parameters
devicedevice that invoked the action
uuidUUID of service
requestrequest to be used for sending reply

Definition at line 65 of file agent.cpp.

◆ cancel()

void BluezQt::Agent::cancel ( )
virtual

Indicate that the agent request failed before receiving reply.

This method gets called to indicate that the agent request failed before a reply was returned.

It cancels the previous request.

Definition at line 73 of file agent.cpp.

◆ capability()

virtual Capability BluezQt::Agent::capability ( ) const
virtual

Input/output capability of the agent.

By default, this method returns DisplayYesNo.

Returns
capability of agent

◆ displayPasskey()

void BluezQt::Agent::displayPasskey ( DevicePtr  device,
const QString passkey,
const QString entered 
)
virtual

Requests the agent to display a passkey.

This method gets called when the Bluetooth daemon needs to display a passkey for an authentication.

When the passkey needs no longer to be displayed, the cancel() method will be called.

Parameters
devicedevice that invoked the action
passkeypasskey to be displayed
enterednumber of already typed keys on the remote side

Definition at line 43 of file agent.cpp.

◆ displayPinCode()

void BluezQt::Agent::displayPinCode ( DevicePtr  device,
const QString pinCode 
)
virtual

Requests the agent to display a PIN code.

This method gets called when the Bluetooth daemon needs to display a pincode for an authentication.

When the PIN code needs no longer to be displayed, the cancel() method will be called.

Parameters
devicedevice that invoked the action
pinCodePIN code to be displayed

Definition at line 30 of file agent.cpp.

◆ objectPath()

virtual QDBusObjectPath BluezQt::Agent::objectPath ( ) const
pure virtual

D-Bus object path of the agent.

The path where the agent will be registered.

Note
You must provide valid object path!
Returns
object path of agent

◆ release()

void BluezQt::Agent::release ( )
virtual

Indicates that the agent was unregistered.

This method gets called when the Bluetooth daemon unregisters the agent.

An agent can use it to do cleanup tasks. There is no need to unregister the agent, because when this method gets called it has already been unregistered.

Definition at line 77 of file agent.cpp.

◆ requestAuthorization()

void BluezQt::Agent::requestAuthorization ( DevicePtr  device,
const Request<> &  request 
)
virtual

Requests the agent to authorize an incoming pairing attempt.

This method gets called to request the user to authorize an incoming pairing attempt which would in other circumstances trigger the just-works model.

Parameters
devicedevice that invoked the action
requestrequest to be used for sending reply

Definition at line 58 of file agent.cpp.

◆ requestConfirmation()

void BluezQt::Agent::requestConfirmation ( DevicePtr  device,
const QString passkey,
const Request<> &  request 
)
virtual

Requests the agent to confirm a passkey.

This method gets called when the Bluetooth daemon needs to confirm a passkey for an authentication.

Parameters
devicedevice that invoked the action
passkeypasskey to be confirmed
requestrequest to be used for sending reply

Definition at line 50 of file agent.cpp.

◆ requestPasskey()

void BluezQt::Agent::requestPasskey ( DevicePtr  device,
const Request< quint32 > &  request 
)
virtual

Requests a passkey from the agent.

This method gets called when the Bluetooth daemon needs to get the passkey for an authentication.

The return value should be a numeric value between 0-999999.

Parameters
devicedevice that invoked the action
requestrequest to be used for sending reply

Definition at line 36 of file agent.cpp.

◆ requestPinCode()

void BluezQt::Agent::requestPinCode ( DevicePtr  device,
const Request< QString > &  request 
)
virtual

Requests a PIN code from the agent.

This method gets called when the Bluetooth daemon needs to get the PIN code for an authentication.

The return value should be a string of 1-16 characters length. The string can be alphanumeric.

Parameters
devicedevice that invoked the action
requestrequest to be used for sending reply

Definition at line 23 of file agent.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Nov 27 2022 04:09:33 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.