• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2016 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.tradefed.host;
18 
19 import com.android.tradefed.build.IBuildProvider;
20 import com.android.tradefed.config.ConfigurationException;
21 import com.android.tradefed.targetprep.DeviceFlashPreparer;
22 
23 import java.io.File;
24 import java.util.Map;
25 
26 /**
27  * Host options holder interface.
28  * This interface is used to access host-wide options.
29  */
30 public interface IHostOptions {
31 
32     /**
33      * Returns the max number of concurrent flashing to allow. Used by {@link DeviceFlashPreparer}.
34      *
35      * @return the concurrent flasher limit.
36      */
getConcurrentFlasherLimit()37     Integer getConcurrentFlasherLimit();
38 
39     /**
40      * Returns the max number of concurrent downloads allowed. Used by {@link IBuildProvider} that
41      * downloads remote builds.
42      */
getConcurrentDownloadLimit()43     Integer getConcurrentDownloadLimit();
44 
45     /** Returns the path that fastboot should use as temporary folder. */
getFastbootTmpDir()46     File getFastbootTmpDir();
47 
48     /** Returns the path used for storing downloaded artifacts. */
getDownloadCacheDir()49     File getDownloadCacheDir();
50 
51     /** Check if it should use the SingleSignOn client or not. */
shouldUseSsoClient()52     Boolean shouldUseSsoClient();
53 
54     /** Returns a Map of service account json key files. */
getServiceAccountJsonKeyFiles()55     Map<String, File> getServiceAccountJsonKeyFiles();
56 
57     /** Validate that the options set on {@link IHostOptions} are valid. */
validateOptions()58     void validateOptions() throws ConfigurationException;
59 }
60