1 /*
2  * Copyright 2020 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 package android.app.blob;
17 
18 import android.app.blob.IBlobCommitCallback;
19 import android.os.ParcelFileDescriptor;
20 
21 /** {@hide} */
22 interface IBlobStoreSession {
openWrite(long offsetBytes, long lengthBytes)23     ParcelFileDescriptor openWrite(long offsetBytes, long lengthBytes);
openRead()24     ParcelFileDescriptor openRead();
25 
allowPackageAccess(in String packageName, in byte[] certificate)26     void allowPackageAccess(in String packageName, in byte[] certificate);
allowSameSignatureAccess()27     void allowSameSignatureAccess();
allowPublicAccess()28     void allowPublicAccess();
29 
isPackageAccessAllowed(in String packageName, in byte[] certificate)30     boolean isPackageAccessAllowed(in String packageName, in byte[] certificate);
isSameSignatureAccessAllowed()31     boolean isSameSignatureAccessAllowed();
isPublicAccessAllowed()32     boolean isPublicAccessAllowed();
33 
getSize()34     long getSize();
close()35     void close();
abandon()36     void abandon();
37 
commit(in IBlobCommitCallback callback)38     void commit(in IBlobCommitCallback callback);
39 }