| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // The result code used for RequestUpdateCheck(). | 56 // The result code used for RequestUpdateCheck(). |
| 57 enum UpdateCheckResult { | 57 enum UpdateCheckResult { |
| 58 UPDATE_RESULT_SUCCESS, | 58 UPDATE_RESULT_SUCCESS, |
| 59 UPDATE_RESULT_FAILED, | 59 UPDATE_RESULT_FAILED, |
| 60 UPDATE_RESULT_NOTIMPLEMENTED, | 60 UPDATE_RESULT_NOTIMPLEMENTED, |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 // Interface for observing changes from the update engine. | 63 // Interface for observing changes from the update engine. |
| 64 class Observer { | 64 class Observer { |
| 65 public: | 65 public: |
| 66 virtual ~Observer() {} |
| 67 |
| 66 // Called when the status is updated. | 68 // Called when the status is updated. |
| 67 virtual void UpdateStatusChanged(const Status& status) {} | 69 virtual void UpdateStatusChanged(const Status& status) {} |
| 68 }; | 70 }; |
| 69 | 71 |
| 70 virtual ~UpdateEngineClient(); | 72 virtual ~UpdateEngineClient(); |
| 71 | 73 |
| 72 // Adds and removes the observer. | 74 // Adds and removes the observer. |
| 73 virtual void AddObserver(Observer* observer) = 0; | 75 virtual void AddObserver(Observer* observer) = 0; |
| 74 virtual void RemoveObserver(Observer* observer) = 0; | 76 virtual void RemoveObserver(Observer* observer) = 0; |
| 75 // Returns true if this object has the given observer. | 77 // Returns true if this object has the given observer. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // Create() should be used instead. | 144 // Create() should be used instead. |
| 143 UpdateEngineClient(); | 145 UpdateEngineClient(); |
| 144 | 146 |
| 145 private: | 147 private: |
| 146 DISALLOW_COPY_AND_ASSIGN(UpdateEngineClient); | 148 DISALLOW_COPY_AND_ASSIGN(UpdateEngineClient); |
| 147 }; | 149 }; |
| 148 | 150 |
| 149 } // namespace chromeos | 151 } // namespace chromeos |
| 150 | 152 |
| 151 #endif // CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_ | 153 #endif // CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_ |
| OLD | NEW |