From f7e5c77a9f443e93edb179d5cc1b0b1cb2f5e0b1 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Mon, 15 May 2023 18:54:05 +0300 Subject: [PATCH] Bump to v0.0.1-paginate-only-with-token (matrix-rust-sdk 18954a6ba57a6bfb5a42a58e65e5935a79cd40fa) --- Package.swift | 4 +- Sources/MatrixRustSDK/matrix_sdk_ffi.swift | 76 ++++++++++++++++------ 2 files changed, 59 insertions(+), 21 deletions(-) diff --git a/Package.swift b/Package.swift index 7a66773..350a849 100644 --- a/Package.swift +++ b/Package.swift @@ -3,8 +3,8 @@ import PackageDescription -let checksum = "101bc8e54cc69bcc9105085caf4c2ffe816ce44b9805e9c5b842bda01f949438" -let version = "v1.0.64-alpha" +let checksum = "f7d91caa2ad4a98a1513fbef110cb31231a13efd991977323a8be2323f3af47a" +let version = "v0.0.1-paginate-only-with-token" let url = "https://github.com/matrix-org/matrix-rust-components-swift/releases/download/\(version)/MatrixSDKFFI.xcframework.zip" let package = Package( diff --git a/Sources/MatrixRustSDK/matrix_sdk_ffi.swift b/Sources/MatrixRustSDK/matrix_sdk_ffi.swift index 2ad6d67..a3443b6 100644 --- a/Sources/MatrixRustSDK/matrix_sdk_ffi.swift +++ b/Sources/MatrixRustSDK/matrix_sdk_ffi.swift @@ -1560,6 +1560,7 @@ public func FfiConverterTypeMediaFileHandle_lower(_ value: MediaFileHandle) -> U public protocol MediaSourceProtocol { + func `toJson`() -> String func `url`() -> String } @@ -1580,9 +1581,29 @@ public class MediaSource: MediaSourceProtocol { + public static func `fromJson`(`json`: String) throws -> MediaSource { + return MediaSource(unsafeFromRawPointer: try rustCallWithError(FfiConverterTypeClientError.self) { + uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json( + FfiConverterString.lower(`json`), $0) +}) + } + + + + public func `toJson`() -> String { + return try! FfiConverterString.lift( + try! + rustCall() { + + uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json(self.pointer, $0 + ) +} + ) + } + public func `url`() -> String { return try! FfiConverterString.lift( try! @@ -1774,6 +1795,7 @@ public protocol RoomProtocol { func `isTombstoned`() -> Bool func `joinedMembersCount`() -> UInt64 func `leave`() throws + func `member`(`userId`: String) throws -> RoomMember func `members`() throws -> [RoomMember] func `membership`() -> Membership func `memberAvatarUrl`(`userId`: String) throws -> String? @@ -2047,6 +2069,17 @@ public class Room: RoomProtocol { } } + public func `member`(`userId`: String) throws -> RoomMember { + return try FfiConverterTypeRoomMember.lift( + try + rustCallWithError(FfiConverterTypeClientError.self) { + uniffi_matrix_sdk_ffi_fn_method_room_member(self.pointer, + FfiConverterString.lower(`userId`), $0 + ) +} + ) + } + public func `members`() throws -> [RoomMember] { return try FfiConverterSequenceTypeRoomMember.lift( try @@ -3471,7 +3504,7 @@ public func FfiConverterTypeSlidingSyncList_lower(_ value: SlidingSyncList) -> U public protocol SlidingSyncListBuilderProtocol { - func `addRange`(`from`: UInt32, `to`: UInt32) -> SlidingSyncListBuilder + func `addRange`(`from`: UInt32, `toIncluded`: UInt32) -> SlidingSyncListBuilder func `batchSize`(`batchSize`: UInt32) -> SlidingSyncListBuilder func `filters`(`filters`: SlidingSyncRequestListFilters) -> SlidingSyncListBuilder func `noFilters`() -> SlidingSyncListBuilder @@ -3512,14 +3545,14 @@ public class SlidingSyncListBuilder: SlidingSyncListBuilderProtocol { - public func `addRange`(`from`: UInt32, `to`: UInt32) -> SlidingSyncListBuilder { + public func `addRange`(`from`: UInt32, `toIncluded`: UInt32) -> SlidingSyncListBuilder { return try! FfiConverterTypeSlidingSyncListBuilder.lift( try! rustCall() { uniffi_matrix_sdk_ffi_fn_method_slidingsynclistbuilder_add_range(self.pointer, FfiConverterUInt32.lower(`from`), - FfiConverterUInt32.lower(`to`), $0 + FfiConverterUInt32.lower(`toIncluded`), $0 ) } ) @@ -3715,7 +3748,6 @@ public protocol SlidingSyncRoomProtocol { func `hasUnreadNotifications`() -> Bool func `isDm`() -> Bool? func `isInitial`() -> Bool? - func `isLoadingMore`() -> Bool func `latestRoomMessage`() -> EventTimelineItem? func `name`() -> String? func `roomId`() -> String @@ -3809,17 +3841,6 @@ public class SlidingSyncRoom: SlidingSyncRoomProtocol { ) } - public func `isLoadingMore`() -> Bool { - return try! FfiConverterBool.lift( - try! - rustCall() { - - uniffi_matrix_sdk_ffi_fn_method_slidingsyncroom_is_loading_more(self.pointer, $0 - ) -} - ) - } - public func `latestRoomMessage`() -> EventTimelineItem? { return try! FfiConverterOptionTypeEventTimelineItem.lift( try! @@ -11826,6 +11847,14 @@ public func `messageEventContentFromMarkdown`(`md`: String) -> RoomMessageEvent ) } +public func `sdkGitSha`() -> String { + return try! FfiConverterString.lift( + try! rustCall() { + uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha($0) +} + ) +} + public func `setupOtlpTracing`(`filter`: String, `clientName`: String, `user`: String, `password`: String, `otlpEndpoint`: String) { try! rustCall() { uniffi_matrix_sdk_ffi_fn_func_setup_otlp_tracing( @@ -11875,6 +11904,9 @@ private var checkVersionResult: CheckVersionResult { if (uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown() != 35040) { return CheckVersionResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha() != 11183) { + return CheckVersionResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_func_setup_otlp_tracing() != 53941) { return CheckVersionResult.apiChecksumMismatch } @@ -12013,6 +12045,9 @@ private var checkVersionResult: CheckVersionResult { if (uniffi_matrix_sdk_ffi_checksum_method_timelinediff_set() != 879) { return CheckVersionResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json() != 44584) { + return CheckVersionResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_mediasource_url() != 8330) { return CheckVersionResult.apiChecksumMismatch } @@ -12061,7 +12096,7 @@ private var checkVersionResult: CheckVersionResult { if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_user_agent() != 3669) { return CheckVersionResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_slidingsynclistbuilder_add_range() != 52420) { + if (uniffi_matrix_sdk_ffi_checksum_method_slidingsynclistbuilder_add_range() != 31001) { return CheckVersionResult.apiChecksumMismatch } if (uniffi_matrix_sdk_ffi_checksum_method_slidingsynclistbuilder_batch_size() != 18730) { @@ -12331,6 +12366,9 @@ private var checkVersionResult: CheckVersionResult { if (uniffi_matrix_sdk_ffi_checksum_method_room_leave() != 32484) { return CheckVersionResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_room_member() != 63311) { + return CheckVersionResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_room_members() != 28201) { return CheckVersionResult.apiChecksumMismatch } @@ -12505,9 +12543,6 @@ private var checkVersionResult: CheckVersionResult { if (uniffi_matrix_sdk_ffi_checksum_method_slidingsyncroom_is_initial() != 63464) { return CheckVersionResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_slidingsyncroom_is_loading_more() != 14088) { - return CheckVersionResult.apiChecksumMismatch - } if (uniffi_matrix_sdk_ffi_checksum_method_slidingsyncroom_latest_room_message() != 23437) { return CheckVersionResult.apiChecksumMismatch } @@ -12544,6 +12579,9 @@ private var checkVersionResult: CheckVersionResult { if (uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count() != 52564) { return CheckVersionResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_json() != 36478) { + return CheckVersionResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_constructor_authenticationservice_new() != 51213) { return CheckVersionResult.apiChecksumMismatch }