blob: 56e15246dc10b2b8bdcedbad8ce9739cd20e175d [file] [log] [blame]
Casey Dahlina93cd532016-01-14 16:55:11 -08001/*
2 * Copyright (C) 2016 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
17package android.brillo;
18
19import android.brillo.IUpdateEngineStatusCallback;
20import android.brillo.ParcelableUpdateEngineStatus;
21
22interface IUpdateEngine {
Aaron Woodbf5a2522017-10-04 10:58:36 -070023 void SetUpdateAttemptFlags(in int flags);
Aaron Wood081c0232017-10-19 17:14:58 -070024 boolean AttemptUpdate(in String app_version, in String omaha_url, in int flags);
Casey Dahlina93cd532016-01-14 16:55:11 -080025 void AttemptRollback(in boolean powerwash);
26 boolean CanRollback();
27 void ResetStatus();
28 ParcelableUpdateEngineStatus GetStatus();
29 void RebootIfNeeded();
30 void SetChannel(in String target_channel, in boolean powewash);
31 String GetChannel(in boolean get_current_channel);
Alex Deymo5b5fa8b2016-10-06 15:40:49 -070032 void SetCohortHint(in String cohort_hint);
33 String GetCohortHint();
Casey Dahlina93cd532016-01-14 16:55:11 -080034 void SetP2PUpdatePermission(in boolean enabled);
35 boolean GetP2PUpdatePermission();
36 void SetUpdateOverCellularPermission(in boolean enabled);
Weidong Guo421ff332017-04-17 10:08:38 -070037 void SetUpdateOverCellularTarget(in String target_version,
38 in long target_size);
Casey Dahlina93cd532016-01-14 16:55:11 -080039 boolean GetUpdateOverCellularPermission();
40 long GetDurationSinceUpdate();
41 String GetPrevVersion();
42 String GetRollbackPartition();
43 void RegisterStatusCallback(in IUpdateEngineStatusCallback callback);
Shuqian Zhao29971732016-02-05 11:29:32 -080044 int GetLastAttemptError();
Alex Deymob3fa53b2016-04-18 19:57:58 -070045 int GetEolStatus();
Casey Dahlina93cd532016-01-14 16:55:11 -080046}