@@ -3845,19 +3845,21 @@ public protocol EncryptionProtocol: AnyObject, Sendable {
38453845 * This method always tries to fetch the identity from the store, which we
38463846 * only have if the user is tracked, meaning that we are both members
38473847 * of the same encrypted room. If no user is found locally, a request will
3848- * be made to the homeserver.
3848+ * be made to the homeserver unless `fallback_to_server` is set to `false` .
38493849 *
38503850 * # Arguments
38513851 *
38523852 * * `user_id` - The ID of the user that the identity belongs to.
3853+ * * `fallback_to_server` - Should we request the user identity from the
3854+ * homeserver if one isn't found locally.
38533855 *
38543856 * Returns a `UserIdentity` if one is found. Returns an error if there
38553857 * was an issue with the crypto store or with the request to the
38563858 * homeserver.
38573859 *
38583860 * This will always return `None` if the client hasn't been logged in.
38593861 */
3860- func userIdentity(userId: String) async throws -> UserIdentity?
3862+ func userIdentity(userId: String, fallbackToServer: Bool ) async throws -> UserIdentity?
38613863
38623864 func verificationState() -> VerificationState
38633865
@@ -4197,25 +4199,27 @@ open func resetRecoveryKey()async throws -> String {
41974199 * This method always tries to fetch the identity from the store, which we
41984200 * only have if the user is tracked, meaning that we are both members
41994201 * of the same encrypted room. If no user is found locally, a request will
4200- * be made to the homeserver.
4202+ * be made to the homeserver unless `fallback_to_server` is set to `false` .
42014203 *
42024204 * # Arguments
42034205 *
42044206 * * `user_id` - The ID of the user that the identity belongs to.
4207+ * * `fallback_to_server` - Should we request the user identity from the
4208+ * homeserver if one isn't found locally.
42054209 *
42064210 * Returns a `UserIdentity` if one is found. Returns an error if there
42074211 * was an issue with the crypto store or with the request to the
42084212 * homeserver.
42094213 *
42104214 * This will always return `None` if the client hasn't been logged in.
42114215 */
4212- open func userIdentity(userId: String)async throws -> UserIdentity? {
4216+ open func userIdentity(userId: String, fallbackToServer: Bool )async throws -> UserIdentity? {
42134217 return
42144218 try await uniffiRustCallAsync(
42154219 rustFutureFunc: {
42164220 uniffi_matrix_sdk_ffi_fn_method_encryption_user_identity(
42174221 self.uniffiCloneHandle(),
4218- FfiConverterString.lower(userId)
4222+ FfiConverterString.lower(userId),FfiConverterBool.lower(fallbackToServer)
42194223 )
42204224 },
42214225 pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer,
@@ -12672,6 +12676,13 @@ public func FfiConverterTypeSpaceRoomList_lower(_ value: SpaceRoomList) -> UInt6
1267212676 */
1267312677public protocol SpaceServiceProtocol: AnyObject, Sendable {
1267412678
12679+ func addChildToSpace(childId: String, spaceId: String) async throws
12680+
12681+ /**
12682+ * Returns all known direct-parents of a given space room ID.
12683+ */
12684+ func joinedParentsOfChild(childId: String) async throws -> [SpaceRoom]
12685+
1267512686 /**
1267612687 * Returns a list of all the top-level joined spaces. It will eagerly
1267712688 * compute the latest version and also notify subscribers if there were
@@ -12690,6 +12701,8 @@ public protocol SpaceServiceProtocol: AnyObject, Sendable {
1269012701 */
1269112702 func leaveSpace(spaceId: String) async throws -> LeaveSpaceHandle
1269212703
12704+ func removeChildFromSpace(childId: String, spaceId: String) async throws
12705+
1269312706 /**
1269412707 * Returns a `SpaceRoomList` for the given space ID.
1269512708 */
@@ -12758,6 +12771,43 @@ open class SpaceService: SpaceServiceProtocol, @unchecked Sendable {
1275812771
1275912772
1276012773
12774+ open func addChildToSpace(childId: String, spaceId: String)async throws {
12775+ return
12776+ try await uniffiRustCallAsync(
12777+ rustFutureFunc: {
12778+ uniffi_matrix_sdk_ffi_fn_method_spaceservice_add_child_to_space(
12779+ self.uniffiCloneHandle(),
12780+ FfiConverterString.lower(childId),FfiConverterString.lower(spaceId)
12781+ )
12782+ },
12783+ pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void,
12784+ completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_void,
12785+ freeFunc: ffi_matrix_sdk_ffi_rust_future_free_void,
12786+ liftFunc: { $0 },
12787+ errorHandler: FfiConverterTypeClientError_lift
12788+ )
12789+ }
12790+
12791+ /**
12792+ * Returns all known direct-parents of a given space room ID.
12793+ */
12794+ open func joinedParentsOfChild(childId: String)async throws -> [SpaceRoom] {
12795+ return
12796+ try await uniffiRustCallAsync(
12797+ rustFutureFunc: {
12798+ uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_parents_of_child(
12799+ self.uniffiCloneHandle(),
12800+ FfiConverterString.lower(childId)
12801+ )
12802+ },
12803+ pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer,
12804+ completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer,
12805+ freeFunc: ffi_matrix_sdk_ffi_rust_future_free_rust_buffer,
12806+ liftFunc: FfiConverterSequenceTypeSpaceRoom.lift,
12807+ errorHandler: FfiConverterTypeClientError_lift
12808+ )
12809+ }
12810+
1276112811 /**
1276212812 * Returns a list of all the top-level joined spaces. It will eagerly
1276312813 * compute the latest version and also notify subscribers if there were
@@ -12807,6 +12857,23 @@ open func leaveSpace(spaceId: String)async throws -> LeaveSpaceHandle {
1280712857 )
1280812858}
1280912859
12860+ open func removeChildFromSpace(childId: String, spaceId: String)async throws {
12861+ return
12862+ try await uniffiRustCallAsync(
12863+ rustFutureFunc: {
12864+ uniffi_matrix_sdk_ffi_fn_method_spaceservice_remove_child_from_space(
12865+ self.uniffiCloneHandle(),
12866+ FfiConverterString.lower(childId),FfiConverterString.lower(spaceId)
12867+ )
12868+ },
12869+ pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void,
12870+ completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_void,
12871+ freeFunc: ffi_matrix_sdk_ffi_rust_future_free_void,
12872+ liftFunc: { $0 },
12873+ errorHandler: FfiConverterTypeClientError_lift
12874+ )
12875+ }
12876+
1281012877 /**
1281112878 * Returns a `SpaceRoomList` for the given space ID.
1281212879 */
@@ -27634,7 +27701,7 @@ public enum LatestEventValue {
2763427701 case none
2763527702 case remote(timestamp: Timestamp, sender: String, isOwn: Bool, profile: ProfileDetails, content: TimelineItemContent
2763627703 )
27637- case local(timestamp: Timestamp, content: TimelineItemContent, isSending: Bool
27704+ case local(timestamp: Timestamp, sender: String, profile: ProfileDetails, content: TimelineItemContent, isSending: Bool
2763827705 )
2763927706
2764027707
@@ -27660,7 +27727,7 @@ public struct FfiConverterTypeLatestEventValue: FfiConverterRustBuffer {
2766027727 case 2: return .remote(timestamp: try FfiConverterTypeTimestamp.read(from: &buf), sender: try FfiConverterString.read(from: &buf), isOwn: try FfiConverterBool.read(from: &buf), profile: try FfiConverterTypeProfileDetails.read(from: &buf), content: try FfiConverterTypeTimelineItemContent.read(from: &buf)
2766127728 )
2766227729
27663- case 3: return .local(timestamp: try FfiConverterTypeTimestamp.read(from: &buf), content: try FfiConverterTypeTimelineItemContent.read(from: &buf), isSending: try FfiConverterBool.read(from: &buf)
27730+ case 3: return .local(timestamp: try FfiConverterTypeTimestamp.read(from: &buf), sender: try FfiConverterString.read(from: &buf), profile: try FfiConverterTypeProfileDetails.read(from: &buf), content: try FfiConverterTypeTimelineItemContent.read(from: &buf), isSending: try FfiConverterBool.read(from: &buf)
2766427731 )
2766527732
2766627733 default: throw UniffiInternalError.unexpectedEnumCase
@@ -27684,9 +27751,11 @@ public struct FfiConverterTypeLatestEventValue: FfiConverterRustBuffer {
2768427751 FfiConverterTypeTimelineItemContent.write(content, into: &buf)
2768527752
2768627753
27687- case let .local(timestamp,content,isSending):
27754+ case let .local(timestamp,sender,profile, content,isSending):
2768827755 writeInt(&buf, Int32(3))
2768927756 FfiConverterTypeTimestamp.write(timestamp, into: &buf)
27757+ FfiConverterString.write(sender, into: &buf)
27758+ FfiConverterTypeProfileDetails.write(profile, into: &buf)
2769027759 FfiConverterTypeTimelineItemContent.write(content, into: &buf)
2769127760 FfiConverterBool.write(isSending, into: &buf)
2769227761
@@ -45516,7 +45585,7 @@ private let initializationResult: InitializationResult = {
4551645585 if (uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_recovery_key() != 20380) {
4551745586 return InitializationResult.apiChecksumMismatch
4551845587 }
45519- if (uniffi_matrix_sdk_ffi_checksum_method_encryption_user_identity() != 20644 ) {
45588+ if (uniffi_matrix_sdk_ffi_checksum_method_encryption_user_identity() != 17575 ) {
4552045589 return InitializationResult.apiChecksumMismatch
4552145590 }
4552245591 if (uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state() != 29114) {
@@ -46203,12 +46272,21 @@ private let initializationResult: InitializationResult = {
4620346272 if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_space_updates() != 26327) {
4620446273 return InitializationResult.apiChecksumMismatch
4620546274 }
46275+ if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_add_child_to_space() != 31295) {
46276+ return InitializationResult.apiChecksumMismatch
46277+ }
46278+ if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_parents_of_child() != 18724) {
46279+ return InitializationResult.apiChecksumMismatch
46280+ }
4620646281 if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces() != 54285) {
4620746282 return InitializationResult.apiChecksumMismatch
4620846283 }
4620946284 if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_leave_space() != 7949) {
4621046285 return InitializationResult.apiChecksumMismatch
4621146286 }
46287+ if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_remove_child_from_space() != 14438) {
46288+ return InitializationResult.apiChecksumMismatch
46289+ }
4621246290 if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list() != 6768) {
4621346291 return InitializationResult.apiChecksumMismatch
4621446292 }
0 commit comments