Environment.kt 2.42 KB
Newer Older
1
2
package org.dpppt.android.app

3
4
import org.dpppt.android.app.domain.entity.FederationGatewayUsageForDP3TBackend
import org.dpppt.android.app.domain.entity.FederationGatewayUsageForPatientPortal
5
import org.dpppt.android.app.domain.entity.GracePeriodConfiguration
6
import org.dpppt.android.app.domain.entity.LocalizedUrl
7
8
import org.dpppt.android.sdk.internal.logger.LogLevel

9
10
11
12
/**
 * This interface will be provided by different flavours of the application
 */
interface Environment {
13
    // SDK values
14
    val gracePeriodConfigOverride: GracePeriodConfiguration? // No override if value is null
15
16
17
    val bucketPublicKeyBase64: String
    val sdkReportUrl: String
    val sdkBucketUrl: String
18
19
    // SDK side log level. For anything else that debug builds should be LogLevel.OFF
    val sdkLogLevel: LogLevel
20
21

    // Application values
22
    // The patient portal base url must end with a query parameters start char '?'
23
    val patientPortalBaseUrl: String
24
    val patientPortalCallbackBaseUrl: String
25
26
27
    val infoPageUrl: LocalizedUrl
    val contactInfoPageUrl: LocalizedUrl
    val covidInstructionsUrl: LocalizedUrl
Michelle Mueller's avatar
Michelle Mueller committed
28
    val healthBoardRecommendationsUrl: LocalizedUrl
29
    val privacyPolicyUrl: LocalizedUrl
30
31
32
33
    /**
     * URL to Hoia.me page's got sick abroad information.
     */
    val gotSickAbroadUrl: LocalizedUrl
34
35
    // Is app logging enabled?
    val appLogEnabled: Boolean
36
    // Should we display the long version string with backend and SDK info?
37
38
    // For public release this should be set to false. For all others we want to show as much info as possible.
    val showLongVersionInfo: Boolean
39
    val crashAppOnUndeliverableException: Boolean
40
41
42
    // Show the application allow to start the infection confirmation process without GAEN enabled.
    // NB: Should only be allowed for debug versions. No reason to allow it for releases.
    val allowInfectionConfirmationStartWithoutGAEN: Boolean
43
    /**
44
     * Flag to use when getting or sending exposed keys to and from the DP-3T backend. See [FederationGatewayUsageForDP3TBackend] for more.
45
46
     * Has three states: server decides, app requests gateway to be used, app requests the gateway to not to be used.
     */
47
48
49
50
51
    val federationGatewayUsageForDP3TBackend: FederationGatewayUsageForDP3TBackend
    /**
     * Flag to use when doing PP side infection confirmation. See [FederationGatewayUsageForPatientPortal] for more.
     */
    val federationGatewayUsageForPatientPortal: FederationGatewayUsageForPatientPortal
52
}