зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1187249: Cleanup BluetoothInterfaceHelpers.{cpp,h}, r=shuang
This patch moves the last conversion function to Bluetooth's daemon backend and removes the files BluetoothInterfaceHelpers.{cpp,h}.
This commit is contained in:
Родитель
518504fa87
Коммит
66fa98429a
|
@ -1,28 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "BluetoothInterfaceHelpers.h"
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
||||
//
|
||||
// Conversion
|
||||
//
|
||||
|
||||
nsresult
|
||||
Convert(nsresult aIn, BluetoothStatus& aOut)
|
||||
{
|
||||
if (NS_SUCCEEDED(aIn)) {
|
||||
aOut = STATUS_SUCCESS;
|
||||
} else if (aIn == NS_ERROR_OUT_OF_MEMORY) {
|
||||
aOut = STATUS_NOMEM;
|
||||
} else {
|
||||
aOut = STATUS_FAIL;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
END_BLUETOOTH_NAMESPACE
|
|
@ -1,23 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef mozilla_dom_bluetooth_bluetoothinterfacehelpers_h
|
||||
#define mozilla_dom_bluetooth_bluetoothinterfacehelpers_h
|
||||
|
||||
#include "BluetoothCommon.h"
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
||||
//
|
||||
// Conversion
|
||||
//
|
||||
|
||||
nsresult
|
||||
Convert(nsresult aIn, BluetoothStatus& aOut);
|
||||
|
||||
END_BLUETOOTH_NAMESPACE
|
||||
|
||||
#endif
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "BluetoothDaemonHelpers.h"
|
||||
#include "BluetoothInterface.h"
|
||||
#include "BluetoothInterfaceHelpers.h"
|
||||
#include "mozilla/ipc/DaemonRunnables.h"
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "BluetoothDaemonHelpers.h"
|
||||
#include "BluetoothInterface.h"
|
||||
#include "BluetoothInterfaceHelpers.h"
|
||||
#include "mozilla/ipc/DaemonRunnables.h"
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "BluetoothDaemonHelpers.h"
|
||||
#include "BluetoothInterface.h"
|
||||
#include "BluetoothInterfaceHelpers.h"
|
||||
#include "mozilla/ipc/DaemonRunnables.h"
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "BluetoothDaemonHelpers.h"
|
||||
#include "BluetoothInterface.h"
|
||||
#include "BluetoothInterfaceHelpers.h"
|
||||
#include "mozilla/ipc/DaemonRunnables.h"
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
|
|
@ -524,6 +524,19 @@ Convert(const nsAString& aIn, BluetoothServiceName& aOut)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(nsresult aIn, BluetoothStatus& aOut)
|
||||
{
|
||||
if (NS_SUCCEEDED(aIn)) {
|
||||
aOut = STATUS_SUCCESS;
|
||||
} else if (aIn == NS_ERROR_OUT_OF_MEMORY) {
|
||||
aOut = STATUS_NOMEM;
|
||||
} else {
|
||||
aOut = STATUS_FAIL;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Convert(BluetoothAclState aIn, bool& aOut)
|
||||
{
|
||||
|
|
|
@ -288,6 +288,9 @@ Convert(BluetoothGattAuthReq aIn, int32_t& aOut);
|
|||
nsresult
|
||||
Convert(BluetoothGattWriteType aIn, int32_t& aOut);
|
||||
|
||||
nsresult
|
||||
Convert(nsresult aIn, BluetoothStatus& aOut);
|
||||
|
||||
//
|
||||
// Packing
|
||||
//
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "BluetoothDaemonHelpers.h"
|
||||
#include "BluetoothDaemonSetupInterface.h"
|
||||
#include "BluetoothDaemonSocketInterface.h"
|
||||
#include "BluetoothInterfaceHelpers.h"
|
||||
#include "mozilla/ipc/DaemonRunnables.h"
|
||||
#include "mozilla/ipc/DaemonSocket.h"
|
||||
#include "mozilla/ipc/ListenSocket.h"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "BluetoothDaemonHelpers.h"
|
||||
#include "BluetoothInterface.h"
|
||||
#include "BluetoothInterfaceHelpers.h"
|
||||
#include "mozilla/ipc/DaemonRunnables.h"
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
|
|
@ -13,7 +13,6 @@ if CONFIG['MOZ_B2G_BT']:
|
|||
SOURCES += [
|
||||
'BluetoothHidManager.cpp',
|
||||
'BluetoothInterface.cpp',
|
||||
'BluetoothInterfaceHelpers.cpp',
|
||||
'BluetoothUtils.cpp',
|
||||
'BluetoothUuid.cpp',
|
||||
'ObexBase.cpp'
|
||||
|
|
Загрузка…
Ссылка в новой задаче