This patch integrates |ConnectionOrientedSocket| into the hierarchy
of socket I/O classes. In future patches, the class can provide
common interfaces and functionality for all connection-oriented
sockets.
With the current code, the Bluetooth result runnable is saved for
receiving before a command has been sent successfully. If sending
fails afterwards, the saved result runnable will still sit in the
result queue, and interfere with later, successful commands.
With this patch, the result runnable is saved only if the sending
was successful.
This patch removes the template parameters from
|SocketIORequestClosingRunnable| and moves its methods into
the C++ source file. All users have been adapted.
This patch renames |SocketConsumerBase| to |DataSocket|, and for the
I/O classes |SocketConsumerIO| to |DataSocketIO|. |DataSocketIO| also
contains send and receive functionality from |SocketBaseIO|.
|DataSocket| is a virtual base class that represents a socket that
transfers data, without a particular constraints to what the data
represents. |DataSocketIO| is the corresponding helper class on the
I/O thread.
This patch moves memory management of |UnixSocketIOBuffer| into
|UnixSocketBuffer| and extends |UnixSocketIOBuffer| with send and
receive interfaces. The class is now the base for all socket-buffer
classes, such as |UnixSocketRawData| and |BluetoothDaemonPDU|.
This patch adds support for |ListenSocket| to |BluetoothDaemonConnection|.
The class can now handle file descriptors that have been accepted by
|ListenSocket|.
This patch adds |BluetoothDaemonConnection|, which transfers PDUs from and
to the Bluetooth daemon. The class is build around the existing socket I/O
infrastructure.