Add specific methods to track analytics and test generated event types.

This commit is contained in:
Doug
2021-11-24 10:43:22 +00:00
parent 72f75cc36d
commit 84fdd7585c
12 changed files with 234 additions and 49 deletions
@@ -0,0 +1,45 @@
import Foundation
struct AnalyticsEvent {
struct Error {
let domain: ErrorDomain
let name: ErrorName
let context: String?
}
enum ErrorDomain: String {
case E2EE
case VOIP
}
enum ErrorName: String {
case UnknownError
case OlmIndexError
case OlmKeysNotSentError
case OlmUnspecifiedError
case VoipUserHangup
case VoipIceFailed
case VoipInviteTimeout
case VoipIceTimeout
case VoipUserMediaFailed
}
struct CallStarted {
let placed: Bool
let isVideo: Bool
let numParticipants: Int
}
struct CallEnded {
let placed: Bool
let isVideo: Bool
let durationMs: Int
let numParticipants: Int
}
struct CallError {
let placed: Bool
let isVideo: Bool
let numParticipants: Int
}
}