summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2014-08-06 22:16:56 +0200
committerWim Taymans <wtaymans@redhat.com>2014-08-06 22:16:56 +0200
commita6d2b7900a79b54d228141891013c5e360a38a5b (patch)
treea8ebf0b9d71799c0a7a9b2753bd8a8e2f72df16a /doc
Initial commit
Diffstat (limited to 'doc')
-rw-r--r--doc/design.txt40
-rw-r--r--doc/headset-api.txt171
2 files changed, 211 insertions, 0 deletions
diff --git a/doc/design.txt b/doc/design.txt
new file mode 100644
index 0000000..4539c56
--- /dev/null
+++ b/doc/design.txt
@@ -0,0 +1,40 @@
+
+
+ bluez headsetd pulseaudio
+ | | |
+ |<---------------------| |
+ | RegisterProfile | |
+ | |<----------------------|
+ | | RegisterAgent |
+ | | |
+ | | |
+ |--------------------->| |
+ bluetooth | NewConnection |---------------------->|
+ connection | | NewConnection | Agent can choose to
+ | | | manage rfcomm or not
+ | | |
+ | | | A new Headset Device h
+ | | | is made
+ | | |
+ | |<----------------------|
+ | | h.GetTransport | On the new device, we
+ | | | request a transport t.
+ | | |
+ | | |
+ | |<----------------------|
+ | | t.Acquire | We get fd to read/write
+ | | |
+ | | |
+ | |<----------------------|
+ | | t.Release |
+ | | |
+ | | |
+ | |<----------------------|
+ | | h.ReleaseTransport |
+ |--------------------->| |
+ | RequestDisconnection | |
+ | | | Release all transport
+ | |---------------------->|
+ | | RequestDisconnection |
+ | | |
+ | | |
diff --git a/doc/headset-api.txt b/doc/headset-api.txt
new file mode 100644
index 0000000..c27228c
--- /dev/null
+++ b/doc/headset-api.txt
@@ -0,0 +1,171 @@
+Headset D-Bus API description
+*****************************
+
+
+HeadsetManager hierarchy
+========================
+
+Service org.freedesktop.Headset
+Interface org.freedesktop.HeadsetManager
+Object path /
+
+ The HeadsetManager interface manages the detected Devices
+ and Registered Agents.
+
+Methods array{object,dict} GetDevices()
+
+ Get an array of device objects and properties
+ that represent the currently attached devices.
+
+ This method call should only be used once when an
+ application starts up. Further device additions
+ and removal shall be monitored via DeviceAdded and
+ DeviceRemoved signals.
+
+ void Register(object path, dict)
+
+ Registers a Headset Agent with a specific
+ path (freely selectable by the subsystem) and
+ properties
+
+ Possible Errors: [service].Error.InvalidArguments
+
+ void Unregister(object path)
+
+ Unregisters a Headset Agent with specific path
+
+ Possible Errors: [service].Error.NotFound
+ [service].Error.InvalidArguments
+ [service].Error.NotAllowed
+
+Signals DeviceAdded(object path, dict properties)
+
+ Signal that is sent when a new device is added. It
+ contains the object path of new device and its
+ properties.
+
+ DeviceRemoved(object path)
+
+ Signal that is sent when a device has been removed.
+ The object path is no longer accessible after this
+ signal and only emitted for reference.
+
+
+Headset Agent hierarchy
+=======================
+
+Service <freely defined>
+Interface org.freedesktop.HeadsetAgent
+Object path <freely defined>
+
+ The Agent is used to take control of the rfcomm connection of
+ a Headset. When no Agent is registered, the Headset daemon
+ will manage the rfcomm channel itself.
+
+Methods bool NewConnection(object device, fd rfcomm, dict properties)
+
+ Notify the agent that a new device is connected. The Agent
+ returns True if it will use the rfcomm fd.
+ When all registered Agents return False, headsetd will
+ manage the rfcomm instead.
+
+ Possible Errors: [service].Error.NotAuthorized
+ [service].Error.Failed
+
+ void RequestDisconnection(object device)
+
+ Notify the agent that the connection with the device
+ ended.
+
+ void Release()
+
+ Notifies the Agent that it is no longer registered
+
+
+Headset hierarchy
+=================
+
+Service org.freedesktop.Headset
+Interface org.freedesktop.Headset
+Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
+
+Methods object GetTransport(dict properties)
+
+ Get a Transport Object for the given properties
+
+ Possible Errors: [service].Error.NotAuthorized
+ [service].Error.Failed
+
+ void ReleaseTransport(object transport)
+
+ Releases transport descriptor.
+
+Properties object Device [readonly]
+
+ The bluetooth Device object.
+
+
+HeadsetTransport hierarchy
+==========================
+
+Service org.freedesktop.Headset
+Interface org.freedesktop.HeadsetTransport
+Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/fdX
+
+Methods fd, uint16, uint16 Acquire()
+
+ Acquire transport file descriptor and the MTU for read
+ and write respectively.
+
+ Possible Errors: [service].Error.NotAuthorized
+ [service].Error.Failed
+
+ void Release()
+
+ Releases file descriptor.
+
+Properties object Device [readonly]
+
+ The Device object.
+
+ string UUID [readonly]
+
+ UUID of the profile which this transport is for.
+
+ byte Codec [readonly]
+
+ Assigned number of codec that the transport support.
+ The values should match the profile specification which
+ is indicated by the UUID.
+
+ string State [readonly]
+
+ Indicates the state of the transport. Possible
+ values are:
+ "idle": not streaming
+ "pending": streaming but not acquired
+ "active": streaming and acquired
+
+ uint16 Delay [readwrite]
+
+ Optional. Transport delay in 1/10 of millisecond, this
+ property is only writeable when the transport was
+ acquired by the sender.
+
+ byte MicrophoneGain [readwrite]
+
+ Optional. Indicates volume level of the transport's
+ incoming audio stream. This
+ property is only writeable when the transport was
+ acquired by the sender.
+
+ Possible Values: 0-15
+
+ byte SpeakerGain [readwrite]
+
+ Optional. Indicates volume level of the transport's
+ outgoing audio stream. This
+ property is only writeable when the transport was
+ acquired by the sender.
+
+ Possible Values: 0-15