Package-level declarations

Contains classes that coordinate the Frontends within the system UI.

Types

Link copied to clipboard

A factory used to create a FrontendContext to provide when creating a Frontend instance.

Link copied to clipboard
typealias FrontendCoordinationRulesFactory<PR> = (frontendRegistry: FrontendRegistry, panelRegistry: PR) -> Collection<FrontendCoordinationRule>
Link copied to clipboard
@IviExperimental(reasons = [])
class FrontendCoordinator<PR : PanelRegistry>(frontendCoordinatorContext: FrontendCoordinatorContext<PR>)

Coordinates the Frontends within the IVI system. It manages the lifecycle of frontends, determines which of the frontend's panels should be shown in the UI, and enables the business logic rules between them.

Link copied to clipboard
@IviExperimental(reasons = [])
data class FrontendCoordinatorContext<PR : PanelRegistry> @IviInternal constructor(val lifecycleOwner: LifecycleOwner, val iviServiceProvider: IviInstanceBoundIviServiceProvider, val frontendMetadata: Collection<FrontendMetadata>, val frontendContextFactory: FrontendContextFactory, val panelRegistryFactory: PanelRegistryFactory<PR>, val frontendCoordinationRulesFactory: FrontendCoordinationRulesFactory<PR>, val createAfterStartupFrontendsTrigger: Flow<Boolean>, val createAfterStartupFrontendsTimeout: Flow<Duration>)

The entry point for a single FrontendCoordinator to communicate with the rest of the system. The FrontendCoordinatorContext should only be created by a system UI host through the LifecycleViewModel.createDefaultFrontendCoordinatorContext or LifecycleViewModel.createFrontendCoordinatorContext extension functions and can be modified afterwards using the copy method.

Link copied to clipboard
@IviExperimental(reasons = [])
class FrontendRegistry(lifecycleOwner: LifecycleOwner, frontendMetadata: Collection<FrontendMetadata>, frontendContextFactory: FrontendContextFactory, createAfterStartupFrontendsTrigger: Flow<Boolean>, createAfterStartupFrontendsTimeout: Flow<Duration>, onYield: suspend () -> Unit = ::yield)

Manages the lifecycles of Frontends based on the given frontendMetadata.

Link copied to clipboard
@IviExperimental(reasons = [])
class IviFrontendContext(val iviServiceProvider: IviInstanceBoundIviServiceProvider, val staticConfigurationProvider: StaticConfigurationProvider, val applicationContext: Context, panelTypesAvailableToFrontend: PanelTypeSet, panelTypesSupportedBySystemUi: PanelTypeSet) : FrontendContext

A basic default implementation for FrontendContext.

Link copied to clipboard
@IviExperimental(reasons = [])
class IviPanelRegistry(val homePanel: LiveData<HomePanel?>, val mainMenuPanel: LiveData<MainMenuPanel?>, val controlCenterPanels: LiveData<PanelList<ControlCenterPanel>>, val mainProcessPanel: LiveData<MainProcessPanel?>, val expandedProcessPanel: LiveData<ExpandedProcessPanel?>, val taskPanelStackData: LiveData<TaskPanelStackData>, val notificationPanelData: LiveData<NotificationPanelData>, val guidancePanel: LiveData<GuidancePanel?>, val settingsPanel: LiveData<SettingsPanel?>, val navigationPanel: LiveData<NavigationPanel?>, val speedLimitPanel: LiveData<SpeedLimitPanel?>, val debugPanel: LiveData<DebugPanel?>, val overlayPanels: LiveData<PanelList<OverlayPanel>>, val modalPanelStackData: LiveData<ModalPanelStackData>) : PanelRegistry

A class that indicates the currently active Panels.

Link copied to clipboard
@IviExperimental(reasons = [])
interface PanelRegistry

An identifying interface for classes that indicate the currently active Panels.

Link copied to clipboard
typealias PanelRegistryFactory<PR> = (frontendRegistry: FrontendRegistry) -> PR