12dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll/* 22dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * Copyright (C) 2009 The Android Open Source Project 32dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * 42dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * Licensed under the Apache License, Version 2.0 (the "License"); 52dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * you may not use this file except in compliance with the License. 62dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * You may obtain a copy of the License at 72dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * 82dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * http://www.apache.org/licenses/LICENSE-2.0 92dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * 102dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * Unless required by applicable law or agreed to in writing, software 112dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * distributed under the License is distributed on an "AS IS" BASIS, 122dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 132dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * See the License for the specific language governing permissions and 142dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * limitations under the License. 152dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll */ 162dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll 172dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Mollpackage com.android.sdklib.internal.repository.packages; 182dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll 192dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Mollimport com.android.annotations.NonNull; 202dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Mollimport com.android.sdklib.AndroidVersion; 212dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll 222dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll/** 232dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * Interface for packages that provide an {@link AndroidVersion}. 242dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * <p/> 252dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * Note that {@link IPlatformDependency} is a similar interface, but with a different semantic. 262dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * The {@link IPlatformDependency} denotes that a given package can only be installed if the 272dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * requested platform is present, whereas this interface denotes that the given package simply 282dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * has a version, which is not necessarily a dependency. 292dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll */ 302dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Mollpublic interface IAndroidVersionProvider { 312dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll 322dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll /** 332dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * Returns the android version, for platform, add-on and doc packages. 342dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll * Can be 0 if this is a local package of unknown api-level. 352dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll */ 362dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll public abstract @NonNull AndroidVersion getAndroidVersion(); 372dbb10456924ea2cbce7c4647881fd57f766c3aaRaphael Moll} 38