OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROMEOS_NETWORK_DEVICE_STATE_H_ |
| 6 #define CHROMEOS_NETWORK_DEVICE_STATE_H_ |
| 7 |
| 8 #include "chromeos/network/managed_state.h" |
| 9 |
| 10 namespace chromeos { |
| 11 |
| 12 // Simple class to provide device state information. Similar to NetworkState; |
| 13 // see network_state.h for usage guidelines. |
| 14 class CHROMEOS_EXPORT DeviceState : public ManagedState { |
| 15 public: |
| 16 explicit DeviceState(const std::string& path); |
| 17 |
| 18 // ManagedState overrides. |
| 19 virtual bool PropertyChanged(const std::string& key, |
| 20 const base::Value& value) OVERRIDE; |
| 21 |
| 22 // Accessors |
| 23 const std::string& name() const { return name_; } |
| 24 const std::string& type() const { return type_; } |
| 25 const std::string& mac_address() const { return mac_address_; } |
| 26 bool always_in_roaming() const { return always_in_roaming_; } |
| 27 bool support_network_scan() const { return support_network_scan_; } |
| 28 |
| 29 private: |
| 30 // Device Properties |
| 31 std::string name_; |
| 32 std::string type_; |
| 33 std::string mac_address_; |
| 34 std::string home_provider_id_; |
| 35 bool always_in_roaming_; |
| 36 bool support_network_scan_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(DeviceState); |
| 39 }; |
| 40 |
| 41 } // namespace chromeos |
| 42 |
| 43 #endif // CHROMEOS_NETWORK_DEVICE_STATE_H_ |
OLD | NEW |