Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: chromeos/network/network_state.h

Issue 14566009: Add NetworkConnectionHandler class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback from gauravsh Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 19 matching lines...) Expand all
30 // If you change this method, update GetProperties too. 30 // If you change this method, update GetProperties too.
31 virtual bool PropertyChanged(const std::string& key, 31 virtual bool PropertyChanged(const std::string& key,
32 const base::Value& value) OVERRIDE; 32 const base::Value& value) OVERRIDE;
33 virtual void InitialPropertiesReceived() OVERRIDE; 33 virtual void InitialPropertiesReceived() OVERRIDE;
34 34
35 // Fills |dictionary| with the state properties. All the properties that are 35 // Fills |dictionary| with the state properties. All the properties that are
36 // accepted by PropertyChanged are stored in |dictionary|, no other values are 36 // accepted by PropertyChanged are stored in |dictionary|, no other values are
37 // stored. 37 // stored.
38 void GetProperties(base::DictionaryValue* dictionary) const; 38 void GetProperties(base::DictionaryValue* dictionary) const;
39 39
40 // Similar to GetProperties but only sets properties accepted by
41 // Manager.ConfigureService.
42 void GetConfigProperties(base::DictionaryValue* dictionary) const;
pneubeck (no reviews) 2013/05/13 09:29:36 not used anymore. maybe needed in the future, but
stevenjb 2013/05/13 20:25:52 Done.
43
40 // Accessors 44 // Accessors
41 const std::string& security() const { return security_; } 45 const std::string& security() const { return security_; }
42 const std::string& ip_address() const { return ip_address_; } 46 const std::string& ip_address() const { return ip_address_; }
43 const std::vector<std::string>& dns_servers() const { return dns_servers_; } 47 const std::vector<std::string>& dns_servers() const { return dns_servers_; }
44 const std::string& device_path() const { return device_path_; } 48 const std::string& device_path() const { return device_path_; }
45 const std::string& guid() const { return guid_; } 49 const std::string& guid() const { return guid_; }
46 const std::string& connection_state() const { return connection_state_; } 50 const std::string& connection_state() const { return connection_state_; }
47 const std::string& profile_path() const { return profile_path_; } 51 const std::string& profile_path() const { return profile_path_; }
48 const std::string& error() const { return error_; } 52 const std::string& error() const { return error_; }
49 bool auto_connect() const { return auto_connect_; } 53 bool auto_connect() const { return auto_connect_; }
50 bool favorite() const { return favorite_; } 54 bool favorite() const { return favorite_; }
51 int priority() const { return priority_; } 55 int priority() const { return priority_; }
52 // Wireless property accessors 56 // Wireless property accessors
53 int signal_strength() const { return signal_strength_; } 57 int signal_strength() const { return signal_strength_; }
58 bool connectable() const { return connectable_; }
59 // Wifi property accessors
60 bool passphrase_required() const { return passphrase_required_; }
54 // Cellular property accessors 61 // Cellular property accessors
55 const std::string& technology() const { return technology_; } 62 const std::string& technology() const { return technology_; }
56 const std::string& activation_state() const { return activation_state_; } 63 const std::string& activation_state() const { return activation_state_; }
57 const std::string& roaming() const { return roaming_; } 64 const std::string& roaming() const { return roaming_; }
58 bool activate_over_non_cellular_networks() const { 65 bool activate_over_non_cellular_networks() const {
59 return activate_over_non_cellular_networks_; 66 return activate_over_non_cellular_networks_;
60 } 67 }
61 bool cellular_out_of_credits() const { return cellular_out_of_credits_; } 68 bool cellular_out_of_credits() const { return cellular_out_of_credits_; }
62 69
63 bool IsConnectedState() const; 70 bool IsConnectedState() const;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 bool auto_connect_; 103 bool auto_connect_;
97 bool favorite_; 104 bool favorite_;
98 int priority_; 105 int priority_;
99 // IPConfig properties. 106 // IPConfig properties.
100 // Note: These do not correspond to actual Shill.Service properties 107 // Note: These do not correspond to actual Shill.Service properties
101 // but are derived from the service's corresponding IPConfig object. 108 // but are derived from the service's corresponding IPConfig object.
102 std::string ip_address_; 109 std::string ip_address_;
103 std::vector<std::string> dns_servers_; 110 std::vector<std::string> dns_servers_;
104 // Wireless properties 111 // Wireless properties
105 int signal_strength_; 112 int signal_strength_;
113 bool connectable_;
106 // Wifi properties 114 // Wifi properties
107 std::string hex_ssid_; 115 std::string hex_ssid_;
108 std::string country_code_; 116 std::string country_code_;
117 bool passphrase_required_;
109 // Cellular properties 118 // Cellular properties
110 std::string technology_; 119 std::string technology_;
111 std::string activation_state_; 120 std::string activation_state_;
112 std::string roaming_; 121 std::string roaming_;
113 bool activate_over_non_cellular_networks_; 122 bool activate_over_non_cellular_networks_;
114 bool cellular_out_of_credits_; 123 bool cellular_out_of_credits_;
115 124
116 DISALLOW_COPY_AND_ASSIGN(NetworkState); 125 DISALLOW_COPY_AND_ASSIGN(NetworkState);
117 }; 126 };
118 127
119 } // namespace chromeos 128 } // namespace chromeos
120 129
121 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_ 130 #endif // CHROMEOS_NETWORK_NETWORK_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698