mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Rename GetUrlResolver to UrlContentFetcher and TemporaryMatrixClientFactory.createTemporaryMatrixClient to just create
This commit is contained in:
committed by
Jorge Martin Espinosa
parent
dbc28df3eb
commit
e371b46c68
+1
-1
@@ -54,7 +54,7 @@ import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import java.util.Optional
|
||||
|
||||
interface MatrixClient : GetUrlResolver {
|
||||
interface MatrixClient : UrlContentFetcher {
|
||||
val sessionId: SessionId
|
||||
val deviceId: DeviceId
|
||||
|
||||
|
||||
+1
-1
@@ -15,4 +15,4 @@ import java.lang.AutoCloseable
|
||||
* Note: this client implements an [AutoCloseable] interface, so using [AutoCloseable.close] or [AutoCloseable.use] will clean up any resources associated
|
||||
* with it, such as temporary files.
|
||||
*/
|
||||
interface TemporaryMatrixClient : GetUrlResolver, AutoCloseable
|
||||
interface TemporaryMatrixClient : UrlContentFetcher, AutoCloseable
|
||||
|
||||
+1
-1
@@ -11,5 +11,5 @@ package io.element.android.libraries.matrix.api
|
||||
* Factory to create a temporary [TemporaryMatrixClient] for a given home server URL.
|
||||
*/
|
||||
interface TemporaryMatrixClientFactory {
|
||||
suspend fun createTemporaryMatrixClient(homeServerUrl: String): Result<TemporaryMatrixClient>
|
||||
suspend fun create(homeServerUrl: String): Result<TemporaryMatrixClient>
|
||||
}
|
||||
|
||||
+4
-1
@@ -7,7 +7,10 @@
|
||||
|
||||
package io.element.android.libraries.matrix.api
|
||||
|
||||
fun interface GetUrlResolver {
|
||||
/**
|
||||
* An interface to fetch content from a URL using a simple GET request.
|
||||
*/
|
||||
fun interface UrlContentFetcher {
|
||||
/**
|
||||
* Execute generic GET requests through the SDKs internal HTTP client.
|
||||
*/
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
|
||||
package io.element.android.libraries.matrix.api.scanner
|
||||
|
||||
import io.element.android.libraries.matrix.api.GetUrlResolver
|
||||
import io.element.android.libraries.matrix.api.UrlContentFetcher
|
||||
import io.element.android.libraries.matrix.api.core.SessionId
|
||||
|
||||
/**
|
||||
@@ -20,6 +20,6 @@ fun interface ContentScannerUrlProvider {
|
||||
suspend fun getContentScannerUrl(sessionId: SessionId): Result<String?>
|
||||
|
||||
fun interface Factory {
|
||||
fun create(getUrlResolver: GetUrlResolver): ContentScannerUrlProvider
|
||||
fun create(urlContentFetcher: UrlContentFetcher): ContentScannerUrlProvider
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user