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_
11 #include "base/basictypes.h"
12 #include "device/bluetooth/bluetooth_export.h"
13 #include "device/bluetooth/bluetooth_init_win.h"
14 #include "device/bluetooth/bluetooth_uuid.h"
18 class DEVICE_BLUETOOTH_EXPORT BluetoothServiceRecordWin
{
20 BluetoothServiceRecordWin(const std::string
& device_address
,
21 const std::string
& name
,
22 const std::vector
<uint8
>& sdp_bytes
,
23 const BluetoothUUID
& gatt_uuid
);
25 bool IsEqual(const BluetoothServiceRecordWin
& other
);
27 // The BTH_ADDR address of the BluetoothDevice providing this service.
28 BTH_ADDR
device_bth_addr() const { return device_bth_addr_
; }
30 // The address of the BluetoothDevice providing this service.
31 const std::string
& device_address() const { return device_address_
; }
33 // The human-readable name of this service.
34 const std::string
& name() const { return name_
; }
36 // The UUID of the service. This field may be empty if no UUID was
37 // specified in the service record.
38 const BluetoothUUID
& uuid() const { return uuid_
; }
40 // Indicates if this service supports RFCOMM communication.
41 bool SupportsRfcomm() const { return supports_rfcomm_
; }
43 // The RFCOMM channel to use, if this service supports RFCOMM communication.
44 // The return value is undefined if SupportsRfcomm() returns false.
45 uint8
rfcomm_channel() const { return rfcomm_channel_
; }
48 BTH_ADDR device_bth_addr_
;
49 std::string device_address_
;
53 bool supports_rfcomm_
;
54 uint8 rfcomm_channel_
;
56 DISALLOW_COPY_AND_ASSIGN(BluetoothServiceRecordWin
);
61 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_WIN_H_