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 ServiceList
GetServices() const OVERRIDE
;
38 virtual void GetServiceRecords(
39 const ServiceRecordsCallback
& callback
,
40 const ErrorCallback
& error_callback
) OVERRIDE
;
41 virtual void ProvidesServiceWithName(
42 const std::string
& name
,
43 const ProvidesServiceCallback
& callback
) OVERRIDE
;
44 virtual bool ExpectingPinCode() const OVERRIDE
;
45 virtual bool ExpectingPasskey() const OVERRIDE
;
46 virtual bool ExpectingConfirmation() const OVERRIDE
;
48 PairingDelegate
* pairing_delegate
,
49 const base::Closure
& callback
,
50 const ConnectErrorCallback
& error_callback
) OVERRIDE
;
51 virtual void SetPinCode(const std::string
& pincode
) OVERRIDE
;
52 virtual void SetPasskey(uint32 passkey
) OVERRIDE
;
53 virtual void ConfirmPairing() OVERRIDE
;
54 virtual void RejectPairing() OVERRIDE
;
55 virtual void CancelPairing() OVERRIDE
;
56 virtual void Disconnect(
57 const base::Closure
& callback
,
58 const ErrorCallback
& error_callback
) OVERRIDE
;
59 virtual void Forget(const ErrorCallback
& error_callback
) OVERRIDE
;
60 virtual void ConnectToService(
61 const std::string
& service_uuid
,
62 const SocketCallback
& callback
) OVERRIDE
;
63 virtual void ConnectToProfile(
64 device::BluetoothProfile
* profile
,
65 const base::Closure
& callback
,
66 const ErrorCallback
& error_callback
) OVERRIDE
;
67 virtual void SetOutOfBandPairingData(
68 const BluetoothOutOfBandPairingData
& data
,
69 const base::Closure
& callback
,
70 const ErrorCallback
& error_callback
) OVERRIDE
;
71 virtual void ClearOutOfBandPairingData(
72 const base::Closure
& callback
,
73 const ErrorCallback
& error_callback
) OVERRIDE
;
76 // BluetoothDevice override
77 virtual std::string
GetDeviceName() const OVERRIDE
;
80 friend class BluetoothAdapterMac
;
82 IOBluetoothDevice
* device_
;
84 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceMac
);
89 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_