14a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate/* 24a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * Copyright (C) 2011 The Android Open Source Project 34a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * 44a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * Licensed under the Apache License, Version 2.0 (the "License"); 54a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * you may not use this file except in compliance with the License. 64a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * You may obtain a copy of the License at 74a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * 84a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * http://www.apache.org/licenses/LICENSE-2.0 94a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * 104a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * Unless required by applicable law or agreed to in writing, software 114a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * distributed under the License is distributed on an "AS IS" BASIS, 124a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 134a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * See the License for the specific language governing permissions and 144a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * limitations under the License. 154a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate */ 164a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate 174a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tatepackage android.app.backup; 184a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate 194a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate/** 204a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * Observer of a full backup or restore process. The observer is told "interesting" 214a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * information about an ongoing full backup or restore action. 224a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * 234a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * {@hide} 244a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate */ 254a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate 264a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tateoneway interface IFullBackupRestoreObserver { 274a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate /** 284a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * Notification: a full backup operation has begun. 294a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate */ 304a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate void onStartBackup(); 314a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate 324a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate /** 334a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * Notification: the system has begun backing up the given package. 344a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * 354a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * @param name The name of the application being saved. This will typically be a 364a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * user-meaningful name such as "Browser" rather than a package name such as 374a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * "com.android.browser", though this is not guaranteed. 384a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate */ 394a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate void onBackupPackage(String name); 404a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate 414a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate /** 424a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * Notification: the full backup operation has ended. 434a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate */ 444a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate void onEndBackup(); 454a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate 464a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate /** 474a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * Notification: a restore-from-full-backup operation has begun. 484a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate */ 494a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate void onStartRestore(); 504a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate 514a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate /** 524a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * Notification: the system has begun restore of the given package. 534a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * 544a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * @param name The name of the application being saved. This will typically be a 554a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * user-meaningful name such as "Browser" rather than a package name such as 564a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * "com.android.browser", though this is not guaranteed. 574a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate */ 584a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate void onRestorePackage(String name); 594a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate 604a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate /** 614a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * Notification: the restore-from-full-backup operation has ended. 624a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate */ 634a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate void onEndRestore(); 644a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate 654a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate /** 664a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate * The user's window of opportunity for confirming the operation has timed out. 674a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate */ 684a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate void onTimeout(); 694a627c71ff53a4fca1f961f4b1dcc0461df18a06Christopher Tate} 70