Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2029)

Unified Diff: chrome/browser/chromeos/bluetooth/bluetooth_service_record.h

Issue 10007008: Add support for creating bluetooth RFCOMM sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase diff to exclude extensions code Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/bluetooth/bluetooth_service_record.h
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_service_record.h b/chrome/browser/chromeos/bluetooth/bluetooth_service_record.h
index 2706b6382076bc08c15b6a48557b30874ff81ac4..5552ef8afc87e1907bb1144ed64079238defa449 100644
--- a/chrome/browser/chromeos/bluetooth/bluetooth_service_record.h
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_service_record.h
@@ -10,6 +10,8 @@
#include "base/basictypes.h"
+class XmlReader;
+
namespace chromeos {
// The BluetoothServiceRecord represents an SDP service record.
@@ -18,13 +20,32 @@ namespace chromeos {
// that have been necessary so far.
class BluetoothServiceRecord {
public:
- explicit BluetoothServiceRecord(const std::string& xml_data);
+ BluetoothServiceRecord(
+ const std::string& address,
+ const std::string& xml_data);
+ // The human-readable name of this service.
const std::string& name() const { return name_; }
+ // The address of the BluetoothDevice providing this service.
+ const std::string& address() const { return address_; }
+
+ // Indicates if this service supports RFCOMM communication.
+ bool SupportsRfcomm() const { return supports_rfcomm_; }
+
+ // The RFCOMM channel to use, if this service supports RFCOMM communication.
+ // The return value is undefined if SupportsRfcomm() returns false.
+ uint8_t rfcomm_channel() const { return rfcomm_channel_; }
+
private:
+ void ExtractChannels(XmlReader* reader);
+
+ std::string address_;
std::string name_;
+ bool supports_rfcomm_;
+ uint8_t rfcomm_channel_;
+
DISALLOW_COPY_AND_ASSIGN(BluetoothServiceRecord);
};
« no previous file with comments | « chrome/browser/chromeos/bluetooth/bluetooth_device.cc ('k') | chrome/browser/chromeos/bluetooth/bluetooth_service_record.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698