1 /*
2  * Copyright (C) 2020 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 com.android.systemui.controls.controller
18 
19 import android.content.ComponentName
20 
21 /**
22  * Stores basic information about a Structure to persist and keep track of favorites.
23  *
24  * Every [component] [structure] pair uniquely identifies the structure.
25  *
26  * @property componentName the name of the component that provides the [Control].
27  * @property structure common structure name of all underlying [controls], or empty string
28  * @property controls all controls in the name structure
29  */
30 data class StructureInfo(
31     val componentName: ComponentName,
32     val structure: CharSequence,
33     val controls: List<ControlInfo>
34 ) {
35     companion object {
36         val EMPTY_COMPONENT = ComponentName("", "")
37         val EMPTY_STRUCTURE = StructureInfo(EMPTY_COMPONENT, "", mutableListOf())
38     }
39 }
40