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_NETWORK_STATE_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_H_ |
6 #define CHROMEOS_NETWORK_NETWORK_STATE_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_STATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 // Wifi property accessors | 60 // Wifi property accessors |
61 bool passphrase_required() const { return passphrase_required_; } | 61 bool passphrase_required() const { return passphrase_required_; } |
62 // Cellular property accessors | 62 // Cellular property accessors |
63 const std::string& technology() const { return technology_; } | 63 const std::string& technology() const { return technology_; } |
64 const std::string& activation_state() const { return activation_state_; } | 64 const std::string& activation_state() const { return activation_state_; } |
65 const std::string& roaming() const { return roaming_; } | 65 const std::string& roaming() const { return roaming_; } |
66 bool activate_over_non_cellular_networks() const { | 66 bool activate_over_non_cellular_networks() const { |
67 return activate_over_non_cellular_networks_; | 67 return activate_over_non_cellular_networks_; |
68 } | 68 } |
69 bool cellular_out_of_credits() const { return cellular_out_of_credits_; } | 69 bool cellular_out_of_credits() const { return cellular_out_of_credits_; } |
70 const std::string& usage_url() const { return usage_url_; } | |
71 const std::string& payment_url() const { return payment_url_; } | |
72 const std::string& post_method() const { return post_method_; } | |
73 const std::string& post_data() const { return post_data_; } | |
stevenjb
2013/06/21 01:15:11
Ugh, do we really need instant access to all of th
gauravsh
2013/06/21 01:51:09
In this particular case, yes, it is preferable to
stevenjb
2013/06/21 20:28:53
OK, fair enough.
| |
70 | 74 |
71 bool IsConnectedState() const; | 75 bool IsConnectedState() const; |
72 bool IsConnectingState() const; | 76 bool IsConnectingState() const; |
73 | 77 |
74 // Returns true if |error_| contains an authentication error. | 78 // Returns true if |error_| contains an authentication error. |
75 bool HasAuthenticationError() const; | 79 bool HasAuthenticationError() const; |
76 | 80 |
77 // Helpers (used e.g. when a state is cached) | 81 // Helpers (used e.g. when a state is cached) |
78 static bool StateIsConnected(const std::string& connection_state); | 82 static bool StateIsConnected(const std::string& connection_state); |
79 static bool StateIsConnecting(const std::string& connection_state); | 83 static bool StateIsConnecting(const std::string& connection_state); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 // Wifi properties | 127 // Wifi properties |
124 std::string hex_ssid_; | 128 std::string hex_ssid_; |
125 std::string country_code_; | 129 std::string country_code_; |
126 bool passphrase_required_; | 130 bool passphrase_required_; |
127 // Cellular properties | 131 // Cellular properties |
128 std::string technology_; | 132 std::string technology_; |
129 std::string activation_state_; | 133 std::string activation_state_; |
130 std::string roaming_; | 134 std::string roaming_; |
131 bool activate_over_non_cellular_networks_; | 135 bool activate_over_non_cellular_networks_; |
132 bool cellular_out_of_credits_; | 136 bool cellular_out_of_credits_; |
137 // Cellular payment portal properties. | |
138 std::string usage_url_; | |
139 std::string payment_url_; | |
140 std::string post_method_; | |
141 std::string post_data_; | |
133 | 142 |
134 DISALLOW_COPY_AND_ASSIGN(NetworkState); | 143 DISALLOW_COPY_AND_ASSIGN(NetworkState); |
135 }; | 144 }; |
136 | 145 |
137 } // namespace chromeos | 146 } // namespace chromeos |
138 | 147 |
139 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ | 148 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ |
OLD | NEW |