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 com.android.wallpaper.picker.category.client
18 
19 import com.android.wallpaper.model.Category
20 
21 /** This class is responsible for fetching categories and wallpaper info. from external sources. */
22 interface DefaultWallpaperCategoryClient {
23 
24     /**
25      * This method is used for fetching the system categories.
26      */
getSystemCategoriesnull27     suspend fun getSystemCategories(): List<Category>
28 
29     /**
30      * This method is used for fetching the MyPhotos category.
31      */
32     suspend fun getMyPhotosCategory(): Category
33 
34     /**
35      * This method is used for fetching the pre-loaded on device categories.
36      */
37     suspend fun getOnDeviceCategory(): Category?
38 
39     /**
40      * This method is used for fetching the third party categories.
41      */
42     suspend fun getThirdPartyCategory(excludedPackageNames: List<String>): List<Category>
43 
44     /**
45      * This method is used for fetching the package names that should not be included in third
46      * party categories.
47      */
48     fun getExcludedThirdPartyPackageNames(): List<String>
49 
50     /**
51      * This method is used for fetching the third party live wallpaper categories.
52      */
53     suspend fun getThirdPartyLiveWallpaperCategory(excludedPackageNames: Set<String>): List<Category>
54 
55     /**
56      * This method is used for returning the package names that should not be included
57      * in live wallpaper categories.
58      */
59     fun getExcludedLiveWallpaperPackageNames(): Set<String>
60 }
61