Relanding this change. The bug 332430 which caused this to be reverted will be addres...
[chromium-blink-merge.git] / device / bluetooth / bluetooth_profile_mac.h
blobbad10ce527c27d25129f95625db706b8ea85a12a
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"
13 #include "device/bluetooth/bluetooth_uuid.h"
15 #ifdef __OBJC__
16 @class IOBluetoothDevice;
17 #else
18 class IOBluetoothDevice;
19 #endif
21 namespace device {
23 class BluetoothProfileMac : public BluetoothProfile {
24 public:
25 // BluetoothProfile override.
26 virtual void Unregister() OVERRIDE;
27 virtual void SetConnectionCallback(
28 const ConnectionCallback& callback) OVERRIDE;
30 // Makes an outgoing connection to |device|.
31 // This method runs |socket_callback_| with the socket and returns true if the
32 // connection is made successfully.
33 bool Connect(IOBluetoothDevice* device);
35 private:
36 friend BluetoothProfile;
38 BluetoothProfileMac(const BluetoothUUID& uuid, const std::string& name);
39 virtual ~BluetoothProfileMac();
41 const BluetoothUUID uuid_;
42 const std::string name_;
43 ConnectionCallback connection_callback_;
46 } // namespace device
48 #endif // DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_MAC_H_