blob: 98943a2c527740eba3d5c7a1c033b8889955b1a4 [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,
Alex Deymo95b8f242016-01-28 16:06:57 -080050 int64_t payload_offset,
51 int64_t payload_size,
Alex Deymoe97b39c2016-01-20 13:22:17 -080052 const vector<String16>& header_kv_pairs) {
Casey Dahlina93cd532016-01-14 16:55:11 -080053 return Status::ok();
54}
55
Alex Deymoe97b39c2016-01-20 13:22:17 -080056Status BinderUpdateEngineAndroidService::suspend() {
Casey Dahlina93cd532016-01-14 16:55:11 -080057 return Status::ok();
58}
59
Alex Deymoe97b39c2016-01-20 13:22:17 -080060Status BinderUpdateEngineAndroidService::resume() {
Casey Dahlina93cd532016-01-14 16:55:11 -080061 return Status::ok();
62}
63
Alex Deymoe97b39c2016-01-20 13:22:17 -080064Status BinderUpdateEngineAndroidService::cancel() {
Casey Dahlina93cd532016-01-14 16:55:11 -080065 return Status::ok();
66}
67
68} // namespace chromeos_update_engine