From 6f3ffb5dc897f4d63be2fc6a176ed6b391c0ebba Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 6 Mar 2008 12:40:47 +0000 Subject: Add directory for documentation --- doc/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 doc/Makefile.am (limited to 'doc') diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 00000000..02742923 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,2 @@ + +MAINTAINERCLEANFILES = Makefile.in -- cgit From 19e7dbecf4b38bf64458a34ea005a8aca0bc8974 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 7 Mar 2008 14:28:43 +0000 Subject: Move documentation into doc directory --- doc/Makefile.am | 2 ++ doc/adapter-api.txt | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/device-api.txt | 50 ++++++++++++++++++++++++++ 3 files changed, 153 insertions(+) create mode 100644 doc/adapter-api.txt create mode 100644 doc/device-api.txt (limited to 'doc') diff --git a/doc/Makefile.am b/doc/Makefile.am index 02742923..b66ceb7f 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,2 +1,4 @@ +EXTRA_DIST = adapter-api.txt device-api.txt + MAINTAINERCLEANFILES = Makefile.in diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt new file mode 100644 index 00000000..1f9cdd88 --- /dev/null +++ b/doc/adapter-api.txt @@ -0,0 +1,101 @@ +BlueZ D-Bus Adapter API description +*********************************** + +Copyright (C) 2006-2008 Marcel Holtmann +Copyright (C) 2005-2006 Johan Hedberg +Copyright (C) 2005-2006 Claudio Takahasi +Copyright (C) 2005-2006 Eduardo Rocha +Copyright (C) 2008-2008 Luiz von Dentz + +Adapter hierarchy +================= + +Service org.bluez +Interface org.bluez.Adapter +Object path /org/bluez/{hci0,hci1,...} + +Methods dict GetProperties() + + TBD + + void SetProperty(string name, variant value) + + TBD + + array{object} ListDevices() + + TBD + + void DiscoverDevices() + + This method starts the device discovery procedure. This + includes an inquiry procedure and remote device name + resolving. + + On start up this process will generate a DiscoveryStarted + signal and then return RemoteDeviceFound and also + RemoteNameUpdated signals. If the procedure has been + finished an DiscoveryCompleted signal will be sent. + + Possible errors: org.bluez.Error.NotReady + org.bluez.Error.Failed + org.bluez.Error.InProgress + org.bluez.Error.NoSuchAdapter + + void CancelDiscovery() + + This method will cancel any previous DiscoverDevices + or DiscoverDevicesWithoutNameResolving actions. + + Possible errors: org.bluez.Error.NotReady + org.bluez.Error.Failed + org.bluez.Error.NotAuthorized + org.bluez.Error.NoSuchAdapter + + object CreateDevice(string address) + + TBD + + object CreateDeviceWithAgent(string address, object path) + + TBD + + void RemoveDevice(object path) + +Signals DeviceCreated(object path) + + TBD + + DeviceRemoved(object path) + + TBD + + PropertyChanged(string name, variant value) + + TBD + + DiscoveryStarted() + + TBD + + DiscoveryCompleted() + + TBD + + DeviceFound(string address, dict values) + + TBD + + DeviceDisappeared(string address) + + TBD + +Properties string Name [readonly] + + string Address [readonly] + + boolean PeriodicInquiry [readwrite] + + string Mode [readwrite] + + uint32 DiscoverableTimeout [readwrite] diff --git a/doc/device-api.txt b/doc/device-api.txt new file mode 100644 index 00000000..82de22f4 --- /dev/null +++ b/doc/device-api.txt @@ -0,0 +1,50 @@ +BlueZ D-Bus Device API description +********************************** + +Copyright (C) 2008-2008 Marcel Holtmann +Copyright (C) 2008-2008 Johan Hedberg +Copyright (C) 2008-2008 Claudio Takahasi +Copyright (C) 2008-2008 Luiz von Dentz + +Adapter hierarchy +================= + +Service org.bluez +Interface org.bluez.Device +Object path /org/bluez/{hci0,hci1,...}/{dev_XX_XX_XX_XX_XX_XX...} + +Methods dict GetProperties() + + TBD + + void SetProperty(string name, variant value) + + TBD + + void Disconnect() + + TBD + +Signals PropertyChanged(string name, variant value) + + TBD + + DisconnectRequested() + + TBD + +Properties string Name [readonly] + + string Address [readonly] + + string Class [readonly] + + array{string} UUIDS [readwrite] + + boolean Paired [readonly] + + boolean Trusted [readwrite] + + boolean Connected [readonly] + + string Alias [readwrite] -- cgit From 860a1fc8d94dc3edf90f90b4d8aacd6db4b9bd4c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 7 Mar 2008 14:39:14 +0000 Subject: Update documentation --- doc/Makefile.am | 2 +- doc/adapter-api.txt | 18 ++++++++++-------- doc/agent-api.txt | 21 +++++++++++++++++++++ doc/device-api.txt | 21 +++++++++++---------- 4 files changed, 43 insertions(+), 19 deletions(-) create mode 100644 doc/agent-api.txt (limited to 'doc') diff --git a/doc/Makefile.am b/doc/Makefile.am index b66ceb7f..3b7bd904 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,4 +1,4 @@ -EXTRA_DIST = adapter-api.txt device-api.txt +EXTRA_DIST = adapter-api.txt device-api.txt agent-api.txt MAINTAINERCLEANFILES = Makefile.in diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index 1f9cdd88..6c3976ba 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -1,11 +1,11 @@ BlueZ D-Bus Adapter API description *********************************** -Copyright (C) 2006-2008 Marcel Holtmann +Copyright (C) 2004-2008 Marcel Holtmann Copyright (C) 2005-2006 Johan Hedberg Copyright (C) 2005-2006 Claudio Takahasi -Copyright (C) 2005-2006 Eduardo Rocha -Copyright (C) 2008-2008 Luiz von Dentz +Copyright (C) 2006-2007 Luiz von Dentz + Adapter hierarchy ================= @@ -60,7 +60,9 @@ Methods dict GetProperties() TBD - void RemoveDevice(object path) + void RemoveDevice(object + + TBD Signals DeviceCreated(object path) @@ -90,12 +92,12 @@ Signals DeviceCreated(object path) TBD -Properties string Name [readonly] +Properties string Address [readonly] - string Address [readonly] - - boolean PeriodicInquiry [readwrite] + string Name [readonly] string Mode [readwrite] uint32 DiscoverableTimeout [readwrite] + + boolean PeriodicInquiry [readwrite] diff --git a/doc/agent-api.txt b/doc/agent-api.txt new file mode 100644 index 00000000..24dc508b --- /dev/null +++ b/doc/agent-api.txt @@ -0,0 +1,21 @@ +BlueZ D-Bus Agent API description +********************************** + +Copyright (C) 2004-2008 Marcel Holtmann +Copyright (C) 2005-2006 Johan Hedberg + + +Agent hierarchy +=============== + +Service unique name +Interface org.bluez.Agent +Object path freely definable + +Methods void Release() + + 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. diff --git a/doc/device-api.txt b/doc/device-api.txt index 82de22f4..49545ef5 100644 --- a/doc/device-api.txt +++ b/doc/device-api.txt @@ -1,13 +1,14 @@ BlueZ D-Bus Device API description ********************************** -Copyright (C) 2008-2008 Marcel Holtmann -Copyright (C) 2008-2008 Johan Hedberg -Copyright (C) 2008-2008 Claudio Takahasi -Copyright (C) 2008-2008 Luiz von Dentz +Copyright (C) 2004-2008 Marcel Holtmann +Copyright (C) 2005-2006 Johan Hedberg +Copyright (C) 2005-2006 Claudio Takahasi +Copyright (C) 2006-2007 Luiz von Dentz -Adapter hierarchy -================= + +Device hierarchy +================ Service org.bluez Interface org.bluez.Device @@ -33,9 +34,9 @@ Signals PropertyChanged(string name, variant value) TBD -Properties string Name [readonly] +Properties string Address [readonly] - string Address [readonly] + string Name [readonly] string Class [readonly] @@ -43,8 +44,8 @@ Properties string Name [readonly] boolean Paired [readonly] - boolean Trusted [readwrite] - boolean Connected [readonly] + boolean Trusted [readwrite] + string Alias [readwrite] -- cgit From 8504c972c3019405fb4dc82d99c56f41ad859b40 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 10 Mar 2008 15:01:22 +0000 Subject: Change property PeriodicInquiry to PeriodicDiscovery. --- doc/adapter-api.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index 6c3976ba..d3068480 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -100,4 +100,4 @@ Properties string Address [readonly] uint32 DiscoverableTimeout [readwrite] - boolean PeriodicInquiry [readwrite] + boolean PeriodicDiscovery [readwrite] -- cgit From 0693bc353614e02d657e771982cfa4d13ed243f5 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 10 Mar 2008 21:18:56 +0000 Subject: Update agent method descriptions --- doc/agent-api.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'doc') diff --git a/doc/agent-api.txt b/doc/agent-api.txt index 24dc508b..1e82e2b3 100644 --- a/doc/agent-api.txt +++ b/doc/agent-api.txt @@ -19,3 +19,34 @@ Methods void Release() cleanup tasks. There is no need to unregister the agent, because when this method gets called it has already been unregistered. + + string RequestPasskey(object device) + + This method gets called when the service daemon + needs to get the passkey for an authentication. The + return value is actual passkey. + + Possible errors: org.bluez.Error.Rejected + org.bluez.Error.Canceled + + void Authorize(object device) + + This method gets called when the service daemon + needs to authorize a connection/service request. + + Possible errors: org.bluez.Error.Rejected + org.bluez.Error.Canceled + + void ConfirmModeChange(string mode) + + This method gets called if a mode change is requested + that needs to be confirmed by the user. An example + would be leaving flight mode. + + Possible errors: org.bluez.Error.Rejected + org.bluez.Error.Canceled + + void Cancel() + + This method gets called to indicate that the agent + request failed before a reply was returned. -- cgit From 63df86c865dbb5bc711cf02853cf39533a02d4b4 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 10 Mar 2008 22:19:35 +0000 Subject: Add Adapter property to device and fix access mode of Name property in adapter interface. --- doc/adapter-api.txt | 2 +- doc/device-api.txt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index d3068480..7cc3284d 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -94,7 +94,7 @@ Signals DeviceCreated(object path) Properties string Address [readonly] - string Name [readonly] + string Name [readwrite] string Mode [readwrite] diff --git a/doc/device-api.txt b/doc/device-api.txt index 49545ef5..4c4ebf44 100644 --- a/doc/device-api.txt +++ b/doc/device-api.txt @@ -34,7 +34,9 @@ Signals PropertyChanged(string name, variant value) TBD -Properties string Address [readonly] +Properties object Adapter [readonly] + + string Address [readonly] string Name [readonly] -- cgit From cf7e3b025c4b4aa80499ec54cc24950950a796fe Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 12 Mar 2008 20:07:43 +0000 Subject: Add uuid parameter to Agent.Authorize method call --- doc/agent-api.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/agent-api.txt b/doc/agent-api.txt index 1e82e2b3..febdcd35 100644 --- a/doc/agent-api.txt +++ b/doc/agent-api.txt @@ -29,7 +29,7 @@ Methods void Release() Possible errors: org.bluez.Error.Rejected org.bluez.Error.Canceled - void Authorize(object device) + void Authorize(object device, string uuid) This method gets called when the service daemon needs to authorize a connection/service request. -- cgit From ecbee417ecd9af9a39017018d995782013fe69da Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 12 Mar 2008 20:12:32 +0000 Subject: Fix use of path for objects in adapter documentation. --- doc/adapter-api.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index 7cc3284d..79062e6a 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -56,19 +56,19 @@ Methods dict GetProperties() TBD - object CreateDeviceWithAgent(string address, object path) + object CreateDeviceWithAgent(string address, object agent) TBD - void RemoveDevice(object + void RemoveDevice(object device) TBD -Signals DeviceCreated(object path) +Signals DeviceCreated(object device) TBD - DeviceRemoved(object path) + DeviceRemoved(object device) TBD -- cgit From e56307690bbfb9f7949b54c73d244e4e8c03b4f2 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 13 Mar 2008 17:22:03 +0000 Subject: Update UUIDS device property access to readonly. --- doc/device-api.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/device-api.txt b/doc/device-api.txt index 4c4ebf44..100e62ba 100644 --- a/doc/device-api.txt +++ b/doc/device-api.txt @@ -42,7 +42,7 @@ Properties object Adapter [readonly] string Class [readonly] - array{string} UUIDS [readwrite] + array{string} UUIDS [readonly] boolean Paired [readonly] -- cgit From 8369d15ca8f1ceda30adb5c488c6c982a9f5c3f0 Mon Sep 17 00:00:00 2001 From: Vinicius Gomes Date: Thu, 13 Mar 2008 18:26:08 +0000 Subject: Adapter: adding the new FindDevice method and documentation. --- doc/adapter-api.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index 79062e6a..0ddc1a42 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -26,6 +26,13 @@ Methods dict GetProperties() TBD + object FindDevice(string address) + + Returns the object path of a device given an address. + + Possible Errors: org.bluez.Error.DoesNotExist + org.bluez.Error.InvalidArguments + void DiscoverDevices() This method starts the device discovery procedure. This -- cgit From 07041f5a50955742a8cd160f466b75d5b9c2005c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 13 Mar 2008 18:45:08 +0000 Subject: Add documention for manager API --- doc/Makefile.am | 2 +- doc/manager-api.txt | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 doc/manager-api.txt (limited to 'doc') diff --git a/doc/Makefile.am b/doc/Makefile.am index 3b7bd904..8af862e8 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,4 +1,4 @@ -EXTRA_DIST = adapter-api.txt device-api.txt agent-api.txt +EXTRA_DIST = manager-api.txt adapter-api.txt device-api.txt agent-api.txt MAINTAINERCLEANFILES = Makefile.in diff --git a/doc/manager-api.txt b/doc/manager-api.txt new file mode 100644 index 00000000..b62e6dfb --- /dev/null +++ b/doc/manager-api.txt @@ -0,0 +1,51 @@ +BlueZ D-Bus Manager API description +*********************************** + +Copyright (C) 2004-2008 Marcel Holtmann +Copyright (C) 2005-2006 Johan Hedberg +Copyright (C) 2005-2006 Claudio Takahasi +Copyright (C) 2006-2007 Luiz von Dentz + + +Manager hierarchy +================= + +Service org.bluez +Interface org.bluez.Manager +Object path /org/bluez + +Methods string DefaultAdapter() + + Returns object path for the default adapter. + + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NoSuchAdapter + + string FindAdapter(string pattern) + + Returns object path for the specified adapter. Valid + patterns are "hci0" or "00:11:22:33:44:55". + + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NoSuchAdapter + + array{string} ListAdapters() + + Returns list of adapter object paths under /org/bluez + + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.Failed + org.bluez.Error.OutOfMemory + +Signals void AdapterAdded(string path) + + Parameter is object path of added adapter. + + void AdapterRemoved(string path) + + Parameter is object path of removed adapter. + + void DefaultAdapterChanged(string path) + + Parameter is object path of the new default adapter, + or an empty string if there is no available adapters. -- cgit From 4fe9f126fa4b007d8c3ed33f5d7bf79d06c492be Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 13 Mar 2008 19:04:56 +0000 Subject: Fix manager signal documentation --- doc/manager-api.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/manager-api.txt b/doc/manager-api.txt index b62e6dfb..9de1de9b 100644 --- a/doc/manager-api.txt +++ b/doc/manager-api.txt @@ -37,15 +37,15 @@ Methods string DefaultAdapter() org.bluez.Error.Failed org.bluez.Error.OutOfMemory -Signals void AdapterAdded(string path) +Signals AdapterAdded(string path) Parameter is object path of added adapter. - void AdapterRemoved(string path) + AdapterRemoved(string path) Parameter is object path of removed adapter. - void DefaultAdapterChanged(string path) + DefaultAdapterChanged(string path) Parameter is object path of the new default adapter, or an empty string if there is no available adapters. -- cgit From 2498ab2e65fb661d828f45c4921af8c43aa0fdcc Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 13 Mar 2008 19:05:18 +0000 Subject: Update adapter API documentation --- doc/adapter-api.txt | 118 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 93 insertions(+), 25 deletions(-) (limited to 'doc') diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index 0ddc1a42..259e7018 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -16,19 +16,17 @@ Object path /org/bluez/{hci0,hci1,...} Methods dict GetProperties() - TBD + Returns all properties for the adapter. See the + properties section for available properties. - void SetProperty(string name, variant value) - - TBD - - array{object} ListDevices() - - TBD + Possible Errors: org.bluez.Error.DoesNotExist + org.bluez.Error.InvalidArguments - object FindDevice(string address) + void SetProperty(string name, variant value) - Returns the object path of a device given an address. + Changes the value of the specified property. Only + properties that are listed a read-write are changeable. + On success this will emit a PropertyChanged signal. Possible Errors: org.bluez.Error.DoesNotExist org.bluez.Error.InvalidArguments @@ -59,52 +57,122 @@ Methods dict GetProperties() org.bluez.Error.NotAuthorized org.bluez.Error.NoSuchAdapter + object FindDevice(string address) + + Returns the object path of device for given address. + The device object needs to be first created via + CreateDevice or CreatePairedDevice. + + Possible Errors: org.bluez.Error.DoesNotExist + org.bluez.Error.InvalidArguments + + array{object} ListDevices() + + Returns list of device object paths. + + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.Failed + org.bluez.Error.OutOfMemory + object CreateDevice(string address) - TBD + Creates a new object path for a remote device. This + method will connect to the remote device and retrieve + all SDP records. - object CreateDeviceWithAgent(string address, object agent) + If the object for the remote device already exists + this method will fail. - TBD + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.Failed - void RemoveDevice(object device) + object CreatePairedDevice(string address, object agent) - TBD + Creates a new object path for a remote device. This + method will connect to the remote device and retrieve + all SDP records and then initiate the pairing. -Signals DeviceCreated(object device) + If previously CreateDevice was used successfully, + this method will only initiate the pairing. - TBD + Compared to CreateDevice this method will fail if + the pairing already exists, but not if the object + path already has been created. This allows applications + to use CreateDevice first and the if needed use + CreatePairedDevice to initiate pairing. - DeviceRemoved(object device) + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.Failed + + void RemoveDevice(object device) + + This removes the remote device object at the given + path. It will remove also the pairing information. - TBD + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.Failed - PropertyChanged(string name, variant value) +Signals PropertyChanged(string name, variant value) - TBD + This signal indicates a changed value of the given + property. DiscoveryStarted() - TBD + This signal indicates that a device discovery + procedure has been started. DiscoveryCompleted() - TBD + This signal indicates that a device discovery + procedure has been completed. DeviceFound(string address, dict values) - TBD + This signal will be send every time an inquiry result + has been found by the service daemon. In general they + only appear during a device discovery. DeviceDisappeared(string address) - TBD + This signal will be send when an inquiry session for + a periodic discovery finishes and previously found + devices are no longer in range or visible. + + DeviceCreated(object device) + + Parameter is object path of created device. + + DeviceRemoved(object device) + + Parameter is object path of removed device. Properties string Address [readonly] + The Bluetooth device address. + string Name [readwrite] + The Bluetooth friendly name. This value can be + changed and a PropertyChanged signal will be emitted. + string Mode [readwrite] + The Bluetooth operation mode. + + Valid modes: "off", "connectable", + "discoverable", "limited" + uint32 DiscoverableTimeout [readwrite] + The discoverable timeout in seconds. A value of zero + means that the timeout is disabled and it will stay in + discoverable/limited mode forever. + + The default value for the discoverable timeout should + be 180 seconds (3 minutes). + boolean PeriodicDiscovery [readwrite] + + Is peridoic inquiry active or not. Changing this + property will either enable or disable it. -- cgit From b573eca995bacaf8c901c5d90f55ad5cbe273819 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 13 Mar 2008 19:18:30 +0000 Subject: Update device API documentation --- doc/device-api.txt | 77 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 67 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/device-api.txt b/doc/device-api.txt index 100e62ba..a7ddf68c 100644 --- a/doc/device-api.txt +++ b/doc/device-api.txt @@ -12,42 +12,99 @@ Device hierarchy Service org.bluez Interface org.bluez.Device -Object path /org/bluez/{hci0,hci1,...}/{dev_XX_XX_XX_XX_XX_XX...} +Object path /org/bluez/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX Methods dict GetProperties() - TBD + Returns all properties for the adapter. See the + properties section for available properties. + + Possible Errors: org.bluez.Error.DoesNotExist + org.bluez.Error.InvalidArguments void SetProperty(string name, variant value) - TBD + Changes the value of the specified property. Only + properties that are listed a read-write are changeable. + On success this will emit a PropertyChanged signal. + + Possible Errors: org.bluez.Error.DoesNotExist + org.bluez.Error.InvalidArguments void Disconnect() - TBD + This method disconnects a specific remote device by + terminating the low-level ACL connection. The use of + this method should be restricted to administrator + use. + + A DisconnectRequested signal will be sent and the + actual disconnection will only happen 2 seconds later. + This enables upper-level applications to terminate + their connections gracefully before the ACL connection + is terminated. + + Possible errors: org.bluez.Error.NotReady + org.bluez.Error.Failed + org.bluez.Error.NoSuchAdapter + org.bluez.Error.InvalidArguments + org.bluez.Error.NotConnected + org.bluez.Error.InProgress Signals PropertyChanged(string name, variant value) - TBD + This signal indicates a changed value of the given + property. DisconnectRequested() - TBD + This signal will be sent when a low level + disconnection to a remote device has been requested. + The actual disconnection will happen 2 seconds later. -Properties object Adapter [readonly] +Properties string Address [readonly] - string Address [readonly] + The Bluetooth device address of the remote device. string Name [readonly] - string Class [readonly] + The Bluetooth remote name. This value can not be + changed. Use the Alias property instead. + + uint32 Class [readonly] + + The Bluetooth class of device of the remote device. + + array{string} UUIDs [readonly] - array{string} UUIDS [readonly] + List of 128-bit UUIDs that represents the available + remote services. boolean Paired [readonly] + Indicates if the remote device is paired. + boolean Connected [readonly] + Indicates if the remote device is currently connected. + A PropertyChanged signal indicate changes to this + status. + boolean Trusted [readwrite] + Indicates if the remote is seen as trusted. This + setting can be changed by the application. + string Alias [readwrite] + + The name alias for the remote device. The alias can + be used to have a different friendly name for the + remote device. + + In case no alias is set, it will return the remote + device name. Setting an empty string as alias will + convert it back to the remote device name. + + object Adapter [readonly] + + The object path of the adpater the device belongs to. -- cgit From fc8eb9740a846de0724f5580afb3b08bcda1bc1e Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 13 Mar 2008 19:28:32 +0000 Subject: Document agent register/unregister methods --- doc/adapter-api.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doc') diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index 259e7018..305aa624 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -112,6 +112,26 @@ Methods dict GetProperties() Possible errors: org.bluez.Error.InvalidArguments org.bluez.Error.Failed + void RegisterAgent(object agent) + + This registers the adapter wide agent. + + The object path defines the path the of the agent + that will be called when user input is needed. + + If an application disconnects from the bus all + of its registered agents will be removed. + + Possible errors: org.bluez.Error.AlreadyExists + + void UnregisterAgent(object agent) + + This unregisters the agent that has been previously + registered. The object path parameter must match the + same value that has been used on registration. + + Possible errors: org.bluez.Error.DoesNotExist + Signals PropertyChanged(string name, variant value) This signal indicates a changed value of the given -- cgit From 9c821ad5194bc78888e08ef68ed8344d2b96c241 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 13 Mar 2008 20:13:18 +0000 Subject: Mention the signal value for alias reset --- doc/device-api.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/device-api.txt b/doc/device-api.txt index a7ddf68c..dd14d04b 100644 --- a/doc/device-api.txt +++ b/doc/device-api.txt @@ -105,6 +105,10 @@ Properties string Address [readonly] device name. Setting an empty string as alias will convert it back to the remote device name. + When reseting the alias with an empty string, the + emitted PropertyChanged signal will show the remote + name again. + object Adapter [readonly] The object path of the adpater the device belongs to. -- cgit From 8f9e79080f516142cc74446078b6ab9e68c9c0f4 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 13 Mar 2008 22:36:55 +0000 Subject: Make sure to use the object path type --- doc/manager-api.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/manager-api.txt b/doc/manager-api.txt index 9de1de9b..9869cd91 100644 --- a/doc/manager-api.txt +++ b/doc/manager-api.txt @@ -14,14 +14,14 @@ Service org.bluez Interface org.bluez.Manager Object path /org/bluez -Methods string DefaultAdapter() +Methods object DefaultAdapter() Returns object path for the default adapter. Possible errors: org.bluez.Error.InvalidArguments org.bluez.Error.NoSuchAdapter - string FindAdapter(string pattern) + object FindAdapter(string pattern) Returns object path for the specified adapter. Valid patterns are "hci0" or "00:11:22:33:44:55". @@ -29,7 +29,7 @@ Methods string DefaultAdapter() Possible errors: org.bluez.Error.InvalidArguments org.bluez.Error.NoSuchAdapter - array{string} ListAdapters() + array{object} ListAdapters() Returns list of adapter object paths under /org/bluez @@ -37,15 +37,15 @@ Methods string DefaultAdapter() org.bluez.Error.Failed org.bluez.Error.OutOfMemory -Signals AdapterAdded(string path) +Signals AdapterAdded(object adapter) Parameter is object path of added adapter. - AdapterRemoved(string path) + AdapterRemoved(object adapter) Parameter is object path of removed adapter. - DefaultAdapterChanged(string path) + DefaultAdapterChanged(object adapter) Parameter is object path of the new default adapter, or an empty string if there is no available adapters. -- cgit From c02f77b6ef70f49d18b20e23caaccf685a150ea1 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 13 Mar 2008 22:47:35 +0000 Subject: Use root as path for the new manager interface --- doc/manager-api.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/manager-api.txt b/doc/manager-api.txt index 9869cd91..458fa4ac 100644 --- a/doc/manager-api.txt +++ b/doc/manager-api.txt @@ -12,7 +12,7 @@ Manager hierarchy Service org.bluez Interface org.bluez.Manager -Object path /org/bluez +Object path / Methods object DefaultAdapter() -- cgit From dc59cbaf3eab30d8962a5690810ac9453a7294db Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 14 Mar 2008 20:00:24 +0000 Subject: Mention the key/value pairs for DeviceFound signal --- doc/adapter-api.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index 305aa624..0d8011f2 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -153,6 +153,11 @@ Signals PropertyChanged(string name, variant value) has been found by the service daemon. In general they only appear during a device discovery. + The dictionary can contain bascially the same values + that we be returned by the GetProperties method + from the org.bluez.Device interface. In addition there + can be values for the RSSI and the TX power level. + DeviceDisappeared(string address) This signal will be send when an inquiry session for -- cgit From f2e721cb33943a434fc4a1565badc774b3397e93 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 14 Mar 2008 20:09:33 +0000 Subject: Document the RequestMode method --- doc/adapter-api.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'doc') diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index 0d8011f2..1f28988e 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -31,6 +31,23 @@ Methods dict GetProperties() Possible Errors: org.bluez.Error.DoesNotExist org.bluez.Error.InvalidArguments + void RequestMode(string mode) + + This method will request a mode change. The mode + change must be confirmed by the user via the agent. + + Possible modes for this call are "connectable" and + "discoverable". Any application that wants to use + Bluetooth functionality can use this method to + indicate which mode it needs to operate sucessfully. + + In case the user doesn't confirm the mode change it + will return an error to indicate this rejection. + + Possible Errors: org.bluez.Error.DoesNotExist + org.bluez.Error.InvalidArguments + org.bluez.Error.Rejected + void DiscoverDevices() This method starts the device discovery procedure. This -- cgit From 3dbf6d5d3b4dfd2e41a28911832a2ba2fd95f7a7 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 14 Mar 2008 20:15:44 +0000 Subject: Mention the special of DefaultAdapterChanged and no adapters --- doc/manager-api.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc') diff --git a/doc/manager-api.txt b/doc/manager-api.txt index 458fa4ac..ba45504a 100644 --- a/doc/manager-api.txt +++ b/doc/manager-api.txt @@ -49,3 +49,8 @@ Signals AdapterAdded(object adapter) Parameter is object path of the new default adapter, or an empty string if there is no available adapters. + + In case all adapters are removed this signal will not + be emitted. The AdapterRemoved signal has to be used + to detect that no default adapter is selected or + available anymore. -- cgit From 451e08926eda0977f554907c14db359d1b7bfbc7 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 14 Mar 2008 21:08:44 +0000 Subject: Update object paths to new root --- doc/adapter-api.txt | 2 +- doc/device-api.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index 1f28988e..56590c8e 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -12,7 +12,7 @@ Adapter hierarchy Service org.bluez Interface org.bluez.Adapter -Object path /org/bluez/{hci0,hci1,...} +Object path /{hci0,hci1,...} Methods dict GetProperties() diff --git a/doc/device-api.txt b/doc/device-api.txt index dd14d04b..61911f44 100644 --- a/doc/device-api.txt +++ b/doc/device-api.txt @@ -12,7 +12,7 @@ Device hierarchy Service org.bluez Interface org.bluez.Device -Object path /org/bluez/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX +Object path /{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX Methods dict GetProperties() -- cgit From b51f694b3da1556d33d188fc9453d38cc2723405 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 15 Mar 2008 00:15:54 +0000 Subject: Add methods for dealing with service record registration --- doc/adapter-api.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc') diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index 56590c8e..d0690ae2 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -149,6 +149,35 @@ Methods dict GetProperties() Possible errors: org.bluez.Error.DoesNotExist + uint32 AddServiceRecord(string record) + + Adds a new service record from the XML description + and returns the assigned record handle. + + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.Failed + + void UpdateServiceRecord(uint32 handle, string record) + + Updates a given service record provided in the + XML format. + + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotAvailable + org.bluez.Error.Failed + + void RemoveServiceRecord(uint32 handle) + + Remove a service record identified by its handle. + + It is only possible to remove service records that + where added by the current connection. + + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotAuthorized + org.bluez.Error.DoesNotExist + org.bluez.Error.Failed + Signals PropertyChanged(string name, variant value) This signal indicates a changed value of the given -- cgit From b32e7c98584fe6ad17fe22bd6c3e347b2d6c0a2c Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 28 May 2008 14:14:31 +0000 Subject: Update adapter documentation including ReleaseMode. --- doc/adapter-api.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index d0690ae2..1fb56231 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -48,6 +48,12 @@ Methods dict GetProperties() org.bluez.Error.InvalidArguments org.bluez.Error.Rejected + void ReleaseMode() + + Releases a mode requested via RequestMode. + + Possible Errors: org.bluez.Error.DoesNotExist + void DiscoverDevices() This method starts the device discovery procedure. This -- cgit From 2f7d49d41e6c4fd80e5b117777012fbbbd6730ed Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 28 May 2008 14:15:24 +0000 Subject: Add serial API documentation --- doc/Makefile.am | 3 ++- doc/serial-api.txt | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 doc/serial-api.txt (limited to 'doc') diff --git a/doc/Makefile.am b/doc/Makefile.am index 8af862e8..d21be88e 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,4 +1,5 @@ -EXTRA_DIST = manager-api.txt adapter-api.txt device-api.txt agent-api.txt +EXTRA_DIST = manager-api.txt adapter-api.txt device-api.txt agent-api.txt \ + serial-api.txt MAINTAINERCLEANFILES = Makefile.in diff --git a/doc/serial-api.txt b/doc/serial-api.txt new file mode 100644 index 00000000..7be4277d --- /dev/null +++ b/doc/serial-api.txt @@ -0,0 +1,31 @@ +BlueZ D-Bus Serial API description +********************************** + +Copyright (C) 2004-2008 Marcel Holtmann + + +Serial hierarchy +================ + +Service org.bluez +Interface org.bluez.Serial +Object path /{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX + +Methods string Connect(string uuid) + + Connects to a specific RFCOMM based service on a + remote device and then creates a RFCOMM TTY + device for it. The RFCOMM TTY device is returned. + + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.InProgress + org.bluez.Error.ConnectionAttemptFailed + org.bluez.Error.NotSupported + + void Disconnect(string device) + + Disconnect a RFCOMM TTY device that has been + created by Connect method. + + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.DoesNotExist -- cgit From 73f5d492078f1438a6d8164010a779e676b8c2d3 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 29 May 2008 07:27:55 +0000 Subject: Add basic API document for new input interface --- doc/Makefile.am | 2 +- doc/input-api.txt | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 doc/input-api.txt (limited to 'doc') diff --git a/doc/Makefile.am b/doc/Makefile.am index d21be88e..e060d254 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,5 +1,5 @@ EXTRA_DIST = manager-api.txt adapter-api.txt device-api.txt agent-api.txt \ - serial-api.txt + serial-api.txt input-api.txt MAINTAINERCLEANFILES = Makefile.in diff --git a/doc/input-api.txt b/doc/input-api.txt new file mode 100644 index 00000000..881825ec --- /dev/null +++ b/doc/input-api.txt @@ -0,0 +1,29 @@ +BlueZ D-Bus Input API description +********************************* + +Copyright (C) 2004-2008 Marcel Holtmann + + +Input hierarchy +=============== + +Service org.bluez +Interface org.bluez.Input +Object path /{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX + +Methods void Connect() + + Connect to the input device. + + Possible errors: org.bluez.Error.AlreadyConnected + org.bluez.Error.ConnectionAttemptFailed + + void Disconnect() + + Disconnect from the input device. + + Possible errors: org.bluez.Error.Failed + +Signals void Connected() + + void Disconnected() -- cgit From 2cd3aa2618dedd8d5683ccdc7caaafaed03b9364 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 29 May 2008 08:56:25 +0000 Subject: Add CancelConnect() and IsConnected() methods --- doc/input-api.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/input-api.txt b/doc/input-api.txt index 881825ec..e9ad0aa7 100644 --- a/doc/input-api.txt +++ b/doc/input-api.txt @@ -18,12 +18,23 @@ Methods void Connect() Possible errors: org.bluez.Error.AlreadyConnected org.bluez.Error.ConnectionAttemptFailed + void CancelConnect() + + Abort connection attempt in case of errors or + timeouts in the client. + + Possible errors: org.bluez.Error.Failed + void Disconnect() Disconnect from the input device. Possible errors: org.bluez.Error.Failed + bool IsConnected() + + Returns the connection status. + Signals void Connected() void Disconnected() -- cgit From 74945e0c555beb42ffa5ca9d6c057cdfa2978802 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 29 May 2008 09:07:06 +0000 Subject: Add first draft of new network API --- doc/Makefile.am | 2 +- doc/network-api.txt | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 doc/network-api.txt (limited to 'doc') diff --git a/doc/Makefile.am b/doc/Makefile.am index e060d254..82650503 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,5 +1,5 @@ EXTRA_DIST = manager-api.txt adapter-api.txt device-api.txt agent-api.txt \ - serial-api.txt input-api.txt + serial-api.txt network-api.txt input-api.txt MAINTAINERCLEANFILES = Makefile.in diff --git a/doc/network-api.txt b/doc/network-api.txt new file mode 100644 index 00000000..3aee9bac --- /dev/null +++ b/doc/network-api.txt @@ -0,0 +1,40 @@ +BlueZ D-Bus Network API description +*********************************** + +Copyright (C) 2004-2008 Marcel Holtmann + + +Network hierarchy +================= + +Service org.bluez +Interface org.bluez.Network +Object path /{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX + +Methods void Connect() + + Connect to the network device. + + Possible errors: org.bluez.Error.AlreadyConnected + org.bluez.Error.ConnectionAttemptFailed + + void CancelConnect() + + Abort connection attempt in case of errors or + timeouts in the client. + + Possible errors: org.bluez.Error.Failed + + void Disconnect() + + Disconnect from the network device. + + Possible errors: org.bluez.Error.Failed + + bool IsConnected() + + Returns the connection status. + +Signals void Connected() + + void Disconnected() -- cgit From 30412071a518a8ba5ea7889a7781095b1424018e Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 29 May 2008 11:43:08 +0000 Subject: Fix copy and paste bugs --- doc/adapter-api.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index 1fb56231..f5b45419 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -61,9 +61,9 @@ Methods dict GetProperties() resolving. On start up this process will generate a DiscoveryStarted - signal and then return RemoteDeviceFound and also - RemoteNameUpdated signals. If the procedure has been - finished an DiscoveryCompleted signal will be sent. + signal and then return DeviceFound singals. If the + procedure has been finished an DiscoveryCompleted + signal will be sent. Possible errors: org.bluez.Error.NotReady org.bluez.Error.Failed @@ -73,7 +73,7 @@ Methods dict GetProperties() void CancelDiscovery() This method will cancel any previous DiscoverDevices - or DiscoverDevicesWithoutNameResolving actions. + transaction. Possible errors: org.bluez.Error.NotReady org.bluez.Error.Failed -- cgit From 4baf1de49d3aad2837a968a18a7181d568ff9457 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 29 May 2008 11:43:48 +0000 Subject: Document the DiscoverServices() and CancelDiscovery() methods --- doc/device-api.txt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'doc') diff --git a/doc/device-api.txt b/doc/device-api.txt index 61911f44..f5943b53 100644 --- a/doc/device-api.txt +++ b/doc/device-api.txt @@ -31,6 +31,29 @@ Methods dict GetProperties() Possible Errors: org.bluez.Error.DoesNotExist org.bluez.Error.InvalidArguments + dict DiscoverServices(string pattern) + + This method starts the service discovery to retrieve + remote service records. The pattern parameter can + be used to specific specific UUIDs. + + The return value is a dictionary with the record + handles as keys and the service record in XML format + as values. + + Possible errors: org.bluez.Error.NotReady + org.bluez.Error.Failed + org.bluez.Error.InProgress + + void CancelDiscovery() + + This method will cancel any previous DiscoverServices + transaction. + + Possible errors: org.bluez.Error.NotReady + org.bluez.Error.Failed + org.bluez.Error.NotAuthorized + void Disconnect() This method disconnects a specific remote device by -- cgit From 07d1404659065104580ce7b24315af99dcd02ec0 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 29 May 2008 21:15:47 +0000 Subject: Remove CancelConnect methods --- doc/input-api.txt | 10 +++------- doc/network-api.txt | 10 +++------- doc/serial-api.txt | 6 ++++++ 3 files changed, 12 insertions(+), 14 deletions(-) (limited to 'doc') diff --git a/doc/input-api.txt b/doc/input-api.txt index e9ad0aa7..65f87e7d 100644 --- a/doc/input-api.txt +++ b/doc/input-api.txt @@ -18,17 +18,13 @@ Methods void Connect() Possible errors: org.bluez.Error.AlreadyConnected org.bluez.Error.ConnectionAttemptFailed - void CancelConnect() - - Abort connection attempt in case of errors or - timeouts in the client. - - Possible errors: org.bluez.Error.Failed - void Disconnect() Disconnect from the input 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 bool IsConnected() diff --git a/doc/network-api.txt b/doc/network-api.txt index 3aee9bac..11a362c6 100644 --- a/doc/network-api.txt +++ b/doc/network-api.txt @@ -18,17 +18,13 @@ Methods void Connect() Possible errors: org.bluez.Error.AlreadyConnected org.bluez.Error.ConnectionAttemptFailed - void CancelConnect() - - Abort connection attempt in case of errors or - timeouts in the client. - - Possible errors: org.bluez.Error.Failed - 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 bool IsConnected() diff --git a/doc/serial-api.txt b/doc/serial-api.txt index 7be4277d..21c4f220 100644 --- a/doc/serial-api.txt +++ b/doc/serial-api.txt @@ -27,5 +27,11 @@ Methods string Connect(string uuid) Disconnect a RFCOMM TTY device that has been created by Connect method. + To abort a connection attempt in case of errors or + timeouts in the client it is fine to call this method. + + In that case the UUID of the Connect method should + be suplied instead of the TTY device. + Possible errors: org.bluez.Error.InvalidArguments org.bluez.Error.DoesNotExist -- cgit From bc23c086b3e41836fb8c680c2c7108cadd395f91 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 29 May 2008 21:21:11 +0000 Subject: Add initial version of new audio API --- doc/Makefile.am | 2 +- doc/audio-api.txt | 154 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 155 insertions(+), 1 deletion(-) create mode 100644 doc/audio-api.txt (limited to 'doc') diff --git a/doc/Makefile.am b/doc/Makefile.am index 82650503..5505391e 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,5 +1,5 @@ EXTRA_DIST = manager-api.txt adapter-api.txt device-api.txt agent-api.txt \ - serial-api.txt network-api.txt input-api.txt + serial-api.txt network-api.txt input-api.txt audio-api.txt MAINTAINERCLEANFILES = Makefile.in diff --git a/doc/audio-api.txt b/doc/audio-api.txt new file mode 100644 index 00000000..941f7ef7 --- /dev/null +++ b/doc/audio-api.txt @@ -0,0 +1,154 @@ +BlueZ D-Bus Audio API description +********************************* + +Copyright (C) 2004-2008 Marcel Holtmann +Copyright (C) 2005-2007 Johan Hedberg +Copyright (C) 2005-2006 Brad Midgley + + +Headset hierarchy +================= + +Service org.bluez +Interface org.bluez.Headset +Object path /{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX + +Methods void Connect() + + Connect to the HSP/HFP service on the remote device. + + void Disconnect() + + Disconnect from the HSP/HFP service on the remote + device. + + boolean IsConnected() + + Returns TRUE if there is a active connection to the + HSP/HFP connection on the remote device. + + void IndicateCall() + + Indicate an incoming call on the headset + connected to the stream. Will continue to + ring the headset about every 3 seconds. + + void CancelCall() + + Cancel the incoming call indication. + + void Play() + + Open the audio connection to the headset. + + void Stop() + + Close the audio connection. + + boolean IsPlaying() + + Returns true if an audio connection to the headset + is active. + + uint16 GetSpeakerGain() + + Returns the current speaker gain if available, + otherwise returns the error NotAvailable. + + uint16 GetMicrophoneGain() + + Returns the current microphone gain if available, + otherwise returns the error NotAvailable. + + void SetSpeakerGain(uint16 gain) + + Changes the current speaker gain if possible. + + void SetMicrophoneGain(uint16 gain) + + Changes the current speaker gain if possible. + + void SetupCall(string value) [experimental] + + Sets up an call with the connected HFP. The value can + be "incoming", "outgoing" or "remote" to indicate + incoming call, outgoing call and remote party alerted + respectively. + + void IdentifyCall(string phone_number, int32 type) [experimental] + + Enables a called subscriber to get the calling + line identity (CLI) of the calling party when + receiving a call. The value of type shud be + the same as provided by the GSM stack. + +Signals void AnswerRequested() + + Sent when the answer button is pressed on the headset + + void Connected() + + Sent when the device has been connected to. + + void Disconnected() + + Sent when the device has been disconnected from. + + void Stopped() + + Sent when the audio connection is closed + + void Playing() + + Sent when the audio connection is opened + + void SpeakerGainChanged(uint16 gain) + + The speaker gain changed. + + void MicrophoneGainChanged(uint16 gain) + + The microphone gain changed. + + void CallTerminated() + + Sent when an ongoing call is terminated. + + +Headset hierarchy +================= + +Service org.bluez +Interface org.bluez.Sink +Object path /{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX + +Methods void Connect() + + Connect and setup a stream to a A2DP sink on the + remote device. + + void Disconnect() + + Disconnect from the remote device. + + boolean IsConnected() + + Returns TRUE if a stream is setup to a A2DP sink on + the remote device. + +Signals void Connected() + + Sent when a successful connection has been made to the + remote A2DP Sink + + void Disconnected() + + Sent when the device has been disconnected from. + + void Playing() + + Sent when a stream with remote device is started. + + void Stopped() + + Sent when a stream with remote device is suspended. -- cgit From 29327cee186a403af002831e2facdffa35781ed8 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 30 May 2008 07:47:24 +0000 Subject: Add methods for authorization --- doc/adapter-api.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'doc') diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index f5b45419..9ae43b39 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -184,6 +184,24 @@ Methods dict GetProperties() org.bluez.Error.DoesNotExist org.bluez.Error.Failed + void RequestAuthorization(string address, uint32 handle) + + Request an authorization for an incoming connection + for a specific service record. The service record + needs to be registered via AddServiceRecord first. + + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotAuthorized + org.bluez.Error.DoesNotExist + org.bluez.Error.Failed + + void CancelAuthorization() + + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotAuthorized + org.bluez.Error.DoesNotExist + org.bluez.Error.Failed + Signals PropertyChanged(string name, variant value) This signal indicates a changed value of the given -- cgit From 304d6c9cc1a23888fc4ec755a9fcc19134642f05 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 30 May 2008 08:00:55 +0000 Subject: Update new network API --- doc/network-api.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/network-api.txt b/doc/network-api.txt index 11a362c6..7b3688b8 100644 --- a/doc/network-api.txt +++ b/doc/network-api.txt @@ -11,12 +11,13 @@ Service org.bluez Interface org.bluez.Network Object path /{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX -Methods void Connect() +Methods string Connect(string uuid) - Connect to the network device. + Connect to the network device and return the network + device name. Possible errors: org.bluez.Error.AlreadyConnected - org.bluez.Error.ConnectionAttemptFailed + org.bluez.Error.ConnectionAttemptFailed void Disconnect() @@ -31,6 +32,6 @@ Methods void Connect() Returns the connection status. -Signals void Connected() +Signals void Connected(string device, string uuid) - void Disconnected() + void Disconnected(string device) -- cgit From 77000b708ed9aafcfc232311e812c172b4a791b9 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 30 May 2008 08:04:22 +0000 Subject: Fix whitespaces --- doc/input-api.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/input-api.txt b/doc/input-api.txt index 65f87e7d..c0816eec 100644 --- a/doc/input-api.txt +++ b/doc/input-api.txt @@ -16,7 +16,7 @@ Methods void Connect() Connect to the input device. Possible errors: org.bluez.Error.AlreadyConnected - org.bluez.Error.ConnectionAttemptFailed + org.bluez.Error.ConnectionAttemptFailed void Disconnect() -- cgit From 707dd3b2d943f57f00b129a231538b221b89a87d Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 30 May 2008 08:05:01 +0000 Subject: Add example for device names --- doc/network-api.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/network-api.txt b/doc/network-api.txt index 7b3688b8..a59c8972 100644 --- a/doc/network-api.txt +++ b/doc/network-api.txt @@ -14,7 +14,8 @@ Object path /{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX Methods string Connect(string uuid) Connect to the network device and return the network - device name. + device name. Examples of the device name are bnep0, + bnep1 etc. Possible errors: org.bluez.Error.AlreadyConnected org.bluez.Error.ConnectionAttemptFailed -- cgit From f3ef195f207870d40785c9a6275c517ac4643f0e Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 30 May 2008 08:09:53 +0000 Subject: Fix typo --- doc/audio-api.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/audio-api.txt b/doc/audio-api.txt index 941f7ef7..9c0cbef0 100644 --- a/doc/audio-api.txt +++ b/doc/audio-api.txt @@ -115,8 +115,8 @@ Signals void AnswerRequested() Sent when an ongoing call is terminated. -Headset hierarchy -================= +Sink hierarchy +============== Service org.bluez Interface org.bluez.Sink -- cgit From 3b98cbf66a4e58062861f284924880d9ae706dcf Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 30 May 2008 10:44:52 +0000 Subject: Remove HFP specific stuff from Headset API --- doc/audio-api.txt | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'doc') diff --git a/doc/audio-api.txt b/doc/audio-api.txt index 9c0cbef0..b9f0a920 100644 --- a/doc/audio-api.txt +++ b/doc/audio-api.txt @@ -68,20 +68,6 @@ Methods void Connect() Changes the current speaker gain if possible. - void SetupCall(string value) [experimental] - - Sets up an call with the connected HFP. The value can - be "incoming", "outgoing" or "remote" to indicate - incoming call, outgoing call and remote party alerted - respectively. - - void IdentifyCall(string phone_number, int32 type) [experimental] - - Enables a called subscriber to get the calling - line identity (CLI) of the calling party when - receiving a call. The value of type shud be - the same as provided by the GSM stack. - Signals void AnswerRequested() Sent when the answer button is pressed on the headset @@ -110,10 +96,6 @@ Signals void AnswerRequested() The microphone gain changed. - void CallTerminated() - - Sent when an ongoing call is terminated. - Sink hierarchy ============== -- cgit From 5be5ec17635762cc22ac96f6f0f5ee86fbfaa31e Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 30 May 2008 13:25:40 +0000 Subject: Document method callbacks for Simple Pairing --- doc/agent-api.txt | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/agent-api.txt b/doc/agent-api.txt index febdcd35..d0137aad 100644 --- a/doc/agent-api.txt +++ b/doc/agent-api.txt @@ -20,11 +20,44 @@ Methods void Release() agent, because when this method gets called it has already been unregistered. - string RequestPasskey(object device) + string RequestPinCode(object device) This method gets called when the service daemon - needs to get the passkey for an authentication. The - return value is actual passkey. + needs to get the passkey for an authentication. + + The return value should be a string of 1-16 characters + length. The string can be alphanumeric. + + Possible errors: org.bluez.Error.Rejected + org.bluez.Error.Canceled + + uint32 RequestPasskey(object device) + + This method gets called when the service daemon + needs to get the passkey for an authentication. + + The return value should be a numeric value + between 0-999999. + + Possible errors: org.bluez.Error.Rejected + org.bluez.Error.Canceled + + void DisplayPasskey(object device, uint32 passkey) + + This method gets called when the service daemon + needs to display a passkey for an authentication. + + An empty reply should be returned. When the passkey + needs no longer to be displayed, the Cancel method + of the agent will be called. + + void RequestConfirmation(object device, uint32 passkey) + + This method gets called when the service daemon + needs to confirm a passkey for an authentication. + + To confirm the value it should return an empty reply + or an error in case the passkey is invalid. Possible errors: org.bluez.Error.Rejected org.bluez.Error.Canceled -- cgit From a17fe523f29dfcec23fa44528e957b6cef71b7d2 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 30 May 2008 14:15:46 +0000 Subject: Switch RequestPinCode and and RequestPasskey methods --- doc/agent-api.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/agent-api.txt b/doc/agent-api.txt index d0137aad..5cbe9af3 100644 --- a/doc/agent-api.txt +++ b/doc/agent-api.txt @@ -20,7 +20,7 @@ Methods void Release() agent, because when this method gets called it has already been unregistered. - string RequestPinCode(object device) + uint32 RequestPasskey(object device) This method gets called when the service daemon needs to get the passkey for an authentication. @@ -31,7 +31,7 @@ Methods void Release() Possible errors: org.bluez.Error.Rejected org.bluez.Error.Canceled - uint32 RequestPasskey(object device) + string RequestPinCode(object device) This method gets called when the service daemon needs to get the passkey for an authentication. -- cgit From f5a4741b96908bce4cf7e4c5d37e2f33f2922434 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 3 Jun 2008 13:55:38 +0000 Subject: Add capability parameter for the agent registration --- doc/adapter-api.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index 9ae43b39..55b36621 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -135,7 +135,7 @@ Methods dict GetProperties() Possible errors: org.bluez.Error.InvalidArguments org.bluez.Error.Failed - void RegisterAgent(object agent) + void RegisterAgent(object agent, string capability) This registers the adapter wide agent. @@ -145,7 +145,14 @@ Methods dict GetProperties() If an application disconnects from the bus all of its registered agents will be removed. - Possible errors: org.bluez.Error.AlreadyExists + The capability parameter can have the values + "DisplayOnly", "DisplayYesNo", "KeyboardOnly" and + "NoInputNoOutput" which reflects the input and output + capabilities of the agent. If an empty string is + used it will fallback to "DisplayYesNo". + + Possible errors: org.bluez.Error.InvalidArguments + org.bluez.Error.AlreadyExists void UnregisterAgent(object agent) -- cgit From 0e7032e4f6a7f0fffe95761b5f21540f0150120c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 3 Jun 2008 14:00:03 +0000 Subject: Fix swapped prototypes for pin code and passkey requests --- doc/agent-api.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/agent-api.txt b/doc/agent-api.txt index 5cbe9af3..d0137aad 100644 --- a/doc/agent-api.txt +++ b/doc/agent-api.txt @@ -20,7 +20,7 @@ Methods void Release() agent, because when this method gets called it has already been unregistered. - uint32 RequestPasskey(object device) + string RequestPinCode(object device) This method gets called when the service daemon needs to get the passkey for an authentication. @@ -31,7 +31,7 @@ Methods void Release() Possible errors: org.bluez.Error.Rejected org.bluez.Error.Canceled - string RequestPinCode(object device) + uint32 RequestPasskey(object device) This method gets called when the service daemon needs to get the passkey for an authentication. -- cgit From a1628010a26bf5969abb51e9449b4cd14c84f853 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 3 Jun 2008 14:29:57 +0000 Subject: Add capability parameter to CreatePairedDevice --- doc/adapter-api.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/adapter-api.txt b/doc/adapter-api.txt index 55b36621..a05bf620 100644 --- a/doc/adapter-api.txt +++ b/doc/adapter-api.txt @@ -109,7 +109,8 @@ Methods dict GetProperties() Possible errors: org.bluez.Error.InvalidArguments org.bluez.Error.Failed - object CreatePairedDevice(string address, object agent) + object CreatePairedDevice(string address, object agent, + string capability) Creates a new object path for a remote device. This method will connect to the remote device and retrieve @@ -124,6 +125,9 @@ Methods dict GetProperties() to use CreateDevice first and the if needed use CreatePairedDevice to initiate pairing. + The capability parameter is the same as for the + RegisterAgent method. + Possible errors: org.bluez.Error.InvalidArguments org.bluez.Error.Failed -- cgit From f4b508c613ec2bfccf68fe72d2d028e6529d45b6 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 9 Jun 2008 13:03:12 +0000 Subject: Clarify the dictionary key and value types --- doc/device-api.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/device-api.txt b/doc/device-api.txt index f5943b53..34091853 100644 --- a/doc/device-api.txt +++ b/doc/device-api.txt @@ -39,7 +39,8 @@ Methods dict GetProperties() The return value is a dictionary with the record handles as keys and the service record in XML format - as values. + as values. The key is uint32 and the value a string + for this dictionary. Possible errors: org.bluez.Error.NotReady org.bluez.Error.Failed -- cgit From 97c70dad4b624a35eb678cc69b77ccf41884cbe0 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Tue, 10 Jun 2008 12:22:11 +0000 Subject: Changed device Disconnect possible errors --- doc/device-api.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/device-api.txt b/doc/device-api.txt index 34091853..059398df 100644 --- a/doc/device-api.txt +++ b/doc/device-api.txt @@ -68,12 +68,7 @@ Methods dict GetProperties() their connections gracefully before the ACL connection is terminated. - Possible errors: org.bluez.Error.NotReady - org.bluez.Error.Failed - org.bluez.Error.NoSuchAdapter - org.bluez.Error.InvalidArguments - org.bluez.Error.NotConnected - org.bluez.Error.InProgress + Possible errors: org.bluez.Error.NotConnected Signals PropertyChanged(string name, variant value) -- cgit From fd1ac97806d4531cb54523b3d694899afce281e7 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 16 Jun 2008 01:51:04 +0000 Subject: Small API update --- doc/agent-api.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/agent-api.txt b/doc/agent-api.txt index d0137aad..7e3fa3a9 100644 --- a/doc/agent-api.txt +++ b/doc/agent-api.txt @@ -42,15 +42,21 @@ Methods void Release() Possible errors: org.bluez.Error.Rejected org.bluez.Error.Canceled - void DisplayPasskey(object device, uint32 passkey) + void DisplayPasskey(object device, uint32 passkey, uint8 entered) This method gets called when the service daemon needs to display a passkey for an authentication. + The entered parameter indicates the number of already + typed keys on the remote side. + An empty reply should be returned. When the passkey needs no longer to be displayed, the Cancel method of the agent will be called. + During the pairing process this method might be + called multiple times to update the entered value. + void RequestConfirmation(object device, uint32 passkey) This method gets called when the service daemon -- cgit