bluez5: telephony: implement asynchronous D-Bus calls

This removes the need to call poll() on the rfcomm socket in order
to wait for replies from the AG.

Use a queue to buffer all the commands that are to be sent to the AG
and match them to replies when they are received. Optionally associate
each command with a DBusMessage that is assumed to be a method call
from the telephony interface, which is then replied to when the rfcomm
command reply is received. Also associate each command with a state,
so that it is always deterministic what gets executed after the reply
is received.

On the telephony module, pass on the DBusMessage on the callbacks and
add a method to allow the receiver to send a reply. Only send FAILED
directly when the callback is not handled. Also, remove the return value
from the Dial() command (it was not advertised on the introspection
anyway) to make things easier.
This commit is contained in:
George Kiagiadakis 2025-07-25 22:15:17 +03:00 committed by Wim Taymans
parent 0b647a9009
commit e4b0f68e0b
4 changed files with 369 additions and 628 deletions

File diff suppressed because it is too large Load diff