summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api/bluetooth/bluetooth_api_utils.h
blob: 364a5d25d21535d0846db03637f4479d31d4fabf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_UTILS_H_
#define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_UTILS_H_

#include "base/values.h"
#include "chrome/common/extensions/api/experimental_bluetooth.h"
#include "device/bluetooth/bluetooth_device.h"

namespace extensions {
namespace api {
namespace experimental_bluetooth {

// Fill in a Device object from a BluetoothDevice.
void BluetoothDeviceToApiDevice(
    const device::BluetoothDevice& device,
    Device* out);

// The caller takes ownership of the returned pointer.
base::Value* BluetoothDeviceToValue(
    const device::BluetoothDevice& device);

}  // namespace experimental_bluetooth
}  // namespace api
}  // namespace extensions

#endif  // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_BLUETOOTH_API_UTILS_H_