Bug 1159709: Integrate |ConnectionOrientedSocket| into socket I/O class hierarchy, r=kmachulis

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.
This commit is contained in:
Thomas Zimmermann 2015-04-30 12:55:37 +02:00
parent d3fc99267d
commit f21f5cd47f
5 changed files with 8 additions and 14 deletions

View File

@ -199,9 +199,9 @@ BluetoothDaemonPDUConsumer::~BluetoothDaemonPDUConsumer()
// BluetoothDaemonConnectionIO
//
class BluetoothDaemonConnectionIO final : public UnixSocketWatcher
, public DataSocketIO
, public ConnectionOrientedSocketIO
class BluetoothDaemonConnectionIO final
: public UnixSocketWatcher
, public ConnectionOrientedSocketIO
{
public:
BluetoothDaemonConnectionIO(MessageLoop* aIOLoop, int aFd,

View File

@ -10,8 +10,6 @@
#include "mozilla/Attributes.h"
#include "mozilla/FileUtils.h"
#include "mozilla/ipc/ConnectionOrientedSocket.h"
#include "mozilla/ipc/DataSocket.h"
#include "nsError.h"
#include "nsAutoPtr.h"
namespace mozilla {
@ -112,8 +110,7 @@ protected:
* Bluetooth daemon. It offers connection establishment and sending
* PDUs. PDU receiving is performed by |BluetoothDaemonPDUConsumer|.
*/
class BluetoothDaemonConnection : public DataSocket
, public ConnectionOrientedSocket
class BluetoothDaemonConnection : public ConnectionOrientedSocket
{
public:
BluetoothDaemonConnection();

View File

@ -8,7 +8,7 @@
#define mozilla_ipc_connectionorientedsocket_h
#include <sys/socket.h>
#include "nsError.h"
#include "DataSocket.h"
namespace mozilla {
namespace ipc {
@ -21,7 +21,7 @@ union sockaddr_any;
* |ListenSocket| uses these classes to handle accepted sockets.
*/
class ConnectionOrientedSocketIO
class ConnectionOrientedSocketIO : public DataSocketIO
{
public:
virtual nsresult Accept(int aFd,
@ -32,7 +32,7 @@ protected:
virtual ~ConnectionOrientedSocketIO();
};
class ConnectionOrientedSocket
class ConnectionOrientedSocket : public DataSocket
{
public:
virtual ConnectionOrientedSocketIO* GetIO() = 0;

View File

@ -21,7 +21,6 @@ namespace ipc {
class StreamSocketIO final
: public UnixSocketWatcher
, public DataSocketIO
, public ConnectionOrientedSocketIO
{
public:

View File

@ -7,7 +7,6 @@
#ifndef mozilla_ipc_streamsocket_h
#define mozilla_ipc_streamsocket_h
#include "mozilla/ipc/DataSocket.h"
#include "ConnectionOrientedSocket.h"
namespace mozilla {
@ -16,8 +15,7 @@ namespace ipc {
class StreamSocketIO;
class UnixSocketConnector;
class StreamSocket : public DataSocket
, public ConnectionOrientedSocket
class StreamSocket : public ConnectionOrientedSocket
{
public:
StreamSocket();