mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-01 18:23:03 +00:00
fccad5fc30
Remove some redundant injections when passed alongside a user session too. # Conflicts: # ElementX/Sources/Screens/PinnedEventsTimelineScreen/View/PinnedEventsTimelineScreen.swift # ElementX/Sources/Screens/Timeline/TimelineViewModel.swift
42 lines
1.6 KiB
Swift
42 lines
1.6 KiB
Swift
//
|
|
// Copyright 2026 Element Creations Ltd.
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
|
// Please see LICENSE files in the repository root for full details.
|
|
//
|
|
|
|
import Foundation
|
|
import MatrixRustSDK
|
|
|
|
// sourcery: AutoMockable
|
|
nonisolated protocol ClientFactoryProtocol {
|
|
// MARK: Authentication
|
|
|
|
#if IS_MAIN_APP
|
|
func makeAuthenticationClient(serverNameOrBaseURL: String,
|
|
sessionDirectories: SessionDirectories,
|
|
passphrase: Data,
|
|
clientSessionDelegate: ClientSessionDelegate,
|
|
appSettings: AppSettings,
|
|
appHooks: AppHooks) async throws -> ClientProtocol
|
|
|
|
func makeInMemoryClient(serverNameOrBaseURL: String,
|
|
clientSessionDelegate: ClientSessionDelegate,
|
|
appSettings: AppSettings,
|
|
appHooks: AppHooks) async throws -> ClientProtocol
|
|
|
|
// MARK: Restoration
|
|
|
|
func makeAppClient(credentials: KeychainCredentials,
|
|
clientSessionDelegate: ClientSessionDelegate,
|
|
appSettings: AppSettings,
|
|
appHooks: AppHooks) async throws -> ClientProtocol
|
|
#endif
|
|
|
|
func makeNSEClient(credentials: KeychainCredentials,
|
|
roomID: String,
|
|
clientSessionDelegate: ClientSessionDelegate,
|
|
userSettings: CommonSettingsProtocol,
|
|
appHooks: AppHooks) async throws -> ClientProtocol
|
|
}
|