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..554291fc3c2875875582836fde409fb792bd984d |
--- /dev/null |
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_device.h |
@@ -0,0 +1,55 @@ |
+// 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 |
+ |
+using base::DictionaryValue; |
+ |
+namespace chromeos { |
+ |
+class BluetoothDevice { |
+ public: |
+ virtual ~BluetoothDevice(); |
+ |
+ // Returns the MAC address for this device. |
+ virtual const std::string& Address() const = 0; |
satorux1
2011/10/26 19:26:55
GetAddress()? As it's essentially an accessor, add
Vince Laviano
2011/10/26 21:41:55
I had originally named them that way in my CL at h
|
+ |
+ // Returns the bluetooth class for this device. |
+ virtual uint32 BluetoothClass() const = 0; |
satorux1
2011/10/26 19:26:55
uint32 doesn't seem to be a good type. Can you ret
Vince Laviano
2011/10/26 21:41:55
This is a bitfield that contains 3 subfields repre
satorux1
2011/10/26 22:28:10
Please add that information as a comment here.
|
+ |
+ // Returns the suggested icon for this device. |
+ virtual const std::string& Icon() const = 0; |
satorux1
2011/10/26 19:26:55
What will string contain? An URL to an image? Plea
Vince Laviano
2011/10/26 21:41:55
"icon" is a property defined in the BlueZ D-Bus AP
|
+ |
+ // Returns the name for this device. |
+ virtual const std::string& Name() const = 0; |
satorux1
2011/10/26 19:26:55
Maybe a bit redundant but DeviceName() may be a bi
Vince Laviano
2011/10/26 21:41:55
Ditto. Would like to retain the BlueZ property nam
|
+ |
+ // Returns whether or not this device is paired. |
+ virtual bool Paired() const = 0; |
+ |
+ // Returns a dictionary representation of this device. |
+ virtual const DictionaryValue& DictionaryRep() const = 0; |
satorux1
2011/10/26 19:26:55
AsDictionary() may be a bit better name?
Vince Laviano
2011/10/26 21:41:55
Done.
|
+ |
+ // Creates a device with property values based on |properties|. |
+ static BluetoothDevice* Create(const DictionaryValue& properties); |
+ |
+ protected: |
+ BluetoothDevice(); |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(BluetoothDevice); |
+}; |
+ |
+} // namespace chromeos |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_DEVICE_H_ |