- add sources.
[platform/framework/web/crosswalk.git] / src / device / bluetooth / bluetooth_device_mac.h
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.
4
5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "device/bluetooth/bluetooth_device.h"
12
13 #ifdef __OBJC__
14 @class IOBluetoothDevice;
15 #else
16 class IOBluetoothDevice;
17 #endif
18
19 namespace device {
20
21 class BluetoothDeviceMac : public BluetoothDevice {
22  public:
23   explicit BluetoothDeviceMac(IOBluetoothDevice* device);
24   virtual ~BluetoothDeviceMac();
25
26   // BluetoothDevice override
27   virtual uint32 GetBluetoothClass() const OVERRIDE;
28   virtual std::string GetAddress() const OVERRIDE;
29   virtual uint16 GetVendorID() const OVERRIDE;
30   virtual uint16 GetProductID() const OVERRIDE;
31   virtual uint16 GetDeviceID() const OVERRIDE;
32   virtual bool IsPaired() const OVERRIDE;
33   virtual bool IsConnected() const OVERRIDE;
34   virtual bool IsConnectable() const OVERRIDE;
35   virtual bool IsConnecting() const OVERRIDE;
36   virtual ServiceList GetServices() const OVERRIDE;
37   virtual void GetServiceRecords(
38       const ServiceRecordsCallback& callback,
39       const ErrorCallback& error_callback) OVERRIDE;
40   virtual void ProvidesServiceWithName(
41       const std::string& name,
42       const ProvidesServiceCallback& callback) OVERRIDE;
43   virtual bool ExpectingPinCode() const OVERRIDE;
44   virtual bool ExpectingPasskey() const OVERRIDE;
45   virtual bool ExpectingConfirmation() const OVERRIDE;
46   virtual void Connect(
47       PairingDelegate* pairing_delegate,
48       const base::Closure& callback,
49       const ConnectErrorCallback& error_callback) OVERRIDE;
50   virtual void SetPinCode(const std::string& pincode) OVERRIDE;
51   virtual void SetPasskey(uint32 passkey) OVERRIDE;
52   virtual void ConfirmPairing() OVERRIDE;
53   virtual void RejectPairing() OVERRIDE;
54   virtual void CancelPairing() OVERRIDE;
55   virtual void Disconnect(
56       const base::Closure& callback,
57       const ErrorCallback& error_callback) OVERRIDE;
58   virtual void Forget(const ErrorCallback& error_callback) OVERRIDE;
59   virtual void ConnectToService(
60       const std::string& service_uuid,
61       const SocketCallback& callback) OVERRIDE;
62   virtual void ConnectToProfile(
63       device::BluetoothProfile* profile,
64       const base::Closure& callback,
65       const ErrorCallback& error_callback) OVERRIDE;
66   virtual void SetOutOfBandPairingData(
67       const BluetoothOutOfBandPairingData& data,
68       const base::Closure& callback,
69       const ErrorCallback& error_callback) OVERRIDE;
70   virtual void ClearOutOfBandPairingData(
71       const base::Closure& callback,
72       const ErrorCallback& error_callback) OVERRIDE;
73
74  protected:
75   // BluetoothDevice override
76   virtual std::string GetDeviceName() const OVERRIDE;
77
78  private:
79   friend class BluetoothAdapterMac;
80
81   IOBluetoothDevice* device_;
82
83   DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceMac);
84 };
85
86 }  // namespace device
87
88 #endif  // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_