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_DEVICE_MAC_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_
10 #include "base/basictypes.h"
11 #include "device/bluetooth/bluetooth_device.h"
14 @
class IOBluetoothDevice
;
16 class IOBluetoothDevice
;
21 class BluetoothDeviceMac
: public BluetoothDevice
{
23 explicit BluetoothDeviceMac(IOBluetoothDevice
* device
);
24 virtual ~BluetoothDeviceMac();
26 // BluetoothDevice override
27 virtual uint32
GetBluetoothClass() const OVERRIDE
;
28 virtual std::string
GetAddress() const OVERRIDE
;
29 virtual VendorIDSource
GetVendorIDSource() const OVERRIDE
;
30 virtual uint16
GetVendorID() const OVERRIDE
;
31 virtual uint16
GetProductID() const OVERRIDE
;
32 virtual uint16
GetDeviceID() const OVERRIDE
;
33 virtual bool IsPaired() const OVERRIDE
;
34 virtual bool IsConnected() const OVERRIDE
;
35 virtual bool IsConnectable() const OVERRIDE
;
36 virtual bool IsConnecting() const OVERRIDE
;
37 virtual UUIDList
GetUUIDs() const OVERRIDE
;
38 virtual bool ExpectingPinCode() const OVERRIDE
;
39 virtual bool ExpectingPasskey() const OVERRIDE
;
40 virtual bool ExpectingConfirmation() const OVERRIDE
;
42 PairingDelegate
* pairing_delegate
,
43 const base::Closure
& callback
,
44 const ConnectErrorCallback
& error_callback
) OVERRIDE
;
45 virtual void SetPinCode(const std::string
& pincode
) OVERRIDE
;
46 virtual void SetPasskey(uint32 passkey
) OVERRIDE
;
47 virtual void ConfirmPairing() OVERRIDE
;
48 virtual void RejectPairing() OVERRIDE
;
49 virtual void CancelPairing() OVERRIDE
;
50 virtual void Disconnect(
51 const base::Closure
& callback
,
52 const ErrorCallback
& error_callback
) OVERRIDE
;
53 virtual void Forget(const ErrorCallback
& error_callback
) OVERRIDE
;
54 virtual void ConnectToService(
55 const std::string
& service_uuid
,
56 const SocketCallback
& callback
) OVERRIDE
;
57 virtual void ConnectToProfile(
58 device::BluetoothProfile
* profile
,
59 const base::Closure
& callback
,
60 const ErrorCallback
& error_callback
) OVERRIDE
;
61 virtual void SetOutOfBandPairingData(
62 const BluetoothOutOfBandPairingData
& data
,
63 const base::Closure
& callback
,
64 const ErrorCallback
& error_callback
) OVERRIDE
;
65 virtual void ClearOutOfBandPairingData(
66 const base::Closure
& callback
,
67 const ErrorCallback
& error_callback
) OVERRIDE
;
70 // BluetoothDevice override
71 virtual std::string
GetDeviceName() const OVERRIDE
;
74 friend class BluetoothAdapterMac
;
76 IOBluetoothDevice
* device_
;
78 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceMac
);
83 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_