framework: asec: Rename 'Cache' -> 'Container'
Signed-off-by: San Mehat <san@google.com>
This commit is contained in:
@@ -70,38 +70,38 @@ interface IMountService
|
||||
String getVolumeState(String mountPoint);
|
||||
|
||||
/*
|
||||
* Creates a secure cache with the specified parameters.
|
||||
* On success, the filesystem cache-path is returned.
|
||||
* Creates a secure container with the specified parameters.
|
||||
* On success, the filesystem container-path is returned.
|
||||
*/
|
||||
String createSecureCache(String id, int sizeMb, String fstype, String key, int ownerUid);
|
||||
String createSecureContainer(String id, int sizeMb, String fstype, String key, int ownerUid);
|
||||
|
||||
/*
|
||||
* Finalize a cache which has just been created and populated.
|
||||
* After finalization, the cache is immutable.
|
||||
* Finalize a container which has just been created and populated.
|
||||
* After finalization, the container is immutable.
|
||||
*/
|
||||
void finalizeSecureCache(String id);
|
||||
void finalizeSecureContainer(String id);
|
||||
|
||||
/*
|
||||
* Destroy a secure cache, and free up all resources associated with it.
|
||||
* Destroy a secure container, and free up all resources associated with it.
|
||||
* NOTE: Ensure all references are released prior to deleting.
|
||||
*/
|
||||
void destroySecureCache(String id);
|
||||
void destroySecureContainer(String id);
|
||||
|
||||
/*
|
||||
* Mount a secure cache with the specified key and owner UID.
|
||||
* On success, the filesystem cache-path is returned.
|
||||
* Mount a secure container with the specified key and owner UID.
|
||||
* On success, the filesystem container-path is returned.
|
||||
*/
|
||||
String mountSecureCache(String id, String key, int ownerUid);
|
||||
String mountSecureContainer(String id, String key, int ownerUid);
|
||||
|
||||
/*
|
||||
* Returns the filesystem path of a mounted secure cache.
|
||||
* Returns the filesystem path of a mounted secure container.
|
||||
*/
|
||||
String getSecureCachePath(String id);
|
||||
String getSecureContainerPath(String id);
|
||||
|
||||
/**
|
||||
* Gets an Array of currently known secure cache IDs
|
||||
* Gets an Array of currently known secure container IDs
|
||||
*/
|
||||
String[] getSecureCacheList();
|
||||
String[] getSecureContainerList();
|
||||
|
||||
/**
|
||||
* Shuts down the MountService and gracefully unmounts
|
||||
|
||||
@@ -105,33 +105,33 @@ static int asec_create(const char *id, int sizeMb, const char *fstype,
|
||||
String16 sFstype(fstype);
|
||||
String16 sKey(key);
|
||||
|
||||
String16 r = gMountService->createSecureCache(sId, sizeMb, sFstype,
|
||||
sKey, ownerUid);
|
||||
String16 r = gMountService->createSecureContainer(sId, sizeMb, sFstype,
|
||||
sKey, ownerUid);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int asec_finalize(const char *id) {
|
||||
String16 sId(id);
|
||||
gMountService->finalizeSecureCache(sId);
|
||||
gMountService->finalizeSecureContainer(sId);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int asec_destroy(const char *id) {
|
||||
String16 sId(id);
|
||||
gMountService->destroySecureCache(sId);
|
||||
gMountService->destroySecureContainer(sId);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int asec_mount(const char *id, const char *key, int ownerUid) {
|
||||
String16 sId(id);
|
||||
String16 sKey(key);
|
||||
gMountService->mountSecureCache(sId, sKey, ownerUid);
|
||||
gMountService->mountSecureContainer(sId, sKey, ownerUid);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int asec_path(const char *id) {
|
||||
String16 sId(id);
|
||||
gMountService->getSecureCachePath(sId);
|
||||
gMountService->getSecureContainerPath(sId);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -888,28 +888,28 @@ class MountService extends IMountService.Stub {
|
||||
}
|
||||
}
|
||||
|
||||
public String[] getSecureCacheList() throws IllegalStateException {
|
||||
public String[] getSecureContainerList() throws IllegalStateException {
|
||||
return mListener.listAsec();
|
||||
}
|
||||
|
||||
public String createSecureCache(String id, int sizeMb, String fstype,
|
||||
public String createSecureContainer(String id, int sizeMb, String fstype,
|
||||
String key, int ownerUid) throws IllegalStateException {
|
||||
return mListener.createAsec(id, sizeMb, fstype, key, ownerUid);
|
||||
}
|
||||
|
||||
public void finalizeSecureCache(String id) throws IllegalStateException {
|
||||
public void finalizeSecureContainer(String id) throws IllegalStateException {
|
||||
mListener.finalizeAsec(id);
|
||||
}
|
||||
|
||||
public void destroySecureCache(String id) throws IllegalStateException {
|
||||
public void destroySecureContainer(String id) throws IllegalStateException {
|
||||
mListener.destroyAsec(id);
|
||||
}
|
||||
|
||||
public String mountSecureCache(String id, String key, int ownerUid) throws IllegalStateException {
|
||||
public String mountSecureContainer(String id, String key, int ownerUid) throws IllegalStateException {
|
||||
return mListener.mountAsec(id, key, ownerUid);
|
||||
}
|
||||
|
||||
public String getSecureCachePath(String id) throws IllegalStateException {
|
||||
public String getSecureContainerPath(String id) throws IllegalStateException {
|
||||
return mListener.getAsecPath(id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user