Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_H_ | 6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 | 12 |
| 13 namespace chromeos { | 13 namespace chromeos { |
| 14 | 14 |
| 15 // The BluetoothServiceRecord represents an SDP service record. | 15 // The BluetoothServiceRecord represents an SDP service record. |
| 16 // | 16 // |
| 17 // This implementation is currently incomplete: it only supports those fields | 17 // This implementation is currently incomplete: it only supports those fields |
| 18 // that have been necessary so far. | 18 // that have been necessary so far. |
| 19 class BluetoothServiceRecord { | 19 class BluetoothServiceRecord { |
| 20 public: | 20 public: |
| 21 BluetoothServiceRecord() {} | 21 BluetoothServiceRecord() : supports_rfcomm_(false) {} |
|
keybuk
2012/04/19 01:05:40
This should move to the .cc file
bryeung
2012/04/19 19:42:43
Done.
| |
| 22 | 22 |
| 23 bool Init(const std::string& xml_data); | 23 bool Init(const std::string& xml_data); |
| 24 | 24 |
| 25 const std::string& name() const { return name_; } | 25 const std::string& name() const { return name_; } |
| 26 | 26 |
| 27 bool SupportsRfcomm() const { return supports_rfcomm_; } | |
| 28 uint8_t rfcomm_channel() const { return rfcomm_channel_; } | |
|
keybuk
2012/04/19 01:05:40
add L2CAP and L2CAP PSM as well?
bryeung
2012/04/19 19:42:43
Can that wait for a future CL? I'm focused on RFC
| |
| 29 | |
| 27 private: | 30 private: |
| 31 void ExtractChannels(const std::string& xml_data); | |
| 32 | |
| 28 std::string name_; | 33 std::string name_; |
| 29 | 34 |
| 35 bool supports_rfcomm_; | |
| 36 uint8_t rfcomm_channel_; | |
| 37 | |
| 30 DISALLOW_COPY_AND_ASSIGN(BluetoothServiceRecord); | 38 DISALLOW_COPY_AND_ASSIGN(BluetoothServiceRecord); |
| 31 }; | 39 }; |
| 32 | 40 |
| 33 } // namespace chromeos | 41 } // namespace chromeos |
| 34 | 42 |
| 35 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_H_ | 43 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_H_ |
| OLD | NEW |