All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.com.sceyt.chatuikit.persistence.file_transfer.TransferTask.kt Maven / Gradle / Ivy

There is a newer version: 1.7.2
Show newest version
package com.sceyt.chatuikit.persistence.file_transfer

import com.sceyt.chatuikit.data.models.messages.SceytAttachment

class TransferTask(
        var attachment: SceytAttachment,
        val messageTid: Long,
        var state: TransferState?,
) {
    var progressCallback: ProgressUpdateCallback? = null
    var preparingCallback: PreparingCallback? = null
    var resumePauseCallback: ResumePauseCallback? = null
    var uploadResultCallback: TransferResultCallback? = null
    var downloadCallback: TransferResultCallback? = null
    var updateFileLocationCallback: UpdateFileLocationCallback? = null
    var thumbCallback: ThumbCallback? = null

    val onCompletionListeners: HashMap Unit> by lazy { hashMapOf() }

    fun addOnCompletionListener(key: String, listener: (success: Boolean, url: String?) -> Unit) {
        onCompletionListeners[key] = listener
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy