device_state.h revision 5821806d5e7f356e8fa4b058a389a808ea183019
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 10namespace chromeos { 11 12// Simple class to provide device state information. Similar to NetworkState; 13// see network_state.h for usage guidelines. 14class CHROMEOS_EXPORT DeviceState : public ManagedState { 15 public: 16 explicit DeviceState(const std::string& path); 17 virtual ~DeviceState(); 18 19 // ManagedState overrides 20 virtual bool PropertyChanged(const std::string& key, 21 const base::Value& value) OVERRIDE; 22 23 // Accessors 24 const std::string& mac_address() const { return mac_address_; } 25 bool provider_requires_roaming() const { return provider_requires_roaming_; } 26 bool support_network_scan() const { return support_network_scan_; } 27 28 private: 29 // Common Device Properties 30 std::string mac_address_; 31 // Cellular specific propeties 32 std::string home_provider_id_; 33 bool provider_requires_roaming_; 34 bool support_network_scan_; 35 36 DISALLOW_COPY_AND_ASSIGN(DeviceState); 37}; 38 39} // namespace chromeos 40 41#endif // CHROMEOS_NETWORK_DEVICE_STATE_H_ 42