summaryrefslogtreecommitdiff
path: root/doc/agent-api.txt
blob: c9c512244c20915e4df640ff6cbb704cd6597825 (plain)
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
HandoverAgent hierarchy
=======================

Service		unique name
Interface	org.neard.HandoverAgent
Object path	freely definable

Methods		dict RequestOOB(dict values) [experimental]

			This method gets called when the service daemon
			needs to get Out Of Band data from the handover
			agent, typically the BlueZ daemon.

			The service daemon will use this OOB data to build
			a Handover Request or Select message and send it to
			remote device.

			Values parameter is optional. It should be a dictionary
			where the keys are the field names and the values are
			the actual fields. If provided it should contain remote
			Out Of Band data received in Handover Request message.
			Those data will be stored for future use (i.e. when
			remote initialize pairing) and providing those will not
			initialize pairing.

			The return value should be a dictionary where the
			keys are the field names and the values are the
			actual fields.

			Possible Errors: org.neard.HandoverAgent.Error.NotSupported
					 org.neard.HandoverAgent.Error.NoSuchDevice
					 org.neard.HandoverAgent.Error.InProgress
					 org.neard.HandoverAgent.Error.Failed

		void PushOOB(dict values) [experimental]

			This method gets called when service daemon received
			Handover Select message from selector and needs to pass
			remote Out Of Band data to agent to start handover.

			If there is no Bluetooth adapter or if it doesn't
			support simple pairing the agent will return an error.

			Agent shall implicitly initialize pairing if needed.

			This function returns when alternative carrier
			(Bluetooth) is ready to be used i.e. pairing has
			finished.

			Parameter should be a dictionary where the keys are the
			field names and the values are the actual fields.

			Possible Errors: org.neard.HandoverAgent.Error.NotSupported
					 org.neard.HandoverAgent.Error.NoSuchDevice
					 org.neard.HandoverAgent.Error.InProgress
					 org.neard.HandoverAgent.Error.Failed

		void Release() [experimental]

			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.

Fields		array{byte} EIR

			This is EIR blob as described in Bluetooth Core
			Specification 4.0 (Vol 3, Part C, chapter 8.1.6).
			Used by SSP capable devices.

		array{byte} nokia.com:bt

			This is a proprietary extension blob used by some
			Nokia Bluetooth 2.0 devices.


NDEFAgent hierarchy
=======================

Service		unique name
Interface	org.neard.NDEFAgent
Object path	freely definable

Methods		dict GetNDEF(dict values) [experimental]

			This method gets called when the service daemon
			found an NDEF matching the registered type.

			The parameter is a dictionary where the keys are the
			field names and the values are the actual fields.

		void Release() [experimental]

			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.

Fields		array{byte} NDEF

			This is the raw NDEF data.

		object Record

			This is a record object path.