mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Add the open in web to the service facade
This commit is contained in:
parent
6d235fe74a
commit
6282fbd419
@ -28,4 +28,5 @@ import com.owncloud.android.lib.resources.Service
|
|||||||
|
|
||||||
interface FileService : Service {
|
interface FileService : Service {
|
||||||
fun checkPathExistence(path: String, isUserLogged: Boolean): RemoteOperationResult<Boolean>
|
fun checkPathExistence(path: String, isUserLogged: Boolean): RemoteOperationResult<Boolean>
|
||||||
|
fun getUrlToOpenInWeb(openWebEndpoint: String, fileId: String): RemoteOperationResult<String>
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@ package com.owncloud.android.lib.resources.files.services.implementation
|
|||||||
import com.owncloud.android.lib.common.OwnCloudClient
|
import com.owncloud.android.lib.common.OwnCloudClient
|
||||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult
|
import com.owncloud.android.lib.common.operations.RemoteOperationResult
|
||||||
import com.owncloud.android.lib.resources.files.CheckPathExistenceRemoteOperation
|
import com.owncloud.android.lib.resources.files.CheckPathExistenceRemoteOperation
|
||||||
|
import com.owncloud.android.lib.resources.files.GetUrlToOpenInWebRemoteOperation
|
||||||
import com.owncloud.android.lib.resources.files.services.FileService
|
import com.owncloud.android.lib.resources.files.services.FileService
|
||||||
|
|
||||||
class OCFileService(override val client: OwnCloudClient) :
|
class OCFileService(override val client: OwnCloudClient) :
|
||||||
@ -35,4 +36,8 @@ class OCFileService(override val client: OwnCloudClient) :
|
|||||||
remotePath = path,
|
remotePath = path,
|
||||||
isUserLoggedIn = isUserLogged
|
isUserLoggedIn = isUserLogged
|
||||||
).execute(client)
|
).execute(client)
|
||||||
|
|
||||||
|
override fun getUrlToOpenInWeb(openWebEndpoint: String, fileId: String): RemoteOperationResult<String> =
|
||||||
|
GetUrlToOpenInWebRemoteOperation(openWithWebEndpoint = openWebEndpoint, fileId = fileId).execute(client)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user