summaryrefslogtreecommitdiffstats
path: root/input/input-api.txt
blob: 1d9fec1f37f854a1b8ad3d553b04404cae525511 (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
Bluetooth input service API description
***************************************

Copyright (C) 2006-2007  Marcel Holtmann <marcel@holtmann.org>


Input Manager hierarchy
=======================

Interface	org.bluez.input.Manager
Object path	/org/bluez/input

Methods		array{string} ListDevices()

			Returns an array of available input devices path.

		string CreateDevice(string address)

			Create an input device object.

			On success it will return the path of the
			newly created device object.

			Possible errors: org.bluez.input.AlreadyExists
			                 org.bluez.input.NotSupported
			                 org.bluez.input.ConnectionAttemptFailed
			                 org.bluez.input.Failed

		string CreateSecureDevice(string address)

			Create an input device object. Pairing will
			be initiated if needed(keyboard/combo devices).

			On success it will return the path of the
			newly created device object.

			Possible errors: org.bluez.input.AlreadyExists
			                 org.bluez.input.NotSupported
			                 org.bluez.input.ConnectionAttemptFailed
			                 org.bluez.input.AuthenticationFailed
			                 org.bluez.input.Failed

		void RemoveDevice(string path)

			Remove the input device object for a given path.

			Possible errors:org.bluez.input.DoesNotExist
					org.bluez.input.Failed

Signals		void DeviceCreated(string path)

		void DeviceRemoved(string path)


Input Device hierarchy
======================

Interface	org.bluez.input.Device
Object path	/org/bluez/input/{keyboard*|mouse*|...}

Methods		string GetAdapter()

			Returns the adapter address.

			Example: "00:11:22:33:44:55"

		string GetAddress()

			Returns the device address.

			Example: "00:11:22:33:44:55"

		string GetName()

			Returns the service name.

		uint16 GetProductId()

			Returns the product id.

		uint16 GetVendorId()

			Returns the vendor id.

		boolean IsConnected()

			Returns the connection status.

		void Connect()

			Connect to the input device.

			Possible errors: org.bluez.input.AlreadyConnected
			                 org.bluez.input.ConnectionAttemptFailed

		void Disconnect()

			Disconnect from the input device.

			Possible errors: org.bluez.input.Failed

Signals		void Connected()

		void Disconnected()