Skip to content

Commit f00c834

Browse files
committed
Bump to v1.1.18 (matrix-rust-sdk 1a158022018beaa4397b47d885f615e9d40c193a)
1 parent 5f7b353 commit f00c834

File tree

2 files changed

+174
-8
lines changed

2 files changed

+174
-8
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 = "b25bd4e0fce141d6157679ac5ff38425f0c753fdbe429297c7d4ef8249240f0b"
7-
let version = "v1.1.17"
6+
let checksum = "f3bdb4c7fb4abd52e3d6258a56ca99284a86430946f8aab35ad1fa66ba4738e9"
7+
let version = "v1.1.18"
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: 172 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2886,7 +2886,7 @@ public protocol RoomProtocol {
28862886
func sendReadReceipt(eventId: String) throws
28872887
func sendReply(msg: RoomMessageEventContentWithoutRelation, inReplyToEventId: String, txnId: String?) throws
28882888
func sendVideo(url: String, thumbnailUrl: String, videoInfo: VideoInfo, progressWatcher: ProgressWatcher?) -> SendAttachmentJoinHandle
2889-
func setName(name: String?) throws
2889+
func setName(name: String) throws
28902890
func setTopic(topic: String) throws
28912891
func subscribeToBackPaginationStatus(listener: BackPaginationStatusListener) throws -> TaskHandle
28922892
func subscribeToRoomInfoUpdates(listener: RoomInfoListener) -> TaskHandle
@@ -3856,11 +3856,11 @@ public class Room: RoomProtocol {
38563856
)
38573857
}
38583858

3859-
public func setName(name: String?) throws {
3859+
public func setName(name: String) throws {
38603860
try
38613861
rustCallWithError(FfiConverterTypeClientError.lift) {
38623862
uniffi_matrix_sdk_ffi_fn_method_room_set_name(self.pointer,
3863-
FfiConverterOptionString.lower(name),$0
3863+
FfiConverterString.lower(name),$0
38643864
)
38653865
}
38663866
}
@@ -6723,13 +6723,17 @@ public struct AudioMessageContent {
67236723
public var body: String
67246724
public var source: MediaSource
67256725
public var info: AudioInfo?
6726+
public var audio: UnstableAudioDetailsContent?
6727+
public var voice: UnstableVoiceContent?
67266728

67276729
// Default memberwise initializers are never public by default, so we
67286730
// declare one manually.
6729-
public init(body: String, source: MediaSource, info: AudioInfo?) {
6731+
public init(body: String, source: MediaSource, info: AudioInfo?, audio: UnstableAudioDetailsContent?, voice: UnstableVoiceContent?) {
67306732
self.body = body
67316733
self.source = source
67326734
self.info = info
6735+
self.audio = audio
6736+
self.voice = voice
67336737
}
67346738
}
67356739

@@ -6740,14 +6744,18 @@ public struct FfiConverterTypeAudioMessageContent: FfiConverterRustBuffer {
67406744
return try AudioMessageContent(
67416745
body: FfiConverterString.read(from: &buf),
67426746
source: FfiConverterTypeMediaSource.read(from: &buf),
6743-
info: FfiConverterOptionTypeAudioInfo.read(from: &buf)
6747+
info: FfiConverterOptionTypeAudioInfo.read(from: &buf),
6748+
audio: FfiConverterOptionTypeUnstableAudioDetailsContent.read(from: &buf),
6749+
voice: FfiConverterOptionTypeUnstableVoiceContent.read(from: &buf)
67446750
)
67456751
}
67466752

67476753
public static func write(_ value: AudioMessageContent, into buf: inout [UInt8]) {
67486754
FfiConverterString.write(value.body, into: &buf)
67496755
FfiConverterTypeMediaSource.write(value.source, into: &buf)
67506756
FfiConverterOptionTypeAudioInfo.write(value.info, into: &buf)
6757+
FfiConverterOptionTypeUnstableAudioDetailsContent.write(value.audio, into: &buf)
6758+
FfiConverterOptionTypeUnstableVoiceContent.write(value.voice, into: &buf)
67516759
}
67526760
}
67536761

@@ -9128,6 +9136,100 @@ public func FfiConverterTypeTransmissionProgress_lower(_ value: TransmissionProg
91289136
}
91299137

91309138

9139+
public struct UnstableAudioDetailsContent {
9140+
public var duration: TimeInterval
9141+
public var waveform: [UInt16]
9142+
9143+
// Default memberwise initializers are never public by default, so we
9144+
// declare one manually.
9145+
public init(duration: TimeInterval, waveform: [UInt16]) {
9146+
self.duration = duration
9147+
self.waveform = waveform
9148+
}
9149+
}
9150+
9151+
9152+
extension UnstableAudioDetailsContent: Equatable, Hashable {
9153+
public static func ==(lhs: UnstableAudioDetailsContent, rhs: UnstableAudioDetailsContent) -> Bool {
9154+
if lhs.duration != rhs.duration {
9155+
return false
9156+
}
9157+
if lhs.waveform != rhs.waveform {
9158+
return false
9159+
}
9160+
return true
9161+
}
9162+
9163+
public func hash(into hasher: inout Hasher) {
9164+
hasher.combine(duration)
9165+
hasher.combine(waveform)
9166+
}
9167+
}
9168+
9169+
9170+
public struct FfiConverterTypeUnstableAudioDetailsContent: FfiConverterRustBuffer {
9171+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> UnstableAudioDetailsContent {
9172+
return try UnstableAudioDetailsContent(
9173+
duration: FfiConverterDuration.read(from: &buf),
9174+
waveform: FfiConverterSequenceUInt16.read(from: &buf)
9175+
)
9176+
}
9177+
9178+
public static func write(_ value: UnstableAudioDetailsContent, into buf: inout [UInt8]) {
9179+
FfiConverterDuration.write(value.duration, into: &buf)
9180+
FfiConverterSequenceUInt16.write(value.waveform, into: &buf)
9181+
}
9182+
}
9183+
9184+
9185+
public func FfiConverterTypeUnstableAudioDetailsContent_lift(_ buf: RustBuffer) throws -> UnstableAudioDetailsContent {
9186+
return try FfiConverterTypeUnstableAudioDetailsContent.lift(buf)
9187+
}
9188+
9189+
public func FfiConverterTypeUnstableAudioDetailsContent_lower(_ value: UnstableAudioDetailsContent) -> RustBuffer {
9190+
return FfiConverterTypeUnstableAudioDetailsContent.lower(value)
9191+
}
9192+
9193+
9194+
public struct UnstableVoiceContent {
9195+
9196+
// Default memberwise initializers are never public by default, so we
9197+
// declare one manually.
9198+
public init() {
9199+
}
9200+
}
9201+
9202+
9203+
extension UnstableVoiceContent: Equatable, Hashable {
9204+
public static func ==(lhs: UnstableVoiceContent, rhs: UnstableVoiceContent) -> Bool {
9205+
return true
9206+
}
9207+
9208+
public func hash(into hasher: inout Hasher) {
9209+
}
9210+
}
9211+
9212+
9213+
public struct FfiConverterTypeUnstableVoiceContent: FfiConverterRustBuffer {
9214+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> UnstableVoiceContent {
9215+
return try UnstableVoiceContent(
9216+
)
9217+
}
9218+
9219+
public static func write(_ value: UnstableVoiceContent, into buf: inout [UInt8]) {
9220+
}
9221+
}
9222+
9223+
9224+
public func FfiConverterTypeUnstableVoiceContent_lift(_ buf: RustBuffer) throws -> UnstableVoiceContent {
9225+
return try FfiConverterTypeUnstableVoiceContent.lift(buf)
9226+
}
9227+
9228+
public func FfiConverterTypeUnstableVoiceContent_lower(_ value: UnstableVoiceContent) -> RustBuffer {
9229+
return FfiConverterTypeUnstableVoiceContent.lower(value)
9230+
}
9231+
9232+
91319233
public struct UserProfile {
91329234
public var userId: String
91339235
public var displayName: String?
@@ -15754,6 +15856,48 @@ fileprivate struct FfiConverterOptionTypeTracingFileConfiguration: FfiConverterR
1575415856
}
1575515857
}
1575615858

15859+
fileprivate struct FfiConverterOptionTypeUnstableAudioDetailsContent: FfiConverterRustBuffer {
15860+
typealias SwiftType = UnstableAudioDetailsContent?
15861+
15862+
public static func write(_ value: SwiftType, into buf: inout [UInt8]) {
15863+
guard let value = value else {
15864+
writeInt(&buf, Int8(0))
15865+
return
15866+
}
15867+
writeInt(&buf, Int8(1))
15868+
FfiConverterTypeUnstableAudioDetailsContent.write(value, into: &buf)
15869+
}
15870+
15871+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType {
15872+
switch try readInt(&buf) as Int8 {
15873+
case 0: return nil
15874+
case 1: return try FfiConverterTypeUnstableAudioDetailsContent.read(from: &buf)
15875+
default: throw UniffiInternalError.unexpectedOptionalTag
15876+
}
15877+
}
15878+
}
15879+
15880+
fileprivate struct FfiConverterOptionTypeUnstableVoiceContent: FfiConverterRustBuffer {
15881+
typealias SwiftType = UnstableVoiceContent?
15882+
15883+
public static func write(_ value: SwiftType, into buf: inout [UInt8]) {
15884+
guard let value = value else {
15885+
writeInt(&buf, Int8(0))
15886+
return
15887+
}
15888+
writeInt(&buf, Int8(1))
15889+
FfiConverterTypeUnstableVoiceContent.write(value, into: &buf)
15890+
}
15891+
15892+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType {
15893+
switch try readInt(&buf) as Int8 {
15894+
case 0: return nil
15895+
case 1: return try FfiConverterTypeUnstableVoiceContent.read(from: &buf)
15896+
default: throw UniffiInternalError.unexpectedOptionalTag
15897+
}
15898+
}
15899+
}
15900+
1575715901
fileprivate struct FfiConverterOptionTypeVideoInfo: FfiConverterRustBuffer {
1575815902
typealias SwiftType = VideoInfo?
1575915903

@@ -16175,6 +16319,28 @@ fileprivate struct FfiConverterSequenceUInt8: FfiConverterRustBuffer {
1617516319
}
1617616320
}
1617716321

16322+
fileprivate struct FfiConverterSequenceUInt16: FfiConverterRustBuffer {
16323+
typealias SwiftType = [UInt16]
16324+
16325+
public static func write(_ value: [UInt16], into buf: inout [UInt8]) {
16326+
let len = Int32(value.count)
16327+
writeInt(&buf, len)
16328+
for item in value {
16329+
FfiConverterUInt16.write(item, into: &buf)
16330+
}
16331+
}
16332+
16333+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [UInt16] {
16334+
let len: Int32 = try readInt(&buf)
16335+
var seq = [UInt16]()
16336+
seq.reserveCapacity(Int(len))
16337+
for _ in 0 ..< len {
16338+
seq.append(try FfiConverterUInt16.read(from: &buf))
16339+
}
16340+
return seq
16341+
}
16342+
}
16343+
1617816344
fileprivate struct FfiConverterSequenceString: FfiConverterRustBuffer {
1617916345
typealias SwiftType = [String]
1618016346

@@ -18726,7 +18892,7 @@ private var initializationResult: InitializationResult {
1872618892
if (uniffi_matrix_sdk_ffi_checksum_method_room_send_video() != 38775) {
1872718893
return InitializationResult.apiChecksumMismatch
1872818894
}
18729-
if (uniffi_matrix_sdk_ffi_checksum_method_room_set_name() != 39725) {
18895+
if (uniffi_matrix_sdk_ffi_checksum_method_room_set_name() != 56429) {
1873018896
return InitializationResult.apiChecksumMismatch
1873118897
}
1873218898
if (uniffi_matrix_sdk_ffi_checksum_method_room_set_topic() != 55348) {

0 commit comments

Comments
 (0)