blob: 144836a0f996c81bef3f066984f63995b1d106a9 [file] [log] [blame]
Casey Dahlina93cd532016-01-14 16:55:11 -08001//
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
19using android::String16;
20using android::binder::Status;
21using android::os::IUpdateEngineCallback;
22using android::sp;
23using std::vector;
24
25namespace chromeos_update_engine {
26
Alex Deymofa78f142016-01-26 21:36:16 -080027BinderUpdateEngineAndroidService::BinderUpdateEngineAndroidService(
28 DaemonStateAndroid* /* daemon_state */) {
29 // TODO(deymo): Hook this interface calls to the daemon_state.
30}
31
32void 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 Deymoe97b39c2016-01-20 13:22:17 -080041Status BinderUpdateEngineAndroidService::bind(
42 const sp<IUpdateEngineCallback>& callback,
43 bool* return_value) {
Casey Dahlina93cd532016-01-14 16:55:11 -080044 *return_value = true;
45 return Status::ok();
46}
47
Alex Deymoe97b39c2016-01-20 13:22:17 -080048Status BinderUpdateEngineAndroidService::applyPayload(
49 const String16& url,
50 const vector<String16>& header_kv_pairs) {
Casey Dahlina93cd532016-01-14 16:55:11 -080051 return Status::ok();
52}
53
Alex Deymoe97b39c2016-01-20 13:22:17 -080054Status BinderUpdateEngineAndroidService::suspend() {
Casey Dahlina93cd532016-01-14 16:55:11 -080055 return Status::ok();
56}
57
Alex Deymoe97b39c2016-01-20 13:22:17 -080058Status BinderUpdateEngineAndroidService::resume() {
Casey Dahlina93cd532016-01-14 16:55:11 -080059 return Status::ok();
60}
61
Alex Deymoe97b39c2016-01-20 13:22:17 -080062Status BinderUpdateEngineAndroidService::cancel() {
Casey Dahlina93cd532016-01-14 16:55:11 -080063 return Status::ok();
64}
65
66} // namespace chromeos_update_engine