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

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


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

Service		org.bluez.input
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. The HID service
			record will be retrieved and the pairing will
			be initiated if needed.

			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

		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
======================

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

Methods		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()