1 /*
2  * Copyright (C) 2024 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.tools.traces.io
18 
19 import android.tools.Timestamp
20 import android.tools.io.Artifact
21 import android.tools.io.RunStatus
22 import android.tools.io.TransitionTimeRange
23 
24 /** Contents of a flicker run (e.g. files, status, event log) */
25 interface IResultData {
26     val transitionTimeRange: TransitionTimeRange
27     val executionError: Throwable?
28     val artifact: Artifact
29     val runStatus: RunStatus
30 
31     /** updates the artifact status to [newStatus] */
updateStatusnull32     fun updateStatus(newStatus: RunStatus): IResultData
33 
34     /** @return a subsection of the trace */
35     fun slice(startTimestamp: Timestamp, endTimestamp: Timestamp): IResultData
36 }
37