Add KDoc to the single-interface library and service API modules

Cover the last remaining interfaces across libraries/audio, libraries/cachestore,
libraries/indicator, libraries/slashcommands, libraries/voiceplayer and
services/apperror, with their members and parameters.

This completes the effort: all 222 in-scope interfaces and their 820 members in
the 60 api modules that hold any now carry documentation.

Notable points: CacheStore applies no expiry of its own and only records when each
entry was written, leaving staleness to the caller; SlashCommandService.parse
never throws, returning NotACommand for ordinary text and an error case for a
malformed command.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benoit Marty
2026-08-14 12:04:40 +02:00
parent 9822b3d4f7
commit b74b146917
6 changed files with 78 additions and 1 deletions
@@ -7,9 +7,33 @@
package io.element.android.libraries.cachestore.api
/**
* A generic on-disk key/value cache, where each entry records when it was written so callers can decide for themselves when it is stale.
*/
interface CacheStore {
/**
* Stores an entry, replacing any previous one under the same key.
*
* @param key the entry to write.
* @param data the value along with the time it was obtained.
*/
suspend fun storeData(key: String, data: CacheData)
/**
* Reads an entry without applying any expiry of its own; judging staleness is up to the caller.
*
* @param key the entry to read.
* @return the value and its timestamp, or `null` when nothing is stored under that key.
*/
suspend fun getData(key: String): CacheData?
/**
* Removes one entry.
*
* @param key the entry to delete.
*/
suspend fun deleteData(key: String)
/** Empties the whole cache. */
suspend fun deleteAll()
}