@@ -2106,6 +2106,8 @@ internal open class UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider(
2106
2106
2107
2107
2108
2108
2109
+
2110
+
2109
2111
2110
2112
2111
2113
@@ -2315,6 +2317,8 @@ internal interface UniffiLib : Library {
2315
2317
): Pointer
2316
2318
fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_proxy(`ptr`: Pointer,`url`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
2317
2319
): Pointer
2320
+ fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_request_config(`ptr`: Pointer,`config`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
2321
+ ): Pointer
2318
2322
fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_requires_sliding_sync(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
2319
2323
): Pointer
2320
2324
fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name(`ptr`: Pointer,`serverName`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
@@ -3383,6 +3387,8 @@ internal interface UniffiLib : Library {
3383
3387
): Short
3384
3388
fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_proxy(
3385
3389
): Short
3390
+ fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_request_config(
3391
+ ): Short
3386
3392
fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_requires_sliding_sync(
3387
3393
): Short
3388
3394
fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name(
@@ -4285,6 +4291,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
4285
4291
if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_proxy() != 5659.toShort()) {
4286
4292
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
4287
4293
}
4294
+ if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_request_config() != 58783.toShort()) {
4295
+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
4296
+ }
4288
4297
if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_requires_sliding_sync() != 18165.toShort()) {
4289
4298
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
4290
4299
}
@@ -7363,6 +7372,11 @@ public interface ClientBuilderInterface {
7363
7372
7364
7373
fun `proxy`(`url`: kotlin.String): ClientBuilder
7365
7374
7375
+ /**
7376
+ * Add a default request config to this client.
7377
+ */
7378
+ fun `requestConfig`(`config`: RequestConfig): ClientBuilder
7379
+
7366
7380
fun `requiresSlidingSync`(): ClientBuilder
7367
7381
7368
7382
fun `serverName`(`serverName`: kotlin.String): ClientBuilder
@@ -7681,6 +7695,21 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface {
7681
7695
}
7682
7696
7683
7697
7698
+
7699
+ /**
7700
+ * Add a default request config to this client.
7701
+ */override fun `requestConfig`(`config`: RequestConfig): ClientBuilder {
7702
+ return FfiConverterTypeClientBuilder.lift(
7703
+ callWithPointer {
7704
+ uniffiRustCall() { _status ->
7705
+ UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_request_config(
7706
+ it, FfiConverterTypeRequestConfig.lower(`config`),_status)
7707
+ }
7708
+ }
7709
+ )
7710
+ }
7711
+
7712
+
7684
7713
override fun `requiresSlidingSync`(): ClientBuilder {
7685
7714
return FfiConverterTypeClientBuilder.lift(
7686
7715
callWithPointer {
@@ -23272,6 +23301,58 @@ public object FfiConverterTypeReceipt: FfiConverterRustBuffer<Receipt> {
23272
23301
23273
23302
23274
23303
23304
+ /**
23305
+ * The config to use for HTTP requests by default in this client.
23306
+ */
23307
+ data class RequestConfig (
23308
+ /**
23309
+ * Max number of retries.
23310
+ */
23311
+ var `retryLimit`: kotlin.ULong?,
23312
+ /**
23313
+ * Timeout for a request in milliseconds.
23314
+ */
23315
+ var `timeout`: kotlin.ULong?,
23316
+ /**
23317
+ * Max number of concurrent requests. No value means no limits.
23318
+ */
23319
+ var `maxConcurrentRequests`: kotlin.ULong?,
23320
+ /**
23321
+ * Base delay between retries.
23322
+ */
23323
+ var `retryTimeout`: kotlin.ULong?
23324
+ ) {
23325
+
23326
+ companion object
23327
+ }
23328
+
23329
+ public object FfiConverterTypeRequestConfig: FfiConverterRustBuffer<RequestConfig> {
23330
+ override fun read(buf: ByteBuffer): RequestConfig {
23331
+ return RequestConfig(
23332
+ FfiConverterOptionalULong.read(buf),
23333
+ FfiConverterOptionalULong.read(buf),
23334
+ FfiConverterOptionalULong.read(buf),
23335
+ FfiConverterOptionalULong.read(buf),
23336
+ )
23337
+ }
23338
+
23339
+ override fun allocationSize(value: RequestConfig) = (
23340
+ FfiConverterOptionalULong.allocationSize(value.`retryLimit`) +
23341
+ FfiConverterOptionalULong.allocationSize(value.`timeout`) +
23342
+ FfiConverterOptionalULong.allocationSize(value.`maxConcurrentRequests`) +
23343
+ FfiConverterOptionalULong.allocationSize(value.`retryTimeout`)
23344
+ )
23345
+
23346
+ override fun write(value: RequestConfig, buf: ByteBuffer) {
23347
+ FfiConverterOptionalULong.write(value.`retryLimit`, buf)
23348
+ FfiConverterOptionalULong.write(value.`timeout`, buf)
23349
+ FfiConverterOptionalULong.write(value.`maxConcurrentRequests`, buf)
23350
+ FfiConverterOptionalULong.write(value.`retryTimeout`, buf)
23351
+ }
23352
+ }
23353
+
23354
+
23355
+
23275
23356
data class RequiredState (
23276
23357
var `key`: kotlin.String,
23277
23358
var `value`: kotlin.String
0 commit comments