Chromium Code Reviews| Index: chrome/browser/chromeos/cros/network_library.h |
| diff --git a/chrome/browser/chromeos/cros/network_library.h b/chrome/browser/chromeos/cros/network_library.h |
| index 890c97fd8db7ca02e24da42d0fcc25b1a670b28a..496c06e98cfafc6c4bfb182990a9a99c29553406 100644 |
| --- a/chrome/browser/chromeos/cros/network_library.h |
| +++ b/chrome/browser/chromeos/cros/network_library.h |
| @@ -253,6 +253,7 @@ class NetworkDevice { |
| friend class NetworkLibraryImpl; |
| DISALLOW_COPY_AND_ASSIGN(NetworkDevice); |
| }; |
| +typedef std::vector<NetworkDevice*> NetworkDeviceVector; |
| // Contains data common to all network service types. |
| class Network { |
| @@ -847,6 +848,11 @@ typedef std::vector<NetworkIPConfig> NetworkIPConfigVector; |
| // library like this: chromeos::CrosLibrary::Get()->GetNetworkLibrary() |
| class NetworkLibrary { |
| public: |
| + enum HardwareAddressFormat { |
| + FORMAT_RAW_HEX, |
| + FORMAT_COLON_SEPARATED_HEX |
| + }; |
| + |
| class NetworkManagerObserver { |
| public: |
| // Called when the state of the network manager has changed, |
| @@ -980,10 +986,15 @@ class NetworkLibrary { |
| virtual const NetworkDevice* FindNetworkDeviceByPath( |
| const std::string& path) const = 0; |
| - // Returns device with TYPE_CELLULAR. Returns NULL if such a device doesn't |
| - // exist. |
| + // Returns device with TYPE_CELLULAR. Returns NULL if none exists. |
| virtual const NetworkDevice* FindCellularDevice() const = 0; |
| + // Returns random device with TYPE_ETHERNET. Returns NULL if none exists. |
|
Nikita (slow)
2011/04/25 08:51:35
"Returns random device with TYPE_ETHERNET" is misl
stevenjb
2011/04/25 17:54:27
In the future, there may be hardware more than one
Denis Lagno
2011/04/26 15:54:58
Done.
|
| + virtual NetworkDeviceVector FindEthernetDevices() const = 0; |
| + |
| + // Returns random device with TYPE_WIFI. Returns NULL if none exists. |
| + virtual NetworkDeviceVector FindWifiDevices() const = 0; |
| + |
| // Return a pointer to the network, if it exists, or NULL. |
| // NOTE: Never store these results, store service paths instead. |
| // The pattern for doing an operation on a Network is: |
| @@ -1136,7 +1147,8 @@ class NetworkLibrary { |
| // found. |
| virtual NetworkIPConfigVector GetIPConfigs( |
| const std::string& device_path, |
| - std::string* hardware_address) = 0; |
| + std::string* hardware_address, |
| + HardwareAddressFormat) = 0; |
| // Factory function, creates a new instance and returns ownership. |
| // For normal usage, access the singleton via CrosLibrary::Get(). |