Skip to content

Commit 440bba3

Browse files
committed
Bump to version 26.01.30 (matrix-rust-sdk/main 2f7887d607e440609056a3a8da4dcabd01c0fe91)
1 parent f49e072 commit 440bba3

File tree

4 files changed

+148
-161
lines changed

4 files changed

+148
-161
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 = "610b34f5d3a4c7d1f8be52fb2b2b9a1b40e98d839e7f2e5ba76df9c127c4a338"
5-
let version = "26.01.27"
4+
let checksum = "fd146561bb247111cbd0df8c85bfdc05dc786df3828becea4b1536e9792360ed"
5+
let version = "26.01.30"
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_crypto.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,15 +1201,15 @@ public enum LoginQrCodeDecodeError: Swift.Error, Equatable, Hashable, Foundation
12011201
case UrlParse(message: String)
12021202

12031203
/**
1204-
* The QR code data contains an invalid mode, we expect the login (0x03)
1205-
* mode or the reciprocate mode (0x04).
1204+
* The QR code data contains an invalid intent, we expect the login
1205+
* intent or the reciprocate intent.
12061206
*/
1207-
case InvalidMode(message: String)
1207+
case InvalidIntent(message: String)
12081208

12091209
/**
1210-
* The QR code data contains an unsupported version.
1210+
* The QR code data contains an unsupported type.
12111211
*/
1212-
case InvalidVersion(message: String)
1212+
case InvalidType(message: String)
12131213

12141214
/**
12151215
* The base64 encoded variant of the QR code data is not a valid base64
@@ -1263,11 +1263,11 @@ public struct FfiConverterTypeLoginQrCodeDecodeError: FfiConverterRustBuffer {
12631263
message: try FfiConverterString.read(from: &buf)
12641264
)
12651265

1266-
case 4: return .InvalidMode(
1266+
case 4: return .InvalidIntent(
12671267
message: try FfiConverterString.read(from: &buf)
12681268
)
12691269

1270-
case 5: return .InvalidVersion(
1270+
case 5: return .InvalidType(
12711271
message: try FfiConverterString.read(from: &buf)
12721272
)
12731273

@@ -1296,9 +1296,9 @@ public struct FfiConverterTypeLoginQrCodeDecodeError: FfiConverterRustBuffer {
12961296
writeInt(&buf, Int32(2))
12971297
case .UrlParse(_ /* message is ignored*/):
12981298
writeInt(&buf, Int32(3))
1299-
case .InvalidMode(_ /* message is ignored*/):
1299+
case .InvalidIntent(_ /* message is ignored*/):
13001300
writeInt(&buf, Int32(4))
1301-
case .InvalidVersion(_ /* message is ignored*/):
1301+
case .InvalidType(_ /* message is ignored*/):
13021302
writeInt(&buf, Int32(5))
13031303
case .Base64(_ /* message is ignored*/):
13041304
writeInt(&buf, Int32(6))

Sources/MatrixRustSDK/matrix_sdk_ffi.swift

Lines changed: 43 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -7224,7 +7224,7 @@ public protocol QrCodeDataProtocol: AnyObject, Sendable {
72247224
/**
72257225
* The server name contained within the scanned QR code data.
72267226
*
7227-
* Note: This value is only present when scanning a QR code the belongs to
7227+
* Note: This value is only present when scanning a QR code that belongs to
72287228
* a logged in client. The mode where the new client shows the QR code
72297229
* will return `None`.
72307230
*/
@@ -7312,7 +7312,7 @@ public static func fromBytes(bytes: Data)throws -> QrCodeData {
73127312
/**
73137313
* The server name contained within the scanned QR code data.
73147314
*
7315-
* Note: This value is only present when scanning a QR code the belongs to
7315+
* Note: This value is only present when scanning a QR code that belongs to
73167316
* a logged in client. The mode where the new client shows the QR code
73177317
* will return `None`.
73187318
*/
@@ -15897,6 +15897,14 @@ public static func exclude(conditions: [FilterTimelineEventCondition]) -> Timeli
1589715897
})
1589815898
}
1589915899

15900+
public static func excludeEventTypes(eventTypes: [FilterTimelineEventType]) -> TimelineEventFilter {
15901+
return try! FfiConverterTypeTimelineEventFilter_lift(try! rustCall() {
15902+
uniffi_matrix_sdk_ffi_fn_constructor_timelineeventfilter_exclude_event_types(
15903+
FfiConverterSequenceTypeFilterTimelineEventType.lower(eventTypes),$0
15904+
)
15905+
})
15906+
}
15907+
1590015908
public static func include(conditions: [FilterTimelineEventCondition]) -> TimelineEventFilter {
1590115909
return try! FfiConverterTypeTimelineEventFilter_lift(try! rustCall() {
1590215910
uniffi_matrix_sdk_ffi_fn_constructor_timelineeventfilter_include(
@@ -15905,6 +15913,14 @@ public static func include(conditions: [FilterTimelineEventCondition]) -> Timeli
1590515913
})
1590615914
}
1590715915

15916+
public static func includeEventTypes(eventTypes: [FilterTimelineEventType]) -> TimelineEventFilter {
15917+
return try! FfiConverterTypeTimelineEventFilter_lift(try! rustCall() {
15918+
uniffi_matrix_sdk_ffi_fn_constructor_timelineeventfilter_include_event_types(
15919+
FfiConverterSequenceTypeFilterTimelineEventType.lower(eventTypes),$0
15920+
)
15921+
})
15922+
}
15923+
1590815924

1590915925

1591015926

@@ -15957,128 +15973,6 @@ public func FfiConverterTypeTimelineEventFilter_lower(_ value: TimelineEventFilt
1595715973

1595815974

1595915975

15960-
public protocol TimelineEventTypeFilterProtocol: AnyObject, Sendable {
15961-
15962-
}
15963-
open class TimelineEventTypeFilter: TimelineEventTypeFilterProtocol, @unchecked Sendable {
15964-
fileprivate let handle: UInt64
15965-
15966-
/// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly.
15967-
#if swift(>=5.8)
15968-
@_documentation(visibility: private)
15969-
#endif
15970-
public struct NoHandle {
15971-
public init() {}
15972-
}
15973-
15974-
// TODO: We'd like this to be `private` but for Swifty reasons,
15975-
// we can't implement `FfiConverter` without making this `required` and we can't
15976-
// make it `required` without making it `public`.
15977-
#if swift(>=5.8)
15978-
@_documentation(visibility: private)
15979-
#endif
15980-
required public init(unsafeFromHandle handle: UInt64) {
15981-
self.handle = handle
15982-
}
15983-
15984-
// This constructor can be used to instantiate a fake object.
15985-
// - Parameter noHandle: Placeholder value so we can have a constructor separate from the default empty one that may be implemented for classes extending [FFIObject].
15986-
//
15987-
// - Warning:
15988-
// Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash.
15989-
#if swift(>=5.8)
15990-
@_documentation(visibility: private)
15991-
#endif
15992-
public init(noHandle: NoHandle) {
15993-
self.handle = 0
15994-
}
15995-
15996-
#if swift(>=5.8)
15997-
@_documentation(visibility: private)
15998-
#endif
15999-
public func uniffiCloneHandle() -> UInt64 {
16000-
return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_timelineeventtypefilter(self.handle, $0) }
16001-
}
16002-
// No primary constructor declared for this class.
16003-
16004-
deinit {
16005-
if handle == 0 {
16006-
// Mock objects have handle=0 don't try to free them
16007-
return
16008-
}
16009-
16010-
try! rustCall { uniffi_matrix_sdk_ffi_fn_free_timelineeventtypefilter(handle, $0) }
16011-
}
16012-
16013-
16014-
public static func exclude(eventTypes: [FilterTimelineEventType]) -> TimelineEventTypeFilter {
16015-
return try! FfiConverterTypeTimelineEventTypeFilter_lift(try! rustCall() {
16016-
uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_exclude(
16017-
FfiConverterSequenceTypeFilterTimelineEventType.lower(eventTypes),$0
16018-
)
16019-
})
16020-
}
16021-
16022-
public static func include(eventTypes: [FilterTimelineEventType]) -> TimelineEventTypeFilter {
16023-
return try! FfiConverterTypeTimelineEventTypeFilter_lift(try! rustCall() {
16024-
uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_include(
16025-
FfiConverterSequenceTypeFilterTimelineEventType.lower(eventTypes),$0
16026-
)
16027-
})
16028-
}
16029-
16030-
16031-
16032-
16033-
16034-
}
16035-
16036-
16037-
#if swift(>=5.8)
16038-
@_documentation(visibility: private)
16039-
#endif
16040-
public struct FfiConverterTypeTimelineEventTypeFilter: FfiConverter {
16041-
typealias FfiType = UInt64
16042-
typealias SwiftType = TimelineEventTypeFilter
16043-
16044-
public static func lift(_ handle: UInt64) throws -> TimelineEventTypeFilter {
16045-
return TimelineEventTypeFilter(unsafeFromHandle: handle)
16046-
}
16047-
16048-
public static func lower(_ value: TimelineEventTypeFilter) -> UInt64 {
16049-
return value.uniffiCloneHandle()
16050-
}
16051-
16052-
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TimelineEventTypeFilter {
16053-
let handle: UInt64 = try readInt(&buf)
16054-
return try lift(handle)
16055-
}
16056-
16057-
public static func write(_ value: TimelineEventTypeFilter, into buf: inout [UInt8]) {
16058-
writeInt(&buf, lower(value))
16059-
}
16060-
}
16061-
16062-
16063-
#if swift(>=5.8)
16064-
@_documentation(visibility: private)
16065-
#endif
16066-
public func FfiConverterTypeTimelineEventTypeFilter_lift(_ handle: UInt64) throws -> TimelineEventTypeFilter {
16067-
return try FfiConverterTypeTimelineEventTypeFilter.lift(handle)
16068-
}
16069-
16070-
#if swift(>=5.8)
16071-
@_documentation(visibility: private)
16072-
#endif
16073-
public func FfiConverterTypeTimelineEventTypeFilter_lower(_ value: TimelineEventTypeFilter) -> UInt64 {
16074-
return FfiConverterTypeTimelineEventTypeFilter.lower(value)
16075-
}
16076-
16077-
16078-
16079-
16080-
16081-
1608215976
public protocol TimelineItemProtocol: AnyObject, Sendable {
1608315977

1608415978
func asEvent() -> EventTimelineItem?
@@ -29350,6 +29244,8 @@ public enum LatestEventValue {
2935029244
case none
2935129245
case remote(timestamp: Timestamp, sender: String, isOwn: Bool, profile: ProfileDetails, content: TimelineItemContent
2935229246
)
29247+
case remoteInvite(timestamp: Timestamp, inviter: String?, inviterProfile: ProfileDetails
29248+
)
2935329249
case local(timestamp: Timestamp, sender: String, profile: ProfileDetails, content: TimelineItemContent, state: LatestEventValueLocalState
2935429250
)
2935529251

@@ -29378,7 +29274,10 @@ public struct FfiConverterTypeLatestEventValue: FfiConverterRustBuffer {
2937829274
case 2: return .remote(timestamp: try FfiConverterTypeTimestamp.read(from: &buf), sender: try FfiConverterString.read(from: &buf), isOwn: try FfiConverterBool.read(from: &buf), profile: try FfiConverterTypeProfileDetails.read(from: &buf), content: try FfiConverterTypeTimelineItemContent.read(from: &buf)
2937929275
)
2938029276

29381-
case 3: return .local(timestamp: try FfiConverterTypeTimestamp.read(from: &buf), sender: try FfiConverterString.read(from: &buf), profile: try FfiConverterTypeProfileDetails.read(from: &buf), content: try FfiConverterTypeTimelineItemContent.read(from: &buf), state: try FfiConverterTypeLatestEventValueLocalState.read(from: &buf)
29277+
case 3: return .remoteInvite(timestamp: try FfiConverterTypeTimestamp.read(from: &buf), inviter: try FfiConverterOptionString.read(from: &buf), inviterProfile: try FfiConverterTypeProfileDetails.read(from: &buf)
29278+
)
29279+
29280+
case 4: return .local(timestamp: try FfiConverterTypeTimestamp.read(from: &buf), sender: try FfiConverterString.read(from: &buf), profile: try FfiConverterTypeProfileDetails.read(from: &buf), content: try FfiConverterTypeTimelineItemContent.read(from: &buf), state: try FfiConverterTypeLatestEventValueLocalState.read(from: &buf)
2938229281
)
2938329282

2938429283
default: throw UniffiInternalError.unexpectedEnumCase
@@ -29402,9 +29301,16 @@ public struct FfiConverterTypeLatestEventValue: FfiConverterRustBuffer {
2940229301
FfiConverterTypeTimelineItemContent.write(content, into: &buf)
2940329302

2940429303

29405-
case let .local(timestamp,sender,profile,content,state):
29304+
case let .remoteInvite(timestamp,inviter,inviterProfile):
2940629305
writeInt(&buf, Int32(3))
2940729306
FfiConverterTypeTimestamp.write(timestamp, into: &buf)
29307+
FfiConverterOptionString.write(inviter, into: &buf)
29308+
FfiConverterTypeProfileDetails.write(inviterProfile, into: &buf)
29309+
29310+
29311+
case let .local(timestamp,sender,profile,content,state):
29312+
writeInt(&buf, Int32(4))
29313+
FfiConverterTypeTimestamp.write(timestamp, into: &buf)
2940829314
FfiConverterString.write(sender, into: &buf)
2940929315
FfiConverterTypeProfileDetails.write(profile, into: &buf)
2941029316
FfiConverterTypeTimelineItemContent.write(content, into: &buf)
@@ -37475,11 +37381,6 @@ public enum TimelineFilter {
3747537381
* appear in the timeline.
3747637382
*/types: [RoomMessageEventMessageType]
3747737383
)
37478-
/**
37479-
* Show only events which match this filter.
37480-
*/
37481-
case eventTypeFilter(filter: TimelineEventTypeFilter
37482-
)
3748337384
/**
3748437385
* Show only events which match this event filter.
3748537386
*/
@@ -37511,10 +37412,7 @@ public struct FfiConverterTypeTimelineFilter: FfiConverterRustBuffer {
3751137412
case 2: return .onlyMessage(types: try FfiConverterSequenceTypeRoomMessageEventMessageType.read(from: &buf)
3751237413
)
3751337414

37514-
case 3: return .eventTypeFilter(filter: try FfiConverterTypeTimelineEventTypeFilter.read(from: &buf)
37515-
)
37516-
37517-
case 4: return .eventFilter(filter: try FfiConverterTypeTimelineEventFilter.read(from: &buf)
37415+
case 3: return .eventFilter(filter: try FfiConverterTypeTimelineEventFilter.read(from: &buf)
3751837416
)
3751937417

3752037418
default: throw UniffiInternalError.unexpectedEnumCase
@@ -37534,13 +37432,8 @@ public struct FfiConverterTypeTimelineFilter: FfiConverterRustBuffer {
3753437432
FfiConverterSequenceTypeRoomMessageEventMessageType.write(types, into: &buf)
3753537433

3753637434

37537-
case let .eventTypeFilter(filter):
37538-
writeInt(&buf, Int32(3))
37539-
FfiConverterTypeTimelineEventTypeFilter.write(filter, into: &buf)
37540-
37541-
3754237435
case let .eventFilter(filter):
37543-
writeInt(&buf, Int32(4))
37436+
writeInt(&buf, Int32(3))
3754437437
FfiConverterTypeTimelineEventFilter.write(filter, into: &buf)
3754537438

3754637439
}
@@ -37582,8 +37475,8 @@ public enum TimelineFocus: Equatable, Hashable {
3758237475
* The number of context events to load around the focused event.
3758337476
*/numContextEvents: UInt16,
3758437477
/**
37585-
* Whether to hide in-thread replies from the live timeline.
37586-
*/hideThreadedEvents: Bool
37478+
* How to handle threaded events.
37479+
*/threadMode: TimelineEventFocusThreadMode
3758737480
)
3758837481
case thread(
3758937482
/**
@@ -37616,7 +37509,7 @@ public struct FfiConverterTypeTimelineFocus: FfiConverterRustBuffer {
3761637509
case 1: return .live(hideThreadedEvents: try FfiConverterBool.read(from: &buf)
3761737510
)
3761837511

37619-
case 2: return .event(eventId: try FfiConverterString.read(from: &buf), numContextEvents: try FfiConverterUInt16.read(from: &buf), hideThreadedEvents: try FfiConverterBool.read(from: &buf)
37512+
case 2: return .event(eventId: try FfiConverterString.read(from: &buf), numContextEvents: try FfiConverterUInt16.read(from: &buf), threadMode: try FfiConverterTypeTimelineEventFocusThreadMode.read(from: &buf)
3762037513
)
3762137514

3762237515
case 3: return .thread(rootEventId: try FfiConverterString.read(from: &buf)
@@ -37638,11 +37531,11 @@ public struct FfiConverterTypeTimelineFocus: FfiConverterRustBuffer {
3763837531
FfiConverterBool.write(hideThreadedEvents, into: &buf)
3763937532

3764037533

37641-
case let .event(eventId,numContextEvents,hideThreadedEvents):
37534+
case let .event(eventId,numContextEvents,threadMode):
3764237535
writeInt(&buf, Int32(2))
3764337536
FfiConverterString.write(eventId, into: &buf)
3764437537
FfiConverterUInt16.write(numContextEvents, into: &buf)
37645-
FfiConverterBool.write(hideThreadedEvents, into: &buf)
37538+
FfiConverterTypeTimelineEventFocusThreadMode.write(threadMode, into: &buf)
3764637539

3764737540

3764837541
case let .thread(rootEventId):
@@ -48283,7 +48176,7 @@ private let initializationResult: InitializationResult = {
4828348176
if (uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan() != 55947) {
4828448177
return InitializationResult.apiChecksumMismatch
4828548178
}
48286-
if (uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_server_name() != 52906) {
48179+
if (uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_server_name() != 30138) {
4828748180
return InitializationResult.apiChecksumMismatch
4828848181
}
4828948182
if (uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_to_bytes() != 22532) {
@@ -49078,13 +48971,13 @@ private let initializationResult: InitializationResult = {
4907848971
if (uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventfilter_exclude() != 53140) {
4907948972
return InitializationResult.apiChecksumMismatch
4908048973
}
49081-
if (uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventfilter_include() != 40738) {
48974+
if (uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventfilter_exclude_event_types() != 53727) {
4908248975
return InitializationResult.apiChecksumMismatch
4908348976
}
49084-
if (uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude() != 17142) {
48977+
if (uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventfilter_include() != 40738) {
4908548978
return InitializationResult.apiChecksumMismatch
4908648979
}
49087-
if (uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include() != 18137) {
48980+
if (uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventfilter_include_event_types() != 47927) {
4908848981
return InitializationResult.apiChecksumMismatch
4908948982
}
4909048983
if (uniffi_matrix_sdk_ffi_checksum_constructor_span_current() != 2135) {

0 commit comments

Comments
 (0)