mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 910974 - Patch 2: Cleanup, r=echou
This commit is contained in:
parent
df9b5223ee
commit
eb145d6c12
@ -2655,55 +2655,6 @@ BluetoothDBusService::IsConnected(const uint16_t aProfileId)
|
||||
return profile->IsConnected();
|
||||
}
|
||||
|
||||
class ConnectBluetoothSocketRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
ConnectBluetoothSocketRunnable(BluetoothReplyRunnable* aRunnable,
|
||||
UnixSocketConsumer* aConsumer,
|
||||
const nsAString& aObjectPath,
|
||||
const nsAString& aServiceUUID,
|
||||
BluetoothSocketType aType,
|
||||
bool aAuth,
|
||||
bool aEncrypt,
|
||||
int aChannel)
|
||||
: mRunnable(dont_AddRef(aRunnable))
|
||||
, mConsumer(aConsumer)
|
||||
, mObjectPath(aObjectPath)
|
||||
, mServiceUUID(aServiceUUID)
|
||||
, mType(aType)
|
||||
, mAuth(aAuth)
|
||||
, mEncrypt(aEncrypt)
|
||||
, mChannel(aChannel)
|
||||
{
|
||||
}
|
||||
|
||||
nsresult
|
||||
Run()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
nsString address = GetAddressFromObjectPath(mObjectPath);
|
||||
BluetoothUnixSocketConnector* c =
|
||||
new BluetoothUnixSocketConnector(mType, mChannel, mAuth, mEncrypt);
|
||||
if (!mConsumer->ConnectSocket(c, NS_ConvertUTF16toUTF8(address).get())) {
|
||||
NS_NAMED_LITERAL_STRING(errorStr, "SocketConnectionError");
|
||||
DispatchBluetoothReply(mRunnable, BluetoothValue(), errorStr);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
private:
|
||||
nsRefPtr<BluetoothReplyRunnable> mRunnable;
|
||||
nsRefPtr<UnixSocketConsumer> mConsumer;
|
||||
nsString mObjectPath;
|
||||
nsString mServiceUUID;
|
||||
BluetoothSocketType mType;
|
||||
bool mAuth;
|
||||
bool mEncrypt;
|
||||
int mChannel;
|
||||
};
|
||||
|
||||
class OnUpdateSdpRecordsRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user