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