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