interface AsyncLoginsStorage : AutoCloseable (source)
An interface equivalent to the LoginsStorage interface, but where operations are asynchronous.
abstract fun add(login: ServerPassword): Deferred<String>
Inserts the provided login into the database, returning it's id. |
|
abstract fun delete(id: String): Deferred<Boolean>
Deletes the password with the given ID. |
|
abstract fun get(id: String): Deferred<ServerPassword?>
Fetches a password from the underlying storage layer by ID. |
|
abstract fun isLocked(): Boolean
Returns |
|
abstract fun list(): Deferred<List<ServerPassword>>
Fetches the full list of passwords from the underlying storage layer. |
|
abstract fun lock(): Deferred<Unit>
Locks the logins storage. |
|
abstract fun reset(): Deferred<Unit>
Deletes all locally stored login sync metadata. |
|
abstract fun sync(syncInfo: SyncUnlockInfo): Deferred<Unit>
Synchronizes the logins storage layer with a remote layer. |
|
abstract fun touch(id: String): Deferred<Unit>
Marks the login with the given ID as |
|
abstract fun unlock(encryptionKey: String): Deferred<Unit>
Unlocks the logins storage using the provided key. |
|
abstract fun update(login: ServerPassword): Deferred<Unit>
Updates the fields in the provided record. |
|
abstract fun wipe(): Deferred<Unit>
Deletes all locally stored login data. It is unlikely you need to use this. |
open class AsyncLoginsStorageAdapter<T : LoginsStorage> : AsyncLoginsStorage, AutoCloseable
A helper class to wrap a synchronous LoginsStorage implementation and make it asynchronous. |