Skip to content

Commit 76ccbfd

Browse files
committed
Bump to version v1.0.14 (matrix-rust-sdk/main 72adaf4)
1 parent 94373ae commit 76ccbfd

File tree

2 files changed

+137
-64
lines changed

2 files changed

+137
-64
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 = "be1b65972780ed24592d4bf6655ed55ea8bc06c926e8a796d66aa51aefcfd36c"
5-
let version = "v1.0.13"
4+
let checksum = "f4081f37f28dacd5644367919a17d115b39b597f2fad47cfaa5aa3cc2968f234"
5+
let version = "v1.0.14"
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: 135 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -6279,7 +6279,7 @@ public protocol RoomListProtocol : AnyObject {
62796279

62806280
func loadingState(listener: RoomListLoadingStateListener) throws -> RoomListLoadingStateResult
62816281

6282-
func room(roomId: String) async throws -> RoomListItem
6282+
func room(roomId: String) throws -> RoomListItem
62836283

62846284
}
62856285

@@ -6349,21 +6349,12 @@ open func loadingState(listener: RoomListLoadingStateListener)throws -> RoomLis
63496349
})
63506350
}
63516351

6352-
open func room(roomId: String)async throws -> RoomListItem {
6353-
return
6354-
try await uniffiRustCallAsync(
6355-
rustFutureFunc: {
6356-
uniffi_matrix_sdk_ffi_fn_method_roomlist_room(
6357-
self.uniffiClonePointer(),
6358-
FfiConverterString.lower(roomId)
6359-
)
6360-
},
6361-
pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_pointer,
6362-
completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_pointer,
6363-
freeFunc: ffi_matrix_sdk_ffi_rust_future_free_pointer,
6364-
liftFunc: FfiConverterTypeRoomListItem.lift,
6365-
errorHandler: FfiConverterTypeRoomListError.lift
6366-
)
6352+
open func room(roomId: String)throws -> RoomListItem {
6353+
return try FfiConverterTypeRoomListItem.lift(try rustCallWithError(FfiConverterTypeRoomListError.lift) {
6354+
uniffi_matrix_sdk_ffi_fn_method_roomlist_room(self.uniffiClonePointer(),
6355+
FfiConverterString.lower(roomId),$0
6356+
)
6357+
})
63676358
}
63686359

63696360

@@ -6816,7 +6807,7 @@ public protocol RoomListServiceProtocol : AnyObject {
68166807

68176808
func applyInput(input: RoomListInput) async throws
68186809

6819-
func room(roomId: String) async throws -> RoomListItem
6810+
func room(roomId: String) throws -> RoomListItem
68206811

68216812
func state(listener: RoomListServiceStateListener) -> TaskHandle
68226813

@@ -6899,21 +6890,12 @@ open func applyInput(input: RoomListInput)async throws {
68996890
)
69006891
}
69016892

6902-
open func room(roomId: String)async throws -> RoomListItem {
6903-
return
6904-
try await uniffiRustCallAsync(
6905-
rustFutureFunc: {
6906-
uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room(
6907-
self.uniffiClonePointer(),
6908-
FfiConverterString.lower(roomId)
6909-
)
6910-
},
6911-
pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_pointer,
6912-
completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_pointer,
6913-
freeFunc: ffi_matrix_sdk_ffi_rust_future_free_pointer,
6914-
liftFunc: FfiConverterTypeRoomListItem.lift,
6915-
errorHandler: FfiConverterTypeRoomListError.lift
6916-
)
6893+
open func room(roomId: String)throws -> RoomListItem {
6894+
return try FfiConverterTypeRoomListItem.lift(try rustCallWithError(FfiConverterTypeRoomListError.lift) {
6895+
uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room(self.uniffiClonePointer(),
6896+
FfiConverterString.lower(roomId),$0
6897+
)
6898+
})
69176899
}
69186900

69196901
open func state(listener: RoomListServiceStateListener) -> TaskHandle {
@@ -8274,8 +8256,6 @@ public protocol TimelineProtocol : AnyObject {
82748256
*/
82758257
func getEventTimelineItemByTransactionId(transactionId: String) async throws -> EventTimelineItem
82768258

8277-
func latestEvent() async -> EventTimelineItem?
8278-
82798259
/**
82808260
* Load the reply details for the given event id.
82818261
*
@@ -8578,24 +8558,6 @@ open func getEventTimelineItemByTransactionId(transactionId: String)async throws
85788558
)
85798559
}
85808560

8581-
open func latestEvent()async -> EventTimelineItem? {
8582-
return
8583-
try! await uniffiRustCallAsync(
8584-
rustFutureFunc: {
8585-
uniffi_matrix_sdk_ffi_fn_method_timeline_latest_event(
8586-
self.uniffiClonePointer()
8587-
8588-
)
8589-
},
8590-
pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer,
8591-
completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer,
8592-
freeFunc: ffi_matrix_sdk_ffi_rust_future_free_rust_buffer,
8593-
liftFunc: FfiConverterOptionTypeEventTimelineItem.lift,
8594-
errorHandler: nil
8595-
8596-
)
8597-
}
8598-
85998561
/**
86008562
* Load the reply details for the given event id.
86018563
*
@@ -12233,7 +12195,6 @@ public struct RoomInfo {
1223312195
public var canonicalAlias: String?
1223412196
public var alternativeAliases: [String]
1223512197
public var membership: Membership
12236-
public var latestEvent: EventTimelineItem?
1223712198
/**
1223812199
* Member who invited the current user to a room that's in the invited
1223912200
* state.
@@ -12280,7 +12241,7 @@ public struct RoomInfo {
1228012241
*/displayName: String?,
1228112242
/**
1228212243
* Room name as defined by the room state event only.
12283-
*/rawName: String?, topic: String?, avatarUrl: String?, isDirect: Bool, isPublic: Bool, isSpace: Bool, isTombstoned: Bool, isFavourite: Bool, canonicalAlias: String?, alternativeAliases: [String], membership: Membership, latestEvent: EventTimelineItem?,
12244+
*/rawName: String?, topic: String?, avatarUrl: String?, isDirect: Bool, isPublic: Bool, isSpace: Bool, isTombstoned: Bool, isFavourite: Bool, canonicalAlias: String?, alternativeAliases: [String], membership: Membership,
1228412245
/**
1228512246
* Member who invited the current user to a room that's in the invited
1228612247
* state.
@@ -12316,7 +12277,6 @@ public struct RoomInfo {
1231612277
self.canonicalAlias = canonicalAlias
1231712278
self.alternativeAliases = alternativeAliases
1231812279
self.membership = membership
12319-
self.latestEvent = latestEvent
1232012280
self.inviter = inviter
1232112281
self.activeMembersCount = activeMembersCount
1232212282
self.invitedMembersCount = invitedMembersCount
@@ -12336,6 +12296,124 @@ public struct RoomInfo {
1233612296

1233712297

1233812298

12299+
extension RoomInfo: Equatable, Hashable {
12300+
public static func ==(lhs: RoomInfo, rhs: RoomInfo) -> Bool {
12301+
if lhs.id != rhs.id {
12302+
return false
12303+
}
12304+
if lhs.displayName != rhs.displayName {
12305+
return false
12306+
}
12307+
if lhs.rawName != rhs.rawName {
12308+
return false
12309+
}
12310+
if lhs.topic != rhs.topic {
12311+
return false
12312+
}
12313+
if lhs.avatarUrl != rhs.avatarUrl {
12314+
return false
12315+
}
12316+
if lhs.isDirect != rhs.isDirect {
12317+
return false
12318+
}
12319+
if lhs.isPublic != rhs.isPublic {
12320+
return false
12321+
}
12322+
if lhs.isSpace != rhs.isSpace {
12323+
return false
12324+
}
12325+
if lhs.isTombstoned != rhs.isTombstoned {
12326+
return false
12327+
}
12328+
if lhs.isFavourite != rhs.isFavourite {
12329+
return false
12330+
}
12331+
if lhs.canonicalAlias != rhs.canonicalAlias {
12332+
return false
12333+
}
12334+
if lhs.alternativeAliases != rhs.alternativeAliases {
12335+
return false
12336+
}
12337+
if lhs.membership != rhs.membership {
12338+
return false
12339+
}
12340+
if lhs.inviter != rhs.inviter {
12341+
return false
12342+
}
12343+
if lhs.activeMembersCount != rhs.activeMembersCount {
12344+
return false
12345+
}
12346+
if lhs.invitedMembersCount != rhs.invitedMembersCount {
12347+
return false
12348+
}
12349+
if lhs.joinedMembersCount != rhs.joinedMembersCount {
12350+
return false
12351+
}
12352+
if lhs.userPowerLevels != rhs.userPowerLevels {
12353+
return false
12354+
}
12355+
if lhs.highlightCount != rhs.highlightCount {
12356+
return false
12357+
}
12358+
if lhs.notificationCount != rhs.notificationCount {
12359+
return false
12360+
}
12361+
if lhs.userDefinedNotificationMode != rhs.userDefinedNotificationMode {
12362+
return false
12363+
}
12364+
if lhs.hasRoomCall != rhs.hasRoomCall {
12365+
return false
12366+
}
12367+
if lhs.activeRoomCallParticipants != rhs.activeRoomCallParticipants {
12368+
return false
12369+
}
12370+
if lhs.isMarkedUnread != rhs.isMarkedUnread {
12371+
return false
12372+
}
12373+
if lhs.numUnreadMessages != rhs.numUnreadMessages {
12374+
return false
12375+
}
12376+
if lhs.numUnreadNotifications != rhs.numUnreadNotifications {
12377+
return false
12378+
}
12379+
if lhs.numUnreadMentions != rhs.numUnreadMentions {
12380+
return false
12381+
}
12382+
return true
12383+
}
12384+
12385+
public func hash(into hasher: inout Hasher) {
12386+
hasher.combine(id)
12387+
hasher.combine(displayName)
12388+
hasher.combine(rawName)
12389+
hasher.combine(topic)
12390+
hasher.combine(avatarUrl)
12391+
hasher.combine(isDirect)
12392+
hasher.combine(isPublic)
12393+
hasher.combine(isSpace)
12394+
hasher.combine(isTombstoned)
12395+
hasher.combine(isFavourite)
12396+
hasher.combine(canonicalAlias)
12397+
hasher.combine(alternativeAliases)
12398+
hasher.combine(membership)
12399+
hasher.combine(inviter)
12400+
hasher.combine(activeMembersCount)
12401+
hasher.combine(invitedMembersCount)
12402+
hasher.combine(joinedMembersCount)
12403+
hasher.combine(userPowerLevels)
12404+
hasher.combine(highlightCount)
12405+
hasher.combine(notificationCount)
12406+
hasher.combine(userDefinedNotificationMode)
12407+
hasher.combine(hasRoomCall)
12408+
hasher.combine(activeRoomCallParticipants)
12409+
hasher.combine(isMarkedUnread)
12410+
hasher.combine(numUnreadMessages)
12411+
hasher.combine(numUnreadNotifications)
12412+
hasher.combine(numUnreadMentions)
12413+
}
12414+
}
12415+
12416+
1233912417
public struct FfiConverterTypeRoomInfo: FfiConverterRustBuffer {
1234012418
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RoomInfo {
1234112419
return
@@ -12353,7 +12431,6 @@ public struct FfiConverterTypeRoomInfo: FfiConverterRustBuffer {
1235312431
canonicalAlias: FfiConverterOptionString.read(from: &buf),
1235412432
alternativeAliases: FfiConverterSequenceString.read(from: &buf),
1235512433
membership: FfiConverterTypeMembership.read(from: &buf),
12356-
latestEvent: FfiConverterOptionTypeEventTimelineItem.read(from: &buf),
1235712434
inviter: FfiConverterOptionTypeRoomMember.read(from: &buf),
1235812435
activeMembersCount: FfiConverterUInt64.read(from: &buf),
1235912436
invitedMembersCount: FfiConverterUInt64.read(from: &buf),
@@ -12385,7 +12462,6 @@ public struct FfiConverterTypeRoomInfo: FfiConverterRustBuffer {
1238512462
FfiConverterOptionString.write(value.canonicalAlias, into: &buf)
1238612463
FfiConverterSequenceString.write(value.alternativeAliases, into: &buf)
1238712464
FfiConverterTypeMembership.write(value.membership, into: &buf)
12388-
FfiConverterOptionTypeEventTimelineItem.write(value.latestEvent, into: &buf)
1238912465
FfiConverterOptionTypeRoomMember.write(value.inviter, into: &buf)
1239012466
FfiConverterUInt64.write(value.activeMembersCount, into: &buf)
1239112467
FfiConverterUInt64.write(value.invitedMembersCount, into: &buf)
@@ -25743,7 +25819,7 @@ private var initializationResult: InitializationResult {
2574325819
if (uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state() != 21585) {
2574425820
return InitializationResult.apiChecksumMismatch
2574525821
}
25746-
if (uniffi_matrix_sdk_ffi_checksum_method_roomlist_room() != 36256) {
25822+
if (uniffi_matrix_sdk_ffi_checksum_method_roomlist_room() != 8801) {
2574725823
return InitializationResult.apiChecksumMismatch
2574825824
}
2574925825
if (uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page() != 47748) {
@@ -25797,7 +25873,7 @@ private var initializationResult: InitializationResult {
2579725873
if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_apply_input() != 31607) {
2579825874
return InitializationResult.apiChecksumMismatch
2579925875
}
25800-
if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room() != 11566) {
25876+
if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room() != 5185) {
2580125877
return InitializationResult.apiChecksumMismatch
2580225878
}
2580325879
if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state() != 64650) {
@@ -25911,9 +25987,6 @@ private var initializationResult: InitializationResult {
2591125987
if (uniffi_matrix_sdk_ffi_checksum_method_timeline_get_event_timeline_item_by_transaction_id() != 64706) {
2591225988
return InitializationResult.apiChecksumMismatch
2591325989
}
25914-
if (uniffi_matrix_sdk_ffi_checksum_method_timeline_latest_event() != 11115) {
25915-
return InitializationResult.apiChecksumMismatch
25916-
}
2591725990
if (uniffi_matrix_sdk_ffi_checksum_method_timeline_load_reply_details() != 52892) {
2591825991
return InitializationResult.apiChecksumMismatch
2591925992
}

0 commit comments

Comments
 (0)