@@ -3828,6 +3828,8 @@ public func FfiConverterTypeMediaFileHandle_lower(_ value: MediaFileHandle) -> U
3828
3828
3829
3829
public protocol MediaSourceProtocol : AnyObject {
3830
3830
3831
+ func toJson() -> String
3832
+
3831
3833
func url() -> String
3832
3834
3833
3835
}
@@ -3871,8 +3873,31 @@ open class MediaSource:
3871
3873
}
3872
3874
3873
3875
3876
+ public static func fromJson(json: String)throws -> MediaSource {
3877
+ return try FfiConverterTypeMediaSource.lift(try rustCallWithError(FfiConverterTypeClientError.lift) {
3878
+ uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json(
3879
+ FfiConverterString.lower(json),$0
3880
+ )
3881
+ })
3882
+ }
3883
+
3884
+ public static func fromUrl(url: String)throws -> MediaSource {
3885
+ return try FfiConverterTypeMediaSource.lift(try rustCallWithError(FfiConverterTypeClientError.lift) {
3886
+ uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url(
3887
+ FfiConverterString.lower(url),$0
3888
+ )
3889
+ })
3890
+ }
3891
+
3874
3892
3875
3893
3894
+ open func toJson() -> String {
3895
+ return try! FfiConverterString.lift(try! rustCall() {
3896
+ uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json(self.uniffiClonePointer(),$0
3897
+ )
3898
+ })
3899
+ }
3900
+
3876
3901
open func url() -> String {
3877
3902
return try! FfiConverterString.lift(try! rustCall() {
3878
3903
uniffi_matrix_sdk_ffi_fn_method_mediasource_url(self.uniffiClonePointer(),$0
@@ -15155,7 +15180,7 @@ public struct RoomPreviewInfo {
15155
15180
/**
15156
15181
* Is the history world-readable for this room?
15157
15182
*/
15158
- public var isHistoryWorldReadable: Bool
15183
+ public var isHistoryWorldReadable: Bool?
15159
15184
/**
15160
15185
* The membership state for the current user, if known.
15161
15186
*/
@@ -15202,7 +15227,7 @@ public struct RoomPreviewInfo {
15202
15227
*/roomType: RoomType,
15203
15228
/**
15204
15229
* Is the history world-readable for this room?
15205
- */isHistoryWorldReadable: Bool,
15230
+ */isHistoryWorldReadable: Bool? ,
15206
15231
/**
15207
15232
* The membership state for the current user, if known.
15208
15233
*/membership: Membership?,
@@ -15307,7 +15332,7 @@ public struct FfiConverterTypeRoomPreviewInfo: FfiConverterRustBuffer {
15307
15332
numJoinedMembers: FfiConverterUInt64.read(from: &buf),
15308
15333
numActiveMembers: FfiConverterOptionUInt64.read(from: &buf),
15309
15334
roomType: FfiConverterTypeRoomType.read(from: &buf),
15310
- isHistoryWorldReadable: FfiConverterBool .read(from: &buf),
15335
+ isHistoryWorldReadable: FfiConverterOptionBool .read(from: &buf),
15311
15336
membership: FfiConverterOptionTypeMembership.read(from: &buf),
15312
15337
joinRule: FfiConverterTypeJoinRule.read(from: &buf),
15313
15338
isDirect: FfiConverterOptionBool.read(from: &buf),
@@ -15324,7 +15349,7 @@ public struct FfiConverterTypeRoomPreviewInfo: FfiConverterRustBuffer {
15324
15349
FfiConverterUInt64.write(value.numJoinedMembers, into: &buf)
15325
15350
FfiConverterOptionUInt64.write(value.numActiveMembers, into: &buf)
15326
15351
FfiConverterTypeRoomType.write(value.roomType, into: &buf)
15327
- FfiConverterBool .write(value.isHistoryWorldReadable, into: &buf)
15352
+ FfiConverterOptionBool .write(value.isHistoryWorldReadable, into: &buf)
15328
15353
FfiConverterOptionTypeMembership.write(value.membership, into: &buf)
15329
15354
FfiConverterTypeJoinRule.write(value.joinRule, into: &buf)
15330
15355
FfiConverterOptionBool.write(value.isDirect, into: &buf)
@@ -28735,13 +28760,6 @@ public func matrixToUserPermalink(userId: String)throws -> String {
28735
28760
)
28736
28761
})
28737
28762
}
28738
- public func mediaSourceFromUrl(url: String) -> MediaSource {
28739
- return try! FfiConverterTypeMediaSource.lift(try! rustCall() {
28740
- uniffi_matrix_sdk_ffi_fn_func_media_source_from_url(
28741
- FfiConverterString.lower(url),$0
28742
- )
28743
- })
28744
- }
28745
28763
public func messageEventContentFromHtml(body: String, htmlBody: String) -> RoomMessageEventContentWithoutRelation {
28746
28764
return try! FfiConverterTypeRoomMessageEventContentWithoutRelation.lift(try! rustCall() {
28747
28765
uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html(
@@ -28897,9 +28915,6 @@ private var initializationResult: InitializationResult = {
28897
28915
if (uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink() != 46473) {
28898
28916
return InitializationResult.apiChecksumMismatch
28899
28917
}
28900
- if (uniffi_matrix_sdk_ffi_checksum_func_media_source_from_url() != 12165) {
28901
- return InitializationResult.apiChecksumMismatch
28902
- }
28903
28918
if (uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html() != 37203) {
28904
28919
return InitializationResult.apiChecksumMismatch
28905
28920
}
@@ -29317,6 +29332,9 @@ private var initializationResult: InitializationResult = {
29317
29332
if (uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist() != 12883) {
29318
29333
return InitializationResult.apiChecksumMismatch
29319
29334
}
29335
+ if (uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json() != 23306) {
29336
+ return InitializationResult.apiChecksumMismatch
29337
+ }
29320
29338
if (uniffi_matrix_sdk_ffi_checksum_method_mediasource_url() != 62692) {
29321
29339
return InitializationResult.apiChecksumMismatch
29322
29340
}
@@ -29977,6 +29995,12 @@ private var initializationResult: InitializationResult = {
29977
29995
if (uniffi_matrix_sdk_ffi_checksum_constructor_clientbuilder_new() != 27991) {
29978
29996
return InitializationResult.apiChecksumMismatch
29979
29997
}
29998
+ if (uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_json() != 10564) {
29999
+ return InitializationResult.apiChecksumMismatch
30000
+ }
30001
+ if (uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_url() != 11983) {
30002
+ return InitializationResult.apiChecksumMismatch
30003
+ }
29980
30004
if (uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes() != 32675) {
29981
30005
return InitializationResult.apiChecksumMismatch
29982
30006
}
0 commit comments