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

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

Issue 17091006: Add additional cellular-related properties to Network|DeviceState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nl cleanup Created 7 years, 6 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
« no previous file with comments | « no previous file | chromeos/network/device_state.cc » ('j') | chromeos/network/network_state.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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 "chromeos/network/managed_state.h" 8 #include "chromeos/network/managed_state.h"
9 9
10 namespace chromeos { 10 namespace chromeos {
11 11
12 // Simple class to provide device state information. Similar to NetworkState; 12 // Simple class to provide device state information. Similar to NetworkState;
13 // see network_state.h for usage guidelines. 13 // see network_state.h for usage guidelines.
14 class CHROMEOS_EXPORT DeviceState : public ManagedState { 14 class CHROMEOS_EXPORT DeviceState : public ManagedState {
15 public: 15 public:
16 explicit DeviceState(const std::string& path); 16 explicit DeviceState(const std::string& path);
17 virtual ~DeviceState(); 17 virtual ~DeviceState();
18 18
19 // ManagedState overrides 19 // ManagedState overrides
20 virtual bool PropertyChanged(const std::string& key, 20 virtual bool PropertyChanged(const std::string& key,
21 const base::Value& value) OVERRIDE; 21 const base::Value& value) OVERRIDE;
22 22
23 // Accessors 23 // Accessors
24 const std::string& mac_address() const { return mac_address_; } 24 const std::string& mac_address() const { return mac_address_; }
stevenjb 2013/06/21 01:15:11 nit: We should add a 'Cellular specific accessors'
gauravsh 2013/06/21 01:51:09 Done. (though - seems redundant, no?)
25 bool provider_requires_roaming() const { return provider_requires_roaming_; } 25 bool provider_requires_roaming() const { return provider_requires_roaming_; }
26 bool support_network_scan() const { return support_network_scan_; } 26 bool support_network_scan() const { return support_network_scan_; }
27 bool scanning() const { return scanning_; } 27 bool scanning() const { return scanning_; }
28 std::string sim_lock_type() const { return sim_lock_type_; } 28 const std::string& sim_lock_type() const { return sim_lock_type_; }
29 const std::string& meid() const { return meid_; }
30 const std::string& imei() const { return imei_; }
31 const std::string& iccid() const { return iccid_; }
32 const std::string& mdn() const { return mdn_; }
29 33
30 // Returns true if the technology family is GSM and sim_present_ is false. 34 // Returns true if the technology family is GSM and sim_present_ is false.
31 bool IsSimAbsent() const; 35 bool IsSimAbsent() const;
32 36
33 private: 37 private:
34 // Common Device Properties 38 // Common Device Properties
35 std::string mac_address_; 39 std::string mac_address_;
36 // Cellular specific propeties 40 // Cellular specific propeties
37 std::string home_provider_id_; 41 std::string home_provider_id_;
38 bool provider_requires_roaming_; 42 bool provider_requires_roaming_;
39 bool support_network_scan_; 43 bool support_network_scan_;
40 bool scanning_; 44 bool scanning_;
41 std::string technology_family_; 45 std::string technology_family_;
42 std::string sim_lock_type_; 46 std::string sim_lock_type_;
47 std::string meid_;
48 std::string imei_;
49 std::string iccid_;
50 std::string mdn_;
43 bool sim_present_; 51 bool sim_present_;
44 52
45 DISALLOW_COPY_AND_ASSIGN(DeviceState); 53 DISALLOW_COPY_AND_ASSIGN(DeviceState);
46 }; 54 };
47 55
48 } // namespace chromeos 56 } // namespace chromeos
49 57
50 #endif // CHROMEOS_NETWORK_DEVICE_STATE_H_ 58 #endif // CHROMEOS_NETWORK_DEVICE_STATE_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/network/device_state.cc » ('j') | chromeos/network/network_state.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698