InboxEntryStream

Provides a streamlined process for creating and sending Inbox entries with optional file attachments.

This class simplifies interacting with the Inbox API for sending entries, especially when dealing with multiple files. It manages the lifecycle of the entry creation process, including file uploads and final entry submission.

Types

Link copied to clipboard
object Companion
Link copied to clipboard
abstract class EntryStreamListener

Interface for listening to state changes and exchanging data with an InboxEntryStream instance.

Link copied to clipboard
data class FileInfo(val publicMeta: ByteArray, val privateMeta: ByteArray, val fileSize: Long, val fileStream: Source?)

Represents information about a file to be sent by InboxEntryStream.

Link copied to clipboard

Contains available states of InboxEntryStream.

Functions

Link copied to clipboard
fun cancel()

Cancels the stream and sets its state to State.ABORTED.

Link copied to clipboard
fun sendEntry()

Sends the entry data and closes this stream, transitioning it to the State.SENT state.

Link copied to clipboard
fun sendFiles(coroutineContext: CoroutineContext = sendingFilesContext): Deferred<Unit>

Initiates the process of sending files using the provided executor.