Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 635e1127 authored by alperozturk's avatar alperozturk
Browse files

use JvmOverloads

parent d490c2fe
Loading
Loading
Loading
Loading
+3 −13
Original line number Diff line number Diff line
@@ -21,23 +21,13 @@ import org.json.JSONObject
/**
 * Remote operation to store the folder metadata
 */
class StoreMetadataV2RemoteOperation(
class StoreMetadataV2RemoteOperation @JvmOverloads constructor(
    private val remoteId: String,
    private val encryptedMetadataJson: String,
    private val token: String,
    private val signature: String
    private val signature: String,
    var sessionTimeOut: SessionTimeOut = defaultSessionTimeOut
) : RemoteOperation<String>() {
    private var sessionTimeOut: SessionTimeOut = defaultSessionTimeOut

    constructor(
        remoteId: String,
        encryptedMetadataJson: String,
        token: String,
        signature: String,
        sessionTimeOut: SessionTimeOut
    ) : this(remoteId, encryptedMetadataJson, token, signature) {
        this.sessionTimeOut = sessionTimeOut
    }

    /**
     * @param client Client object
+3 −7
Original line number Diff line number Diff line
@@ -19,15 +19,11 @@ import org.apache.commons.httpclient.methods.DeleteMethod
/**
 * Unlock a file
 */
class UnlockFileV1RemoteOperation(
class UnlockFileV1RemoteOperation @JvmOverloads constructor(
    private val localId: Long,
    private val token: String
    private val token: String,
    var sessionTimeOut: SessionTimeOut = defaultSessionTimeOut
) : RemoteOperation<Void>() {
    private var sessionTimeOut: SessionTimeOut = defaultSessionTimeOut

    constructor(localId: Long, token: String, sessionTimeOut: SessionTimeOut) : this(localId, token) {
        this.sessionTimeOut = sessionTimeOut
    }

    @Deprecated("Deprecated in Java")
    @Suppress("Detekt.TooGenericExceptionCaught")
+4 −22
Original line number Diff line number Diff line
@@ -23,32 +23,14 @@ import java.net.URLEncoder
/**
 * Remote operation to update the folder metadata
 */
class UpdateMetadataV2RemoteOperation(
class UpdateMetadataV2RemoteOperation @JvmOverloads constructor(
    private val remoteId: String,
    encryptedMetadataJson: String,
    private val token: String,
    private val signature: String
    private val signature: String,
    var sessionTimeOut: SessionTimeOut = defaultSessionTimeOut
) : RemoteOperation<String>() {
    private val encryptedMetadataJson: String
    private var sessionTimeOut: SessionTimeOut = defaultSessionTimeOut

    /**
     * Constructor
     */
    init {
        this.encryptedMetadataJson = URLEncoder.encode(encryptedMetadataJson)
        // this.encryptedMetadataJson = encryptedMetadataJson;
    }

    constructor(
        remoteId: String,
        encryptedMetadataJson: String,
        token: String,
        signature: String,
        sessionTimeOut: SessionTimeOut
    ) : this(remoteId, encryptedMetadataJson, token, signature) {
        this.sessionTimeOut = sessionTimeOut
    }
    private val encryptedMetadataJson: String = URLEncoder.encode(encryptedMetadataJson)

    /**
     * @param client Client object