diff --git a/Package.swift b/Package.swift index 2ecd448..38727a4 100644 --- a/Package.swift +++ b/Package.swift @@ -3,8 +3,8 @@ import PackageDescription -let checksum = "aedf4a97b19b17757cbbb06ebcd2be48cc9f82f1fa2a39028d8b5783c43d41ad" -let version = "v1.1.55" +let checksum = "8250ca186bbf106e435a910afdb612bc75ca4e83413b7e16897fa8ce7f2be524" +let version = "v1.1.56" 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 f530437..2d70a96 100644 --- a/Sources/MatrixRustSDK/matrix_sdk_ffi.swift +++ b/Sources/MatrixRustSDK/matrix_sdk_ffi.swift @@ -806,6 +806,8 @@ public protocol ClientProtocol : AnyObject { func getProfile(userId: String) throws -> UserProfile + func getRecentlyVisitedRooms() async throws -> [String] + func getSessionVerificationController() throws -> SessionVerificationController /** @@ -868,6 +870,8 @@ public protocol ClientProtocol : AnyObject { func syncService() -> SyncServiceBuilder + func trackRecentlyVisitedRoom(room: String) async throws + func unignoreUser(userId: String) async throws func uploadAvatar(mimeType: String, data: Data) throws @@ -1108,6 +1112,22 @@ open class Client: } ) } + open func getRecentlyVisitedRooms() async throws -> [String] { + return try await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_matrix_sdk_ffi_fn_method_client_get_recently_visited_rooms( + self.uniffiClonePointer() + ) + }, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_rust_buffer, + liftFunc: FfiConverterSequenceString.lift, + errorHandler: FfiConverterTypeClientError.lift + ) + } + + open func getSessionVerificationController() throws -> SessionVerificationController { return try FfiConverterTypeSessionVerificationController.lift( try @@ -1355,6 +1375,23 @@ open class Client: } ) } + open func trackRecentlyVisitedRoom(room: String) async throws { + return try await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_matrix_sdk_ffi_fn_method_client_track_recently_visited_room( + self.uniffiClonePointer(), + FfiConverterString.lower(room) + ) + }, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_void, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_void, + liftFunc: { $0 }, + errorHandler: FfiConverterTypeClientError.lift + ) + } + + open func unignoreUser(userId: String) async throws { return try await uniffiRustCallAsync( rustFutureFunc: { @@ -23150,6 +23187,9 @@ private var initializationResult: InitializationResult { if (uniffi_matrix_sdk_ffi_checksum_method_client_get_profile() != 54768) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms() != 22399) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_client_get_session_verification_controller() != 62335) { return InitializationResult.apiChecksumMismatch } @@ -23210,6 +23250,9 @@ private var initializationResult: InitializationResult { if (uniffi_matrix_sdk_ffi_checksum_method_client_sync_service() != 52812) { return InitializationResult.apiChecksumMismatch } + if (uniffi_matrix_sdk_ffi_checksum_method_client_track_recently_visited_room() != 37070) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_matrix_sdk_ffi_checksum_method_client_unignore_user() != 9349) { return InitializationResult.apiChecksumMismatch }