main.com.sceyt.chatuikit.persistence.interactor.AttachmentInteractor.kt Maven / Gradle / Ivy
package com.sceyt.chatuikit.persistence.interactor
import com.sceyt.chatuikit.data.models.LoadKeyData
import com.sceyt.chatuikit.data.models.PaginationResponse
import com.sceyt.chatuikit.data.models.SceytResponse
import com.sceyt.chatuikit.data.models.messages.AttachmentWithUserData
import com.sceyt.chatuikit.data.models.messages.FileChecksumData
import com.sceyt.chatuikit.data.models.messages.LinkPreviewDetails
import com.sceyt.chatuikit.data.models.messages.SceytMessage
import com.sceyt.chatuikit.persistence.entity.messages.AttachmentPayLoadDb
import com.sceyt.chatuikit.persistence.file_transfer.TransferData
import kotlinx.coroutines.flow.Flow
interface AttachmentInteractor {
suspend fun getAllPayLoadsByMsgTid(tid: Long): List
suspend fun getPrevAttachments(conversationId: Long, lastAttachmentId: Long, types: List,
offset: Int, ignoreDb: Boolean = false, loadKeyData: LoadKeyData = LoadKeyData()): Flow>
suspend fun getNextAttachments(conversationId: Long, lastAttachmentId: Long, types: List,
offset: Int, ignoreDb: Boolean = false, loadKeyData: LoadKeyData = LoadKeyData()): Flow>
suspend fun getNearAttachments(conversationId: Long, attachmentId: Long, types: List,
offset: Int, ignoreDb: Boolean = false, loadKeyData: LoadKeyData = LoadKeyData()): Flow>
suspend fun updateAttachmentIdAndMessageId(message: SceytMessage)
suspend fun updateTransferDataByMsgTid(data: TransferData)
suspend fun updateAttachmentWithTransferData(data: TransferData)
suspend fun updateAttachmentFilePathAndMetadata(messageTid: Long, newPath: String, fileSize: Long, metadata: String?)
suspend fun getFileChecksumData(filePath: String?): FileChecksumData?
suspend fun getLinkPreviewData(link: String?): SceytResponse
suspend fun upsertLinkPreviewData(linkDetails: LinkPreviewDetails)
}