Add JSON check in tools/perf presubmit script.
[chromium-blink-merge.git] / device / bluetooth / bluetooth_profile_mac.h
blob0085efdeaeabfb6f0d618274d109635087dda905
1 // Copyright 2013 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 DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_MAC_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_MAC_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/callback.h"
12 #include "device/bluetooth/bluetooth_profile.h"
14 #ifdef __OBJC__
15 @class IOBluetoothDevice;
16 #else
17 class IOBluetoothDevice;
18 #endif
20 namespace device {
22 class BluetoothProfileMac : public BluetoothProfile {
23 public:
24 // BluetoothProfile override.
25 virtual void Unregister() OVERRIDE;
26 virtual void SetConnectionCallback(
27 const ConnectionCallback& callback) OVERRIDE;
29 // Makes an outgoing connection to |device|.
30 // This method runs |socket_callback_| with the socket and returns true if the
31 // connection is made successfully.
32 bool Connect(IOBluetoothDevice* device);
34 private:
35 friend BluetoothProfile;
37 BluetoothProfileMac(const std::string& uuid, const std::string& name);
38 virtual ~BluetoothProfileMac();
40 const std::string uuid_;
41 const std::string name_;
42 ConnectionCallback connection_callback_;
45 } // namespace device
47 #endif // DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_MAC_H_