summaryrefslogtreecommitdiff
path: root/doc/network-api.txt
blob: 4dd3e583a3ba97686020a6240ef940065a7c3e47 (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
BlueZ D-Bus Network API description
***********************************

Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>


Network hierarchy
=================

Service		org.bluez
Interface	org.bluez.Network
Object path	[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX

Methods		string Connect(string uuid)

			Connect to the network device and return the network
			interface name. Examples of the interface name are
			bnep0, bnep1 etc.

			uuid can be either one of "gn", "panu" or "nap" (case
			insensitive) or a traditional string representation of
			UUID or a hexadecimal number.

			The connection will be closed and network device
			released either upon calling Disconnect() or when
			the client disappears from the message bus.

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

		void Disconnect()

			Disconnect from the network device.

			To abort a connection attempt in case of errors or
			timeouts in the client it is fine to call this method.

			Possible errors: org.bluez.Error.Failed

		dict GetProperties()

			Returns all properties for the interface. See the
			properties section for available properties.

Signals		PropertyChanged(string name, variant value)

			This signal indicates a changed value of the given
			property.

Properties	boolean Connected [readonly]

			Indicates if the device is connected.

		string Interface [readonly]

			Indicates the network interface name when available.

		string UUID [readonly]

			Indicates the connection role when available.


Network server hierarchy
========================

Service		org.bluez
Interface	org.bluez.NetworkServer
Object path	/org/bluez/{hci0,hci1,...}

Methods		void Register(string uuid, string bridge)

			Register server for the provided UUID. Every new
			connection to this server will be added the bridge
			interface.

			Valid UUIDs are "gn", "panu" or "nap".

			Initially no network server SDP is provided. Only
			after this method a SDP record will be available
			and the BNEP server will be ready for incoming
			connections.

		void Unregister(string uuid)

			Unregister the server for provided UUID.

			All servers will be automatically unregistered when
			the calling application terminates.