// // ClientProxyProtocol.swift // ElementX // // Created by Stefan Ceriu on 26/05/2022. // Copyright © 2022 Element. All rights reserved. // import Combine import Foundation import MatrixRustSDK enum ClientProxyCallback { case updatedRoomsList case receivedSyncUpdate } enum ClientProxyError: Error { case failedRetrievingAvatarURL case failedRetrievingDisplayName case failedRetrievingSessionVerificationController case failedLoadingMedia } protocol ClientProxyProtocol { var callbacks: PassthroughSubject { get } var userIdentifier: String { get } var rooms: [RoomProxy] { get } func loadUserDisplayName() async -> Result func loadUserAvatarURLString() async -> Result func mediaSourceForURLString(_ urlString: String) -> MatrixRustSDK.MediaSource func loadMediaContentForSource(_ source: MatrixRustSDK.MediaSource) throws -> Data func sessionVerificationControllerProxy() async -> Result }