Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QBluetoothAuthorizationAgent class represents an authorization proxy. More...
#include <QBluetoothAuthorizationAgent>
Inherits QObject.
The QBluetoothAuthorizationAgent class represents an authorization proxy.
The QBluetoothAuthorizationAgent class provides an abstract interface for querying and granting authorization requests whenever remote bluetooth devices wish to use local bluetooth services. It is up to the clients of this class to actually establish whether the authorization request is granted or denied. For instance, the client could ask the user by informing him or her of the incoming request.
The authorization agent can be registered as a global for all local adapters or for a particular adapter.
See also QBluetoothAddress and QBluetoothLocalDevice.
Possible errors that might occur.
Constant | Value | Description |
---|---|---|
QBluetoothAuthorizationAgent::NoError | 0 | No error. |
QBluetoothAuthorizationAgent::AlreadyExists | 1 | Another passkey agent has already been registered. |
QBluetoothAuthorizationAgent::DoesNotExist | 2 | The passkey agent has not been registered. |
QBluetoothAuthorizationAgent::UnknownError | 3 | An unknown error has occurred. |
Constructs an authorization agent. The name parameter specifies a unique name of the authorization agent. The name should be a valid identifier name, e.g. it cannot contain special characters or start with a number. For instance: DefaultAuthAgent.
The parent parameter holds the QObject parent.
Destroys the passkey agent.
This virtual function will be called whenever the bluetooth system has received an authorization request, and the agent is registered to handle the particular request.
The localDevice parameter contains the local adapter this request came in on. The remote parameter contains the Bluetooth address of the remote device requesting authorization, and service parameter holds the name of the service the authorization is being obtained for. The uuid contains an optional uuid of the request.
This function should return true if the request is to be authorized and false otherwise.
See also cancel().
This function will be called whenever an authorization request has been canceled by the requestor (e.g. connection to the service has been dropped).
The request being cancelled is on localDevice and remote is the address of the remote device. The service is the service name of the service canceling the authorization request. The uuid contains an optional uuid of the request.
See also authorize().
Returns the last error that has occurred.
Returns the name of the passkey agent as a string.
Register the authorization agent for all local adapters.
Returns true if the agent cou7ld be registered successfully, and false otherwise. If the call fails, the error can be obtained by calling error().
See also unregisterAgent() and error().
This is an overloaded member function, provided for convenience.
Register the authorization agent for localDevice adapter. The adapter name can be obtained from the QBluetoothLocalDevice object.
Returns true if the agent could be registered successfully, and false otherwise. If the call fails, the error can be obtained by calling error().
See also unregisterAgent(), error(), and QBluetoothLocalDevice.
This function will be called whenever a passkey agent has been unregistered.
See also unregisterAgent().
Unregister the authorization agent for all local adapters.
Returns true if the agent could be registered successfully, and false otherwise. If the call fails, the error can be obtained by calling error().
See also registerAgent() and error().
This is an overloaded member function, provided for convenience.
Unregister the authorization agent for localDevice adapter. The adapter name can be obtained from the QBluetoothLocalDevice object.
Returns true if the agent could be registered successfully, and false otherwise. If the call fails, the error can be obtained by calling error().
See also unregisterAgent(), error(), and QBluetoothLocalDevice.
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |