Skip to content

Commit 057d3ea

Browse files
committed
Bump to version 25.09.15 (matrix-rust-sdk/main e83f37e68b239e931a12c000bbd1868a59d8bb7f)
1 parent c7d11bf commit 057d3ea

File tree

3 files changed

+163
-20
lines changed

3 files changed

+163
-20
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 = "f3374ce650714977af3b98d043585375d714bbe4e90d71a1f7ee6cd9784c3ec1"
5-
let version = "25.09.12"
4+
let checksum = "b3083ef8916fa7f2e6c058cff0cf8b4f2d5dad68fce0223fa656602dd481ea74"
5+
let version = "25.09.15"
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.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -920,46 +920,46 @@ public struct VirtualElementCallWidgetConfig {
920920
*/intent: Intent?,
921921
/**
922922
* Skip the lobby when joining a call.
923-
*/skipLobby: Bool?,
923+
*/skipLobby: Bool? = nil,
924924
/**
925925
* Whether the branding header of Element call should be shown or if a
926926
* mobile header navbar should be render.
927927
*
928928
* Default: [`HeaderStyle::Standard`]
929-
*/header: HeaderStyle?,
929+
*/header: HeaderStyle? = nil,
930930
/**
931931
* Whether the branding header of Element call should be hidden.
932932
*
933933
* Default: `true`
934-
*/hideHeader: Bool?,
934+
*/hideHeader: Bool? = nil,
935935
/**
936936
* If set, the lobby will be skipped and the widget will join the
937937
* call on the `io.element.join` action.
938938
*
939939
* Default: `false`
940-
*/preload: Bool?,
940+
*/preload: Bool? = nil,
941941
/**
942942
* Whether element call should prompt the user to open in the browser or
943943
* the app.
944944
*
945945
* Default: `false`
946-
*/appPrompt: Bool?,
946+
*/appPrompt: Bool? = nil,
947947
/**
948948
* Make it not possible to get to the calls list in the webview.
949949
*
950950
* Default: `true`
951-
*/confineToRoom: Bool?,
951+
*/confineToRoom: Bool? = nil,
952952
/**
953953
* Do not show the screenshare button.
954-
*/hideScreensharing: Bool?,
954+
*/hideScreensharing: Bool? = nil,
955955
/**
956956
* Make the audio devices be controlled by the os instead of the
957957
* element-call webview.
958-
*/controlledAudioDevices: Bool?,
958+
*/controlledAudioDevices: Bool? = nil,
959959
/**
960960
* Whether and what type of notification Element Call should send, when
961961
* starting a call.
962-
*/sendNotificationType: NotificationType?) {
962+
*/sendNotificationType: NotificationType? = nil) {
963963
self.intent = intent
964964
self.skipLobby = skipLobby
965965
self.header = header
@@ -1171,43 +1171,43 @@ public struct VirtualElementCallWidgetProperties {
11711171
*
11721172
* Defaults to `element_call_url` for the non-iframe (dedicated webview)
11731173
* usecase.
1174-
*/parentUrl: String?,
1174+
*/parentUrl: String? = nil,
11751175
/**
11761176
* The font scale which will be used inside element call.
11771177
*
11781178
* Default: `1`
1179-
*/fontScale: Double?,
1179+
*/fontScale: Double? = nil,
11801180
/**
11811181
* The font to use, to adapt to the system font.
1182-
*/font: String?,
1182+
*/font: String? = nil,
11831183
/**
11841184
* The encryption system to use.
11851185
*
11861186
* Use `EncryptionSystem::Unencrypted` to disable encryption.
11871187
*/encryption: EncryptionSystem,
11881188
/**
11891189
* Can be used to pass a PostHog id to element call.
1190-
*/posthogUserId: String?,
1190+
*/posthogUserId: String? = nil,
11911191
/**
11921192
* The host of the posthog api.
11931193
* This is only used by the embedded package of Element Call.
1194-
*/posthogApiHost: String?,
1194+
*/posthogApiHost: String? = nil,
11951195
/**
11961196
* The key for the posthog api.
11971197
* This is only used by the embedded package of Element Call.
1198-
*/posthogApiKey: String?,
1198+
*/posthogApiKey: String? = nil,
11991199
/**
12001200
* The url to use for submitting rageshakes.
12011201
* This is only used by the embedded package of Element Call.
1202-
*/rageshakeSubmitUrl: String?,
1202+
*/rageshakeSubmitUrl: String? = nil,
12031203
/**
12041204
* Sentry [DSN](https://docs.sentry.io/concepts/key-terms/dsn-explainer/)
12051205
* This is only used by the embedded package of Element Call.
1206-
*/sentryDsn: String?,
1206+
*/sentryDsn: String? = nil,
12071207
/**
12081208
* Sentry [environment](https://docs.sentry.io/concepts/key-terms/key-terms/)
12091209
* This is only used by the embedded package of Element Call.
1210-
*/sentryEnvironment: String?) {
1210+
*/sentryEnvironment: String? = nil) {
12111211
self.elementCallUrl = elementCallUrl
12121212
self.widgetId = widgetId
12131213
self.parentUrl = parentUrl

Sources/MatrixRustSDK/matrix_sdk_ffi.swift

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11024,6 +11024,11 @@ public protocol SpaceRoomListProtocol : AnyObject {
1102411024
*/
1102511025
func rooms() -> [SpaceRoom]
1102611026

11027+
/**
11028+
* Returns the space of the room list if known.
11029+
*/
11030+
func space() -> SpaceRoom?
11031+
1102711032
/**
1102811033
* Subscribe to pagination updates.
1102911034
*/
@@ -11034,6 +11039,11 @@ public protocol SpaceRoomListProtocol : AnyObject {
1103411039
*/
1103511040
func subscribeToRoomUpdate(listener: SpaceRoomListEntriesListener) -> TaskHandle
1103611041

11042+
/**
11043+
* Subscribe to space updates.
11044+
*/
11045+
func subscribeToSpaceUpdates(listener: SpaceRoomListSpaceListener) -> TaskHandle
11046+
1103711047
}
1103811048

1103911049
/**
@@ -11127,6 +11137,16 @@ open func rooms() -> [SpaceRoom] {
1112711137
uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms(self.uniffiClonePointer(),$0
1112811138
)
1112911139
})
11140+
}
11141+
11142+
/**
11143+
* Returns the space of the room list if known.
11144+
*/
11145+
open func space() -> SpaceRoom? {
11146+
return try! FfiConverterOptionTypeSpaceRoom.lift(try! rustCall() {
11147+
uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_space(self.uniffiClonePointer(),$0
11148+
)
11149+
})
1113011150
}
1113111151

1113211152
/**
@@ -11151,6 +11171,17 @@ open func subscribeToRoomUpdate(listener: SpaceRoomListEntriesListener) -> TaskH
1115111171
})
1115211172
}
1115311173

11174+
/**
11175+
* Subscribe to space updates.
11176+
*/
11177+
open func subscribeToSpaceUpdates(listener: SpaceRoomListSpaceListener) -> TaskHandle {
11178+
return try! FfiConverterTypeTaskHandle.lift(try! rustCall() {
11179+
uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_space_updates(self.uniffiClonePointer(),
11180+
FfiConverterCallbackInterfaceSpaceRoomListSpaceListener.lower(listener),$0
11181+
)
11182+
})
11183+
}
11184+
1115411185

1115511186
}
1115611187

@@ -34846,6 +34877,87 @@ extension FfiConverterCallbackInterfaceSpaceRoomListPaginationStateListener : Ff
3484634877

3484734878

3484834879

34880+
public protocol SpaceRoomListSpaceListener : AnyObject {
34881+
34882+
func onUpdate(space: SpaceRoom?)
34883+
34884+
}
34885+
34886+
34887+
34888+
// Put the implementation in a struct so we don't pollute the top-level namespace
34889+
fileprivate struct UniffiCallbackInterfaceSpaceRoomListSpaceListener {
34890+
34891+
// Create the VTable using a series of closures.
34892+
// Swift automatically converts these into C callback functions.
34893+
static var vtable: UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener = UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener(
34894+
onUpdate: { (
34895+
uniffiHandle: UInt64,
34896+
space: RustBuffer,
34897+
uniffiOutReturn: UnsafeMutableRawPointer,
34898+
uniffiCallStatus: UnsafeMutablePointer<RustCallStatus>
34899+
) in
34900+
let makeCall = {
34901+
() throws -> () in
34902+
guard let uniffiObj = try? FfiConverterCallbackInterfaceSpaceRoomListSpaceListener.handleMap.get(handle: uniffiHandle) else {
34903+
throw UniffiInternalError.unexpectedStaleHandle
34904+
}
34905+
return uniffiObj.onUpdate(
34906+
space: try FfiConverterOptionTypeSpaceRoom.lift(space)
34907+
)
34908+
}
34909+
34910+
34911+
let writeReturn = { () }
34912+
uniffiTraitInterfaceCall(
34913+
callStatus: uniffiCallStatus,
34914+
makeCall: makeCall,
34915+
writeReturn: writeReturn
34916+
)
34917+
},
34918+
uniffiFree: { (uniffiHandle: UInt64) -> () in
34919+
let result = try? FfiConverterCallbackInterfaceSpaceRoomListSpaceListener.handleMap.remove(handle: uniffiHandle)
34920+
if result == nil {
34921+
print("Uniffi callback interface SpaceRoomListSpaceListener: handle missing in uniffiFree")
34922+
}
34923+
}
34924+
)
34925+
}
34926+
34927+
private func uniffiCallbackInitSpaceRoomListSpaceListener() {
34928+
uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistspacelistener(&UniffiCallbackInterfaceSpaceRoomListSpaceListener.vtable)
34929+
}
34930+
34931+
// FfiConverter protocol for callback interfaces
34932+
fileprivate struct FfiConverterCallbackInterfaceSpaceRoomListSpaceListener {
34933+
fileprivate static var handleMap = UniffiHandleMap<SpaceRoomListSpaceListener>()
34934+
}
34935+
34936+
extension FfiConverterCallbackInterfaceSpaceRoomListSpaceListener : FfiConverter {
34937+
typealias SwiftType = SpaceRoomListSpaceListener
34938+
typealias FfiType = UInt64
34939+
34940+
public static func lift(_ handle: UInt64) throws -> SwiftType {
34941+
try handleMap.get(handle: handle)
34942+
}
34943+
34944+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType {
34945+
let handle: UInt64 = try readInt(&buf)
34946+
return try lift(handle)
34947+
}
34948+
34949+
public static func lower(_ v: SwiftType) -> UInt64 {
34950+
return handleMap.insert(obj: v)
34951+
}
34952+
34953+
public static func write(_ v: SwiftType, into buf: inout [UInt8]) {
34954+
writeInt(&buf, lower(v))
34955+
}
34956+
}
34957+
34958+
34959+
34960+
3484934961
public protocol SpaceServiceJoinedSpacesListener : AnyObject {
3485034962

3485134963
func onUpdate(roomUpdates: [SpaceListUpdate])
@@ -36187,6 +36299,27 @@ fileprivate struct FfiConverterOptionTypeRoomMemberWithSenderInfo: FfiConverterR
3618736299
}
3618836300
}
3618936301

36302+
fileprivate struct FfiConverterOptionTypeSpaceRoom: FfiConverterRustBuffer {
36303+
typealias SwiftType = SpaceRoom?
36304+
36305+
public static func write(_ value: SwiftType, into buf: inout [UInt8]) {
36306+
guard let value = value else {
36307+
writeInt(&buf, Int8(0))
36308+
return
36309+
}
36310+
writeInt(&buf, Int8(1))
36311+
FfiConverterTypeSpaceRoom.write(value, into: &buf)
36312+
}
36313+
36314+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType {
36315+
switch try readInt(&buf) as Int8 {
36316+
case 0: return nil
36317+
case 1: return try FfiConverterTypeSpaceRoom.read(from: &buf)
36318+
default: throw UniffiInternalError.unexpectedOptionalTag
36319+
}
36320+
}
36321+
}
36322+
3619036323
fileprivate struct FfiConverterOptionTypeSuccessorRoom: FfiConverterRustBuffer {
3619136324
typealias SwiftType = SuccessorRoom?
3619236325

@@ -39523,12 +39656,18 @@ private var initializationResult: InitializationResult = {
3952339656
if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms() != 24664) {
3952439657
return InitializationResult.apiChecksumMismatch
3952539658
}
39659+
if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_space() != 25368) {
39660+
return InitializationResult.apiChecksumMismatch
39661+
}
3952639662
if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates() != 16775) {
3952739663
return InitializationResult.apiChecksumMismatch
3952839664
}
3952939665
if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update() != 55793) {
3953039666
return InitializationResult.apiChecksumMismatch
3953139667
}
39668+
if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_space_updates() != 26327) {
39669+
return InitializationResult.apiChecksumMismatch
39670+
}
3953239671
if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces() != 54285) {
3953339672
return InitializationResult.apiChecksumMismatch
3953439673
}
@@ -39868,6 +40007,9 @@ private var initializationResult: InitializationResult = {
3986840007
if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update() != 11960) {
3986940008
return InitializationResult.apiChecksumMismatch
3987040009
}
40010+
if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistspacelistener_on_update() != 39714) {
40011+
return InitializationResult.apiChecksumMismatch
40012+
}
3987140013
if (uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update() != 19262) {
3987240014
return InitializationResult.apiChecksumMismatch
3987340015
}
@@ -39918,6 +40060,7 @@ private var initializationResult: InitializationResult = {
3991840060
uniffiCallbackInitSessionVerificationControllerDelegate()
3991940061
uniffiCallbackInitSpaceRoomListEntriesListener()
3992040062
uniffiCallbackInitSpaceRoomListPaginationStateListener()
40063+
uniffiCallbackInitSpaceRoomListSpaceListener()
3992140064
uniffiCallbackInitSpaceServiceJoinedSpacesListener()
3992240065
uniffiCallbackInitSyncServiceStateObserver()
3992340066
uniffiCallbackInitTimelineListener()

0 commit comments

Comments
 (0)