Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / device / bluetooth / bluetooth_service_record_win.h
blob9612c9dd17e36c2d71be530130e97618dac340d6
1 // Copyright (c) 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_SERVICE_RECORD_WIN_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_WIN_H_
8 #include <string>
9 #include <vector>
11 #include "base/basictypes.h"
12 #include "device/bluetooth/bluetooth_init_win.h"
13 #include "device/bluetooth/bluetooth_uuid.h"
15 namespace device {
17 class BluetoothServiceRecordWin {
18 public:
19 BluetoothServiceRecordWin(const std::string& device_address,
20 const std::string& name,
21 const std::vector<uint8>& sdp_bytes,
22 const BluetoothUUID& gatt_uuid);
24 bool IsEqual(const BluetoothServiceRecordWin& other);
26 // The BTH_ADDR address of the BluetoothDevice providing this service.
27 BTH_ADDR device_bth_addr() const { return device_bth_addr_; }
29 // The address of the BluetoothDevice providing this service.
30 const std::string& device_address() const { return device_address_; }
32 // The human-readable name of this service.
33 const std::string& name() const { return name_; }
35 // The UUID of the service. This field may be empty if no UUID was
36 // specified in the service record.
37 const BluetoothUUID& uuid() const { return uuid_; }
39 // Indicates if this service supports RFCOMM communication.
40 bool SupportsRfcomm() const { return supports_rfcomm_; }
42 // The RFCOMM channel to use, if this service supports RFCOMM communication.
43 // The return value is undefined if SupportsRfcomm() returns false.
44 uint8 rfcomm_channel() const { return rfcomm_channel_; }
46 private:
47 BTH_ADDR device_bth_addr_;
48 std::string device_address_;
49 std::string name_;
50 BluetoothUUID uuid_;
52 bool supports_rfcomm_;
53 uint8 rfcomm_channel_;
55 DISALLOW_COPY_AND_ASSIGN(BluetoothServiceRecordWin);
58 } // namespace device
60 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_WIN_H_