| Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -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 | #include "update_engine/binder_service_android.h" | 
|  | 18 |  | 
|  | 19 | using android::String16; | 
|  | 20 | using android::binder::Status; | 
|  | 21 | using android::os::IUpdateEngineCallback; | 
|  | 22 | using android::sp; | 
|  | 23 | using std::vector; | 
|  | 24 |  | 
|  | 25 | namespace chromeos_update_engine { | 
|  | 26 |  | 
| Alex Deymo | fa78f14 | 2016-01-26 21:36:16 -0800 | [diff] [blame] | 27 | BinderUpdateEngineAndroidService::BinderUpdateEngineAndroidService( | 
|  | 28 | DaemonStateAndroid* /* daemon_state */) { | 
|  | 29 | // TODO(deymo): Hook this interface calls to the daemon_state. | 
|  | 30 | } | 
|  | 31 |  | 
|  | 32 | void BinderUpdateEngineAndroidService::SendStatusUpdate( | 
|  | 33 | int64_t last_checked_time, | 
|  | 34 | double progress, | 
|  | 35 | update_engine::UpdateStatus status, | 
|  | 36 | const std::string& new_version, | 
|  | 37 | int64_t new_size) { | 
|  | 38 | // TODO(deymo): Notify registered callers. | 
|  | 39 | } | 
|  | 40 |  | 
| Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 41 | Status BinderUpdateEngineAndroidService::bind( | 
|  | 42 | const sp<IUpdateEngineCallback>& callback, | 
|  | 43 | bool* return_value) { | 
| Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 44 | *return_value = true; | 
|  | 45 | return Status::ok(); | 
|  | 46 | } | 
|  | 47 |  | 
| Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 48 | Status BinderUpdateEngineAndroidService::applyPayload( | 
|  | 49 | const String16& url, | 
|  | 50 | const vector<String16>& header_kv_pairs) { | 
| Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 51 | return Status::ok(); | 
|  | 52 | } | 
|  | 53 |  | 
| Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 54 | Status BinderUpdateEngineAndroidService::suspend() { | 
| Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 55 | return Status::ok(); | 
|  | 56 | } | 
|  | 57 |  | 
| Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 58 | Status BinderUpdateEngineAndroidService::resume() { | 
| Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 59 | return Status::ok(); | 
|  | 60 | } | 
|  | 61 |  | 
| Alex Deymo | e97b39c | 2016-01-20 13:22:17 -0800 | [diff] [blame] | 62 | Status BinderUpdateEngineAndroidService::cancel() { | 
| Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 63 | return Status::ok(); | 
|  | 64 | } | 
|  | 65 |  | 
|  | 66 | }  // namespace chromeos_update_engine |