1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
BlueZ D-Bus Agent API description
**********************************
Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
Copyright (C) 2005-2006 Johan Hedberg <johan.hedberg@nokia.com>
Agent hierarchy
===============
Service unique name
Interface org.bluez.Agent
Object path freely definable
Methods void Release()
This method gets called when the service 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.
string RequestPinCode(object device)
This method gets called when the service daemon
needs to get the passkey for an authentication.
The return value should be a string of 1-16 characters
length. The string can be alphanumeric.
Possible errors: org.bluez.Error.Rejected
org.bluez.Error.Canceled
uint32 RequestPasskey(object device)
This method gets called when the service daemon
needs to get the passkey for an authentication.
The return value should be a numeric value
between 0-999999.
Possible errors: org.bluez.Error.Rejected
org.bluez.Error.Canceled
void DisplayPasskey(object device, uint32 passkey,
uint16 entered)
This method gets called when the service daemon
needs to display a passkey for an authentication.
The entered parameter indicates the number of already
typed keys on the remote side.
An empty reply should be returned. When the passkey
needs no longer to be displayed, the Cancel method
of the agent will be called.
During the pairing process this method might be
called multiple times to update the entered value.
Note that the passkey will always be a 6-digit number,
so the display should be zero-padded at the start if
the value contains less than 6 digits.
void DisplayPinCode(object device, string pincode)
This method gets called when the service daemon
needs to display a pincode for an authentication.
An empty reply should be returned. When the pincode
needs no longer to be displayed, the Cancel method
of the agent will be called.
If this method is not implemented the RequestPinCode
method will be used instead.
This is used during the pairing process of keyboards
that don't support Bluetooth 2.1 Secure Simple Pairing,
in contrast to DisplayPasskey which is used for those
that do.
This method will only ever be called once since
older keyboards do not support typing notification.
Note that the PIN will always be a 6-digit number,
zero-padded to 6 digits. This is for harmony with
the later specification.
void RequestConfirmation(object device, uint32 passkey)
This method gets called when the service daemon
needs to confirm a passkey for an authentication.
To confirm the value it should return an empty reply
or an error in case the passkey is invalid.
Note that the passkey will always be a 6-digit number,
so the display should be zero-padded at the start if
the value contains less than 6 digits.
Possible errors: org.bluez.Error.Rejected
org.bluez.Error.Canceled
void Authorize(object device, string uuid)
This method gets called when the service daemon
needs to authorize a connection/service request.
Possible errors: org.bluez.Error.Rejected
org.bluez.Error.Canceled
void ConfirmModeChange(string mode)
This method gets called if a mode change is requested
that needs to be confirmed by the user. An example
would be leaving flight mode.
Possible errors: org.bluez.Error.Rejected
org.bluez.Error.Canceled
void Cancel()
This method gets called to indicate that the agent
request failed before a reply was returned.
|