1a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin/* 2a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin * Copyright (C) 2016 The Android Open Source Project 3a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin * 4a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin * Licensed under the Apache License, Version 2.0 (the "License"); 5a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin * you may not use this file except in compliance with the License. 6a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin * You may obtain a copy of the License at 7a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin * 8a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin * http://www.apache.org/licenses/LICENSE-2.0 9a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin * 10a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin * Unless required by applicable law or agreed to in writing, software 11a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin * distributed under the License is distributed on an "AS IS" BASIS, 12a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin * See the License for the specific language governing permissions and 14a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin * limitations under the License. 15a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin */ 16a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin 17a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlinpackage android.brillo; 18a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin 19a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlinimport android.brillo.IUpdateEngineStatusCallback; 20a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlinimport android.brillo.ParcelableUpdateEngineStatus; 21a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin 22a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlininterface IUpdateEngine { 23a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin void AttemptUpdate(in String app_version, in String omaha_url, in int flags); 24a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin void AttemptRollback(in boolean powerwash); 25a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin boolean CanRollback(); 26a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin void ResetStatus(); 27a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin ParcelableUpdateEngineStatus GetStatus(); 28a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin void RebootIfNeeded(); 29a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin void SetChannel(in String target_channel, in boolean powewash); 30a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin String GetChannel(in boolean get_current_channel); 31a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin void SetP2PUpdatePermission(in boolean enabled); 32a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin boolean GetP2PUpdatePermission(); 33a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin void SetUpdateOverCellularPermission(in boolean enabled); 34a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin boolean GetUpdateOverCellularPermission(); 35a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin long GetDurationSinceUpdate(); 36a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin String GetPrevVersion(); 37a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin String GetRollbackPartition(); 38a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin void RegisterStatusCallback(in IUpdateEngineStatusCallback callback); 392997173235e88c5e4cb13d2844f74afc7b25d6e2Shuqian Zhao int GetLastAttemptError(); 40a93cd53c4f8ab8cb926ed9223373567ebbf45cb6Casey Dahlin} 41