| 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_DBUS_UPDATE_ENGINE_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_ | 6 #define CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // Called when the status is updated. | 68 // Called when the status is updated. |
| 69 virtual void UpdateStatusChanged(const Status& status) {} | 69 virtual void UpdateStatusChanged(const Status& status) {} |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 virtual ~UpdateEngineClient(); | 72 virtual ~UpdateEngineClient(); |
| 73 | 73 |
| 74 // Adds and removes the observer. | 74 // Adds and removes the observer. |
| 75 virtual void AddObserver(Observer* observer) = 0; | 75 virtual void AddObserver(Observer* observer) = 0; |
| 76 virtual void RemoveObserver(Observer* observer) = 0; | 76 virtual void RemoveObserver(Observer* observer) = 0; |
| 77 // Returns true if this object has the given observer. | 77 // Returns true if this object has the given observer. |
| 78 virtual bool HasObserver(Observer* observer) = 0; | 78 virtual bool HasObserver(const Observer* observer) const = 0; |
| 79 | 79 |
| 80 // Called once RequestUpdateCheck() is complete. Takes one parameter: | 80 // Called once RequestUpdateCheck() is complete. Takes one parameter: |
| 81 // - UpdateCheckResult: the result of the update check. | 81 // - UpdateCheckResult: the result of the update check. |
| 82 typedef base::Callback<void(UpdateCheckResult)> UpdateCheckCallback; | 82 typedef base::Callback<void(UpdateCheckResult)> UpdateCheckCallback; |
| 83 | 83 |
| 84 // Requests an update check and calls |callback| when completed. | 84 // Requests an update check and calls |callback| when completed. |
| 85 virtual void RequestUpdateCheck(const UpdateCheckCallback& callback) = 0; | 85 virtual void RequestUpdateCheck(const UpdateCheckCallback& callback) = 0; |
| 86 | 86 |
| 87 // Reboots if update has been performed. | 87 // Reboots if update has been performed. |
| 88 virtual void RebootAfterUpdate() = 0; | 88 virtual void RebootAfterUpdate() = 0; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // Create() should be used instead. | 144 // Create() should be used instead. |
| 145 UpdateEngineClient(); | 145 UpdateEngineClient(); |
| 146 | 146 |
| 147 private: | 147 private: |
| 148 DISALLOW_COPY_AND_ASSIGN(UpdateEngineClient); | 148 DISALLOW_COPY_AND_ASSIGN(UpdateEngineClient); |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 } // namespace chromeos | 151 } // namespace chromeos |
| 152 | 152 |
| 153 #endif // CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_ | 153 #endif // CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_ |
| OLD | NEW |