Mandoline: Make TransferBufferManager RefCounted
[chromium-blink-merge.git] / components / proximity_auth / bluetooth_util.h
blobec1c2cc56f7398f7956c2b258a01e7f3d062c56c
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_UTIL_H
6 #define COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_UTIL_H
8 #include <string>
10 #include "base/callback_forward.h"
12 namespace base {
13 class TaskRunner;
16 namespace proximity_auth {
17 namespace bluetooth_util {
19 typedef base::Callback<void(const std::string& error_message)> ErrorCallback;
21 // Connects to the SDP service on the Bluetooth device with the given
22 // |device_address|, if possible. Calls the |callback| on success, or the
23 // |error_callback| with an error message on failure. Because this can be an
24 // expensive operation, the work will be run on the provided |task_runner|,
25 // which should correspond to a background thread.
26 void SeekDeviceByAddress(const std::string& device_address,
27 const base::Closure& callback,
28 const ErrorCallback& error_callback,
29 base::TaskRunner* task_runner);
31 } // namespace bluetooth_util
32 } // namespace proximity_auth
34 #endif // COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_UTIL_H