Skip to content

Commit 57931f2

Browse files
committed
Bump to v1.1.47 (matrix-rust-sdk/main 0469c27b91511d7edd284cd55da7cb96afa8e409)
1 parent f0b0602 commit 57931f2

File tree

2 files changed

+234
-23
lines changed

2 files changed

+234
-23
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 = "845bbfa8ccd4b2b4b68ba05e6e787a53251b53faf53e01f77b0bbf4ee3b1ad85"
7-
let version = "v1.1.46"
6+
let checksum = "1094d30bb72fbae410de9db9441192f12f0041ebb7b58d861d69df65ce3082fd"
7+
let version = "v1.1.47"
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: 232 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3869,8 +3869,6 @@ public protocol RoomProtocol : AnyObject {
38693869

38703870
func banUser(userId: String, reason: String?) async throws
38713871

3872-
func buildPowerLevelChangesFromCurrent() async throws -> RoomPowerLevelChanges
3873-
38743872
func canUserBan(userId: String) async throws -> Bool
38753873

38763874
func canUserInvite(userId: String) async throws -> Bool
@@ -3902,6 +3900,8 @@ public protocol RoomProtocol : AnyObject {
39023900

39033901
func displayName() throws -> String
39043902

3903+
func getPowerLevels() async throws -> RoomPowerLevels
3904+
39053905
/**
39063906
* Is there a non expired membership with application "m.call" and scope
39073907
* "m.room" in this room.
@@ -4008,6 +4008,8 @@ public protocol RoomProtocol : AnyObject {
40084008
*/
40094009
func reportContent(eventId: String, score: Int32?, reason: String?) throws
40104010

4011+
func resetPowerLevels() async throws -> RoomPowerLevels
4012+
40114013
func roomInfo() async throws -> RoomInfo
40124014

40134015
func setIsFavourite(isFavourite: Bool, tagOrder: Double?) async throws
@@ -4191,22 +4193,6 @@ open class Room:
41914193
}
41924194

41934195

4194-
open func buildPowerLevelChangesFromCurrent() async throws -> RoomPowerLevelChanges {
4195-
return try await uniffiRustCallAsync(
4196-
rustFutureFunc: {
4197-
uniffi_matrix_sdk_ffi_fn_method_room_build_power_level_changes_from_current(
4198-
self.uniffiClonePointer()
4199-
)
4200-
},
4201-
pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer,
4202-
completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer,
4203-
freeFunc: ffi_matrix_sdk_ffi_rust_future_free_rust_buffer,
4204-
liftFunc: FfiConverterTypeRoomPowerLevelChanges_lift,
4205-
errorHandler: FfiConverterTypeClientError.lift
4206-
)
4207-
}
4208-
4209-
42104196
open func canUserBan(userId: String) async throws -> Bool {
42114197
return try await uniffiRustCallAsync(
42124198
rustFutureFunc: {
@@ -4389,6 +4375,22 @@ open class Room:
43894375
}
43904376
)
43914377
}
4378+
open func getPowerLevels() async throws -> RoomPowerLevels {
4379+
return try await uniffiRustCallAsync(
4380+
rustFutureFunc: {
4381+
uniffi_matrix_sdk_ffi_fn_method_room_get_power_levels(
4382+
self.uniffiClonePointer()
4383+
)
4384+
},
4385+
pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer,
4386+
completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer,
4387+
freeFunc: ffi_matrix_sdk_ffi_rust_future_free_rust_buffer,
4388+
liftFunc: FfiConverterTypeRoomPowerLevels.lift,
4389+
errorHandler: FfiConverterTypeClientError.lift
4390+
)
4391+
}
4392+
4393+
43924394
/**
43934395
* Is there a non expired membership with application "m.call" and scope
43944396
* "m.room" in this room.
@@ -4739,6 +4741,22 @@ open class Room:
47394741
)
47404742
}
47414743
}
4744+
open func resetPowerLevels() async throws -> RoomPowerLevels {
4745+
return try await uniffiRustCallAsync(
4746+
rustFutureFunc: {
4747+
uniffi_matrix_sdk_ffi_fn_method_room_reset_power_levels(
4748+
self.uniffiClonePointer()
4749+
)
4750+
},
4751+
pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer,
4752+
completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer,
4753+
freeFunc: ffi_matrix_sdk_ffi_rust_future_free_rust_buffer,
4754+
liftFunc: FfiConverterTypeRoomPowerLevels.lift,
4755+
errorHandler: FfiConverterTypeClientError.lift
4756+
)
4757+
}
4758+
4759+
47424760
open func roomInfo() async throws -> RoomInfo {
47434761
return try await uniffiRustCallAsync(
47444762
rustFutureFunc: {
@@ -11307,6 +11325,196 @@ public func FfiConverterTypeRoomNotificationSettings_lower(_ value: RoomNotifica
1130711325
}
1130811326

1130911327

11328+
public struct RoomPowerLevels {
11329+
/**
11330+
* The level required to ban a user.
11331+
*/
11332+
public var ban: Int64
11333+
/**
11334+
* The level required to invite a user.
11335+
*/
11336+
public var invite: Int64
11337+
/**
11338+
* The level required to kick a user.
11339+
*/
11340+
public var kick: Int64
11341+
/**
11342+
* The level required to redact an event.
11343+
*/
11344+
public var redact: Int64
11345+
/**
11346+
* The default level required to send message events.
11347+
*/
11348+
public var eventsDefault: Int64
11349+
/**
11350+
* The default level required to send state events.
11351+
*/
11352+
public var stateDefault: Int64
11353+
/**
11354+
* The default power level for every user in the room.
11355+
*/
11356+
public var usersDefault: Int64
11357+
/**
11358+
* The level required to change the room's name.
11359+
*/
11360+
public var roomName: Int64
11361+
/**
11362+
* The level required to change the room's avatar.
11363+
*/
11364+
public var roomAvatar: Int64
11365+
/**
11366+
* The level required to change the room's topic.
11367+
*/
11368+
public var roomTopic: Int64
11369+
11370+
// Default memberwise initializers are never public by default, so we
11371+
// declare one manually.
11372+
public init(
11373+
/**
11374+
* The level required to ban a user.
11375+
*/
11376+
ban: Int64,
11377+
/**
11378+
* The level required to invite a user.
11379+
*/
11380+
invite: Int64,
11381+
/**
11382+
* The level required to kick a user.
11383+
*/
11384+
kick: Int64,
11385+
/**
11386+
* The level required to redact an event.
11387+
*/
11388+
redact: Int64,
11389+
/**
11390+
* The default level required to send message events.
11391+
*/
11392+
eventsDefault: Int64,
11393+
/**
11394+
* The default level required to send state events.
11395+
*/
11396+
stateDefault: Int64,
11397+
/**
11398+
* The default power level for every user in the room.
11399+
*/
11400+
usersDefault: Int64,
11401+
/**
11402+
* The level required to change the room's name.
11403+
*/
11404+
roomName: Int64,
11405+
/**
11406+
* The level required to change the room's avatar.
11407+
*/
11408+
roomAvatar: Int64,
11409+
/**
11410+
* The level required to change the room's topic.
11411+
*/
11412+
roomTopic: Int64) {
11413+
self.ban = ban
11414+
self.invite = invite
11415+
self.kick = kick
11416+
self.redact = redact
11417+
self.eventsDefault = eventsDefault
11418+
self.stateDefault = stateDefault
11419+
self.usersDefault = usersDefault
11420+
self.roomName = roomName
11421+
self.roomAvatar = roomAvatar
11422+
self.roomTopic = roomTopic
11423+
}
11424+
}
11425+
11426+
11427+
extension RoomPowerLevels: Equatable, Hashable {
11428+
public static func ==(lhs: RoomPowerLevels, rhs: RoomPowerLevels) -> Bool {
11429+
if lhs.ban != rhs.ban {
11430+
return false
11431+
}
11432+
if lhs.invite != rhs.invite {
11433+
return false
11434+
}
11435+
if lhs.kick != rhs.kick {
11436+
return false
11437+
}
11438+
if lhs.redact != rhs.redact {
11439+
return false
11440+
}
11441+
if lhs.eventsDefault != rhs.eventsDefault {
11442+
return false
11443+
}
11444+
if lhs.stateDefault != rhs.stateDefault {
11445+
return false
11446+
}
11447+
if lhs.usersDefault != rhs.usersDefault {
11448+
return false
11449+
}
11450+
if lhs.roomName != rhs.roomName {
11451+
return false
11452+
}
11453+
if lhs.roomAvatar != rhs.roomAvatar {
11454+
return false
11455+
}
11456+
if lhs.roomTopic != rhs.roomTopic {
11457+
return false
11458+
}
11459+
return true
11460+
}
11461+
11462+
public func hash(into hasher: inout Hasher) {
11463+
hasher.combine(ban)
11464+
hasher.combine(invite)
11465+
hasher.combine(kick)
11466+
hasher.combine(redact)
11467+
hasher.combine(eventsDefault)
11468+
hasher.combine(stateDefault)
11469+
hasher.combine(usersDefault)
11470+
hasher.combine(roomName)
11471+
hasher.combine(roomAvatar)
11472+
hasher.combine(roomTopic)
11473+
}
11474+
}
11475+
11476+
11477+
public struct FfiConverterTypeRoomPowerLevels: FfiConverterRustBuffer {
11478+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RoomPowerLevels {
11479+
return
11480+
try RoomPowerLevels(
11481+
ban: FfiConverterInt64.read(from: &buf),
11482+
invite: FfiConverterInt64.read(from: &buf),
11483+
kick: FfiConverterInt64.read(from: &buf),
11484+
redact: FfiConverterInt64.read(from: &buf),
11485+
eventsDefault: FfiConverterInt64.read(from: &buf),
11486+
stateDefault: FfiConverterInt64.read(from: &buf),
11487+
usersDefault: FfiConverterInt64.read(from: &buf),
11488+
roomName: FfiConverterInt64.read(from: &buf),
11489+
roomAvatar: FfiConverterInt64.read(from: &buf),
11490+
roomTopic: FfiConverterInt64.read(from: &buf)
11491+
)
11492+
}
11493+
11494+
public static func write(_ value: RoomPowerLevels, into buf: inout [UInt8]) {
11495+
FfiConverterInt64.write(value.ban, into: &buf)
11496+
FfiConverterInt64.write(value.invite, into: &buf)
11497+
FfiConverterInt64.write(value.kick, into: &buf)
11498+
FfiConverterInt64.write(value.redact, into: &buf)
11499+
FfiConverterInt64.write(value.eventsDefault, into: &buf)
11500+
FfiConverterInt64.write(value.stateDefault, into: &buf)
11501+
FfiConverterInt64.write(value.usersDefault, into: &buf)
11502+
FfiConverterInt64.write(value.roomName, into: &buf)
11503+
FfiConverterInt64.write(value.roomAvatar, into: &buf)
11504+
FfiConverterInt64.write(value.roomTopic, into: &buf)
11505+
}
11506+
}
11507+
11508+
11509+
public func FfiConverterTypeRoomPowerLevels_lift(_ buf: RustBuffer) throws -> RoomPowerLevels {
11510+
return try FfiConverterTypeRoomPowerLevels.lift(buf)
11511+
}
11512+
11513+
public func FfiConverterTypeRoomPowerLevels_lower(_ value: RoomPowerLevels) -> RustBuffer {
11514+
return FfiConverterTypeRoomPowerLevels.lower(value)
11515+
}
11516+
11517+
1131011518
public struct RoomSubscription {
1131111519
public var requiredState: [RequiredState]?
1131211520
public var timelineLimit: UInt32?
@@ -22385,9 +22593,6 @@ private var initializationResult: InitializationResult {
2238522593
if (uniffi_matrix_sdk_ffi_checksum_method_room_ban_user() != 25865) {
2238622594
return InitializationResult.apiChecksumMismatch
2238722595
}
22388-
if (uniffi_matrix_sdk_ffi_checksum_method_room_build_power_level_changes_from_current() != 13995) {
22389-
return InitializationResult.apiChecksumMismatch
22390-
}
2239122596
if (uniffi_matrix_sdk_ffi_checksum_method_room_can_user_ban() != 22009) {
2239222597
return InitializationResult.apiChecksumMismatch
2239322598
}
@@ -22421,6 +22626,9 @@ private var initializationResult: InitializationResult {
2242122626
if (uniffi_matrix_sdk_ffi_checksum_method_room_display_name() != 39695) {
2242222627
return InitializationResult.apiChecksumMismatch
2242322628
}
22629+
if (uniffi_matrix_sdk_ffi_checksum_method_room_get_power_levels() != 54094) {
22630+
return InitializationResult.apiChecksumMismatch
22631+
}
2242422632
if (uniffi_matrix_sdk_ffi_checksum_method_room_has_active_room_call() != 33588) {
2242522633
return InitializationResult.apiChecksumMismatch
2242622634
}
@@ -22502,6 +22710,9 @@ private var initializationResult: InitializationResult {
2250222710
if (uniffi_matrix_sdk_ffi_checksum_method_room_report_content() != 39574) {
2250322711
return InitializationResult.apiChecksumMismatch
2250422712
}
22713+
if (uniffi_matrix_sdk_ffi_checksum_method_room_reset_power_levels() != 63622) {
22714+
return InitializationResult.apiChecksumMismatch
22715+
}
2250522716
if (uniffi_matrix_sdk_ffi_checksum_method_room_room_info() != 41146) {
2250622717
return InitializationResult.apiChecksumMismatch
2250722718
}

0 commit comments

Comments
 (0)