davidliu
Committed by GitHub

Specify default values for StreamTextOptions and streamText (#688)

---
"client-sdk-android": patch
---
Specify default values for StreamTextOptions and streamText
... ...
... ... @@ -34,12 +34,12 @@ data class StreamTextOptions(
val attributes: Map<String, String> = emptyMap(),
val streamId: String = UUID.randomUUID().toString(),
val destinationIdentities: List<Participant.Identity> = emptyList(),
val operationType: TextStreamInfo.OperationType,
val operationType: TextStreamInfo.OperationType = TextStreamInfo.OperationType.CREATE,
val version: Int = 0,
val attachedStreamIds: List<String> = emptyList(),
val replyToStreamId: String? = null,
/**
* The total exact size in bytes, if known.
* The total exact size in bytes when encoded to UTF-8, if known.
*/
val totalSize: Long? = null,
)
... ...
... ... @@ -35,12 +35,12 @@ import javax.inject.Inject
interface OutgoingDataStreamManager {
/**
* Start sending a stream of text
* Start sending a stream of text. Call [TextStreamSender.close] when finished sending.
*/
suspend fun streamText(options: StreamTextOptions): TextStreamSender
suspend fun streamText(options: StreamTextOptions = StreamTextOptions()): TextStreamSender
/**
* Start sending a stream of bytes
* Start sending a stream of bytes. Call [ByteStreamSender.close] when finished sending.
*/
suspend fun streamBytes(options: StreamBytesOptions): ByteStreamSender
}
... ...