| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 SimLockState sim_lock_state() const { return sim_lock_state_; } | 382 SimLockState sim_lock_state() const { return sim_lock_state_; } |
| 383 bool is_sim_locked() const { | 383 bool is_sim_locked() const { |
| 384 return sim_lock_state_ == SIM_LOCKED_PIN || | 384 return sim_lock_state_ == SIM_LOCKED_PIN || |
| 385 sim_lock_state_ == SIM_LOCKED_PUK; | 385 sim_lock_state_ == SIM_LOCKED_PUK; |
| 386 } | 386 } |
| 387 const int sim_retries_left() const { return sim_retries_left_; } | 387 const int sim_retries_left() const { return sim_retries_left_; } |
| 388 SimPinRequire sim_pin_required() const { return sim_pin_required_; } | 388 SimPinRequire sim_pin_required() const { return sim_pin_required_; } |
| 389 const std::string& firmware_revision() const { return firmware_revision_; } | 389 const std::string& firmware_revision() const { return firmware_revision_; } |
| 390 const std::string& hardware_revision() const { return hardware_revision_; } | 390 const std::string& hardware_revision() const { return hardware_revision_; } |
| 391 const unsigned int prl_version() const { return prl_version_; } | 391 const unsigned int prl_version() const { return prl_version_; } |
| 392 const std::string& home_provider() const { return home_provider_; } | |
| 393 const std::string& home_provider_code() const { return home_provider_code_; } | 392 const std::string& home_provider_code() const { return home_provider_code_; } |
| 394 const std::string& home_provider_country() const { | 393 const std::string& home_provider_country() const { |
| 395 return home_provider_country_; | 394 return home_provider_country_; |
| 396 } | 395 } |
| 397 const std::string& home_provider_id() const { return home_provider_id_; } | 396 const std::string& home_provider_id() const { return home_provider_id_; } |
| 398 const std::string& home_provider_name() const { return home_provider_name_; } | 397 const std::string& home_provider_name() const { return home_provider_name_; } |
| 399 const std::string& selected_cellular_network() const { | 398 const std::string& selected_cellular_network() const { |
| 400 return selected_cellular_network_; | 399 return selected_cellular_network_; |
| 401 } | 400 } |
| 402 const CellularNetworkList& found_cellular_networks() const { | 401 const CellularNetworkList& found_cellular_networks() const { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 void set_meid(const std::string& meid) { meid_ = meid; } | 444 void set_meid(const std::string& meid) { meid_ = meid; } |
| 446 void set_imei(const std::string& imei) { imei_ = imei; } | 445 void set_imei(const std::string& imei) { imei_ = imei; } |
| 447 void set_imsi(const std::string& imsi) { imsi_ = imsi; } | 446 void set_imsi(const std::string& imsi) { imsi_ = imsi; } |
| 448 void set_esn(const std::string& esn) { esn_ = esn; } | 447 void set_esn(const std::string& esn) { esn_ = esn; } |
| 449 void set_mdn(const std::string& mdn) { mdn_ = mdn; } | 448 void set_mdn(const std::string& mdn) { mdn_ = mdn; } |
| 450 void set_min(const std::string& min) { min_ = min; } | 449 void set_min(const std::string& min) { min_ = min; } |
| 451 void set_technology_family(TechnologyFamily technology_family) { | 450 void set_technology_family(TechnologyFamily technology_family) { |
| 452 technology_family_ = technology_family; | 451 technology_family_ = technology_family; |
| 453 } | 452 } |
| 454 void set_carrier(const std::string& carrier) { carrier_ = carrier; } | 453 void set_carrier(const std::string& carrier) { carrier_ = carrier; } |
| 455 void set_home_provider(const std::string& home_provider) { | |
| 456 home_provider_ = home_provider; | |
| 457 } | |
| 458 void set_home_provider_code(const std::string& home_provider_code) { | 454 void set_home_provider_code(const std::string& home_provider_code) { |
| 459 home_provider_code_ = home_provider_code; | 455 home_provider_code_ = home_provider_code; |
| 460 } | 456 } |
| 461 void set_home_provider_country(const std::string& home_provider_country) { | 457 void set_home_provider_country(const std::string& home_provider_country) { |
| 462 home_provider_country_ = home_provider_country; | 458 home_provider_country_ = home_provider_country; |
| 463 } | 459 } |
| 464 void set_home_provider_id(const std::string& home_provider_id) { | 460 void set_home_provider_id(const std::string& home_provider_id) { |
| 465 home_provider_id_ = home_provider_id; | 461 home_provider_id_ = home_provider_id; |
| 466 } | 462 } |
| 467 void set_home_provider_name(const std::string& home_provider_name) { | 463 void set_home_provider_name(const std::string& home_provider_name) { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 | 507 |
| 512 // General device info. | 508 // General device info. |
| 513 std::string device_path_; | 509 std::string device_path_; |
| 514 std::string name_; | 510 std::string name_; |
| 515 std::string unique_id_; | 511 std::string unique_id_; |
| 516 ConnectionType type_; | 512 ConnectionType type_; |
| 517 bool scanning_; | 513 bool scanning_; |
| 518 // Cellular specific device info. | 514 // Cellular specific device info. |
| 519 TechnologyFamily technology_family_; | 515 TechnologyFamily technology_family_; |
| 520 std::string carrier_; | 516 std::string carrier_; |
| 521 std::string home_provider_; | |
| 522 std::string home_provider_code_; | 517 std::string home_provider_code_; |
| 523 std::string home_provider_country_; | 518 std::string home_provider_country_; |
| 524 std::string home_provider_id_; | 519 std::string home_provider_id_; |
| 525 std::string home_provider_name_; | 520 std::string home_provider_name_; |
| 526 std::string meid_; | 521 std::string meid_; |
| 527 std::string imei_; | 522 std::string imei_; |
| 528 std::string imsi_; | 523 std::string imsi_; |
| 529 std::string esn_; | 524 std::string esn_; |
| 530 std::string mdn_; | 525 std::string mdn_; |
| 531 std::string min_; | 526 std::string min_; |
| (...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1502 | 1497 |
| 1503 // Request a scan for available cellular networks. | 1498 // Request a scan for available cellular networks. |
| 1504 virtual void RequestCellularScan() = 0; | 1499 virtual void RequestCellularScan() = 0; |
| 1505 | 1500 |
| 1506 // Request a register in cellular network with |network_id|. | 1501 // Request a register in cellular network with |network_id|. |
| 1507 virtual void RequestCellularRegister(const std::string& network_id) = 0; | 1502 virtual void RequestCellularRegister(const std::string& network_id) = 0; |
| 1508 | 1503 |
| 1509 // Change data roaming restriction for current cellular device. | 1504 // Change data roaming restriction for current cellular device. |
| 1510 virtual void SetCellularDataRoamingAllowed(bool new_value) = 0; | 1505 virtual void SetCellularDataRoamingAllowed(bool new_value) = 0; |
| 1511 | 1506 |
| 1507 // Return true if GSM SIM card can work only with enabled roaming. |
| 1508 virtual bool IsCellularAlwaysInRoaming() = 0; |
| 1509 |
| 1512 // Request a scan for new wifi networks. | 1510 // Request a scan for new wifi networks. |
| 1513 virtual void RequestNetworkScan() = 0; | 1511 virtual void RequestNetworkScan() = 0; |
| 1514 | 1512 |
| 1515 // Reads out the results of the last wifi scan. These results are not | 1513 // Reads out the results of the last wifi scan. These results are not |
| 1516 // pre-cached in the library, so the call may block whilst the results are | 1514 // pre-cached in the library, so the call may block whilst the results are |
| 1517 // read over IPC. | 1515 // read over IPC. |
| 1518 // Returns false if an error occurred in reading the results. Note that | 1516 // Returns false if an error occurred in reading the results. Note that |
| 1519 // a true return code only indicates the result set was successfully read, | 1517 // a true return code only indicates the result set was successfully read, |
| 1520 // it does not imply a scan has successfully completed yet. | 1518 // it does not imply a scan has successfully completed yet. |
| 1521 virtual bool GetWifiAccessPoints(WifiAccessPointVector* result) = 0; | 1519 virtual bool GetWifiAccessPoints(WifiAccessPointVector* result) = 0; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1629 virtual void SwitchToPreferredNetwork() = 0; | 1627 virtual void SwitchToPreferredNetwork() = 0; |
| 1630 | 1628 |
| 1631 // Factory function, creates a new instance and returns ownership. | 1629 // Factory function, creates a new instance and returns ownership. |
| 1632 // For normal usage, access the singleton via CrosLibrary::Get(). | 1630 // For normal usage, access the singleton via CrosLibrary::Get(). |
| 1633 static NetworkLibrary* GetImpl(bool stub); | 1631 static NetworkLibrary* GetImpl(bool stub); |
| 1634 }; | 1632 }; |
| 1635 | 1633 |
| 1636 } // namespace chromeos | 1634 } // namespace chromeos |
| 1637 | 1635 |
| 1638 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 1636 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
| OLD | NEW |