BluezQt

agent.cpp
1 /*
2  * BluezQt - Asynchronous Bluez wrapper library
3  *
4  * SPDX-FileCopyrightText: 2014 David Rosca <[email protected]>
5  *
6  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7  */
8 
9 #include "agent.h"
10 
11 namespace BluezQt
12 {
14  : QObject(parent)
15 {
16 }
17 
18 Agent::Capability Agent::capability() const
19 {
20  return DisplayYesNo;
21 }
22 
23 void Agent::requestPinCode(DevicePtr device, const Request<QString> &request)
24 {
25  Q_UNUSED(device)
26 
27  request.cancel();
28 }
29 
30 void Agent::displayPinCode(DevicePtr device, const QString &pinCode)
31 {
32  Q_UNUSED(device)
33  Q_UNUSED(pinCode)
34 }
35 
36 void Agent::requestPasskey(DevicePtr device, const Request<quint32> &request)
37 {
38  Q_UNUSED(device)
39 
40  request.cancel();
41 }
42 
43 void Agent::displayPasskey(DevicePtr device, const QString &passkey, const QString &entered)
44 {
45  Q_UNUSED(device)
46  Q_UNUSED(passkey)
47  Q_UNUSED(entered)
48 }
49 
50 void Agent::requestConfirmation(DevicePtr device, const QString &passkey, const Request<> &request)
51 {
52  Q_UNUSED(device)
53  Q_UNUSED(passkey)
54 
55  request.cancel();
56 }
57 
58 void Agent::requestAuthorization(DevicePtr device, const Request<> &request)
59 {
60  Q_UNUSED(device)
61 
62  request.cancel();
63 }
64 
65 void Agent::authorizeService(DevicePtr device, const QString &uuid, const Request<> &request)
66 {
67  Q_UNUSED(device)
68  Q_UNUSED(uuid)
69 
70  request.cancel();
71 }
72 
74 {
75 }
76 
78 {
79 }
80 
81 } // namespace BluezQt
virtual void authorizeService(DevicePtr device, const QString &uuid, const Request<> &request)
Requests the agent to authorize a connection/service request.
Definition: agent.cpp:65
virtual void cancel()
Indicate that the agent request failed before receiving reply.
Definition: agent.cpp:73
virtual void requestPinCode(DevicePtr device, const Request< QString > &request)
Requests a PIN code from the agent.
Definition: agent.cpp:23
virtual void displayPasskey(DevicePtr device, const QString &passkey, const QString &entered)
Requests the agent to display a passkey.
Definition: agent.cpp:43
virtual void requestConfirmation(DevicePtr device, const QString &passkey, const Request<> &request)
Requests the agent to confirm a passkey.
Definition: agent.cpp:50
Agent(QObject *parent=nullptr)
Creates a new Agent object.
Definition: agent.cpp:13
virtual void displayPinCode(DevicePtr device, const QString &pinCode)
Requests the agent to display a PIN code.
Definition: agent.cpp:30
Capability
The input/output capabilities of Agent.
Definition: agent.h:46
virtual void release()
Indicates that the agent was unregistered.
Definition: agent.cpp:77
virtual void requestPasskey(DevicePtr device, const Request< quint32 > &request)
Requests a passkey from the agent.
Definition: agent.cpp:36
virtual void requestAuthorization(DevicePtr device, const Request<> &request)
Requests the agent to authorize an incoming pairing attempt.
Definition: agent.cpp:58
void cancel() const
Cancels the request.
Definition: request.cpp:138
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sun Sep 25 2022 04:19:10 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.