@@ -2432,6 +2432,17 @@ public protocol ClientBuilderProtocol : AnyObject {
2432
2432
2433
2433
func slidingSyncVersionBuilder(versionBuilder: SlidingSyncVersionBuilder) -> ClientBuilder
2434
2434
2435
+ /**
2436
+ * Tell the client that the system is memory constrained, like in a push
2437
+ * notification process for example.
2438
+ *
2439
+ * So far, at the time of writing (2025-04-07), it changes the defaults of
2440
+ * [`SqliteStoreConfig`], so one might not need to call
2441
+ * [`ClientBuilder::session_cache_size`] and siblings for example. Please
2442
+ * check [`SqliteStoreConfig::with_low_memory_config`].
2443
+ */
2444
+ func systemIsMemoryConstrained() -> ClientBuilder
2445
+
2435
2446
/**
2436
2447
* Whether to use the event cache persistent storage or not.
2437
2448
*
@@ -2798,6 +2809,22 @@ open func slidingSyncVersionBuilder(versionBuilder: SlidingSyncVersionBuilder) -
2798
2809
FfiConverterTypeSlidingSyncVersionBuilder.lower(versionBuilder),$0
2799
2810
)
2800
2811
})
2812
+ }
2813
+
2814
+ /**
2815
+ * Tell the client that the system is memory constrained, like in a push
2816
+ * notification process for example.
2817
+ *
2818
+ * So far, at the time of writing (2025-04-07), it changes the defaults of
2819
+ * [`SqliteStoreConfig`], so one might not need to call
2820
+ * [`ClientBuilder::session_cache_size`] and siblings for example. Please
2821
+ * check [`SqliteStoreConfig::with_low_memory_config`].
2822
+ */
2823
+ open func systemIsMemoryConstrained() -> ClientBuilder {
2824
+ return try! FfiConverterTypeClientBuilder.lift(try! rustCall() {
2825
+ uniffi_matrix_sdk_ffi_fn_method_clientbuilder_system_is_memory_constrained(self.uniffiClonePointer(),$0
2826
+ )
2827
+ })
2801
2828
}
2802
2829
2803
2830
/**
@@ -10763,23 +10790,7 @@ public protocol TimelineProtocol : AnyObject {
10763
10790
* reply so that clients that support threads can render the reply
10764
10791
* inside the thread.
10765
10792
*/
10766
- func sendReply(msg: RoomMessageEventContentWithoutRelation, eventId: String) async throws
10767
-
10768
- /**
10769
- * Send a message on a thread.
10770
- *
10771
- * If the replied to event does not have a thread relation, it becomes the
10772
- * root of a new thread.
10773
- *
10774
- * # Arguments
10775
- *
10776
- * * `msg` - Message content to send
10777
- *
10778
- * * `event_id` - ID of the event to reply to
10779
- *
10780
- * * `is_reply` - Whether the message is a reply on a thread
10781
- */
10782
- func sendThreadReply(msg: RoomMessageEventContentWithoutRelation, eventId: String, isReply: Bool) async throws
10793
+ func sendReply(msg: RoomMessageEventContentWithoutRelation, replyParams: ReplyParameters) async throws
10783
10794
10784
10795
func sendVideo(params: UploadParameters, thumbnailPath: String?, videoInfo: VideoInfo, progressWatcher: ProgressWatcher?) throws -> SendAttachmentJoinHandle
10785
10796
@@ -11268,44 +11279,13 @@ open func sendReadReceipt(receiptType: ReceiptType, eventId: String)async throws
11268
11279
* reply so that clients that support threads can render the reply
11269
11280
* inside the thread.
11270
11281
*/
11271
- open func sendReply(msg: RoomMessageEventContentWithoutRelation, eventId: String )async throws {
11282
+ open func sendReply(msg: RoomMessageEventContentWithoutRelation, replyParams: ReplyParameters )async throws {
11272
11283
return
11273
11284
try await uniffiRustCallAsync(
11274
11285
rustFutureFunc: {
11275
11286
uniffi_matrix_sdk_ffi_fn_method_timeline_send_reply(
11276
11287
self.uniffiClonePointer(),
11277
- FfiConverterTypeRoomMessageEventContentWithoutRelation.lower(msg),FfiConverterString.lower(eventId)
11278
- )
11279
- },
11280
- pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void,
11281
- completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_void,
11282
- freeFunc: ffi_matrix_sdk_ffi_rust_future_free_void,
11283
- liftFunc: { $0 },
11284
- errorHandler: FfiConverterTypeClientError.lift
11285
- )
11286
- }
11287
-
11288
- /**
11289
- * Send a message on a thread.
11290
- *
11291
- * If the replied to event does not have a thread relation, it becomes the
11292
- * root of a new thread.
11293
- *
11294
- * # Arguments
11295
- *
11296
- * * `msg` - Message content to send
11297
- *
11298
- * * `event_id` - ID of the event to reply to
11299
- *
11300
- * * `is_reply` - Whether the message is a reply on a thread
11301
- */
11302
- open func sendThreadReply(msg: RoomMessageEventContentWithoutRelation, eventId: String, isReply: Bool)async throws {
11303
- return
11304
- try await uniffiRustCallAsync(
11305
- rustFutureFunc: {
11306
- uniffi_matrix_sdk_ffi_fn_method_timeline_send_thread_reply(
11307
- self.uniffiClonePointer(),
11308
- FfiConverterTypeRoomMessageEventContentWithoutRelation.lower(msg),FfiConverterString.lower(eventId),FfiConverterBool.lower(isReply)
11288
+ FfiConverterTypeRoomMessageEventContentWithoutRelation.lower(msg),FfiConverterTypeReplyParameters.lower(replyParams)
11309
11289
)
11310
11290
},
11311
11291
pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void,
@@ -14861,16 +14841,13 @@ public struct OidcConfiguration {
14861
14841
*/
14862
14842
public var contacts: [String]?
14863
14843
/**
14864
- * Pre-configured registrations for use with issuers that don't support
14844
+ * Pre-configured registrations for use with homeservers that don't support
14865
14845
* dynamic client registration.
14866
- */
14867
- public var staticRegistrations: [String: String]
14868
- /**
14869
- * A file path where any dynamic registrations should be stored.
14870
14846
*
14871
- * Suggested value: `{base_path}/oidc/registrations.json`
14847
+ * The keys of the map should be the URLs of the homeservers, but keys
14848
+ * using `issuer` URLs are also supported.
14872
14849
*/
14873
- public var dynamicRegistrationsFile: String
14850
+ public var staticRegistrations: [ String: String]
14874
14851
14875
14852
// Default memberwise initializers are never public by default, so we
14876
14853
// declare one manually.
@@ -14898,14 +14875,12 @@ public struct OidcConfiguration {
14898
14875
* An array of e-mail addresses of people responsible for this client.
14899
14876
*/contacts: [String]?,
14900
14877
/**
14901
- * Pre-configured registrations for use with issuers that don't support
14878
+ * Pre-configured registrations for use with homeservers that don't support
14902
14879
* dynamic client registration.
14903
- */staticRegistrations: [String: String],
14904
- /**
14905
- * A file path where any dynamic registrations should be stored.
14906
14880
*
14907
- * Suggested value: `{base_path}/oidc/registrations.json`
14908
- */dynamicRegistrationsFile: String) {
14881
+ * The keys of the map should be the URLs of the homeservers, but keys
14882
+ * using `issuer` URLs are also supported.
14883
+ */staticRegistrations: [String: String]) {
14909
14884
self.clientName = clientName
14910
14885
self.redirectUri = redirectUri
14911
14886
self.clientUri = clientUri
@@ -14914,7 +14889,6 @@ public struct OidcConfiguration {
14914
14889
self.policyUri = policyUri
14915
14890
self.contacts = contacts
14916
14891
self.staticRegistrations = staticRegistrations
14917
- self.dynamicRegistrationsFile = dynamicRegistrationsFile
14918
14892
}
14919
14893
}
14920
14894
@@ -14946,9 +14920,6 @@ extension OidcConfiguration: Equatable, Hashable {
14946
14920
if lhs.staticRegistrations != rhs.staticRegistrations {
14947
14921
return false
14948
14922
}
14949
- if lhs.dynamicRegistrationsFile != rhs.dynamicRegistrationsFile {
14950
- return false
14951
- }
14952
14923
return true
14953
14924
}
14954
14925
@@ -14961,7 +14932,6 @@ extension OidcConfiguration: Equatable, Hashable {
14961
14932
hasher.combine(policyUri)
14962
14933
hasher.combine(contacts)
14963
14934
hasher.combine(staticRegistrations)
14964
- hasher.combine(dynamicRegistrationsFile)
14965
14935
}
14966
14936
}
14967
14937
@@ -14977,8 +14947,7 @@ public struct FfiConverterTypeOidcConfiguration: FfiConverterRustBuffer {
14977
14947
tosUri: FfiConverterOptionString.read(from: &buf),
14978
14948
policyUri: FfiConverterOptionString.read(from: &buf),
14979
14949
contacts: FfiConverterOptionSequenceString.read(from: &buf),
14980
- staticRegistrations: FfiConverterDictionaryStringString.read(from: &buf),
14981
- dynamicRegistrationsFile: FfiConverterString.read(from: &buf)
14950
+ staticRegistrations: FfiConverterDictionaryStringString.read(from: &buf)
14982
14951
)
14983
14952
}
14984
14953
@@ -14991,7 +14960,6 @@ public struct FfiConverterTypeOidcConfiguration: FfiConverterRustBuffer {
14991
14960
FfiConverterOptionString.write(value.policyUri, into: &buf)
14992
14961
FfiConverterOptionSequenceString.write(value.contacts, into: &buf)
14993
14962
FfiConverterDictionaryStringString.write(value.staticRegistrations, into: &buf)
14994
- FfiConverterString.write(value.dynamicRegistrationsFile, into: &buf)
14995
14963
}
14996
14964
}
14997
14965
@@ -23426,8 +23394,6 @@ public enum OidcError {
23426
23394
23427
23395
case MetadataInvalid(message: String)
23428
23396
23429
- case RegistrationsPathInvalid(message: String)
23430
-
23431
23397
case CallbackUrlInvalid(message: String)
23432
23398
23433
23399
case Cancelled(message: String)
@@ -23455,19 +23421,15 @@ public struct FfiConverterTypeOidcError: FfiConverterRustBuffer {
23455
23421
message: try FfiConverterString.read(from: &buf)
23456
23422
)
23457
23423
23458
- case 3: return .RegistrationsPathInvalid(
23459
- message: try FfiConverterString.read(from: &buf)
23460
- )
23461
-
23462
- case 4: return .CallbackUrlInvalid(
23424
+ case 3: return .CallbackUrlInvalid(
23463
23425
message: try FfiConverterString.read(from: &buf)
23464
23426
)
23465
23427
23466
- case 5 : return .Cancelled(
23428
+ case 4 : return .Cancelled(
23467
23429
message: try FfiConverterString.read(from: &buf)
23468
23430
)
23469
23431
23470
- case 6 : return .Generic(
23432
+ case 5 : return .Generic(
23471
23433
message: try FfiConverterString.read(from: &buf)
23472
23434
)
23473
23435
@@ -23486,14 +23448,12 @@ public struct FfiConverterTypeOidcError: FfiConverterRustBuffer {
23486
23448
writeInt(&buf, Int32(1))
23487
23449
case .MetadataInvalid(_ /* message is ignored*/):
23488
23450
writeInt(&buf, Int32(2))
23489
- case .RegistrationsPathInvalid(_ /* message is ignored*/):
23490
- writeInt(&buf, Int32(3))
23491
23451
case .CallbackUrlInvalid(_ /* message is ignored*/):
23492
- writeInt(&buf, Int32(4 ))
23452
+ writeInt(&buf, Int32(3 ))
23493
23453
case .Cancelled(_ /* message is ignored*/):
23494
- writeInt(&buf, Int32(5 ))
23454
+ writeInt(&buf, Int32(4 ))
23495
23455
case .Generic(_ /* message is ignored*/):
23496
- writeInt(&buf, Int32(6 ))
23456
+ writeInt(&buf, Int32(5 ))
23497
23457
23498
23458
23499
23459
}
@@ -33886,6 +33846,9 @@ private var initializationResult: InitializationResult = {
33886
33846
if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sliding_sync_version_builder() != 39381) {
33887
33847
return InitializationResult.apiChecksumMismatch
33888
33848
}
33849
+ if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_system_is_memory_constrained() != 6898) {
33850
+ return InitializationResult.apiChecksumMismatch
33851
+ }
33889
33852
if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_use_event_cache_persistent_storage() != 58836) {
33890
33853
return InitializationResult.apiChecksumMismatch
33891
33854
}
@@ -34642,10 +34605,7 @@ private var initializationResult: InitializationResult = {
34642
34605
if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_read_receipt() != 37532) {
34643
34606
return InitializationResult.apiChecksumMismatch
34644
34607
}
34645
- if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_reply() != 11149) {
34646
- return InitializationResult.apiChecksumMismatch
34647
- }
34648
- if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_thread_reply() != 62758) {
34608
+ if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_reply() != 31468) {
34649
34609
return InitializationResult.apiChecksumMismatch
34650
34610
}
34651
34611
if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_video() != 1445) {
0 commit comments