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

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

Issue 8394030: Chrome OS: Add bluetooth API for device discovery (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address more satorux@ review comments Created 9 years, 2 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_device.h
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_device.h b/chrome/browser/chromeos/bluetooth/bluetooth_device.h
new file mode 100644
index 0000000000000000000000000000000000000000..d20ceb340010416fa8748eb2d1910d98b6677aef
--- /dev/null
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_device.h
@@ -0,0 +1,58 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_DEVICE_H_
+#define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_DEVICE_H_
+#pragma once
+
+#include <string>
+
+#include "base/basictypes.h"
+
+namespace base {
+class DictionaryValue;
+} // namespace base
+
+namespace chromeos {
+
+class BluetoothDevice {
+ public:
+ virtual ~BluetoothDevice();
+
+ // Returns the MAC address for this device.
+ virtual const std::string& GetAddress() const = 0;
+
+ // Returns the bluetooth class for this device.
+ // This is a bitfield consisting of 3 subfields representing service class,
+ // major device class, and minor device class.
+ // See www.bluetooth.org/spec/ for details.
+ // TODO(vlaviano): provide a better API for this.
+ virtual uint32 GetBluetoothClass() const = 0;
+
+ // Returns the suggested icon type for this device.
+ // See http://standards.freedesktop.org/icon-naming-spec/ for details.
+ virtual const std::string& GetIcon() const = 0;
+
+ // Returns the name for this device.
+ virtual const std::string& GetName() const = 0;
+
+ // Returns whether or not this device is paired.
+ virtual bool IsPaired() const = 0;
+
+ // Returns a dictionary representation of this device.
+ virtual const base::DictionaryValue& AsDictionary() const = 0;
+
+ // Creates a device with property values based on |properties|.
+ static BluetoothDevice* Create(const base::DictionaryValue& properties);
+
+ protected:
+ BluetoothDevice();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BluetoothDevice);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_DEVICE_H_
« no previous file with comments | « chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc ('k') | chrome/browser/chromeos/bluetooth/bluetooth_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698