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.
5 #ifndef CHROMEOS_NETWORK_DEVICE_STATE_H_
6 #define CHROMEOS_NETWORK_DEVICE_STATE_H_
8 #include "chromeos/network/managed_state.h"
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
{
16 explicit DeviceState(const std::string
& path
);
17 virtual ~DeviceState();
19 // ManagedState overrides
20 virtual bool PropertyChanged(const std::string
& key
,
21 const base::Value
& value
) OVERRIDE
;
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 bool scanning() const { return scanning_
; }
28 std::string
sim_lock_type() const { return sim_lock_type_
; }
30 // Returns true if the technology family is GSM and sim_present_ is false.
31 bool IsSimAbsent() const;
34 // Common Device Properties
35 std::string mac_address_
;
36 // Cellular specific propeties
37 std::string home_provider_id_
;
38 bool provider_requires_roaming_
;
39 bool support_network_scan_
;
41 std::string technology_family_
;
42 std::string sim_lock_type_
;
45 DISALLOW_COPY_AND_ASSIGN(DeviceState
);
48 } // namespace chromeos
50 #endif // CHROMEOS_NETWORK_DEVICE_STATE_H_