From 3917b4c8cf70fbe666929623dc009d1e932eeccb Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 26 Nov 2021 15:06:51 +0100 Subject: [PATCH] tmp expected result --- .../app/features/analytics/plan/Error.kt | 61 +++++++++++++++++++ .../app/features/analytics/plan/Screen.kt | 55 +++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 vector/src/main/java/im/vector/app/features/analytics/plan/Error.kt create mode 100644 vector/src/main/java/im/vector/app/features/analytics/plan/Screen.kt diff --git a/vector/src/main/java/im/vector/app/features/analytics/plan/Error.kt b/vector/src/main/java/im/vector/app/features/analytics/plan/Error.kt new file mode 100644 index 0000000000..d5374f321a --- /dev/null +++ b/vector/src/main/java/im/vector/app/features/analytics/plan/Error.kt @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2021 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.features.analytics.plan + +import im.vector.app.features.analytics.itf.VectorAnalyticsEvent + +// GENERATED FILE, DO NOT EDIT + +/** + * Triggered when an error occurred + */ +data class Error( + /** + * Context - client defined, can be used for debugging + */ + val context: String? = null, + val domain: Domain, + val name: Name, +) : VectorAnalyticsEvent { + + enum class Domain { + E2EE, + VOIP, + } + + enum class Name { + OlmIndexError, + OlmKeysNotSentError, + OlmUnspecifiedError, + UnknownError, + VoipIceFailed, + VoipIceTimeout, + VoipInviteTimeout, + VoipUserHangup, + VoipUserMediaFailed, + } + + override fun getName() = "Error" + + override fun getProperties(): Map? { + return mutableMapOf().apply { + context?.let { put("context", it) } + put("domain", domain.name) + put("name", name.name) + }.takeIf { it.isNotEmpty() } + } +} diff --git a/vector/src/main/java/im/vector/app/features/analytics/plan/Screen.kt b/vector/src/main/java/im/vector/app/features/analytics/plan/Screen.kt new file mode 100644 index 0000000000..3be490fedb --- /dev/null +++ b/vector/src/main/java/im/vector/app/features/analytics/plan/Screen.kt @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2021 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.features.analytics.plan + +import im.vector.app.features.analytics.itf.VectorAnalyticsScreen + +// GENERATED FILE, DO NOT EDIT + +/** + * Triggered when the user changed screen + */ +data class Screen( + val durationMs: Double? = null, + val screenName: ScreenName, +) : VectorAnalyticsScreen { + + enum class ScreenName { + Group, + Home, + MyGroups, + Room, + RoomDirectory, + User, + WebCompleteSecurity, + WebE2ESetup, + WebForgotPassword, + WebLoading, + WebLogin, + WebRegister, + WebSoftLogout, + WebWelcome, + } + + override fun getName() = screenName.name + + override fun getProperties(): Map? { + return mutableMapOf().apply { + durationMs?.let { put("durationMs", it) } + }.takeIf { it.isNotEmpty() } + } +}