[BackgroundSync] Hang the BackgroundSyncManager off of the StoragePartition
[chromium-blink-merge.git] / device / bluetooth / bluetooth_service_record_win.h
blobcedc67efc0b9e7fc716f823dde6f8ed2a6bd9bd8
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_export.h"
13 #include "device/bluetooth/bluetooth_init_win.h"
14 #include "device/bluetooth/bluetooth_uuid.h"
16 namespace device {
18 class DEVICE_BLUETOOTH_EXPORT BluetoothServiceRecordWin {
19 public:
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_; }
47 private:
48 BTH_ADDR device_bth_addr_;
49 std::string device_address_;
50 std::string name_;
51 BluetoothUUID uuid_;
53 bool supports_rfcomm_;
54 uint8 rfcomm_channel_;
56 DISALLOW_COPY_AND_ASSIGN(BluetoothServiceRecordWin);
59 } // namespace device
61 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_WIN_H_