1 /* 2 * Copyright (C) 2011 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; 18 19 import java.io.File; 20 21 22 /** 23 * Describes a system image as used by an {@link IAndroidTarget}. 24 * A system image has an installation path, a location type and an ABI type. 25 */ 26 public interface ISystemImage extends Comparable<ISystemImage> { 27 28 /** Indicates the type of location for the system image folder in the SDK. */ 29 public enum LocationType { 30 /** 31 * The system image is located in the legacy platform's {@link SdkConstants#FD_IMAGES} 32 * folder. 33 * <p/> 34 * Used by both platform and add-ons. 35 */ 36 IN_PLATFORM_LEGACY, 37 38 /** 39 * The system image is located in a sub-directory of the platform's 40 * {@link SdkConstants#FD_IMAGES} folder, allowing for multiple system 41 * images within the platform. 42 * <p/> 43 * Used by both platform and add-ons. 44 */ 45 IN_PLATFORM_SUBFOLDER, 46 47 /** 48 * The system image is located in the new SDK's {@link SdkConstants#FD_SYSTEM_IMAGES} 49 * folder. Supported as of Tools R14 and Repository XSD version 5. 50 * <p/> 51 * Used <em>only</em> by both platform. This is not supported for add-ons yet. 52 */ 53 IN_SYSTEM_IMAGE, 54 } 55 56 /** Returns the actual location of an installed system image. */ 57 public abstract File getLocation(); 58 59 /** Indicates the location strategy for this system image in the SDK. */ 60 public abstract LocationType getLocationType(); 61 62 /** 63 * Returns the ABI type. For example, one of {@link SdkConstants#ABI_ARMEABI}, 64 * {@link SdkConstants#ABI_ARMEABI_V7A} or {@link SdkConstants#ABI_INTEL_ATOM}. 65 * Cannot be null nor empty. 66 */ 67 public abstract String getAbiType(); 68 } 69