Skip to content

Commit 2821191

Browse files
committed
Bump to v1.0.107-alpha (matrix-rust-sdk 0dac5080c6a8efbe850b3c6ffa3e681c3d45f297)
1 parent e9c185d commit 2821191

File tree

2 files changed

+41
-59
lines changed

2 files changed

+41
-59
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
import PackageDescription
55

6-
let checksum = "70256db09e1249879d81aa8fd76ed7812799e0db9732001118f6e20863fee0e6"
7-
let version = "v1.0.106-alpha"
6+
let checksum = "2a696139721ef47e5adef6a835dbb192494b5c8d1c999f6f27156d18eb41f398"
7+
let version = "v1.0.107-alpha"
88
let url = "https://github.com/matrix-org/matrix-rust-components-swift/releases/download/\(version)/MatrixSDKFFI.xcframework.zip"
99

1010
let package = Package(

Sources/MatrixRustSDK/matrix_sdk_ffi.swift

Lines changed: 39 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -4691,12 +4691,11 @@ public class Span: SpanProtocol {
46914691
required init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) {
46924692
self.pointer = pointer
46934693
}
4694-
public convenience init(`file`: String, `line`: UInt32, `column`: UInt32, `level`: LogLevel, `target`: String, `name`: String) {
4694+
public convenience init(`file`: String, `line`: UInt32?, `level`: LogLevel, `target`: String, `name`: String) {
46954695
self.init(unsafeFromRawPointer: try! rustCall() {
46964696
uniffi_matrix_sdk_ffi_fn_constructor_span_new(
46974697
FfiConverterString.lower(`file`),
4698-
FfiConverterUInt32.lower(`line`),
4699-
FfiConverterUInt32.lower(`column`),
4698+
FfiConverterOptionUInt32.lower(`line`),
47004699
FfiConverterTypeLogLevel.lower(`level`),
47014700
FfiConverterString.lower(`target`),
47024701
FfiConverterString.lower(`name`),$0)
@@ -4791,11 +4790,10 @@ public func FfiConverterTypeSpan_lower(_ value: Span) -> UnsafeMutableRawPointer
47914790

47924791

47934792
public protocol SyncServiceProtocol {
4794-
func `currentState`() -> SyncServiceState
4795-
func `pause`() throws
47964793
func `roomListService`() -> RoomListService
4797-
func `start`() async throws
4794+
func `start`() async
47984795
func `state`(`listener`: SyncServiceStateObserver) -> TaskHandle
4796+
func `stop`() async throws
47994797

48004798
}
48014799

@@ -4818,25 +4816,6 @@ public class SyncService: SyncServiceProtocol {
48184816

48194817

48204818

4821-
public func `currentState`() -> SyncServiceState {
4822-
return try! FfiConverterTypeSyncServiceState.lift(
4823-
try!
4824-
rustCall() {
4825-
4826-
uniffi_matrix_sdk_ffi_fn_method_syncservice_current_state(self.pointer, $0
4827-
)
4828-
}
4829-
)
4830-
}
4831-
4832-
public func `pause`() throws {
4833-
try
4834-
rustCallWithError(FfiConverterTypeClientError.lift) {
4835-
uniffi_matrix_sdk_ffi_fn_method_syncservice_pause(self.pointer, $0
4836-
)
4837-
}
4838-
}
4839-
48404819
public func `roomListService`() -> RoomListService {
48414820
return try! FfiConverterTypeRoomListService.lift(
48424821
try!
@@ -4848,21 +4827,21 @@ public class SyncService: SyncServiceProtocol {
48484827
)
48494828
}
48504829

4851-
public func `start`() async throws {
4830+
public func `start`() async {
48524831
// Suspend the function and call the scaffolding function, passing it a callback handler from
48534832
// `AsyncTypes.swift`
48544833
//
48554834
// Make sure to hold on to a reference to the continuation in the top-level scope so that
48564835
// it's not freed before the callback is invoked.
48574836
var continuation: CheckedContinuation<(), Error>? = nil
4858-
return try await withCheckedThrowingContinuation {
4837+
return try! await withCheckedThrowingContinuation {
48594838
continuation = $0
48604839
try! rustCall() {
48614840
uniffi_matrix_sdk_ffi_fn_method_syncservice_start(
48624841
self.pointer,
48634842

48644843
FfiConverterForeignExecutor.lower(UniFfiForeignExecutor()),
4865-
uniffiFutureCallbackHandlerVoidTypeClientError,
4844+
uniffiFutureCallbackHandlerVoid,
48664845
&continuation,
48674846
$0
48684847
)
@@ -4883,6 +4862,30 @@ public class SyncService: SyncServiceProtocol {
48834862
}
48844863
)
48854864
}
4865+
4866+
public func `stop`() async throws {
4867+
// Suspend the function and call the scaffolding function, passing it a callback handler from
4868+
// `AsyncTypes.swift`
4869+
//
4870+
// Make sure to hold on to a reference to the continuation in the top-level scope so that
4871+
// it's not freed before the callback is invoked.
4872+
var continuation: CheckedContinuation<(), Error>? = nil
4873+
return try await withCheckedThrowingContinuation {
4874+
continuation = $0
4875+
try! rustCall() {
4876+
uniffi_matrix_sdk_ffi_fn_method_syncservice_stop(
4877+
self.pointer,
4878+
4879+
FfiConverterForeignExecutor.lower(UniFfiForeignExecutor()),
4880+
uniffiFutureCallbackHandlerVoidTypeClientError,
4881+
&continuation,
4882+
$0
4883+
)
4884+
}
4885+
}
4886+
}
4887+
4888+
48864889
}
48874890

48884891
public struct FfiConverterTypeSyncService: FfiConverter {
@@ -15251,23 +15254,6 @@ fileprivate func uniffiFutureCallbackHandlerTypeRoomNotificationMode(
1525115254
continuation.pointee.resume(throwing: error)
1525215255
}
1525315256
}
15254-
fileprivate func uniffiFutureCallbackHandlerTypeSyncServiceState(
15255-
rawContinutation: UnsafeRawPointer,
15256-
returnValue: RustBuffer,
15257-
callStatus: RustCallStatus) {
15258-
15259-
let continuation = rawContinutation.bindMemory(
15260-
to: CheckedContinuation<SyncServiceState, Error>.self,
15261-
capacity: 1
15262-
)
15263-
15264-
do {
15265-
try uniffiCheckCallStatus(callStatus: callStatus, errorHandler: nil)
15266-
continuation.pointee.resume(returning: try FfiConverterTypeSyncServiceState.lift(returnValue))
15267-
} catch let error {
15268-
continuation.pointee.resume(throwing: error)
15269-
}
15270-
}
1527115257
fileprivate func uniffiFutureCallbackHandlerTypeTimelineChange(
1527215258
rawContinutation: UnsafeRawPointer,
1527315259
returnValue: RustBuffer,
@@ -15753,12 +15739,11 @@ public func `genTransactionId`() -> String {
1575315739
)
1575415740
}
1575515741

15756-
public func `logEvent`(`file`: String, `line`: UInt32, `column`: UInt32, `level`: LogLevel, `target`: String, `message`: String) {
15742+
public func `logEvent`(`file`: String, `line`: UInt32?, `level`: LogLevel, `target`: String, `message`: String) {
1575715743
try! rustCall() {
1575815744
uniffi_matrix_sdk_ffi_fn_func_log_event(
1575915745
FfiConverterString.lower(`file`),
15760-
FfiConverterUInt32.lower(`line`),
15761-
FfiConverterUInt32.lower(`column`),
15746+
FfiConverterOptionUInt32.lower(`line`),
1576215747
FfiConverterTypeLogLevel.lower(`level`),
1576315748
FfiConverterString.lower(`target`),
1576415749
FfiConverterString.lower(`message`),$0)
@@ -15838,7 +15823,7 @@ private var initializationResult: InitializationResult {
1583815823
if (uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id() != 65533) {
1583915824
return InitializationResult.apiChecksumMismatch
1584015825
}
15841-
if (uniffi_matrix_sdk_ffi_checksum_func_log_event() != 48093) {
15826+
if (uniffi_matrix_sdk_ffi_checksum_func_log_event() != 58164) {
1584215827
return InitializationResult.apiChecksumMismatch
1584315828
}
1584415829
if (uniffi_matrix_sdk_ffi_checksum_func_media_source_from_url() != 28929) {
@@ -16471,21 +16456,18 @@ private var initializationResult: InitializationResult {
1647116456
if (uniffi_matrix_sdk_ffi_checksum_method_span_is_none() != 23839) {
1647216457
return InitializationResult.apiChecksumMismatch
1647316458
}
16474-
if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_current_state() != 18935) {
16475-
return InitializationResult.apiChecksumMismatch
16476-
}
16477-
if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_pause() != 2733) {
16478-
return InitializationResult.apiChecksumMismatch
16479-
}
1648016459
if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_service() != 18295) {
1648116460
return InitializationResult.apiChecksumMismatch
1648216461
}
16483-
if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_start() != 31472) {
16462+
if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_start() != 4435) {
1648416463
return InitializationResult.apiChecksumMismatch
1648516464
}
1648616465
if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_state() != 15048) {
1648716466
return InitializationResult.apiChecksumMismatch
1648816467
}
16468+
if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_stop() != 39770) {
16469+
return InitializationResult.apiChecksumMismatch
16470+
}
1648916471
if (uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_finish() != 61604) {
1649016472
return InitializationResult.apiChecksumMismatch
1649116473
}
@@ -16573,7 +16555,7 @@ private var initializationResult: InitializationResult {
1657316555
if (uniffi_matrix_sdk_ffi_checksum_constructor_span_current() != 47163) {
1657416556
return InitializationResult.apiChecksumMismatch
1657516557
}
16576-
if (uniffi_matrix_sdk_ffi_checksum_constructor_span_new() != 17142) {
16558+
if (uniffi_matrix_sdk_ffi_checksum_constructor_span_new() != 47854) {
1657716559
return InitializationResult.apiChecksumMismatch
1657816560
}
1657916561
if (uniffi_matrix_sdk_ffi_checksum_method_backpaginationstatuslistener_on_update() != 2582) {

0 commit comments

Comments
 (0)