linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC v0 00/15] WIP: btd_profile connect and disconnect
@ 2012-10-19 15:39 Mikel Astiz
  2012-10-19 15:39 ` [RFC v0 01/15] network: Specify id while registering server Mikel Astiz
                   ` (14 more replies)
  0 siblings, 15 replies; 23+ messages in thread
From: Mikel Astiz @ 2012-10-19 15:39 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Mikel Astiz

From: Mikel Astiz <mikel.astiz@bmw-carit.de>

This RFC is work-in-progress: the patches are not intended to be applied, but instead submitted as a base for discussion.

The patchset proposes three inter-related changes:

(1) Splitting of individual btd_profile instantes per role. Some profiles do already have such separation (see HFP-Gateway) but some others have all roles merged into one (see A2DP or PAN).

(2) Exposure of internal APIs to connect/disconnect devices, as proposed by the btd_profile approach (.connect and .disconnect). The goal would be not only to support Device.Connect, but also to be able to implement connection-handling plugins such as the IVI case.

(3) The exposure of a D-Bus API to connect/disconnect profiles, and report the current state (disconnected, connecting, or connected). The goal here would be to be able to implement Bluetooth-centric UIs, which typically show which profiles have been connected per device. Additionally, this would allow implementing connection-handling policies externally, instead of in a plugin.

Each of this point requires some discussion. For example, in point (2), there are different possible way to expose an internal API to connect/disconnect profiles. The patchset, in fact, proposes different approaches for HID (patch 08/15), where it's btd_profile-aware, or networking (patch 03/15), where the internal API has nothing to do with the btd_profile infrastructure.

The D-Bus API could have several variants as well, one of them being the currently existing one in BlueZ 4.x. This first RFC proposes a completely different one, based on a new D-Bus interface (org.bluez.Profile, see patch 15/15), which is admittedly ugly.

I hope some of this ideas can make sense for BlueZ 5.

Any feedback will be welcome,

Mikel

Mikel Astiz (15):
  network: Specify id while registering server
  network: Trivial function rename
  network: Expose internal connection API
  network: Split Network into three btd_profile
  network: Add network .connect and .disconnect
  audio: Split A2DP into three btd_profile
  audio: Trivial function rename
  source: Expose internal connection API
  source: Add profile .connect and .disconnect
  input: Trivial function rename
  input: Expose internal disconnection API
  input: Add profile .disconnect
  profile: Rename org.bluez.Profile->ProfileAgent
  profile: Add object to represent device-profile
  profile: Add new org.bluez.Profile

 Makefile.am                   |   1 +
 audio/a2dp.c                  |  88 ++++++-------
 audio/a2dp.h                  |   4 +-
 audio/device.h                |   3 +
 audio/manager.c               | 185 ++++++++++++++++++++++++---
 audio/sink.c                  |  12 +-
 audio/source.c                | 158 +++++++++++++----------
 audio/source.h                |   2 +
 doc/device-api.txt            |  23 ----
 doc/manager-api.txt           |   3 +-
 doc/profile-api.txt           |  59 ++++-----
 doc/profileagent-api.txt      |  53 ++++++++
 profiles/input/device.c       |  39 ++++--
 profiles/input/device.h       |   6 +-
 profiles/input/manager.c      |   1 +
 profiles/network/connection.c | 160 +++++++++++++++--------
 profiles/network/connection.h |   8 ++
 profiles/network/manager.c    | 205 +++++++++++++++++++++++++++---
 profiles/network/server.c     |   9 +-
 profiles/network/server.h     |   4 +-
 src/bluetooth.conf            |   2 +-
 src/device-profile.c          | 288 ++++++++++++++++++++++++++++++++++++++++++
 src/device-profile.h          |  43 +++++++
 src/device.c                  | 110 +++++++++++-----
 src/manager.c                 |   2 +-
 src/profile.c                 |  56 ++++----
 src/profile.h                 |  11 +-
 test/test-profile             |   8 +-
 28 files changed, 1191 insertions(+), 352 deletions(-)
 create mode 100644 doc/profileagent-api.txt
 create mode 100644 src/device-profile.c
 create mode 100644 src/device-profile.h

-- 
1.7.11.7


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2012-10-25 17:38 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-19 15:39 [RFC v0 00/15] WIP: btd_profile connect and disconnect Mikel Astiz
2012-10-19 15:39 ` [RFC v0 01/15] network: Specify id while registering server Mikel Astiz
2012-10-19 15:39 ` [RFC v0 02/15] network: Trivial function rename Mikel Astiz
2012-10-19 15:39 ` [RFC v0 03/15] network: Expose internal connection API Mikel Astiz
2012-10-19 15:39 ` [RFC v0 04/15] network: Split Network into three btd_profile Mikel Astiz
2012-10-19 15:39 ` [RFC v0 05/15] network: Add network .connect and .disconnect Mikel Astiz
2012-10-24 12:28   ` Anderson Lizardo
2012-10-25 10:42     ` Johan Hedberg
2012-10-25 15:53       ` Mikel Astiz
2012-10-25 17:38         ` Johan Hedberg
2012-10-19 15:39 ` [RFC v0 06/15] audio: Split A2DP into three btd_profile Mikel Astiz
2012-10-19 15:39 ` [RFC v0 07/15] audio: Trivial function rename Mikel Astiz
2012-10-19 15:39 ` [RFC v0 08/15] source: Expose internal connection API Mikel Astiz
2012-10-19 15:39 ` [RFC v0 09/15] source: Add profile .connect and .disconnect Mikel Astiz
2012-10-19 15:39 ` [RFC v0 10/15] input: Trivial function rename Mikel Astiz
2012-10-19 15:39 ` [RFC v0 11/15] input: Expose internal disconnection API Mikel Astiz
2012-10-19 15:39 ` [RFC v0 12/15] input: Add profile .disconnect Mikel Astiz
2012-10-25 10:39   ` Johan Hedberg
2012-10-25 15:49     ` Mikel Astiz
2012-10-19 15:39 ` [RFC v0 13/15] profile: Rename org.bluez.Profile->ProfileAgent Mikel Astiz
2012-10-19 16:10   ` Marcel Holtmann
2012-10-19 15:39 ` [RFC v0 14/15] profile: Add object to represent device-profile Mikel Astiz
2012-10-19 15:39 ` [RFC v0 15/15] profile: Add new org.bluez.Profile Mikel Astiz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).