1 /* 2 * Copyright 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 package com.android.photopicker.core 17 18 import dagger.hilt.DefineComponent 19 import dagger.hilt.components.SingletonComponent 20 21 /** 22 * A custom child component of the [SingletonComponent] that will be owned by the [EmbeddedService]. 23 * 24 * @see [EmbeddedSessionModule] which is a dependency container installed in this component. 25 */ 26 @SessionScoped 27 @DefineComponent(parent = SingletonComponent::class) 28 public interface EmbeddedServiceComponent 29 30 /** 31 * A component builder that can be used to obtain a new instance of the [EmbeddedServiceComponent]. 32 * This builder should be used to create a unique set of injectable dependencies for each individual 33 * embedded photopicker session. 34 */ 35 @DefineComponent.Builder 36 interface EmbeddedServiceComponentBuilder { buildnull37 fun build(): EmbeddedServiceComponent 38 } 39