Chromium Code Reviews| Index: chromeos/network/device_state.h |
| diff --git a/chromeos/network/device_state.h b/chromeos/network/device_state.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c514cac9eb07fc91e0d6dc11defd6b8d07937f04 |
| --- /dev/null |
| +++ b/chromeos/network/device_state.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright (c) 2012 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 CHROMEOS_NETWORK_DEVICE_STATE_H_ |
| +#define CHROMEOS_NETWORK_DEVICE_STATE_H_ |
| + |
| +#include "chromeos/network/managed_state.h" |
|
pneubeck (no reviews)
2012/10/24 14:41:42
please add here and in other files where necessary
|
| + |
|
pneubeck (no reviews)
2012/10/24 14:41:42
forward declare base::Value
#include <string>
stevenjb
2012/10/25 00:41:58
These are all guaranteed to be in managed_state.h,
|
| +// Simple class to provide device state information. Similar to NetworkState; |
|
tfarina
2012/10/20 02:34:17
I'd move this atop of class declaration.
stevenjb
2012/10/25 00:41:58
Done.
|
| +// see network_state.h for usage guidelines. |
| + |
| +namespace chromeos { |
| + |
| +class CHROMEOS_EXPORT DeviceState : public ManagedState { |
| + public: |
| + explicit DeviceState(const std::string& path); |
| + |
| + // Called by NetworkStateManager when a property changes. |
| + virtual bool PropertyChanged(const std::string& key, |
| + const base::Value& value) OVERRIDE; |
| + |
| + // Accessors |
| + const std::string& name() const { return name_; } |
| + const std::string& type() const { return type_; } |
| + const std::string& mac_address() const { return mac_address_; } |
| + bool always_in_roaming() const { return always_in_roaming_; } |
| + bool support_network_scan() const { return support_network_scan_; } |
| + |
| +private: |
|
tfarina
2012/10/20 02:34:17
nit: indent one more space.
stevenjb
2012/10/25 00:41:58
Done.
|
| + // Device Properties |
| + std::string name_; |
| + std::string type_; |
| + std::string mac_address_; |
| + std::string home_provider_id_; |
| + bool always_in_roaming_; |
| + bool support_network_scan_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(DeviceState); |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROMEOS_NETWORK_DEVICE_STATE_H_ |