1 /** 2 * Copyright 2019, 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.BlobHandle; 19 import android.app.blob.BlobInfo; 20 import android.app.blob.IBlobStoreSession; 21 import android.app.blob.LeaseInfo; 22 import android.os.RemoteCallback; 23 24 /** {@hide} */ 25 interface IBlobStoreManager { createSession(in BlobHandle handle, in String packageName)26 long createSession(in BlobHandle handle, in String packageName); openSession(long sessionId, in String packageName)27 IBlobStoreSession openSession(long sessionId, in String packageName); openBlob(in BlobHandle handle, in String packageName)28 ParcelFileDescriptor openBlob(in BlobHandle handle, in String packageName); abandonSession(long sessionId, in String packageName)29 void abandonSession(long sessionId, in String packageName); 30 acquireLease(in BlobHandle handle, int descriptionResId, in CharSequence description, long leaseTimeoutMillis, in String packageName)31 void acquireLease(in BlobHandle handle, int descriptionResId, in CharSequence description, 32 long leaseTimeoutMillis, in String packageName); releaseLease(in BlobHandle handle, in String packageName)33 void releaseLease(in BlobHandle handle, in String packageName); releaseAllLeases(in String packageName)34 void releaseAllLeases(in String packageName); getRemainingLeaseQuotaBytes(String packageName)35 long getRemainingLeaseQuotaBytes(String packageName); 36 waitForIdle(in RemoteCallback callback)37 void waitForIdle(in RemoteCallback callback); 38 queryBlobsForUser(int userId)39 List<BlobInfo> queryBlobsForUser(int userId); deleteBlob(long blobId)40 void deleteBlob(long blobId); 41 getLeasedBlobs(in String packageName)42 List<BlobHandle> getLeasedBlobs(in String packageName); getLeaseInfo(in BlobHandle blobHandle, in String packageName)43 LeaseInfo getLeaseInfo(in BlobHandle blobHandle, in String packageName); 44 }