• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2010 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.sdklib.internal.repository.packages;
18 
19 import com.android.sdklib.repository.SdkRepoConstants;
20 
21 /**
22  * Interface used to decorate a {@link Package} that has a dependency
23  * on a minimal API level, e.g. which XML has a <code>&lt;min-api-level&gt;</code> element.
24  * <p/>
25  * A package that has this dependency can only be installed if a platform with at least the
26  * requested API level is present or installed at the same time.
27  */
28 public interface IMinApiLevelDependency {
29 
30     /**
31      * The value of {@link #getMinApiLevel()} when the {@link SdkRepoConstants#NODE_MIN_API_LEVEL}
32      * was not specified in the XML source.
33      */
34     public static final int MIN_API_LEVEL_NOT_SPECIFIED = 0;
35 
36     /**
37      * Returns the minimal API level required by this package, if > 0,
38      * or {@link #MIN_API_LEVEL_NOT_SPECIFIED} if there is no such requirement.
39      */
getMinApiLevel()40     public abstract int getMinApiLevel();
41 }
42