mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1164417: Store PDU consumer in |BluetoothDaemonConnection|, r=kmachulis
This commit is contained in:
parent
25b408e533
commit
e5eabe4c03
@ -1702,16 +1702,15 @@ public:
|
||||
private:
|
||||
BluetoothDaemonInterface* mInterface;
|
||||
BluetoothDaemonInterface::Channel mChannel;
|
||||
BluetoothDaemonPDUConsumer* mConsumer;
|
||||
};
|
||||
|
||||
BluetoothDaemonChannel::BluetoothDaemonChannel(
|
||||
BluetoothDaemonInterface* aInterface,
|
||||
BluetoothDaemonInterface::Channel aChannel,
|
||||
BluetoothDaemonPDUConsumer* aConsumer)
|
||||
: mInterface(aInterface)
|
||||
: BluetoothDaemonConnection(aConsumer)
|
||||
, mInterface(aInterface)
|
||||
, mChannel(aChannel)
|
||||
, mConsumer(aConsumer)
|
||||
{ }
|
||||
|
||||
void
|
||||
@ -1744,7 +1743,7 @@ BluetoothDaemonChannel::OnDisconnect()
|
||||
ConnectionOrientedSocketIO*
|
||||
BluetoothDaemonChannel::GetIO()
|
||||
{
|
||||
return PrepareAccept(mConsumer);
|
||||
return PrepareAccept();
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -431,25 +431,28 @@ BluetoothDaemonConnectionIO::ShutdownOnIOThread()
|
||||
// BluetoothDaemonConnection
|
||||
//
|
||||
|
||||
BluetoothDaemonConnection::BluetoothDaemonConnection()
|
||||
: mIO(nullptr)
|
||||
{ }
|
||||
BluetoothDaemonConnection::BluetoothDaemonConnection(
|
||||
BluetoothDaemonPDUConsumer* aConsumer)
|
||||
: mConsumer(aConsumer)
|
||||
, mIO(nullptr)
|
||||
{
|
||||
MOZ_ASSERT(mConsumer);
|
||||
}
|
||||
|
||||
BluetoothDaemonConnection::~BluetoothDaemonConnection()
|
||||
{ }
|
||||
|
||||
ConnectionOrientedSocketIO*
|
||||
BluetoothDaemonConnection::PrepareAccept(BluetoothDaemonPDUConsumer* aConsumer)
|
||||
BluetoothDaemonConnection::PrepareAccept()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(!mIO);
|
||||
MOZ_ASSERT(aConsumer);
|
||||
|
||||
SetConnectionStatus(SOCKET_CONNECTING);
|
||||
|
||||
mIO = new BluetoothDaemonConnectionIO(
|
||||
XRE_GetIOMessageLoop(), -1, UnixSocketWatcher::SOCKET_IS_CONNECTING,
|
||||
this, aConsumer);
|
||||
this, mConsumer);
|
||||
|
||||
return mIO;
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ protected:
|
||||
class BluetoothDaemonConnection : public ConnectionOrientedSocket
|
||||
{
|
||||
public:
|
||||
BluetoothDaemonConnection();
|
||||
BluetoothDaemonConnection(BluetoothDaemonPDUConsumer* aConsumer);
|
||||
virtual ~BluetoothDaemonConnection();
|
||||
|
||||
// Methods for |ConnectionOrientedSocket|
|
||||
@ -136,10 +136,10 @@ protected:
|
||||
// Prepares an instance of |BluetoothDaemonConnection| in DISCONNECTED
|
||||
// state for accepting a connection. Subclasses implementing |GetIO|
|
||||
// need to call this method.
|
||||
ConnectionOrientedSocketIO*
|
||||
PrepareAccept(BluetoothDaemonPDUConsumer* aConsumer);
|
||||
ConnectionOrientedSocketIO* PrepareAccept();
|
||||
|
||||
private:
|
||||
BluetoothDaemonPDUConsumer* mConsumer;
|
||||
BluetoothDaemonConnectionIO* mIO;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user