1 /* 2 * Copyright (C) 2014 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.content.pm; 18 19 import android.content.pm.Checksum; 20 import android.content.pm.DataLoaderParamsParcel; 21 import android.content.pm.IOnChecksumsReadyListener; 22 import android.content.pm.IPackageInstallObserver2; 23 import android.content.IntentSender; 24 import android.os.ParcelFileDescriptor; 25 26 /** {@hide} */ 27 interface IPackageInstallerSession { setClientProgress(float progress)28 void setClientProgress(float progress); addClientProgress(float progress)29 void addClientProgress(float progress); 30 getNames()31 String[] getNames(); 32 openWrite(String name, long offsetBytes, long lengthBytes)33 ParcelFileDescriptor openWrite(String name, long offsetBytes, long lengthBytes); openRead(String name)34 ParcelFileDescriptor openRead(String name); 35 write(String name, long offsetBytes, long lengthBytes, in ParcelFileDescriptor fd)36 void write(String name, long offsetBytes, long lengthBytes, in ParcelFileDescriptor fd); stageViaHardLink(String target)37 void stageViaHardLink(String target); 38 setChecksums(String name, in Checksum[] checksums, in byte[] signature)39 void setChecksums(String name, in Checksum[] checksums, in byte[] signature); requestChecksums(in String name, int optional, int required, in List trustedInstallers, in IOnChecksumsReadyListener onChecksumsReadyListener)40 void requestChecksums(in String name, int optional, int required, in List trustedInstallers, in IOnChecksumsReadyListener onChecksumsReadyListener); 41 removeSplit(String splitName)42 void removeSplit(String splitName); 43 close()44 void close(); commit(in IntentSender statusReceiver, boolean forTransferred)45 void commit(in IntentSender statusReceiver, boolean forTransferred); transfer(in String packageName)46 void transfer(in String packageName); abandon()47 void abandon(); 48 getDataLoaderParams()49 DataLoaderParamsParcel getDataLoaderParams(); addFile(int location, String name, long lengthBytes, in byte[] metadata, in byte[] signature)50 void addFile(int location, String name, long lengthBytes, in byte[] metadata, in byte[] signature); removeFile(int location, String name)51 void removeFile(int location, String name); 52 isMultiPackage()53 boolean isMultiPackage(); getChildSessionIds()54 int[] getChildSessionIds(); addChildSessionId(in int sessionId)55 void addChildSessionId(in int sessionId); removeChildSessionId(in int sessionId)56 void removeChildSessionId(in int sessionId); getParentSessionId()57 int getParentSessionId(); 58 isStaged()59 boolean isStaged(); getInstallFlags()60 int getInstallFlags(); 61 } 62