Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package android.brillo; |
| 18 | |
| 19 | import android.brillo.IUpdateEngineStatusCallback; |
| 20 | import android.brillo.ParcelableUpdateEngineStatus; |
| 21 | |
| 22 | interface IUpdateEngine { |
| 23 | void AttemptUpdate(in String app_version, in String omaha_url, in int flags); |
| 24 | void AttemptRollback(in boolean powerwash); |
| 25 | boolean CanRollback(); |
| 26 | void ResetStatus(); |
| 27 | ParcelableUpdateEngineStatus GetStatus(); |
| 28 | void RebootIfNeeded(); |
| 29 | void SetChannel(in String target_channel, in boolean powewash); |
| 30 | String GetChannel(in boolean get_current_channel); |
Alex Deymo | d63fab3 | 2016-10-06 15:40:49 -0700 | [diff] [blame] | 31 | void SetCohortHint(in String cohort_hint); |
| 32 | String GetCohortHint(); |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 33 | void SetP2PUpdatePermission(in boolean enabled); |
| 34 | boolean GetP2PUpdatePermission(); |
| 35 | void SetUpdateOverCellularPermission(in boolean enabled); |
Weidong Guo | 70063d9 | 2017-04-17 10:08:38 -0700 | [diff] [blame] | 36 | void SetUpdateOverCellularTarget(in String target_version, |
| 37 | in long target_size); |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 38 | boolean GetUpdateOverCellularPermission(); |
| 39 | long GetDurationSinceUpdate(); |
| 40 | String GetPrevVersion(); |
| 41 | String GetRollbackPartition(); |
| 42 | void RegisterStatusCallback(in IUpdateEngineStatusCallback callback); |
Shuqian Zhao | 2997173 | 2016-02-05 11:29:32 -0800 | [diff] [blame] | 43 | int GetLastAttemptError(); |
Alex Deymo | b3fa53b | 2016-04-18 19:57:58 -0700 | [diff] [blame] | 44 | int GetEolStatus(); |
Casey Dahlin | a93cd53 | 2016-01-14 16:55:11 -0800 | [diff] [blame] | 45 | } |