@@ -21,18 +21,46 @@ import com.wire.ios.shared.auth.login.model.LoginServerLinks
2121
2222data class WireIosSharedConfig (
2323 val defaultServerLinks : LoginServerLinks ,
24+ val runtimeConfig : IosKaliumRuntimeConfig ? = null ,
2425 val isThereActiveSession : Boolean = false ,
2526 val maxAccountsReached : Boolean = false ,
2627 val nomadAccountBlocksLogin : Boolean = false ,
2728 val isAccountCreationAllowed : Boolean = true ,
2829 val useNewRegistration : Boolean = true ,
2930)
3031
32+ data class IosKaliumRuntimeConfig (
33+ val appGroupRootPath : String ,
34+ val accountDataPath : String? = null ,
35+ val sqlDelightRootPath : String ,
36+ val coreCryptoPath : String? = null ,
37+ val userId : String? = null ,
38+ val clientId : String? = null ,
39+ val backendDomain : String ,
40+ val serverLinks : LoginServerLinks ,
41+ val migrationMode : MigrationMode ,
42+ )
43+
44+ enum class MigrationMode {
45+ CleanInstallProbe ,
46+ ExistingIosAccountOpenInPlace ,
47+ }
48+
3149fun createWireIosSharedConfig (defaultServerLinks : LoginServerLinks ): WireIosSharedConfig =
3250 WireIosSharedConfig (defaultServerLinks = defaultServerLinks)
3351
3452fun createWireIosSharedConfig (
3553 defaultServerLinks : LoginServerLinks ,
54+ runtimeConfig : IosKaliumRuntimeConfig ? ,
55+ ): WireIosSharedConfig =
56+ WireIosSharedConfig (
57+ defaultServerLinks = defaultServerLinks,
58+ runtimeConfig = runtimeConfig,
59+ )
60+
61+ fun createWireIosSharedConfig (
62+ defaultServerLinks : LoginServerLinks ,
63+ runtimeConfig : IosKaliumRuntimeConfig ? ,
3664 isThereActiveSession : Boolean ,
3765 maxAccountsReached : Boolean ,
3866 nomadAccountBlocksLogin : Boolean ,
@@ -41,9 +69,48 @@ fun createWireIosSharedConfig(
4169): WireIosSharedConfig =
4270 WireIosSharedConfig (
4371 defaultServerLinks = defaultServerLinks,
72+ runtimeConfig = runtimeConfig,
4473 isThereActiveSession = isThereActiveSession,
4574 maxAccountsReached = maxAccountsReached,
4675 nomadAccountBlocksLogin = nomadAccountBlocksLogin,
4776 isAccountCreationAllowed = isAccountCreationAllowed,
4877 useNewRegistration = useNewRegistration,
4978 )
79+
80+ fun createIosKaliumRuntimeConfig (
81+ appGroupRootPath : String ,
82+ sqlDelightRootPath : String ,
83+ backendDomain : String ,
84+ serverLinks : LoginServerLinks ,
85+ migrationMode : MigrationMode ,
86+ ): IosKaliumRuntimeConfig =
87+ IosKaliumRuntimeConfig (
88+ appGroupRootPath = appGroupRootPath,
89+ sqlDelightRootPath = sqlDelightRootPath,
90+ backendDomain = backendDomain,
91+ serverLinks = serverLinks,
92+ migrationMode = migrationMode,
93+ )
94+
95+ fun createIosKaliumRuntimeConfig (
96+ appGroupRootPath : String ,
97+ accountDataPath : String? ,
98+ sqlDelightRootPath : String ,
99+ coreCryptoPath : String? ,
100+ userId : String? ,
101+ clientId : String? ,
102+ backendDomain : String ,
103+ serverLinks : LoginServerLinks ,
104+ migrationMode : MigrationMode ,
105+ ): IosKaliumRuntimeConfig =
106+ IosKaliumRuntimeConfig (
107+ appGroupRootPath = appGroupRootPath,
108+ accountDataPath = accountDataPath,
109+ sqlDelightRootPath = sqlDelightRootPath,
110+ coreCryptoPath = coreCryptoPath,
111+ userId = userId,
112+ clientId = clientId,
113+ backendDomain = backendDomain,
114+ serverLinks = serverLinks,
115+ migrationMode = migrationMode,
116+ )
0 commit comments