OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 // An attempt to add an observer that has already been added for a | 488 // An attempt to add an observer that has already been added for a |
489 // give service path will be ignored. | 489 // give service path will be ignored. |
490 virtual void AddNetworkObserver(const std::string& service_path, | 490 virtual void AddNetworkObserver(const std::string& service_path, |
491 NetworkObserver* observer) = 0; | 491 NetworkObserver* observer) = 0; |
492 // Remove an observer of a single network | 492 // Remove an observer of a single network |
493 virtual void RemoveNetworkObserver(const std::string& service_path, | 493 virtual void RemoveNetworkObserver(const std::string& service_path, |
494 NetworkObserver* observer) = 0; | 494 NetworkObserver* observer) = 0; |
495 // Stop |observer| from observing any networks | 495 // Stop |observer| from observing any networks |
496 virtual void RemoveObserverForAllNetworks(NetworkObserver* observer) = 0; | 496 virtual void RemoveObserverForAllNetworks(NetworkObserver* observer) = 0; |
497 | 497 |
| 498 // Temporarily locks down certain functionality in network library to prevent |
| 499 // unplanned side effects. During the lock down, Enable*Device() calls cannot |
| 500 // be made. |
| 501 virtual void Lock() = 0; |
| 502 // Removes temporarily lock of network library. |
| 503 virtual void Unlock() = 0; |
| 504 // Checks if access to network library is locked. |
| 505 virtual bool IsLocked() = 0; |
| 506 |
498 virtual void AddCellularDataPlanObserver( | 507 virtual void AddCellularDataPlanObserver( |
499 CellularDataPlanObserver* observer) = 0; | 508 CellularDataPlanObserver* observer) = 0; |
500 virtual void RemoveCellularDataPlanObserver( | 509 virtual void RemoveCellularDataPlanObserver( |
501 CellularDataPlanObserver* observer) = 0; | 510 CellularDataPlanObserver* observer) = 0; |
502 | 511 |
503 // Return the active Ethernet network (or a default structure if inactive). | 512 // Return the active Ethernet network (or a default structure if inactive). |
504 virtual const EthernetNetwork* ethernet_network() const = 0; | 513 virtual const EthernetNetwork* ethernet_network() const = 0; |
505 virtual bool ethernet_connecting() const = 0; | 514 virtual bool ethernet_connecting() const = 0; |
506 virtual bool ethernet_connected() const = 0; | 515 virtual bool ethernet_connected() const = 0; |
507 | 516 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 virtual std::string GetHtmlInfo(int refresh) = 0; | 643 virtual std::string GetHtmlInfo(int refresh) = 0; |
635 | 644 |
636 // Factory function, creates a new instance and returns ownership. | 645 // Factory function, creates a new instance and returns ownership. |
637 // For normal usage, access the singleton via CrosLibrary::Get(). | 646 // For normal usage, access the singleton via CrosLibrary::Get(). |
638 static NetworkLibrary* GetImpl(bool stub); | 647 static NetworkLibrary* GetImpl(bool stub); |
639 }; | 648 }; |
640 | 649 |
641 } // namespace chromeos | 650 } // namespace chromeos |
642 | 651 |
643 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 652 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
OLD | NEW |