Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 6282fbd

Browse files
committed
Add the open in web to the service facade
1 parent 6d235fe commit 6282fbd

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/services/FileService.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ import com.owncloud.android.lib.resources.Service
2828

2929
interface FileService : Service {
3030
fun checkPathExistence(path: String, isUserLogged: Boolean): RemoteOperationResult<Boolean>
31+
fun getUrlToOpenInWeb(openWebEndpoint: String, fileId: String): RemoteOperationResult<String>
3132
}

owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/services/implementation/OCFileService.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ package com.owncloud.android.lib.resources.files.services.implementation
2626
import com.owncloud.android.lib.common.OwnCloudClient
2727
import com.owncloud.android.lib.common.operations.RemoteOperationResult
2828
import com.owncloud.android.lib.resources.files.CheckPathExistenceRemoteOperation
29+
import com.owncloud.android.lib.resources.files.GetUrlToOpenInWebRemoteOperation
2930
import com.owncloud.android.lib.resources.files.services.FileService
3031

3132
class OCFileService(override val client: OwnCloudClient) :
@@ -35,4 +36,8 @@ class OCFileService(override val client: OwnCloudClient) :
3536
remotePath = path,
3637
isUserLoggedIn = isUserLogged
3738
).execute(client)
39+
40+
override fun getUrlToOpenInWeb(openWebEndpoint: String, fileId: String): RemoteOperationResult<String> =
41+
GetUrlToOpenInWebRemoteOperation(openWithWebEndpoint = openWebEndpoint, fileId = fileId).execute(client)
42+
3843
}

0 commit comments

Comments
 (0)