Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH v3 0/8] MAP client: notification support
@ 2013-03-11 15:05 Christian Fetzer
  2013-03-11 15:05 ` [PATCH v3 1/8] obexd: Add get_service_record to obc_transport Christian Fetzer
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Christian Fetzer @ 2013-03-11 15:05 UTC (permalink / raw)
  To: linux-bluetooth

From: Christian Fetzer <christian.fetzer@bmw-carit.de>

Changelog:
v3: Added user_data parameter to dispatcher. This is needed for accessing struct map_data
    in the notification handler.
v2: Rebased since the first patchset didn't apply cleanly anymore.

---

This patchset adds the necessary blocks for receiving notifications in the MAP client.
So far this covers only bluetooth protocol related additions, leaving out end user D-Bus API changes.

The patchset consists of the following parts:
- Message Notification Server (MNS)
  Once connected, the MNS will receive XML based event reports from the MSE and parse them into a struct
  for further processing.

- RegisterNotification function
  The function sends the SetNotificationRegistration command to the MSE which will then try to connect
  to the MNS.

- Notification dispatcher (that dispatches event reports by their MAS instance id to the correct client instance)
  The message access part of every client instance registers a notification handler function.
  The MNS will call the associated handler for all received event report.

Since the dispatching needs to be done on the mas instance id, the message access part of the client
needs to be aware of the instance id of the server it connects to. Unfortunately this information is only
available as SDP attribute.

Due to the current transport layer abstraction in obexd, the MAP client has no direct access to SDP.
Therefore I have extended obc_transport to allow concrete transports (like Bluetooth) to specify
a get_service_record function and made it available through obc_session_get_service_record.
This way, transports can provide additional service information to the client implementations.
The bluetooth transport will now always do a sdp lookup (if the driver's obc_driver->force_service_lookup is set).
In addition it will cache sdp record associated with the connection and make it accessible in get_service_record.

Christian Fetzer (8):
  obexd: Add get_service_record to obc_transport
  obexd: Provide SDP record in get_service_record
  obexd: Read MAP client SDP attributes
  obexd: Add Message Notification Server (MNS)
  obexd: Add RegisterNotifications function
  obexd: Add MAP notification dispatcher
  obexd: Register MAP notification handler
  obexd: Notify registered notification handlers

 Makefile.obexd                |   4 +
 doc/obex-api.txt              |   6 +
 lib/sdp.h                     |   2 +
 obexd/client/bluetooth.c      |  51 ++++++-
 obexd/client/driver.h         |   1 +
 obexd/client/map-dispatcher.c |  88 +++++++++++
 obexd/client/map-dispatcher.h |  47 ++++++
 obexd/client/map-event.h      |  42 +++++
 obexd/client/map.c            | 146 +++++++++++++++++-
 obexd/client/mns.c            | 346 ++++++++++++++++++++++++++++++++++++++++++
 obexd/client/session.c        |  11 +-
 obexd/client/session.h        |   2 +
 obexd/client/transport.h      |   2 +
 obexd/plugins/bluetooth.c     |   2 +
 obexd/src/obexd.h             |   1 +
 src/profile.c                 |  55 +++++++
 16 files changed, 795 insertions(+), 11 deletions(-)
 create mode 100644 obexd/client/map-dispatcher.c
 create mode 100644 obexd/client/map-dispatcher.h
 create mode 100644 obexd/client/map-event.h
 create mode 100644 obexd/client/mns.c

-- 
1.8.1.5


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

end of thread, other threads:[~2013-03-15 15:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11 15:05 [PATCH v3 0/8] MAP client: notification support Christian Fetzer
2013-03-11 15:05 ` [PATCH v3 1/8] obexd: Add get_service_record to obc_transport Christian Fetzer
2013-03-11 15:05 ` [PATCH v3 2/8] obexd: Provide SDP record in get_service_record Christian Fetzer
2013-03-11 15:05 ` [PATCH v3 3/8] obexd: Read MAP client SDP attributes Christian Fetzer
2013-03-11 16:12   ` Marcel Holtmann
2013-03-11 15:05 ` [PATCH v3 4/8] obexd: Add Message Notification Server (MNS) Christian Fetzer
2013-03-11 16:15   ` Marcel Holtmann
2013-03-11 15:05 ` [PATCH v3 5/8] obexd: Add RegisterNotifications function Christian Fetzer
2013-03-11 16:19   ` Marcel Holtmann
2013-03-13 13:20     ` Christian Fetzer
2013-03-13 16:27       ` Marcel Holtmann
2013-03-13 19:57         ` Luiz Augusto von Dentz
2013-03-15 15:38           ` Christian Fetzer
2013-03-15 15:43           ` Christian Fetzer
2013-03-11 15:05 ` [PATCH v3 6/8] obexd: Add MAP notification dispatcher Christian Fetzer
2013-03-11 15:05 ` [PATCH v3 7/8] obexd: Register MAP notification handler Christian Fetzer
2013-03-11 15:05 ` [PATCH v3 8/8] obexd: Notify registered notification handlers Christian Fetzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox