OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROMEOS_NETWORK_DEVICE_STATE_H_ | 5 #ifndef CHROMEOS_NETWORK_DEVICE_STATE_H_ |
6 #define CHROMEOS_NETWORK_DEVICE_STATE_H_ | 6 #define CHROMEOS_NETWORK_DEVICE_STATE_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include "base/macros.h" |
8 #include "base/values.h" | 11 #include "base/values.h" |
9 #include "chromeos/network/managed_state.h" | 12 #include "chromeos/network/managed_state.h" |
10 #include "chromeos/network/network_util.h" | 13 #include "chromeos/network/network_util.h" |
11 | 14 |
12 namespace chromeos { | 15 namespace chromeos { |
13 | 16 |
14 // Simple class to provide device state information. Similar to NetworkState; | 17 // Simple class to provide device state information. Similar to NetworkState; |
15 // see network_state.h for usage guidelines. | 18 // see network_state.h for usage guidelines. |
16 class CHROMEOS_EXPORT DeviceState : public ManagedState { | 19 class CHROMEOS_EXPORT DeviceState : public ManagedState { |
17 public: | 20 public: |
(...skipping 16 matching lines...) Expand all Loading... |
34 bool scanning() const { return scanning_; } | 37 bool scanning() const { return scanning_; } |
35 | 38 |
36 // Cellular specific accessors | 39 // Cellular specific accessors |
37 const std::string& home_provider_id() const { return home_provider_id_; } | 40 const std::string& home_provider_id() const { return home_provider_id_; } |
38 bool allow_roaming() const { return allow_roaming_; } | 41 bool allow_roaming() const { return allow_roaming_; } |
39 bool provider_requires_roaming() const { return provider_requires_roaming_; } | 42 bool provider_requires_roaming() const { return provider_requires_roaming_; } |
40 bool support_network_scan() const { return support_network_scan_; } | 43 bool support_network_scan() const { return support_network_scan_; } |
41 const std::string& technology_family() const { return technology_family_; } | 44 const std::string& technology_family() const { return technology_family_; } |
42 const std::string& carrier() const { return carrier_; } | 45 const std::string& carrier() const { return carrier_; } |
43 const std::string& sim_lock_type() const { return sim_lock_type_; } | 46 const std::string& sim_lock_type() const { return sim_lock_type_; } |
44 uint32 sim_retries_left() const { return sim_retries_left_; } | 47 uint32_t sim_retries_left() const { return sim_retries_left_; } |
45 const std::string& meid() const { return meid_; } | 48 const std::string& meid() const { return meid_; } |
46 const std::string& imei() const { return imei_; } | 49 const std::string& imei() const { return imei_; } |
47 const std::string& iccid() const { return iccid_; } | 50 const std::string& iccid() const { return iccid_; } |
48 const std::string& mdn() const { return mdn_; } | 51 const std::string& mdn() const { return mdn_; } |
49 const CellularScanResults& scan_results() const { return scan_results_; } | 52 const CellularScanResults& scan_results() const { return scan_results_; } |
50 | 53 |
51 // |ip_configs_| is kept up to date by NetworkStateHandler. | 54 // |ip_configs_| is kept up to date by NetworkStateHandler. |
52 const base::DictionaryValue& ip_configs() const { return ip_configs_; } | 55 const base::DictionaryValue& ip_configs() const { return ip_configs_; } |
53 | 56 |
54 // Do not use this. It exists temporarily for internet_options_handler.cc | 57 // Do not use this. It exists temporarily for internet_options_handler.cc |
(...skipping 17 matching lines...) Expand all Loading... |
72 | 75 |
73 // Cellular specific properties | 76 // Cellular specific properties |
74 std::string home_provider_id_; | 77 std::string home_provider_id_; |
75 bool allow_roaming_; | 78 bool allow_roaming_; |
76 bool provider_requires_roaming_; | 79 bool provider_requires_roaming_; |
77 bool support_network_scan_; | 80 bool support_network_scan_; |
78 bool scanning_; | 81 bool scanning_; |
79 std::string technology_family_; | 82 std::string technology_family_; |
80 std::string carrier_; | 83 std::string carrier_; |
81 std::string sim_lock_type_; | 84 std::string sim_lock_type_; |
82 uint32 sim_retries_left_; | 85 uint32_t sim_retries_left_; |
83 bool sim_present_; | 86 bool sim_present_; |
84 std::string meid_; | 87 std::string meid_; |
85 std::string imei_; | 88 std::string imei_; |
86 std::string iccid_; | 89 std::string iccid_; |
87 std::string mdn_; | 90 std::string mdn_; |
88 CellularScanResults scan_results_; | 91 CellularScanResults scan_results_; |
89 | 92 |
90 // Ethernet specific properties | 93 // Ethernet specific properties |
91 bool eap_authentication_completed_; | 94 bool eap_authentication_completed_; |
92 | 95 |
93 // Keep all Device properties in a dictionary for now. See comment above. | 96 // Keep all Device properties in a dictionary for now. See comment above. |
94 base::DictionaryValue properties_; | 97 base::DictionaryValue properties_; |
95 | 98 |
96 // Dictionary of IPConfig properties, keyed by IpConfig path. | 99 // Dictionary of IPConfig properties, keyed by IpConfig path. |
97 base::DictionaryValue ip_configs_; | 100 base::DictionaryValue ip_configs_; |
98 | 101 |
99 DISALLOW_COPY_AND_ASSIGN(DeviceState); | 102 DISALLOW_COPY_AND_ASSIGN(DeviceState); |
100 }; | 103 }; |
101 | 104 |
102 } // namespace chromeos | 105 } // namespace chromeos |
103 | 106 |
104 #endif // CHROMEOS_NETWORK_DEVICE_STATE_H_ | 107 #endif // CHROMEOS_NETWORK_DEVICE_STATE_H_ |
OLD | NEW |