ENAExposureSubmissionService

class ENAExposureSubmissionService : ExposureSubmissionService

Undocumented

Init

Protocol ExposureSubmissionService

  • Undocumented

    Declaration

    Swift

    private(set) var devicePairingConsentAcceptTimestamp: Int64? { get set }
  • Undocumented

    Declaration

    Swift

    private(set) var devicePairingSuccessfulTimestamp: Int64? { get set }
  • This method submits the exposure keys. Additionally, after successful completion, the timestamp of the key submission is updated. Extension for plausible deniability: We prepend a fake request in order to guarantee the V+V+S sequence. Please kindly check getTestResult for more information.

    Declaration

    Swift

    func submitExposure(
    	symptomsOnset: SymptomsOnset,
    	visitedCountries: [Country],
    	completionHandler: @escaping ExposureSubmissionHandler
    )
  • Stores the provided key, retrieves the registration token and deletes the key. Extension for plausible deniability: We append two fake requests to this request in order to fulfill the V+V+S sequence. Please kindly check getTestResult for more information.

    Declaration

    Swift

    func getRegistrationToken(
    	forKey deviceRegistrationKey: DeviceRegistrationKey,
    	completion completeWith: @escaping RegistrationHandler
    )
  • This method gets the test result based on the registrationToken that was previously received, either from the TAN or QR Code flow. After successful completion, the timestamp of the last received test is updated. Extension for plausible deniability: We append two fake requests to this request in order to fulfill the V+V+S sequence. (This means, we always send three requests, regardless which API call we do. The first two have to go to the verification server, and the last one goes to the submission server.)

    Declaration

    Swift

    func getTestResult(_ completeWith: @escaping TestResultHandler)
  • Declaration

    Swift

    func getTestResult(forKey deviceRegistrationKey: DeviceRegistrationKey, useStoredRegistration: Bool = true, completion: @escaping TestResultHandler)
  • Undocumented

    Declaration

    Swift

    func hasRegistrationToken() -> Bool
  • Undocumented

    Declaration

    Swift

    func deleteTest()
  • Undocumented

    Declaration

    Swift

    func preconditions() -> ExposureManagerState
  • Undocumented

    Declaration

    Swift

    func acceptPairing()
  • This method is called randomly sometimes in the foreground and from the background. It represents the full-fledged dummy request needed to realize plausible deniability. Nothing called in this method is considered a “real” request.

    Declaration

    Swift

    func fakeRequest(completionHandler: ExposureSubmissionHandler? = nil)

Internal