| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 UPDATE_RESULT_NOTIMPLEMENTED, | 66 UPDATE_RESULT_NOTIMPLEMENTED, |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 // Interface for observing changes from the update engine. | 69 // Interface for observing changes from the update engine. |
| 70 class Observer { | 70 class Observer { |
| 71 public: | 71 public: |
| 72 virtual ~Observer() {} | 72 virtual ~Observer() {} |
| 73 | 73 |
| 74 // Called when the status is updated. | 74 // Called when the status is updated. |
| 75 virtual void UpdateStatusChanged(const Status& status) {} | 75 virtual void UpdateStatusChanged(const Status& status) {} |
| 76 |
| 77 // Called when the update over cellular target is set. |
| 78 virtual void OnUpdateOverCellularTargetSet(bool success) {} |
| 76 }; | 79 }; |
| 77 | 80 |
| 78 ~UpdateEngineClient() override; | 81 ~UpdateEngineClient() override; |
| 79 | 82 |
| 80 // Adds and removes the observer. | 83 // Adds and removes the observer. |
| 81 virtual void AddObserver(Observer* observer) = 0; | 84 virtual void AddObserver(Observer* observer) = 0; |
| 82 virtual void RemoveObserver(Observer* observer) = 0; | 85 virtual void RemoveObserver(Observer* observer) = 0; |
| 83 // Returns true if this object has the given observer. | 86 // Returns true if this object has the given observer. |
| 84 virtual bool HasObserver(const Observer* observer) const = 0; | 87 virtual bool HasObserver(const Observer* observer) const = 0; |
| 85 | 88 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // Create() should be used instead. | 188 // Create() should be used instead. |
| 186 UpdateEngineClient(); | 189 UpdateEngineClient(); |
| 187 | 190 |
| 188 private: | 191 private: |
| 189 DISALLOW_COPY_AND_ASSIGN(UpdateEngineClient); | 192 DISALLOW_COPY_AND_ASSIGN(UpdateEngineClient); |
| 190 }; | 193 }; |
| 191 | 194 |
| 192 } // namespace chromeos | 195 } // namespace chromeos |
| 193 | 196 |
| 194 #endif // CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_ | 197 #endif // CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_ |
| OLD | NEW |