1 BlueZ D-Bus Agent API description 2 ********************************** 3 4 Copyright (C) 2004-2008 Marcel Holtmann <marcel (a] holtmann.org> 5 Copyright (C) 2005-2006 Johan Hedberg <johan.hedberg (a] nokia.com> 6 7 8 Agent hierarchy 9 =============== 10 11 Service unique name 12 Interface org.bluez.Agent 13 Object path freely definable 14 15 Methods void Release() 16 17 This method gets called when the service daemon 18 unregisters the agent. An agent can use it to do 19 cleanup tasks. There is no need to unregister the 20 agent, because when this method gets called it has 21 already been unregistered. 22 23 string RequestPinCode(object device) 24 25 This method gets called when the service daemon 26 needs to get the passkey for an authentication. 27 28 The return value should be a string of 1-16 characters 29 length. The string can be alphanumeric. 30 31 Possible errors: org.bluez.Error.Rejected 32 org.bluez.Error.Canceled 33 34 uint32 RequestPasskey(object device) 35 36 This method gets called when the service daemon 37 needs to get the passkey for an authentication. 38 39 The return value should be a numeric value 40 between 0-999999. 41 42 Possible errors: org.bluez.Error.Rejected 43 org.bluez.Error.Canceled 44 45 void DisplayPasskey(object device, uint32 passkey, uint8 entered) 46 47 This method gets called when the service daemon 48 needs to display a passkey for an authentication. 49 50 The entered parameter indicates the number of already 51 typed keys on the remote side. 52 53 An empty reply should be returned. When the passkey 54 needs no longer to be displayed, the Cancel method 55 of the agent will be called. 56 57 During the pairing process this method might be 58 called multiple times to update the entered value. 59 60 void RequestConfirmation(object device, uint32 passkey) 61 62 This method gets called when the service daemon 63 needs to confirm a passkey for an authentication. 64 65 To confirm the value it should return an empty reply 66 or an error in case the passkey is invalid. 67 68 Possible errors: org.bluez.Error.Rejected 69 org.bluez.Error.Canceled 70 71 void RequestPairingConsent(object device) 72 73 This method gets called when the service daemon 74 needs to confirm an incoming pairing request. 75 76 To accept it should return an empty reply 77 or an error to reject. 78 79 Possible errors: org.bluez.Error.Rejected 80 org.bluez.Error.Canceled 81 82 void Authorize(object device, string uuid) 83 84 This method gets called when the service daemon 85 needs to authorize a connection/service request. 86 87 Possible errors: org.bluez.Error.Rejected 88 org.bluez.Error.Canceled 89 90 void ConfirmModeChange(string mode) 91 92 This method gets called if a mode change is requested 93 that needs to be confirmed by the user. An example 94 would be leaving flight mode. 95 96 Possible errors: org.bluez.Error.Rejected 97 org.bluez.Error.Canceled 98 99 void Cancel() 100 101 This method gets called to indicate that the agent 102 request failed before a reply was returned. 103