Skip to content

Commit ed17777

Browse files
committed
Bump to version 25.04.08 (matrix-rust-sdk/main 5753ca3a64090469feb8d99de9b2cf6baffeeeca)
1 parent 1bc2c0b commit ed17777

File tree

2 files changed

+51
-91
lines changed

2 files changed

+51
-91
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// swift-tools-version:5.9
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33
import PackageDescription
4-
let checksum = "15847fdf504df27b1cd1d709e40c9483f8a73f542b18c83d78fe5e3558d0032c"
5-
let version = "25.04.02"
4+
let checksum = "8d29896bf41656728b4cfbd34a3755e0637d133df7fdd5d2e8b46ccd5378993b"
5+
let version = "25.04.08"
66
let url = "https://github.com/element-hq/matrix-rust-components-swift/releases/download/\(version)/MatrixSDKFFI.xcframework.zip"
77
let package = Package(
88
name: "MatrixRustSDK",

Sources/MatrixRustSDK/matrix_sdk_ffi.swift

Lines changed: 49 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -2432,6 +2432,17 @@ public protocol ClientBuilderProtocol : AnyObject {
24322432

24332433
func slidingSyncVersionBuilder(versionBuilder: SlidingSyncVersionBuilder) -> ClientBuilder
24342434

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+
24352446
/**
24362447
* Whether to use the event cache persistent storage or not.
24372448
*
@@ -2798,6 +2809,22 @@ open func slidingSyncVersionBuilder(versionBuilder: SlidingSyncVersionBuilder) -
27982809
FfiConverterTypeSlidingSyncVersionBuilder.lower(versionBuilder),$0
27992810
)
28002811
})
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+
})
28012828
}
28022829

28032830
/**
@@ -10763,23 +10790,7 @@ public protocol TimelineProtocol : AnyObject {
1076310790
* reply so that clients that support threads can render the reply
1076410791
* inside the thread.
1076510792
*/
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
1078310794

1078410795
func sendVideo(params: UploadParameters, thumbnailPath: String?, videoInfo: VideoInfo, progressWatcher: ProgressWatcher?) throws -> SendAttachmentJoinHandle
1078510796

@@ -11268,44 +11279,13 @@ open func sendReadReceipt(receiptType: ReceiptType, eventId: String)async throws
1126811279
* reply so that clients that support threads can render the reply
1126911280
* inside the thread.
1127011281
*/
11271-
open func sendReply(msg: RoomMessageEventContentWithoutRelation, eventId: String)async throws {
11282+
open func sendReply(msg: RoomMessageEventContentWithoutRelation, replyParams: ReplyParameters)async throws {
1127211283
return
1127311284
try await uniffiRustCallAsync(
1127411285
rustFutureFunc: {
1127511286
uniffi_matrix_sdk_ffi_fn_method_timeline_send_reply(
1127611287
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)
1130911289
)
1131011290
},
1131111291
pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void,
@@ -14861,16 +14841,13 @@ public struct OidcConfiguration {
1486114841
*/
1486214842
public var contacts: [String]?
1486314843
/**
14864-
* Pre-configured registrations for use with issuers that don't support
14844+
* Pre-configured registrations for use with homeservers that don't support
1486514845
* dynamic client registration.
14866-
*/
14867-
public var staticRegistrations: [String: String]
14868-
/**
14869-
* A file path where any dynamic registrations should be stored.
1487014846
*
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.
1487214849
*/
14873-
public var dynamicRegistrationsFile: String
14850+
public var staticRegistrations: [String: String]
1487414851

1487514852
// Default memberwise initializers are never public by default, so we
1487614853
// declare one manually.
@@ -14898,14 +14875,12 @@ public struct OidcConfiguration {
1489814875
* An array of e-mail addresses of people responsible for this client.
1489914876
*/contacts: [String]?,
1490014877
/**
14901-
* Pre-configured registrations for use with issuers that don't support
14878+
* Pre-configured registrations for use with homeservers that don't support
1490214879
* dynamic client registration.
14903-
*/staticRegistrations: [String: String],
14904-
/**
14905-
* A file path where any dynamic registrations should be stored.
1490614880
*
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]) {
1490914884
self.clientName = clientName
1491014885
self.redirectUri = redirectUri
1491114886
self.clientUri = clientUri
@@ -14914,7 +14889,6 @@ public struct OidcConfiguration {
1491414889
self.policyUri = policyUri
1491514890
self.contacts = contacts
1491614891
self.staticRegistrations = staticRegistrations
14917-
self.dynamicRegistrationsFile = dynamicRegistrationsFile
1491814892
}
1491914893
}
1492014894

@@ -14946,9 +14920,6 @@ extension OidcConfiguration: Equatable, Hashable {
1494614920
if lhs.staticRegistrations != rhs.staticRegistrations {
1494714921
return false
1494814922
}
14949-
if lhs.dynamicRegistrationsFile != rhs.dynamicRegistrationsFile {
14950-
return false
14951-
}
1495214923
return true
1495314924
}
1495414925

@@ -14961,7 +14932,6 @@ extension OidcConfiguration: Equatable, Hashable {
1496114932
hasher.combine(policyUri)
1496214933
hasher.combine(contacts)
1496314934
hasher.combine(staticRegistrations)
14964-
hasher.combine(dynamicRegistrationsFile)
1496514935
}
1496614936
}
1496714937

@@ -14977,8 +14947,7 @@ public struct FfiConverterTypeOidcConfiguration: FfiConverterRustBuffer {
1497714947
tosUri: FfiConverterOptionString.read(from: &buf),
1497814948
policyUri: FfiConverterOptionString.read(from: &buf),
1497914949
contacts: FfiConverterOptionSequenceString.read(from: &buf),
14980-
staticRegistrations: FfiConverterDictionaryStringString.read(from: &buf),
14981-
dynamicRegistrationsFile: FfiConverterString.read(from: &buf)
14950+
staticRegistrations: FfiConverterDictionaryStringString.read(from: &buf)
1498214951
)
1498314952
}
1498414953

@@ -14991,7 +14960,6 @@ public struct FfiConverterTypeOidcConfiguration: FfiConverterRustBuffer {
1499114960
FfiConverterOptionString.write(value.policyUri, into: &buf)
1499214961
FfiConverterOptionSequenceString.write(value.contacts, into: &buf)
1499314962
FfiConverterDictionaryStringString.write(value.staticRegistrations, into: &buf)
14994-
FfiConverterString.write(value.dynamicRegistrationsFile, into: &buf)
1499514963
}
1499614964
}
1499714965

@@ -23426,8 +23394,6 @@ public enum OidcError {
2342623394

2342723395
case MetadataInvalid(message: String)
2342823396

23429-
case RegistrationsPathInvalid(message: String)
23430-
2343123397
case CallbackUrlInvalid(message: String)
2343223398

2343323399
case Cancelled(message: String)
@@ -23455,19 +23421,15 @@ public struct FfiConverterTypeOidcError: FfiConverterRustBuffer {
2345523421
message: try FfiConverterString.read(from: &buf)
2345623422
)
2345723423

23458-
case 3: return .RegistrationsPathInvalid(
23459-
message: try FfiConverterString.read(from: &buf)
23460-
)
23461-
23462-
case 4: return .CallbackUrlInvalid(
23424+
case 3: return .CallbackUrlInvalid(
2346323425
message: try FfiConverterString.read(from: &buf)
2346423426
)
2346523427

23466-
case 5: return .Cancelled(
23428+
case 4: return .Cancelled(
2346723429
message: try FfiConverterString.read(from: &buf)
2346823430
)
2346923431

23470-
case 6: return .Generic(
23432+
case 5: return .Generic(
2347123433
message: try FfiConverterString.read(from: &buf)
2347223434
)
2347323435

@@ -23486,14 +23448,12 @@ public struct FfiConverterTypeOidcError: FfiConverterRustBuffer {
2348623448
writeInt(&buf, Int32(1))
2348723449
case .MetadataInvalid(_ /* message is ignored*/):
2348823450
writeInt(&buf, Int32(2))
23489-
case .RegistrationsPathInvalid(_ /* message is ignored*/):
23490-
writeInt(&buf, Int32(3))
2349123451
case .CallbackUrlInvalid(_ /* message is ignored*/):
23492-
writeInt(&buf, Int32(4))
23452+
writeInt(&buf, Int32(3))
2349323453
case .Cancelled(_ /* message is ignored*/):
23494-
writeInt(&buf, Int32(5))
23454+
writeInt(&buf, Int32(4))
2349523455
case .Generic(_ /* message is ignored*/):
23496-
writeInt(&buf, Int32(6))
23456+
writeInt(&buf, Int32(5))
2349723457

2349823458

2349923459
}
@@ -33886,6 +33846,9 @@ private var initializationResult: InitializationResult = {
3388633846
if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sliding_sync_version_builder() != 39381) {
3388733847
return InitializationResult.apiChecksumMismatch
3388833848
}
33849+
if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_system_is_memory_constrained() != 6898) {
33850+
return InitializationResult.apiChecksumMismatch
33851+
}
3388933852
if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_use_event_cache_persistent_storage() != 58836) {
3389033853
return InitializationResult.apiChecksumMismatch
3389133854
}
@@ -34642,10 +34605,7 @@ private var initializationResult: InitializationResult = {
3464234605
if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_read_receipt() != 37532) {
3464334606
return InitializationResult.apiChecksumMismatch
3464434607
}
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) {
3464934609
return InitializationResult.apiChecksumMismatch
3465034610
}
3465134611
if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_video() != 1445) {

0 commit comments

Comments
 (0)