mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 03:06:14 +00:00
Apply the GetUrlResolver pattern using unauthenticated matrix clients where possible
This commit is contained in:
committed by
Jorge Martin Espinosa
parent
25eca29cd2
commit
90d4fbe0bd
+9
-2
@@ -7,12 +7,19 @@
|
||||
|
||||
package io.element.android.libraries.matrix.api.scanner
|
||||
|
||||
import io.element.android.libraries.matrix.api.GetUrlResolver
|
||||
import io.element.android.libraries.matrix.api.core.SessionId
|
||||
|
||||
/**
|
||||
* Provides the URL of the content scanner service for a given homeserver, if any is set up.
|
||||
*/
|
||||
fun interface ContentScannerUrlProvider {
|
||||
/**
|
||||
* Returns the URL of the content scanner service for the given [homeserver], or `null` if no content scanner is set up.
|
||||
* Returns the URL of the content scanner service for the given [sessionId], or `null` if no content scanner is set up.
|
||||
*/
|
||||
suspend fun getContentScannerUrl(homeserver: String): Result<String?>
|
||||
suspend fun getContentScannerUrl(sessionId: SessionId): Result<String?>
|
||||
|
||||
fun interface Factory {
|
||||
fun create(getUrlResolver: GetUrlResolver): ContentScannerUrlProvider
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user