Support for Bluetooth MAP/MAS/MNS profiles
OBEX Message Access Profile which includes Message Access Service (MAS) and Message Notification Service (MNS) is used by car-kits and some wearables to integrate with phone messaging system and supports MAIL, SMS and MMS. Mail will be responsibility of EDS/Geary but SMS/MMS (basically simple text and reach text) of the Chatty. The MAS allows browsing folders (folder index), Messages (message index in the folder) and retrieving the message (in bMessage format). It also allows submitting the message (send).
The MNS works as reverse obex where phone acts as a client and remote device (car-kit, wearable) as a server, waiting for client's commands (submission of bMessage forward notification).
On Sailfish proprietary messenger did not expose any workable browsing API so I've used direct SQLite calls to read DB and DBus to submit message via Telepathy.
So this issue is an attempt to be master ticket for OBEX MAP support.
Actual requirements/tasks TBC but at the least we'd need to
-
spinoff own instance of bluez to (re-)implement MAS/PBAP profile drivers -
Implement MAS/MNS backend driver as DBus Agent (In one of the mails Luiz mentioned that's preferred approach) -
add read/unread status (that will also enable xep-0022/0333 implementation) -
check existing purple DBus API covers MAS/MNS operations - neither of the existing DBus APIs give ability to walk through message history (neither telepathy nor purple)
- both TP and Prpl give notifications about incoming messages (signals) and ability to send messages
- TP interface is kind of hosted by freedesktop so could theoretically be mainlined while purple scarcely
-
We may try expose history via VFS(default MAS implementation in obexd can browse spools so could be extended to support additional attributes) - upstreaming custom GVFS backend could even be more problematic
-
Implement Chatty as MAP Agent with MAS/MNS Agent DBus Interface -
Submit DBus Agent OBEX MAP Backend to Bluez Upstream
In general the proposed support is following:
- Do not implement group chats. Just from the start - cross it out from MAS, while we can supply multiple vcards with bMessage it will be a headache. Maybe later.
- Inbox folder - virtual folder showing all unread messages
- Sent folder - virtual folder showing sent but not ack-delivered messages
- Outbox folder - virtual folder showing messages which are waiting for delivery (eg waiting for transport/acc to connect)
- Other folders - IM conversations.