Christopher Wiley | 9e1eda9 | 2015-11-16 15:23:37 -0800 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2015 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
| 16 | |
| 17 | #ifndef UPDATE_ENGINE_BINDER_SERVICE_H_ |
| 18 | #define UPDATE_ENGINE_BINDER_SERVICE_H_ |
| 19 | |
| 20 | #include <vector> |
| 21 | |
| 22 | #include <utils/Errors.h> |
| 23 | #include <utils/String16.h> |
| 24 | #include <utils/StrongPointer.h> |
| 25 | |
| 26 | #include "android/os/BnUpdateEngine.h" |
Tao Bao | e78e3fb | 2016-01-04 17:57:53 -0800 | [diff] [blame^] | 27 | #include "android/os/IUpdateEngineCallback.h" |
Christopher Wiley | 9e1eda9 | 2015-11-16 15:23:37 -0800 | [diff] [blame] | 28 | |
| 29 | namespace chromeos_update_engine { |
| 30 | |
| 31 | class BinderService : public android::os::BnUpdateEngine { |
| 32 | public: |
| 33 | BinderService() = default; |
| 34 | virtual ~BinderService() = default; |
| 35 | |
Christopher Wiley | 09af881 | 2015-11-19 08:12:33 -0800 | [diff] [blame] | 36 | android::binder::Status applyPayload( |
Christopher Wiley | 9e1eda9 | 2015-11-16 15:23:37 -0800 | [diff] [blame] | 37 | const android::String16& url, |
Tao Bao | e78e3fb | 2016-01-04 17:57:53 -0800 | [diff] [blame^] | 38 | const std::vector<android::String16>& header_kv_pairs) override; |
| 39 | |
| 40 | android::binder::Status bind( |
| 41 | const android::sp<android::os::IUpdateEngineCallback>& callback, |
| 42 | bool* return_value) override; |
Christopher Wiley | 9e1eda9 | 2015-11-16 15:23:37 -0800 | [diff] [blame] | 43 | |
Christopher Wiley | 09af881 | 2015-11-19 08:12:33 -0800 | [diff] [blame] | 44 | android::binder::Status suspend() override; |
Christopher Wiley | 9e1eda9 | 2015-11-16 15:23:37 -0800 | [diff] [blame] | 45 | |
Christopher Wiley | 09af881 | 2015-11-19 08:12:33 -0800 | [diff] [blame] | 46 | android::binder::Status resume() override; |
Christopher Wiley | 9e1eda9 | 2015-11-16 15:23:37 -0800 | [diff] [blame] | 47 | |
Christopher Wiley | 09af881 | 2015-11-19 08:12:33 -0800 | [diff] [blame] | 48 | android::binder::Status cancel() override; |
Christopher Wiley | 9e1eda9 | 2015-11-16 15:23:37 -0800 | [diff] [blame] | 49 | }; // class BinderService |
| 50 | |
| 51 | } // namespace chromeos_update_engine |
| 52 | |
| 53 | #endif // UPDATE_ENGINE_BINDER_SERVICE_H_ |