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 "base/values.h" | 8 #include "base/values.h" |
9 #include "chromeos/network/managed_state.h" | 9 #include "chromeos/network/managed_state.h" |
10 #include "chromeos/network/network_util.h" | 10 #include "chromeos/network/network_util.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 const std::string& sim_lock_type() const { return sim_lock_type_; } | 39 const std::string& sim_lock_type() const { return sim_lock_type_; } |
40 uint32 sim_retries_left() const { return sim_retries_left_; } | 40 uint32 sim_retries_left() const { return sim_retries_left_; } |
41 bool sim_lock_enabled() const { return sim_lock_enabled_; } | 41 bool sim_lock_enabled() const { return sim_lock_enabled_; } |
42 const std::string& meid() const { return meid_; } | 42 const std::string& meid() const { return meid_; } |
43 const std::string& imei() const { return imei_; } | 43 const std::string& imei() const { return imei_; } |
44 const std::string& iccid() const { return iccid_; } | 44 const std::string& iccid() const { return iccid_; } |
45 const std::string& mdn() const { return mdn_; } | 45 const std::string& mdn() const { return mdn_; } |
46 const CellularScanResults& scan_results() const { return scan_results_; } | 46 const CellularScanResults& scan_results() const { return scan_results_; } |
47 const DictionaryValue& properties() const { return properties_; } | 47 const DictionaryValue& properties() const { return properties_; } |
48 | 48 |
| 49 // Ethernet specific accessors |
| 50 bool eap_authentication_completed() const { |
| 51 return eap_authentication_completed_; |
| 52 } |
| 53 |
49 // Returns true if the technology family is GSM and sim_present_ is false. | 54 // Returns true if the technology family is GSM and sim_present_ is false. |
50 bool IsSimAbsent() const; | 55 bool IsSimAbsent() const; |
51 | 56 |
52 private: | 57 private: |
53 // Common Device Properties | 58 // Common Device Properties |
54 std::string mac_address_; | 59 std::string mac_address_; |
55 // Cellular specific propeties | 60 |
| 61 // Cellular specific properties |
56 std::string home_provider_id_; | 62 std::string home_provider_id_; |
57 bool provider_requires_roaming_; | 63 bool provider_requires_roaming_; |
58 bool support_network_scan_; | 64 bool support_network_scan_; |
59 bool scanning_; | 65 bool scanning_; |
60 std::string technology_family_; | 66 std::string technology_family_; |
61 std::string carrier_; | 67 std::string carrier_; |
62 std::string sim_lock_type_; | 68 std::string sim_lock_type_; |
63 uint32 sim_retries_left_; | 69 uint32 sim_retries_left_; |
64 bool sim_lock_enabled_; | 70 bool sim_lock_enabled_; |
65 bool sim_present_; | 71 bool sim_present_; |
66 std::string meid_; | 72 std::string meid_; |
67 std::string imei_; | 73 std::string imei_; |
68 std::string iccid_; | 74 std::string iccid_; |
69 std::string mdn_; | 75 std::string mdn_; |
70 CellularScanResults scan_results_; | 76 CellularScanResults scan_results_; |
| 77 |
| 78 // Ethernet specific properties |
| 79 bool eap_authentication_completed_; |
| 80 |
71 // Keep all Device properties in a dictionary. Devices are limited and should | 81 // Keep all Device properties in a dictionary. Devices are limited and should |
72 // change rarely if ever, so the overhead for this is small. | 82 // change rarely if ever, so the overhead for this is small. |
73 DictionaryValue properties_; | 83 DictionaryValue properties_; |
74 | 84 |
75 DISALLOW_COPY_AND_ASSIGN(DeviceState); | 85 DISALLOW_COPY_AND_ASSIGN(DeviceState); |
76 }; | 86 }; |
77 | 87 |
78 } // namespace chromeos | 88 } // namespace chromeos |
79 | 89 |
80 #endif // CHROMEOS_NETWORK_DEVICE_STATE_H_ | 90 #endif // CHROMEOS_NETWORK_DEVICE_STATE_H_ |
OLD | NEW |