Home | History | Annotate | Download | only in backup
      1 /*
      2  * Copyright 2013, 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 com.android.internal.backup;
     18 
     19 import android.app.backup.IBackupManager;
     20 import android.os.ParcelFileDescriptor;
     21 
     22 /**
     23  * Interface for the Backup Manager Service to communicate with a helper service that
     24  * handles local (whole-file) backup & restore of OBB content on behalf of applications.
     25  * This can't be done within the Backup Manager Service itself because of the restrictions
     26  * on system-user access to external storage, and can't be left to the apps because even
     27  * apps that do not have permission to access external storage in the usual way can still
     28  * use OBBs.
     29  *
     30  * {@hide}
     31  */
     32 oneway interface IObbBackupService {
     33     /*
     34      * Back up a package's OBB directory tree
     35      */
     36     void backupObbs(in String packageName, in ParcelFileDescriptor data,
     37             int token, in IBackupManager callbackBinder);
     38 
     39     /*
     40      * Restore an OBB file for the given package from the incoming stream
     41      */
     42     void restoreObbFile(in String pkgName, in ParcelFileDescriptor data,
     43             long fileSize, int type, in String path, long mode, long mtime,
     44             int token, in IBackupManager callbackBinder);
     45 }
     46