OSDN Git Service

auto import from //branches/cupcake/...@125939
authorThe Android Open Source Project <initial-contribution@android.com>
Sat, 10 Jan 2009 01:51:19 +0000 (17:51 -0800)
committerThe Android Open Source Project <initial-contribution@android.com>
Sat, 10 Jan 2009 01:51:19 +0000 (17:51 -0800)
176 files changed:
apps/Fallback/res/values-fr/strings.xml [new file with mode: 0644]
apps/Fallback/res/values-it/strings.xml [new file with mode: 0644]
apps/Fallback/res/values-zh-rCN/strings.xml [new file with mode: 0644]
apps/Term/src/com/android/term/Term.java
build/sdk.atree
emulator/qtools/dmtrace.cpp
pdk/Pdk.mk
pdk/README
pdk/docs/_audio_hardware_interface_8h-source.html [deleted file]
pdk/docs/_audio_hardware_interface_8h.html [deleted file]
pdk/docs/_camera_hardware_interface_8h-source.html [deleted file]
pdk/docs/_camera_hardware_interface_8h.html [deleted file]
pdk/docs/annotated.html [deleted file]
pdk/docs/audio_sub_system.html
pdk/docs/camera.html
pdk/docs/classandroid_1_1_audio_hardware_interface.html [deleted file]
pdk/docs/classandroid_1_1_audio_stream_in.html [deleted file]
pdk/docs/classandroid_1_1_audio_stream_out.html [deleted file]
pdk/docs/classandroid_1_1_camera_hardware_interface.html [deleted file]
pdk/docs/doxygen.css [deleted file]
pdk/docs/doxygen.png [deleted file]
pdk/docs/files.html [deleted file]
pdk/docs/functions.html [deleted file]
pdk/docs/functions_func.html [deleted file]
pdk/docs/functions_vars.html [deleted file]
pdk/docs/globals.html [deleted file]
pdk/docs/globals_func.html [deleted file]
pdk/docs/globals_type.html [deleted file]
pdk/docs/gps_8h-source.html [deleted file]
pdk/docs/gps_8h.html [deleted file]
pdk/docs/groups_8dox.html [deleted file]
pdk/docs/main_8dox.html [deleted file]
pdk/docs/namespaceandroid.html [deleted file]
pdk/docs/namespacemembers.html [deleted file]
pdk/docs/namespacemembers_func.html [deleted file]
pdk/docs/namespacemembers_type.html [deleted file]
pdk/docs/namespaces.html [deleted file]
pdk/docs/struct_gps_callbacks.html [deleted file]
pdk/docs/struct_gps_interface.html [deleted file]
pdk/docs/struct_gps_location.html [deleted file]
pdk/docs/struct_gps_status.html [deleted file]
pdk/docs/struct_gps_sv_info.html [deleted file]
pdk/docs/struct_gps_sv_status.html [deleted file]
pdk/docs/struct_gps_xtra_callbacks.html [deleted file]
pdk/docs/struct_gps_xtra_interface.html [deleted file]
pdk/docs/tab_b.gif [deleted file]
pdk/docs/tab_l.gif [deleted file]
pdk/docs/tab_r.gif [deleted file]
pdk/docs/tabs.css [deleted file]
pdk/docs/wifi_8h-source.html [deleted file]
pdk/docs/wifi_8h.html [deleted file]
pdk/doxygen_config/docsfiles/groups.dox [new file with mode: 0644]
pdk/doxygen_config/docsfiles/main.dox [new file with mode: 0644]
pdk/doxygen_config/overrideconfig.conf [new file with mode: 0644]
pdk/doxygen_config/pdk_config.conf [new file with mode: 0644]
pdk/ndk/Ndk.mk
samples/ApiDemos/AndroidManifest.xml
samples/ApiDemos/res/layout/intents.xml [new file with mode: 0644]
samples/ApiDemos/res/values/strings.xml
samples/ApiDemos/src/com/android/samples/app/VoiceRecognition.java
samples/ApiDemos/src/com/example/android/apis/app/Intents.java [new file with mode: 0644]
samples/Home/res/drawable/ic_menu_gallery.png [deleted file]
samples/Home/res/drawable/ic_menu_notifications.png [deleted file]
samples/Home/res/drawable/ic_menu_preferences.png [deleted file]
samples/Home/src/com/example/android/home/Home.java
samples/PlatformLibrary/Android.mk
samples/PlatformLibrary/README.txt
samples/PlatformLibrary/com.example.android.platform_library.xml [new file with mode: 0644]
samples/SoftKeyboard/res/values/dimens.xml
samples/SoftKeyboard/src/com/example/android/softkeyboard/CandidateView.java
samples/SoftKeyboard/src/com/example/android/softkeyboard/SoftKeyboard.java
tools/anttasks/.classpath [new file with mode: 0644]
tools/anttasks/.project [new file with mode: 0644]
tools/anttasks/Android.mk [new file with mode: 0644]
tools/anttasks/src/Android.mk [new file with mode: 0644]
tools/anttasks/src/com/android/ant/AndroidInitTask.java [new file with mode: 0644]
tools/ddms/libs/ddmlib/src/com/android/ddmlib/Device.java
tools/ddms/libs/ddmlib/src/com/android/ddmlib/DeviceMonitor.java
tools/ddms/libs/ddmlib/src/com/android/ddmlib/EmulatorConsole.java
tools/ddms/libs/ddmlib/src/com/android/ddmlib/IDevice.java
tools/ddms/libs/ddmlib/tests/src/com/android/ddmlib/testrunner/RemoteAndroidTestRunnerTest.java
tools/ddms/libs/ddmuilib/src/com/android/ddmuilib/DevicePanel.java
tools/eclipse/features/com.android.ide.eclipse.adt/feature.xml
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtConstants.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/AdtPlugin.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/build/ApkBuilder.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/build/ApkDeltaVisitor.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/build/BaseBuilder.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/build/PreCompilerBuilder.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/build/PreCompilerDeltaVisitor.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/debug/launching/AndroidLaunchController.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/debug/launching/DeviceChooserDialog.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/debug/launching/LaunchConfigDelegate.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/debug/ui/EmulatorConfigTab.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/debug/ui/MainLaunchConfigTab.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/preferences/BuildPreferencePage.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/project/FolderDecorator.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/project/export/ExportWizard.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/project/export/ProjectCheckPage.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/project/internal/AndroidClasspathContainerInitializer.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/sdk/AndroidJarLoader.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/sdk/AndroidTargetParser.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/sdk/IAndroidClassLoader.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/sdk/Sdk.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/sdk/WidgetClassLoader.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/wizards/newproject/NewProjectCreationPage.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/wizards/newproject/NewProjectWizard.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/common/AndroidConstants.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/common/project/AndroidManifestHelper.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/common/project/AndroidManifestParser.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/common/project/AndroidXPathFactory.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/common/project/BaseProjectHelper.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/common/project/XmlErrorHandler.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/common/resources/AttrsXmlParser.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/common/resources/DeclareStyleableInfo.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/AndroidContentAssist.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/AndroidEditor.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/descriptors/AttributeDescriptor.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/descriptors/AttributeDescriptorLabelProvider.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/descriptors/DescriptorsUtils.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/descriptors/TextAttributeDescriptor.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/layout/BasePullParser.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/manifest/descriptors/AndroidManifestDescriptors.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/resources/configurations/CountryCodeQualifier.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/resources/configurations/NetworkCodeQualifier.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/resources/configurations/PixelDensityQualifier.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/resources/manager/MultiResourceFile.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/resources/manager/ProjectClassLoader.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/resources/manager/ProjectResources.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/resources/manager/ResourceFolder.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/resources/manager/ResourceFolderType.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/resources/manager/ResourceManager.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/resources/manager/SingleResourceFile.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/resources/manager/files/FileWrapper.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/resources/manager/files/FolderWrapper.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/resources/manager/files/IFileWrapper.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/resources/manager/files/IFolderWrapper.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/ui/tree/NewItemSelectionDialog.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/wizards/ConfigurationSelector.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/wizards/NewXmlFileCreationPage.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/editors/wizards/ReferenceChooserDialog.java
tools/eclipse/plugins/com.android.ide.eclipse.adt/templates/AndroidManifest.template
tools/eclipse/plugins/com.android.ide.eclipse.adt/templates/uses-sdk.template [new file with mode: 0644]
tools/eclipse/plugins/com.android.ide.eclipse.tests/not_source_folder/jar/example/Class1.java [moved from tools/eclipse/plugins/com.android.ide.eclipse.tests/unittests/jar/example/Class1.java with 100% similarity]
tools/eclipse/plugins/com.android.ide.eclipse.tests/not_source_folder/jar/example/Class2.java [moved from tools/eclipse/plugins/com.android.ide.eclipse.tests/unittests/jar/example/Class2.java with 100% similarity]
tools/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/project/ProjectHelperTest.java
tools/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/sdk/AndroidJarLoaderTest.java
tools/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/common/resources/AttrsXmlParserTest.java
tools/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/editors/descriptors/DescriptorsUtilsTest.java
tools/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/editors/resources/configurations/TextInputMethodQualifierTest.java
tools/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/editors/resources/manager/ConfigMatchTest.java
tools/eclipse/plugins/com.android.ide.eclipse.tests/unittests/data/mock_attrs.xml
tools/eclipse/scripts/create_test_symlinks.sh
tools/findunused/findunusedresources
tools/scripts/android_rules.xml
tools/scripts/build.template
tools/scripts/default.properties.template [deleted file]
tools/sdkmanager/app/.classpath
tools/sdkmanager/app/src/com/android/sdkmanager/CommandLineProcessor.java [new file with mode: 0644]
tools/sdkmanager/app/src/com/android/sdkmanager/Main.java
tools/sdkmanager/app/src/com/android/sdkmanager/SdkCommandLine.java [new file with mode: 0644]
tools/sdkmanager/app/tests/com/android/sdkmanager/CommandLineProcessorTest.java [new file with mode: 0644]
tools/sdkmanager/app/tests/com/android/sdkmanager/SdkCommandLineTest.java [new file with mode: 0644]
tools/sdkmanager/libs/sdklib/src/com/android/sdklib/AddOnTarget.java
tools/sdkmanager/libs/sdklib/src/com/android/sdklib/IAndroidTarget.java
tools/sdkmanager/libs/sdklib/src/com/android/sdklib/ISdkLog.java
tools/sdkmanager/libs/sdklib/src/com/android/sdklib/PlatformTarget.java
tools/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkConstants.java
tools/sdkmanager/libs/sdklib/src/com/android/sdklib/SdkManager.java
tools/sdkmanager/libs/sdklib/src/com/android/sdklib/project/ProjectCreator.java [new file with mode: 0644]
tools/sdkmanager/libs/sdklib/src/com/android/sdklib/project/ProjectProperties.java
tools/sdkmanager/libs/sdklib/src/com/android/sdklib/vm/VmManager.java
tools/sdkmanager/libs/sdkuilib/.classpath [new file with mode: 0644]
tools/sdkmanager/libs/sdkuilib/.project [new file with mode: 0644]
tools/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/SdkTargetSelector.java
tools/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/VmSelector.java [new file with mode: 0644]

diff --git a/apps/Fallback/res/values-fr/strings.xml b/apps/Fallback/res/values-fr/strings.xml
new file mode 100644 (file)
index 0000000..58c84bd
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="appTitle">"Application de secours"</string>
+    <string name="title">"Action non prise en charge"</string>
+    <string name="error">"Cette action n\'est actuellement pas prise en charge."</string>
+</resources>
diff --git a/apps/Fallback/res/values-it/strings.xml b/apps/Fallback/res/values-it/strings.xml
new file mode 100644 (file)
index 0000000..74bef08
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="appTitle">"Fallback"</string>
+    <string name="title">"Azione non supportata"</string>
+    <string name="error">"L\'azione non è al momento supportata."</string>
+</resources>
diff --git a/apps/Fallback/res/values-zh-rCN/strings.xml b/apps/Fallback/res/values-zh-rCN/strings.xml
new file mode 100644 (file)
index 0000000..cee1221
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="appTitle">"Fallback"</string>
+    <string name="title">"不支持的操作"</string>
+    <string name="error">"当前不支持该操作。"</string>
+</resources>
index b3bb7ee..55cee3c 100644 (file)
@@ -60,13 +60,22 @@ import java.util.ArrayList;
  */
 
 public class Term extends Activity {
+    /**
+     * Set to true to add debugging code and logging.
+     */
+    public static final boolean DEBUG = false;
 
     /**
      * Set to true to log each character received from the remote process to the
      * android log, which makes it easier to debug some kinds of problems with
      * emulating escape sequences and control codes.
      */
-    public static final boolean LOG_CHARACTERS_FLAG = false;
+    public static final boolean LOG_CHARACTERS_FLAG = DEBUG && false;
+
+    /**
+     * Set to true to log unknown escape sequences.
+     */
+    public static final boolean LOG_UNKNOWN_ESCAPE_SEQUENCES = DEBUG && false;
 
     /**
      * The tag we use when logging, so that our messages can be distinguished
@@ -619,7 +628,7 @@ interface Screen {
      * @param columns
      * @param rows
      */
-    void resize(int columns, int rows);
+    void resize(int columns, int rows, int foreColor, int backColor);
 }
 
 
@@ -673,7 +682,7 @@ class TranscriptScreen implements Screen {
     private char[] mData;
 
     /**
-     * The data's stored as bytes, but the drawing routines require chars, so we
+     * The data's stored as color-encoded chars, but the drawing routines require chars, so we
      * need a temporary buffer to hold a row's worth of characters.
      */
     private char[] mRowBuffer;
@@ -695,23 +704,25 @@ class TranscriptScreen implements Screen {
      *        transcript that holds lines that have scrolled off the top of the
      *        screen.
      */
-    public TranscriptScreen(int columns, int totalRows, int screenRows) {
-        init(columns, totalRows, screenRows);
+    public TranscriptScreen(int columns, int totalRows, int screenRows,
+            int foreColor, int backColor) {
+        init(columns, totalRows, screenRows, foreColor, backColor);
     }
 
-    private void init(int columns, int totalRows, int screenRows) {
+    private void init(int columns, int totalRows, int screenRows, int foreColor, int backColor) {
         mColumns = columns;
         mTotalRows = totalRows;
         mActiveTranscriptRows = 0;
         mHead = 0;
-        mActiveRows = mScreenRows;
+        mActiveRows = screenRows;
         mScreenRows = screenRows;
         int totalSize = columns * totalRows;
         mData = new char[totalSize];
-        blockSet(0, 0, mColumns, mScreenRows, ' ', 0, 7);
+        blockSet(0, 0, mColumns, mScreenRows, ' ', foreColor, backColor);
         mRowBuffer = new char[columns];
         mLineWrap = new boolean[totalRows];
-    }
+        consistencyCheck();
+   }
 
     /**
      * Convert a row value from the public external coordinate system to our
@@ -781,7 +792,7 @@ class TranscriptScreen implements Screen {
 
         // Adjust the transcript so that the last line of the transcript
         // is ready to receive the newly scrolled data
-
+        consistencyCheck();
         int expansionRows = Math.min(1, mTotalRows - mActiveRows);
         int rollRows = 1 - expansionRows;
         mActiveRows += expansionRows;
@@ -789,6 +800,7 @@ class TranscriptScreen implements Screen {
         if (mActiveTranscriptRows > 0) {
             mHead = (mHead + rollRows) % mActiveTranscriptRows;
         }
+        consistencyCheck();
 
         // Block move the scroll line to the transcript
         int topOffset = getOffset(topMargin);
@@ -799,7 +811,6 @@ class TranscriptScreen implements Screen {
         int destLine = externalToInternalRow(-1);
         System.arraycopy(mLineWrap, topLine, mLineWrap, destLine, 1);
 
-
         // Block move the scrolled data up
         int numScrollChars = (bottomMargin - topMargin - 1) * mColumns;
         System.arraycopy(mData, topOffset + mColumns, mData, topOffset,
@@ -813,6 +824,41 @@ class TranscriptScreen implements Screen {
         mLineWrap[externalToInternalRow(bottomMargin-1)] = false;
     }
 
+    private void consistencyCheck() {
+        checkPositive(mColumns);
+        checkPositive(mTotalRows);
+        checkRange(0, mActiveTranscriptRows, mTotalRows);
+        if (mActiveTranscriptRows == 0) {
+            checkEqual(mHead, 0);
+        } else {
+            checkRange(0, mHead, mActiveTranscriptRows-1);
+        }
+        checkEqual(mScreenRows + mActiveTranscriptRows, mActiveRows);
+        checkRange(0, mScreenRows, mTotalRows);
+
+        checkEqual(mTotalRows, mLineWrap.length);
+        checkEqual(mTotalRows*mColumns, mData.length);
+        checkEqual(mColumns, mRowBuffer.length);
+    }
+
+    private void checkPositive(int n) {
+        if (n < 0) {
+            throw new IllegalArgumentException("checkPositive " + n);
+        }
+    }
+
+    private void checkRange(int a, int b, int c) {
+        if (a > b || b > c) {
+            throw new IllegalArgumentException("checkRange " + a + " <= " + b + " <= " + c);
+        }
+    }
+
+    private void checkEqual(int a, int b) {
+        if (a != b) {
+            throw new IllegalArgumentException("checkEqual " + a + " == " + b);
+        }
+    }
+
     /**
      * Block copy characters from one position in the screen to another. The two
      * positions can overlap. All characters of the source and destination must
@@ -872,7 +918,7 @@ class TranscriptScreen implements Screen {
         for (int y = 0; y < h; y++) {
             int offset = getOffset(sx, sy + y);
             for (int x = 0; x < w; x++) {
-                data[offset + x] = (char) val;
+                data[offset + x] = encodedVal;
             }
         }
     }
@@ -954,7 +1000,7 @@ class TranscriptScreen implements Screen {
         return internalGetTranscriptText(true);
     }
 
-    public String internalGetTranscriptText(boolean stripColors) {
+    private String internalGetTranscriptText(boolean stripColors) {
         StringBuilder builder = new StringBuilder();
         char[] rowBuffer = mRowBuffer;
         char[] data = mData;
@@ -982,55 +1028,11 @@ class TranscriptScreen implements Screen {
         return builder.toString();
     }
 
-    public void resize(int columns, int rows) {
-        if (columns == mColumns) {
-            if (rows == mScreenRows) {
-                return;
-            }
-            if (rows < mTotalRows) {
-                mScreenRows = rows;
-                mActiveTranscriptRows = mActiveRows - mScreenRows;
-                return;
-            }
-        }
-        // Tough case: columns size changes or need to expand rows
-        String transcriptText = internalGetTranscriptText(false);
-        int totalRows = Math.max(rows + 1, mTotalRows);
-        init(columns, totalRows, rows);
-        int length = transcriptText.length();
-
-        // Copy transcript into buffer
-        int row = 0;
-        char[] data = mData;
-        int col = 0;
-        for(int i = 0; i < length && row < totalRows; i++) {
-            char c = transcriptText.charAt(i);
-            if (c == '\n') {
-                row++;
-                col = 0;
-            } else {
-                if (col < columns) {
-                    data[row * columns + col] = c;
-                    col += 1;
-                } else {
-                    if (row < totalRows-1) {
-                        mLineWrap[row] = true;
-                        row++;
-                        col = 0;
-                        data[row * columns + col] = c;
-                        col += 1;
-                    } else {
-                        break; // ran out of room
-                    }
-                }
-            }
-        }
-        mActiveRows = rows;
-        mActiveTranscriptRows = mActiveRows - mScreenRows;
+    public void resize(int columns, int rows, int foreColor, int backColor) {
+        init(columns, mTotalRows, rows, foreColor, backColor);
     }
 }
 
-
 /**
  * Renders text into a screen. Contains all the terminal-specific knowlege and
  * state. Emulates a subset of the X Window System xterm terminal, which in turn
@@ -1270,12 +1272,14 @@ class TerminalEmulator {
         if (mRows == rows && mColumns == columns) {
             return;
         }
-        mScreen.resize(columns, rows);
+        String transcriptText = mScreen.getTranscriptText();
+
+        mScreen.resize(columns, rows, mForeColor, mBackColor);
+
         if (mRows != rows) {
             mRows = rows;
             mTopMargin = 0;
             mBottomMargin = mRows;
-            mCursorRow = Math.min(mCursorRow, mBottomMargin-1);
         }
         if (mColumns != columns) {
             int oldColumns = mColumns;
@@ -1288,7 +1292,23 @@ class TerminalEmulator {
                 mCursorCol -= columns;
                 mCursorRow = Math.min(mBottomMargin-1, mCursorRow + 1);
             }
-            mAboutToAutoWrap = false;
+        }
+        mCursorRow = 0;
+        mCursorCol = 0;
+        mAboutToAutoWrap = false;
+
+        int end = transcriptText.length()-1;
+        while ((end >= 0) && transcriptText.charAt(end) == '\n') {
+            end--;
+        }
+        for(int i = 0; i <= end; i++) {
+            byte c = (byte) transcriptText.charAt(i);
+            if (c == '\n') {
+                setCursorCol(0);
+                doLinefeed();
+            } else {
+                emit(c);
+            }
         }
     }
 
@@ -1877,7 +1897,9 @@ class TerminalEmulator {
             } else if (code >= 40 && code <= 47) { // background color
                 mBackColor = (mBackColor & 0x8) | (code - 40);
             } else {
-                Log.w(Term.LOG_TAG, String.format("SGR unknown code %d", code));
+                if (Term.LOG_UNKNOWN_ESCAPE_SEQUENCES) {
+                    Log.w(Term.LOG_TAG, String.format("SGR unknown code %d", code));
+                }
             }
         }
     }
@@ -2030,52 +2052,59 @@ class TerminalEmulator {
     }
 
     private void unimplementedSequence(byte b) {
-        logError("unimplemented", b);
+        if (Term.LOG_UNKNOWN_ESCAPE_SEQUENCES) {
+            logError("unimplemented", b);
+        }
         finishSequence();
     }
 
     private void unknownSequence(byte b) {
-        logError("unknown", b);
-
+        if (Term.LOG_UNKNOWN_ESCAPE_SEQUENCES) {
+            logError("unknown", b);
+        }
         finishSequence();
     }
 
     private void unknownParameter(int parameter) {
-        // We could log that we didn't recognize parameter.
-        StringBuilder buf = new StringBuilder();
-        buf.append("Unknown parameter");
-        buf.append(parameter);
-        logError(buf.toString());
+        if (Term.LOG_UNKNOWN_ESCAPE_SEQUENCES) {
+            StringBuilder buf = new StringBuilder();
+            buf.append("Unknown parameter");
+            buf.append(parameter);
+            logError(buf.toString());
+        }
     }
 
     private void logError(String errorType, byte b) {
-        // We could log that we didn't recognize character b.
-        StringBuilder buf = new StringBuilder();
-        buf.append(errorType);
-        buf.append(" sequence ");
-        buf.append(" EscapeState: ");
-        buf.append(mEscapeState);
-        buf.append(" char: '");
-        buf.append((char) b);
-        buf.append("' (");
-        buf.append((int) b);
-        buf.append(")");
-        boolean firstArg = true;
-        for (int i = 0; i <= mArgIndex; i++) {
-            int value = mArgs[i];
-            if (value >= 0) {
-                if (firstArg) {
-                    firstArg = false;
-                    buf.append("args = ");
+        if (Term.LOG_UNKNOWN_ESCAPE_SEQUENCES) {
+            StringBuilder buf = new StringBuilder();
+            buf.append(errorType);
+            buf.append(" sequence ");
+            buf.append(" EscapeState: ");
+            buf.append(mEscapeState);
+            buf.append(" char: '");
+            buf.append((char) b);
+            buf.append("' (");
+            buf.append((int) b);
+            buf.append(")");
+            boolean firstArg = true;
+            for (int i = 0; i <= mArgIndex; i++) {
+                int value = mArgs[i];
+                if (value >= 0) {
+                    if (firstArg) {
+                        firstArg = false;
+                        buf.append("args = ");
+                    }
+                    buf.append(String.format("%d; ", value));
                 }
-                buf.append(String.format("%d; ", value));
             }
+            logError(buf.toString());
         }
-        logError(buf.toString());
     }
 
     private void logError(String error) {
-        Log.e(Term.LOG_TAG, error);
+        if (Term.LOG_UNKNOWN_ESCAPE_SEQUENCES) {
+            Log.e(Term.LOG_TAG, error);
+        }
         finishSequence();
     }
 
@@ -2848,7 +2877,7 @@ class EmulatorView extends View implements GestureDetector.OnGestureListener {
             mEmulator.updateSize(mColumns, mRows);
         } else {
             mTranscriptScreen =
-                    new TranscriptScreen(mColumns, TRANSCRIPT_ROWS, mRows);
+                    new TranscriptScreen(mColumns, TRANSCRIPT_ROWS, mRows, 0, 7);
             mEmulator =
                     new TerminalEmulator(mTranscriptScreen, mColumns, mRows,
                             mTermOut);
index 2df42bc..f12a30c 100644 (file)
@@ -50,11 +50,10 @@ development/tools/scripts/java_tests_file.template platforms/${PLATFORM_NAME}/te
 development/tools/scripts/layout.template platforms/${PLATFORM_NAME}/templates/layout.template
 development/tools/scripts/strings.template platforms/${PLATFORM_NAME}/templates/strings.template
 development/tools/scripts/alias.template platforms/${PLATFORM_NAME}/templates/alias.template
+development/tools/scripts/android_rules.xml platforms/${PLATFORM_NAME}/templates/android_rules.xml
+development/tools/scripts/alias_rules.xml platforms/${PLATFORM_NAME}/templates/alias_rules.xml
 development/tools/scripts/build.template tools/lib/build.template
 development/tools/scripts/build.alias.template tools/lib/build.alias.template
-development/tools/scripts/default.properties.template tools/lib/default.properties.template
-development/tools/scripts/android_rules.xml tools/lib/android_rules.xml
-development/tools/scripts/alias_rules.xml tools/lib/alias_rules.xml
 
 # emacs support
 development/tools/scripts/android.el tools/lib/android.el
@@ -116,6 +115,7 @@ framework/traceview.jar tools/lib/traceview.jar
 # activitycreator
 bin/activitycreator tools/activitycreator
 framework/activitycreator.jar tools/lib/activitycreator.jar
+framework/anttasks.jar tools/lib/anttasks.jar
 
 # sdkmanager
 bin/android tools/android
index a27193a..6d9250a 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <unistd.h>
 #include <inttypes.h>
 #include <string.h>
 #include "dmtrace.h"
index cc458bc..88fedf5 100644 (file)
 # limitations under the License.
 #
 
-# Assemble the Platform Development Kit
+# Assemble the Platform Development Kit (PDK)
+# (TODO) Figure out why $(ACP) builds with target ndk but not pdk_docs
+# (TODO) Copy over index.html from templates instead of from generatedDocs 
+# (TODO) Build doxygen (depend on latest version)
 
-pdk: ndk
-       @echo "Package: $@"
+pdk:
+       @echo "Package: $@ has targets ndk, pdk_docs and pdk_all"
 
-LOCAL_PATH := $(my-dir)
+pdk_all: ndk pdk_docs
+       @echo "Package: $^"
 
+LOCAL_PATH := $(call my-dir)
+
+#-------------------------------------------------------------------------------
+# Make the Native Development Kit (Code examples)
+#   Allows vendors to build shared libraries without entire source tree.
+# This include adds /ndk to LOCAL_PATH, so can't use it afterwards...
 include $(LOCAL_PATH)/ndk/Ndk.mk
 
 
+#-------------------------------------------------------------------------------
+# Make the Plaftorm Development Kit Documentation.
+#   Doxygenize the header files to create html docs in the generatedDocs dir.
+#   Copy the template files and the generated html to the docs dir and zip 
+#   everything up to the distribution directory.
+
+
+# Workspace directory
+pdk_docs_intermediates := $(call intermediates-dir-for,PACKAGING,pdkdocs)
+
+# Source directories for templates, config & header files
+pdk_templates_dir := development/pdk/docs
+pdk_config_dir := development/pdk/doxygen_config
+pdk_docsfile_dir := $(pdk_config_dir)/docsfiles
+pdk_hardware_dir := hardware/libhardware/include/hardware
+pdk_camera_dir := frameworks/base/include/ui
+
+# Destination directory for docs (templates + doxygenated headers)
+pdk_docs_dest_dir := $(pdk_docs_intermediates)/docs
+
+# Working directory for source to be doxygenated
+pdk_doxy_source_dir := $(pdk_docs_intermediates)/sources
+
+# Working directory for html, et al. after doxygination
+pdk_generated_source_dir := $(pdk_docs_intermediates)/generatedDocs/html
+
+# Working directory for .dox files
+pdk_doxy_docsfiles_dir := $(pdk_docs_intermediates)/docsfiles
+
+# Doxygen version to use, so we can override it on the command line
+# doxygen 1.4.6 working, the latest version get-apt installable on goobuntu.
+# (TODO) doxygen 1.5.6 generated source files not displayable
+# doxygen_version='~pubengdocs/shared/doxy/doxygen.1.5.6.kcc'
+#   for latest version of doxygen on linux
+doxygen_version = doxygen
+
+#------------------------------------------------------------------------------- 
+# Header files to doxygenize. 
+#   Add new header files to document here, also adjust the templates to have 
+#   descriptions for the new headers and point to the new doxygen created html.
+pdk_headers := $(pdk_hardware_dir)/AudioHardwareInterface.h \
+    $(pdk_hardware_dir)/gps.h \
+    $(pdk_hardware_dir)/wifi.h \
+    $(pdk_camera_dir)/CameraHardwareInterface.h
+
+# Create a rule to copy the list of PDK headers to be doxyginated.
+# copy-one-header defines the actual rule.
+$(foreach header,$(pdk_headers), \
+  $(eval _chFrom := $(header)) \
+  $(eval _chTo :=  $(pdk_doxy_source_dir)/$(notdir $(header))) \
+  $(eval $(call copy-one-header,$(_chFrom),$(_chTo))) \
+  $(eval all_copied_pdk_headers: $(_chTo)) \
+ )
+_chFrom :=
+_chTo :=
+
+
+#-------------------------------------------------------------------------------
+# Assemble all the necessary doxygen config files and the sources into the
+#   working directories
+
+pdk_templates := $(shell find $(pdk_templates_dir) -type f)
+
+# Create a rule to copy the list of PDK doc templates.
+# copy-one-file defines the actual rule.
+$(foreach template,$(pdk_templates), \
+  $(eval _chFrom := $(template)) \
+  $(eval _chTo :=  $(pdk_docs_dest_dir)/$(notdir $(template))) \
+  $(eval $(call copy-one-header,$(_chFrom),$(_chTo))) \
+  $(eval all_copied_pdk_templates: $(_chTo)) \
+ )
+_chFrom :=
+_chTo :=
+
+# Copy newer doxygen config file (basic configs, should not change very often.)
+pdk_doxygen_config_file := $(pdk_docs_intermediates)/pdk_config.conf
+$(pdk_doxygen_config_file): $(pdk_config_dir)/pdk_config.conf
+       @echo "PDK: $@"
+       $(copy-file-to-target-with-cp)
+
+# Copy newer doxygen override config file (may change these more often.)
+pdk_doxygen_config_override_file := $(pdk_docs_intermediates)/overrideconfig.conf
+$(pdk_doxygen_config_override_file): $(pdk_config_dir)/overrideconfig.conf
+       @echo "PDK: $@"
+       $(copy-file-to-target-with-cp)
+
+# (TODO) Get the latest templates
+# Copy newer doxygen html files.
+$(pdk_docs_intermediates)/header.html: $(pdk_config_dir)/header.html
+       @echo "PDK: $@"
+       $(copy-file-to-target-with-cp)
+
+$(pdk_docs_intermediates)/footer.html: $(pdk_config_dir)/footer.html
+       @echo "PDK: $@"
+       $(copy-file-to-target-with-cp)
+
+# Copy newer doxygen .dox files
+$(pdk_doxy_docsfiles_dir)/groups.dox: $(pdk_docsfile_dir)/groups.dox
+       @echo "PDK: $@"
+       $(copy-file-to-target-with-cp)
+
+$(pdk_doxy_docsfiles_dir)/main.dox: $(pdk_docsfile_dir)/main.dox
+       @echo "PDK: $@"
+       $(copy-file-to-target-with-cp)
+
+# Run doxygen and copy all output and templates to the final destination
+# We replace index.html with a template file so don't use the generated one
+pdk_doxygen: all_copied_pdk_headers $(pdk_doxygen_config_override_file) \
+    $(pdk_doxygen_config_file) $(pdk_docs_intermediates)/header.html \
+    $(pdk_docs_intermediates)/footer.html $(pdk_doxy_docsfiles_dir)/groups.dox \
+    $(pdk_doxy_docsfiles_dir)/main.dox
+       @echo "Files for Doxygination: $^"
+       @mkdir -p $(pdk_generated_source_dir)
+       @rm -f $(pdk_generated_source_dir)/*
+       @cd $(pdk_docs_intermediates) && $(doxygen_version) pdk_config.conf
+       @mkdir -p $(pdk_docs_dest_dir)
+       @cd $(pdk_generated_source_dir) && chmod ug+rx *
+       @rm -f $(pdk_generated_source_dir)/index.html
+       @cp -fp $(pdk_generated_source_dir)/* $(pdk_docs_dest_dir)
+  
+# Name the tar files
+name := android_pdk_docs-$(REQUESTED_PRODUCT)
+ifeq ($(TARGET_BUILD_TYPE),debug)
+  name := $(name)_debug
+endif
+name := $(name)-$(BUILD_NUMBER)
+pdk_docs_tarfile := $(pdk_docs_intermediates)/$(name).tar
+pdk_docs_tarfile_zipped := $(pdk_docs_tarfile).gz
+
+.PHONY: pdk pdk_docs pdk_doxygen all_copied_pdk_headers all_copied_pdk_templates
+
+pdk_docs: $(pdk_docs_tarfile_zipped)
+       @echo "PDK: Docs tarred and zipped"
+
+# Put the pdk_docs zip files in the distribution directory
+$(call dist-for-goals,pdk_docs,$(pdk_docs_tarfile_zipped))
+
+# zip up tar files
+%.tar.gz: %.tar
+       @echo "PDK: zipped $<"
+       $(hide) gzip -cf $< > $@
+
+# tar up all the files to make the pdk docs.
+$(pdk_docs_tarfile): pdk_doxygen all_copied_pdk_templates
+       @echo "PDK: $@"
+       @mkdir -p $(dir $@)
+       @rm -f $@
+       $(hide) tar rf $@ -C $(pdk_docs_intermediates) docs 
+
+# Debugging reporting can go here, add it as a target to get output.
+pdk_debug:
+       @echo "You are here: $@"
+       @echo "pdk headers copied: $(all_copied_pdk_headers)"
+       @echo "pdk headers: $(pdk_headers)"
+       @echo "pdk docs dest: $(pdk_docs_dest_dir)"
+       @echo "config dest: $(pdk_doxygen_config_file)"
+       @echo "config src: $(pdk_config_dir)/pdk_config.conf"
+       @echo "pdk templates: $(pdk_templates_dir)"
index b382a10..ab923be 100644 (file)
@@ -1,4 +1,4 @@
-Building the pdk
+Building the pdk (platform development kit)
 
 1) get a cupcake source tree
 
@@ -54,9 +54,15 @@ Building the pdk
 (which contains: 
 
 DT=`date +%y%m%d-%H%M%S`
-#time make -j4 PRODUCT-generic-eng pdk dist DIST_DIR=dist 2>&1 | tee logs/$DT
-time make -j4 pdk dist DIST_DIR=dist 2>&1 | tee logs/$DT
+time make -j4 pdk pdk_all dist DIST_DIR=dist 2>&1 | tee logs/$DT
 
 so you can see the results of the build in the logs directory.)
 
 5) the pdk tar file is put in the dist directory.
+
+
+The build target 'pdk' brings in the pdk/ndk make files into the build system.
+ Then there are three targets:
+  pdk_docs - which builds the pdk documentation
+  ndk - which builds the native development kit (native compiler, linker, etc.)
+  pdk_all - which builds the above two targets
diff --git a/pdk/docs/_audio_hardware_interface_8h-source.html b/pdk/docs/_audio_hardware_interface_8h-source.html
deleted file mode 100755 (executable)
index 799b827..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-</div>
-<h1>AudioHardwareInterface.h</h1><a href="_audio_hardware_interface_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2007 The Android Open Source Project</span>
-<a name="l00003"></a>00003 <span class="comment"> *</span>
-<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
-<a name="l00005"></a>00005 <span class="comment"> * you may not use this file except in compliance with the License.</span>
-<a name="l00006"></a>00006 <span class="comment"> * You may obtain a copy of the License at</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> *      http://www.apache.org/licenses/LICENSE-2.0</span>
-<a name="l00009"></a>00009 <span class="comment"> *</span>
-<a name="l00010"></a>00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
-<a name="l00011"></a>00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
-<a name="l00012"></a>00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
-<a name="l00013"></a>00013 <span class="comment"> * See the License for the specific language governing permissions and</span>
-<a name="l00014"></a>00014 <span class="comment"> * limitations under the License.</span>
-<a name="l00015"></a>00015 <span class="comment"> */</span>
-<a name="l00016"></a>00016 
-<a name="l00017"></a>00017 <span class="preprocessor">#ifndef ANDROID_AUDIO_HARDWARE_INTERFACE_H</span>
-<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define ANDROID_AUDIO_HARDWARE_INTERFACE_H</span>
-<a name="l00019"></a>00019 <span class="preprocessor"></span>
-<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
-<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;sys/types.h&gt;</span>
-<a name="l00022"></a>00022 
-<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;utils/Errors.h&gt;</span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;utils/Vector.h&gt;</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;utils/String16.h&gt;</span>
-<a name="l00026"></a>00026 
-<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;media/IAudioFlinger.h&gt;</span>
-<a name="l00028"></a>00028 <span class="preprocessor">#include "media/AudioSystem.h"</span>
-<a name="l00029"></a>00029 
-<a name="l00030"></a>00030 
-<a name="l00031"></a><a class="code" href="namespaceandroid.html">00031</a> <span class="keyword">namespace </span>android {
-<a name="l00032"></a>00032 
-<a name="l00033"></a>00033 <span class="comment">// ----------------------------------------------------------------------------</span>
-<a name="l00034"></a>00034 <span class="comment"></span>
-<a name="l00035"></a>00035 <span class="comment">/**</span>
-<a name="l00036"></a>00036 <span class="comment"> * AudioStreamOut is the abstraction interface for the audio output hardware.</span>
-<a name="l00037"></a>00037 <span class="comment"> *</span>
-<a name="l00038"></a>00038 <span class="comment"> * It provides information about various properties of the audio output hardware driver.</span>
-<a name="l00039"></a>00039 <span class="comment"> */</span>
-<a name="l00040"></a><a class="code" href="classandroid_1_1_audio_stream_out.html">00040</a> <span class="keyword">class </span><a class="code" href="classandroid_1_1_audio_stream_out.html" title="AudioStreamOut is the abstraction interface for the audio output hardware.">AudioStreamOut</a> {
-<a name="l00041"></a>00041 <span class="keyword">public</span>:
-<a name="l00042"></a>00042     <span class="keyword">virtual</span>             <a class="code" href="classandroid_1_1_audio_stream_out.html#09074dbae95b82d4f83c513035a0034f">~AudioStreamOut</a>() = 0;
-<a name="l00043"></a>00043 <span class="comment"></span>
-<a name="l00044"></a>00044 <span class="comment">    /** return audio sampling rate in hz - eg. 44100 */</span>
-<a name="l00045"></a>00045     <span class="keyword">virtual</span> uint32_t    <a class="code" href="classandroid_1_1_audio_stream_out.html#6bb028e125d13289f26d3d74f851c921" title="return audio sampling rate in hz - eg.">sampleRate</a>() <span class="keyword">const</span> = 0;
-<a name="l00046"></a>00046 <span class="comment"></span>
-<a name="l00047"></a>00047 <span class="comment">    /** returns size of output buffer - eg. 4800 */</span>
-<a name="l00048"></a>00048     <span class="keyword">virtual</span> <span class="keywordtype">size_t</span>      <a class="code" href="classandroid_1_1_audio_stream_out.html#7b3c5f2ce79b9b6f167408f63d19af0a" title="returns size of output buffer - eg.">bufferSize</a>() <span class="keyword">const</span> = 0;
-<a name="l00049"></a>00049 <span class="comment"></span>
-<a name="l00050"></a>00050 <span class="comment">    /**</span>
-<a name="l00051"></a>00051 <span class="comment">     * return number of output audio channels.</span>
-<a name="l00052"></a>00052 <span class="comment">     * Acceptable values are 1 (mono) or 2 (stereo)</span>
-<a name="l00053"></a>00053 <span class="comment">     */</span>
-<a name="l00054"></a>00054     <span class="keyword">virtual</span> <span class="keywordtype">int</span>         <a class="code" href="classandroid_1_1_audio_stream_out.html#4e880a5379c168e8f68c26827e41275b" title="return number of output audio channels.">channelCount</a>() <span class="keyword">const</span> = 0;
-<a name="l00055"></a>00055 <span class="comment"></span>
-<a name="l00056"></a>00056 <span class="comment">    /**</span>
-<a name="l00057"></a>00057 <span class="comment">     * return audio format in 8bit or 16bit PCM format -</span>
-<a name="l00058"></a>00058 <span class="comment">     * eg. AudioSystem:PCM_16_BIT</span>
-<a name="l00059"></a>00059 <span class="comment">     */</span>
-<a name="l00060"></a>00060     <span class="keyword">virtual</span> <span class="keywordtype">int</span>         <a class="code" href="classandroid_1_1_audio_stream_out.html#eb2b430bbff4eebd8fb8590507b1dce1" title="return audio format in 8bit or 16bit PCM format - eg.">format</a>() <span class="keyword">const</span> = 0;
-<a name="l00061"></a>00061 <span class="comment"></span>
-<a name="l00062"></a>00062 <span class="comment">    /**</span>
-<a name="l00063"></a>00063 <span class="comment">     * return the frame size (number of bytes per sample).</span>
-<a name="l00064"></a>00064 <span class="comment">     */</span>
-<a name="l00065"></a><a class="code" href="classandroid_1_1_audio_stream_out.html#66b7c4bb510db4060adfd03a376897d8">00065</a>     uint32_t    <a class="code" href="classandroid_1_1_audio_stream_out.html#66b7c4bb510db4060adfd03a376897d8" title="return the frame size (number of bytes per sample).">frameSize</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classandroid_1_1_audio_stream_out.html#4e880a5379c168e8f68c26827e41275b" title="return number of output audio channels.">channelCount</a>()*((<a class="code" href="classandroid_1_1_audio_stream_out.html#eb2b430bbff4eebd8fb8590507b1dce1" title="return audio format in 8bit or 16bit PCM format - eg.">format</a>()==AudioSystem::PCM_16_BIT)?<span class="keyword">sizeof</span>(int16_t):<span class="keyword">sizeof</span>(int8_t)); }
-<a name="l00066"></a>00066 <span class="comment"></span>
-<a name="l00067"></a>00067 <span class="comment">    /**</span>
-<a name="l00068"></a>00068 <span class="comment">     * return the audio hardware driver latency in milli seconds.</span>
-<a name="l00069"></a>00069 <span class="comment">     */</span>
-<a name="l00070"></a>00070     <span class="keyword">virtual</span> uint32_t    <a class="code" href="classandroid_1_1_audio_stream_out.html#c698a3d95cf0829dcfe283cd5ea437cb" title="return the audio hardware driver latency in milli seconds.">latency</a>() <span class="keyword">const</span> = 0;
-<a name="l00071"></a>00071 <span class="comment"></span>
-<a name="l00072"></a>00072 <span class="comment">    /**</span>
-<a name="l00073"></a>00073 <span class="comment">     * Use this method in situations where audio mixing is done in the</span>
-<a name="l00074"></a>00074 <span class="comment">     * hardware. This method serves as a direct interface with hardware,</span>
-<a name="l00075"></a>00075 <span class="comment">     * allowing you to directly set the volume as apposed to via the framework.</span>
-<a name="l00076"></a>00076 <span class="comment">     * This method might produce multiple PCM outputs or hardware accelerated</span>
-<a name="l00077"></a>00077 <span class="comment">     * codecs, such as MP3 or AAC.</span>
-<a name="l00078"></a>00078 <span class="comment">     */</span>
-<a name="l00079"></a>00079     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_audio_stream_out.html#e6d301925d193c25561b42239c7f44b6" title="Use this method in situations where audio mixing is done in the hardware.">setVolume</a>(<span class="keywordtype">float</span> volume) = 0;
-<a name="l00080"></a>00080 <span class="comment"></span>
-<a name="l00081"></a>00081 <span class="comment">    /** write audio buffer to driver. Returns number of bytes written */</span>
-<a name="l00082"></a>00082     <span class="keyword">virtual</span> ssize_t     <a class="code" href="classandroid_1_1_audio_stream_out.html#cba177e4a4a35a87ab9f8aa2a9c0e78e" title="write audio buffer to driver.">write</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* buffer, <span class="keywordtype">size_t</span> bytes) = 0;
-<a name="l00083"></a>00083 <span class="comment"></span>
-<a name="l00084"></a>00084 <span class="comment">    /** dump the state of the audio output device */</span>
-<a name="l00085"></a>00085     <span class="keyword">virtual</span> status_t <a class="code" href="classandroid_1_1_audio_stream_out.html#97e3cc4610ba40d6c37b3d376a032b98" title="dump the state of the audio output device">dump</a>(<span class="keywordtype">int</span> fd, <span class="keyword">const</span> Vector&lt;String16&gt;&amp; args) = 0;
-<a name="l00086"></a>00086 };
-<a name="l00087"></a>00087 <span class="comment"></span>
-<a name="l00088"></a>00088 <span class="comment">/**</span>
-<a name="l00089"></a>00089 <span class="comment"> * AudioStreamIn is the abstraction interface for the audio input hardware.</span>
-<a name="l00090"></a>00090 <span class="comment"> *</span>
-<a name="l00091"></a>00091 <span class="comment"> * It defines the various properties of the audio hardware input driver.</span>
-<a name="l00092"></a>00092 <span class="comment"> */</span>
-<a name="l00093"></a><a class="code" href="classandroid_1_1_audio_stream_in.html">00093</a> <span class="keyword">class </span><a class="code" href="classandroid_1_1_audio_stream_in.html" title="AudioStreamIn is the abstraction interface for the audio input hardware.">AudioStreamIn</a> {
-<a name="l00094"></a>00094 <span class="keyword">public</span>:
-<a name="l00095"></a>00095     <span class="keyword">virtual</span>             <a class="code" href="classandroid_1_1_audio_stream_in.html#72067577568bbdd0163c1369fe80f101">~AudioStreamIn</a>() = 0;
-<a name="l00096"></a>00096 <span class="comment"></span>
-<a name="l00097"></a>00097 <span class="comment">    /** return the input buffer size allowed by audio driver */</span>
-<a name="l00098"></a>00098     <span class="keyword">virtual</span> <span class="keywordtype">size_t</span>      <a class="code" href="classandroid_1_1_audio_stream_in.html#a458f9cde3edde82f256af7eaa7b2ddf" title="return the input buffer size allowed by audio driver">bufferSize</a>() <span class="keyword">const</span> = 0;
-<a name="l00099"></a>00099 <span class="comment"></span>
-<a name="l00100"></a>00100 <span class="comment">    /** return the number of audio input channels */</span>
-<a name="l00101"></a>00101     <span class="keyword">virtual</span> <span class="keywordtype">int</span>         <a class="code" href="classandroid_1_1_audio_stream_in.html#04f84006dd5f2e0a5e512897a039f851" title="return the number of audio input channels">channelCount</a>() <span class="keyword">const</span> = 0;
-<a name="l00102"></a>00102 <span class="comment"></span>
-<a name="l00103"></a>00103 <span class="comment">    /**</span>
-<a name="l00104"></a>00104 <span class="comment">     * return audio format in 8bit or 16bit PCM format -</span>
-<a name="l00105"></a>00105 <span class="comment">     * eg. AudioSystem:PCM_16_BIT</span>
-<a name="l00106"></a>00106 <span class="comment">     */</span>
-<a name="l00107"></a>00107     <span class="keyword">virtual</span> <span class="keywordtype">int</span>         <a class="code" href="classandroid_1_1_audio_stream_in.html#4ade98c5243b9ed5f3a71a8f36e74b36" title="return audio format in 8bit or 16bit PCM format - eg.">format</a>() <span class="keyword">const</span> = 0;
-<a name="l00108"></a>00108 <span class="comment"></span>
-<a name="l00109"></a>00109 <span class="comment">    /**</span>
-<a name="l00110"></a>00110 <span class="comment">     * return the frame size (number of bytes per sample).</span>
-<a name="l00111"></a>00111 <span class="comment">     */</span>
-<a name="l00112"></a><a class="code" href="classandroid_1_1_audio_stream_in.html#43d2c6b97806c005f0717a7bb6f7595c">00112</a>     uint32_t    <a class="code" href="classandroid_1_1_audio_stream_in.html#43d2c6b97806c005f0717a7bb6f7595c" title="return the frame size (number of bytes per sample).">frameSize</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classandroid_1_1_audio_stream_in.html#04f84006dd5f2e0a5e512897a039f851" title="return the number of audio input channels">channelCount</a>()*((<a class="code" href="classandroid_1_1_audio_stream_in.html#4ade98c5243b9ed5f3a71a8f36e74b36" title="return audio format in 8bit or 16bit PCM format - eg.">format</a>()==AudioSystem::PCM_16_BIT)?<span class="keyword">sizeof</span>(int16_t):<span class="keyword">sizeof</span>(int8_t)); }
-<a name="l00113"></a>00113 <span class="comment"></span>
-<a name="l00114"></a>00114 <span class="comment">    /** set the input gain for the audio driver. This method is for</span>
-<a name="l00115"></a>00115 <span class="comment">     *  for future use */</span>
-<a name="l00116"></a>00116     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_audio_stream_in.html#339822afb3f2f2ac1b4c775d31d12440" title="set the input gain for the audio driver.">setGain</a>(<span class="keywordtype">float</span> gain) = 0;
-<a name="l00117"></a>00117 <span class="comment"></span>
-<a name="l00118"></a>00118 <span class="comment">    /** read audio buffer in from audio driver */</span>
-<a name="l00119"></a>00119     <span class="keyword">virtual</span> ssize_t     <a class="code" href="classandroid_1_1_audio_stream_in.html#7c313cbfbb47dafd90f3225bcd26e592" title="read audio buffer in from audio driver">read</a>(<span class="keywordtype">void</span>* buffer, ssize_t bytes) = 0;
-<a name="l00120"></a>00120 <span class="comment"></span>
-<a name="l00121"></a>00121 <span class="comment">    /** dump the state of the audio input device */</span>
-<a name="l00122"></a>00122     <span class="keyword">virtual</span> status_t <a class="code" href="classandroid_1_1_audio_stream_in.html#18c3760208bfb99498715a0d4977f675" title="dump the state of the audio input device">dump</a>(<span class="keywordtype">int</span> fd, <span class="keyword">const</span> Vector&lt;String16&gt;&amp; args) = 0;
-<a name="l00123"></a>00123 <span class="comment"></span>
-<a name="l00124"></a>00124 <span class="comment">    /**</span>
-<a name="l00125"></a>00125 <span class="comment">     * Put the audio hardware input into standby mode. Returns</span>
-<a name="l00126"></a>00126 <span class="comment">     * status based on include/utils/Errors.h</span>
-<a name="l00127"></a>00127 <span class="comment">     */</span>
-<a name="l00128"></a>00128     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_audio_stream_in.html#93fab46e8afdbaedd4d20cc6ee2b7c41" title="Put the audio hardware input into standby mode.">standby</a>() = 0;
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130 };
-<a name="l00131"></a>00131 <span class="comment"></span>
-<a name="l00132"></a>00132 <span class="comment">/**</span>
-<a name="l00133"></a>00133 <span class="comment"> * AudioHardwareInterface.h defines the interface to the audio hardware abstraction layer.</span>
-<a name="l00134"></a>00134 <span class="comment"> *</span>
-<a name="l00135"></a>00135 <span class="comment"> * The interface supports setting and getting parameters, selecting audio routing</span>
-<a name="l00136"></a>00136 <span class="comment"> * paths, and defining input and output streams.</span>
-<a name="l00137"></a>00137 <span class="comment"> *</span>
-<a name="l00138"></a>00138 <span class="comment"> * AudioFlinger initializes the audio hardware and immediately opens an output stream.</span>
-<a name="l00139"></a>00139 <span class="comment"> * You can set Audio routing to output to handset, speaker, Bluetooth, or a headset.</span>
-<a name="l00140"></a>00140 <span class="comment"> *</span>
-<a name="l00141"></a>00141 <span class="comment"> * The audio input stream is initialized when AudioFlinger is called to carry out</span>
-<a name="l00142"></a>00142 <span class="comment"> * a record operation.</span>
-<a name="l00143"></a>00143 <span class="comment"> */</span>
-<a name="l00144"></a><a class="code" href="classandroid_1_1_audio_hardware_interface.html">00144</a> <span class="keyword">class </span><a class="code" href="classandroid_1_1_audio_hardware_interface.html" title="AudioHardwareInterface.h defines the interface to the audio hardware abstraction...">AudioHardwareInterface</a>
-<a name="l00145"></a>00145 {
-<a name="l00146"></a>00146 <span class="keyword">public</span>:<span class="comment"></span>
-<a name="l00147"></a>00147 <span class="comment">    /**</span>
-<a name="l00148"></a>00148 <span class="comment">     * check to see if the audio hardware interface has been initialized.</span>
-<a name="l00149"></a>00149 <span class="comment">     * return status based on values defined in include/utils/Errors.h</span>
-<a name="l00150"></a>00150 <span class="comment">     */</span>
-<a name="l00151"></a>00151     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_audio_hardware_interface.html#b7e19e09fa6cbc07c127122fa9866c50" title="check to see if the audio hardware interface has been initialized.">initCheck</a>() = 0;
-<a name="l00152"></a>00152 <span class="comment"></span>
-<a name="l00153"></a>00153 <span class="comment">    /**</span>
-<a name="l00154"></a>00154 <span class="comment">     * put the audio hardware into standby mode to conserve power. Returns</span>
-<a name="l00155"></a>00155 <span class="comment">     * status based on include/utils/Errors.h</span>
-<a name="l00156"></a>00156 <span class="comment">     */</span>
-<a name="l00157"></a>00157     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_audio_hardware_interface.html#61121d365bb4d182bdec2c1b12fb1178" title="put the audio hardware into standby mode to conserve power.">standby</a>() = 0;
-<a name="l00158"></a>00158 <span class="comment"></span>
-<a name="l00159"></a>00159 <span class="comment">    /** set the audio volume of a voice call. Range is between 0.0 and 1.0 */</span>
-<a name="l00160"></a>00160     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_audio_hardware_interface.html#7b7418072df1eeaacc89cd0c725755f6" title="set the audio volume of a voice call.">setVoiceVolume</a>(<span class="keywordtype">float</span> volume) = 0;
-<a name="l00161"></a>00161 <span class="comment"></span>
-<a name="l00162"></a>00162 <span class="comment">    /**</span>
-<a name="l00163"></a>00163 <span class="comment">     * set the audio volume for all audio activities other than voice call.</span>
-<a name="l00164"></a>00164 <span class="comment">     * Range between 0.0 and 1.0. If any value other than NO_ERROR is returned,</span>
-<a name="l00165"></a>00165 <span class="comment">     * the software mixer will emulate this capability.</span>
-<a name="l00166"></a>00166 <span class="comment">     */</span>
-<a name="l00167"></a>00167     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_audio_hardware_interface.html#925092e556eb89f304bcebb09f90c9a3" title="set the audio volume for all audio activities other than voice call.">setMasterVolume</a>(<span class="keywordtype">float</span> volume) = 0;
-<a name="l00168"></a>00168 <span class="comment"></span>
-<a name="l00169"></a>00169 <span class="comment">    /**</span>
-<a name="l00170"></a>00170 <span class="comment">     * Audio routing methods. Routes defined in include/hardware/AudioSystem.h.</span>
-<a name="l00171"></a>00171 <span class="comment">     * Audio routes can be (ROUTE_EARPIECE | ROUTE_SPEAKER | ROUTE_BLUETOOTH</span>
-<a name="l00172"></a>00172 <span class="comment">     *                    | ROUTE_HEADSET)</span>
-<a name="l00173"></a>00173 <span class="comment">     *</span>
-<a name="l00174"></a>00174 <span class="comment">     * setRouting sets the routes for a mode. This is called at startup. It is</span>
-<a name="l00175"></a>00175 <span class="comment">     * also called when a new device is connected, such as a wired headset is</span>
-<a name="l00176"></a>00176 <span class="comment">     * plugged in or a Bluetooth headset is paired.</span>
-<a name="l00177"></a>00177 <span class="comment">     */</span>
-<a name="l00178"></a>00178     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_audio_hardware_interface.html#39b2690e19219425b8cff093ef83bfb1" title="Audio routing methods.">setRouting</a>(<span class="keywordtype">int</span> mode, uint32_t routes) = 0;
-<a name="l00179"></a>00179 
-<a name="l00180"></a>00180     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_audio_hardware_interface.html#1886de8fff2342ae628dbbbc0c45ba83">getRouting</a>(<span class="keywordtype">int</span> mode, uint32_t* routes) = 0;
-<a name="l00181"></a>00181 <span class="comment"></span>
-<a name="l00182"></a>00182 <span class="comment">    /**</span>
-<a name="l00183"></a>00183 <span class="comment">     * setMode is called when the audio mode changes. NORMAL mode is for</span>
-<a name="l00184"></a>00184 <span class="comment">     * standard audio playback, RINGTONE when a ringtone is playing, and IN_CALL</span>
-<a name="l00185"></a>00185 <span class="comment">     * when a call is in progress.</span>
-<a name="l00186"></a>00186 <span class="comment">     */</span>
-<a name="l00187"></a>00187     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_audio_hardware_interface.html#aaf2a429c240f00b21836794849b430f" title="setMode is called when the audio mode changes.">setMode</a>(<span class="keywordtype">int</span> mode) = 0;
-<a name="l00188"></a>00188     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_audio_hardware_interface.html#8466c76328a51b8a83da103032abba55">getMode</a>(<span class="keywordtype">int</span>* mode) = 0;
-<a name="l00189"></a>00189 
-<a name="l00190"></a>00190     <span class="comment">// mic mute</span>
-<a name="l00191"></a>00191     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_audio_hardware_interface.html#be35b7cb738531939a3ac9abc5514621">setMicMute</a>(<span class="keywordtype">bool</span> state) = 0;
-<a name="l00192"></a>00192     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_audio_hardware_interface.html#15d3c33d7e3f965dc2588c537f05a133">getMicMute</a>(<span class="keywordtype">bool</span>* state) = 0;
-<a name="l00193"></a>00193 
-<a name="l00194"></a>00194     <span class="comment">// Temporary interface, do not use</span>
-<a name="l00195"></a>00195     <span class="comment">// TODO: Replace with a more generic key:value get/set mechanism</span>
-<a name="l00196"></a>00196     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_audio_hardware_interface.html#a1b477901df48b3a27103a77e6bb39c8">setParameter</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* key, <span class="keyword">const</span> <span class="keywordtype">char</span>* value) = 0;
-<a name="l00197"></a>00197 
-<a name="l00198"></a>00198     <span class="comment">// Returns audio input buffer size according to parameters passed or 0 if one of the</span>
-<a name="l00199"></a>00199     <span class="comment">// parameters is not supported</span>
-<a name="l00200"></a>00200     <span class="keyword">virtual</span> <span class="keywordtype">size_t</span>    <a class="code" href="classandroid_1_1_audio_hardware_interface.html#19f68d873b2a6e4c00c017c580170395">getInputBufferSize</a>(uint32_t sampleRate, <span class="keywordtype">int</span> format, <span class="keywordtype">int</span> channelCount) = 0;
-<a name="l00201"></a>00201     <span class="comment"></span>
-<a name="l00202"></a>00202 <span class="comment">    /** This method creates and opens the audio hardware output stream */</span>
-<a name="l00203"></a>00203     <span class="keyword">virtual</span> <a class="code" href="classandroid_1_1_audio_stream_out.html" title="AudioStreamOut is the abstraction interface for the audio output hardware.">AudioStreamOut</a>* <a class="code" href="classandroid_1_1_audio_hardware_interface.html#eda0986e145c8dd68d21cb79051f94f9" title="This method creates and opens the audio hardware output stream.">openOutputStream</a>(
-<a name="l00204"></a>00204                                 <span class="keywordtype">int</span> format=0,
-<a name="l00205"></a>00205                                 <span class="keywordtype">int</span> channelCount=0,
-<a name="l00206"></a>00206                                 uint32_t sampleRate=0,
-<a name="l00207"></a>00207                                 status_t *status=0) = 0;
-<a name="l00208"></a>00208 <span class="comment"></span>
-<a name="l00209"></a>00209 <span class="comment">    /** This method creates and opens the audio hardware input stream */</span>
-<a name="l00210"></a>00210     <span class="keyword">virtual</span> <a class="code" href="classandroid_1_1_audio_stream_in.html" title="AudioStreamIn is the abstraction interface for the audio input hardware.">AudioStreamIn</a>* <a class="code" href="classandroid_1_1_audio_hardware_interface.html#efb777d192fcbcd65458fa4f2d976476" title="This method creates and opens the audio hardware input stream.">openInputStream</a>(
-<a name="l00211"></a>00211                                 <span class="keywordtype">int</span> format,
-<a name="l00212"></a>00212                                 <span class="keywordtype">int</span> channelCount,
-<a name="l00213"></a>00213                                 uint32_t sampleRate,
-<a name="l00214"></a>00214                                 status_t *status) = 0;
-<a name="l00215"></a>00215 <span class="comment"></span>
-<a name="l00216"></a>00216 <span class="comment">    /**This method dumps the state of the audio hardware */</span>
-<a name="l00217"></a>00217     <span class="keyword">virtual</span> status_t <a class="code" href="classandroid_1_1_audio_hardware_interface.html#05f035af60e67a22251175b44a089f69" title="This method dumps the state of the audio hardware.">dumpState</a>(<span class="keywordtype">int</span> fd, <span class="keyword">const</span> Vector&lt;String16&gt;&amp; args) = 0;
-<a name="l00218"></a>00218 
-<a name="l00219"></a>00219     <span class="keyword">static</span> <a class="code" href="classandroid_1_1_audio_hardware_interface.html" title="AudioHardwareInterface.h defines the interface to the audio hardware abstraction...">AudioHardwareInterface</a>* <a class="code" href="classandroid_1_1_audio_hardware_interface.html#aa5ae45e9ad969fefc494e103cf5068d">create</a>();
-<a name="l00220"></a>00220 
-<a name="l00221"></a>00221 <span class="keyword">protected</span>:<span class="comment"></span>
-<a name="l00222"></a>00222 <span class="comment">    /**</span>
-<a name="l00223"></a>00223 <span class="comment">     * doRouting actually initiates the routing. A call to setRouting</span>
-<a name="l00224"></a>00224 <span class="comment">     * or setMode may result in a routing change. The generic logic calls</span>
-<a name="l00225"></a>00225 <span class="comment">     * doRouting when required. If the device has any special requirements these</span>
-<a name="l00226"></a>00226 <span class="comment">     * methods can be overriden.</span>
-<a name="l00227"></a>00227 <span class="comment">     */</span>
-<a name="l00228"></a>00228     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_audio_hardware_interface.html#d82c3e4827f275abf28eb872e8751e1f" title="doRouting actually initiates the routing.">doRouting</a>() = 0;
-<a name="l00229"></a>00229 
-<a name="l00230"></a>00230     <span class="keyword">virtual</span> status_t <a class="code" href="classandroid_1_1_audio_hardware_interface.html#371f198a416cb726804e0f47e8763217">dump</a>(<span class="keywordtype">int</span> fd, <span class="keyword">const</span> Vector&lt;String16&gt;&amp; args) = 0;
-<a name="l00231"></a>00231 };
-<a name="l00232"></a>00232 
-<a name="l00233"></a>00233 <span class="comment">// ----------------------------------------------------------------------------</span>
-<a name="l00234"></a>00234 
-<a name="l00235"></a>00235 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> <a class="code" href="classandroid_1_1_audio_hardware_interface.html" title="AudioHardwareInterface.h defines the interface to the audio hardware abstraction...">AudioHardwareInterface</a>* <a class="code" href="namespaceandroid.html#dcc80314ddffcb0981a9e9c5468662f8">createAudioHardware</a>(<span class="keywordtype">void</span>);
-<a name="l00236"></a>00236 
-<a name="l00237"></a>00237 }; <span class="comment">// namespace android</span>
-<a name="l00238"></a>00238 
-<a name="l00239"></a>00239 <span class="preprocessor">#endif // ANDROID_AUDIO_HARDWARE_INTERFACE_H</span>
-</pre></div></div>
-</body>
-</html>
diff --git a/pdk/docs/_audio_hardware_interface_8h.html b/pdk/docs/_audio_hardware_interface_8h.html
deleted file mode 100755 (executable)
index f45379f..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>AudioHardwareInterface.h File Reference</h1>
-<p>
-<a href="_audio_hardware_interface_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceandroid.html">android</a></td></tr>
-
-<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_out.html">android::AudioStreamOut</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classandroid_1_1_audio_stream_out.html" title="AudioStreamOut is the abstraction interface for the audio output hardware.">AudioStreamOut</a> is the abstraction interface for the audio output hardware.  <a href="classandroid_1_1_audio_stream_out.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_in.html">android::AudioStreamIn</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classandroid_1_1_audio_stream_in.html" title="AudioStreamIn is the abstraction interface for the audio input hardware.">AudioStreamIn</a> is the abstraction interface for the audio input hardware.  <a href="classandroid_1_1_audio_stream_in.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html">android::AudioHardwareInterface</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="_audio_hardware_interface_8h.html">AudioHardwareInterface.h</a> defines the interface to the audio hardware abstraction layer.  <a href="classandroid_1_1_audio_hardware_interface.html#_details">More...</a><br></td></tr>
-<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">AudioHardwareInterface *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceandroid.html#dcc80314ddffcb0981a9e9c5468662f8">android::createAudioHardware</a> (void)</td></tr>
-
-</table>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/_camera_hardware_interface_8h-source.html b/pdk/docs/_camera_hardware_interface_8h-source.html
deleted file mode 100755 (executable)
index 41f0a1d..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-</div>
-<h1>CameraHardwareInterface.h</h1><a href="_camera_hardware_interface_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2008 The Android Open Source Project</span>
-<a name="l00003"></a>00003 <span class="comment"> *</span>
-<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
-<a name="l00005"></a>00005 <span class="comment"> * you may not use this file except in compliance with the License.</span>
-<a name="l00006"></a>00006 <span class="comment"> * You may obtain a copy of the License at</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> *      http://www.apache.org/licenses/LICENSE-2.0</span>
-<a name="l00009"></a>00009 <span class="comment"> *</span>
-<a name="l00010"></a>00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
-<a name="l00011"></a>00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
-<a name="l00012"></a>00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
-<a name="l00013"></a>00013 <span class="comment"> * See the License for the specific language governing permissions and</span>
-<a name="l00014"></a>00014 <span class="comment"> * limitations under the License.</span>
-<a name="l00015"></a>00015 <span class="comment"> */</span>
-<a name="l00016"></a>00016 
-<a name="l00017"></a>00017 <span class="preprocessor">#ifndef ANDROID_HARDWARE_CAMERA_HARDWARE_INTERFACE_H</span>
-<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define ANDROID_HARDWARE_CAMERA_HARDWARE_INTERFACE_H</span>
-<a name="l00019"></a>00019 <span class="preprocessor"></span>
-<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;utils/IMemory.h&gt;</span>
-<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;utils/RefBase.h&gt;</span>
-<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;ui/CameraParameters.h&gt;</span>
-<a name="l00023"></a>00023 
-<a name="l00024"></a>00024 <span class="keyword">namespace </span>android {
-<a name="l00025"></a>00025 <span class="comment"></span>
-<a name="l00026"></a>00026 <span class="comment">/** Callback for startPreview() */</span>
-<a name="l00027"></a><a class="code" href="namespaceandroid.html#d32b08663d42356404e2eb971e271636">00027</a> <span class="keyword">typedef</span> void (*<a class="code" href="namespaceandroid.html#d32b08663d42356404e2eb971e271636" title="Callback for startPreview().">preview_callback</a>)(<span class="keyword">const</span> sp&lt;IMemory&gt;&amp; mem, <span class="keywordtype">void</span>* user);
-<a name="l00028"></a>00028 <span class="comment"></span>
-<a name="l00029"></a>00029 <span class="comment">/** Callback for takePicture() */</span>
-<a name="l00030"></a><a class="code" href="namespaceandroid.html#04c83209c2627e2d303320712ca9ee65">00030</a> <span class="keyword">typedef</span> void (*<a class="code" href="namespaceandroid.html#04c83209c2627e2d303320712ca9ee65" title="Callback for takePicture().">shutter_callback</a>)(<span class="keywordtype">void</span>* user);
-<a name="l00031"></a>00031 <span class="comment"></span>
-<a name="l00032"></a>00032 <span class="comment">/** Callback for takePicture() */</span>
-<a name="l00033"></a><a class="code" href="namespaceandroid.html#a97926709e452d66360cb9b24736969e">00033</a> <span class="keyword">typedef</span> void (*<a class="code" href="namespaceandroid.html#a97926709e452d66360cb9b24736969e" title="Callback for takePicture().">raw_callback</a>)(<span class="keyword">const</span> sp&lt;IMemory&gt;&amp; mem, <span class="keywordtype">void</span>* user);
-<a name="l00034"></a>00034 <span class="comment"></span>
-<a name="l00035"></a>00035 <span class="comment">/** Callback for takePicture() */</span>
-<a name="l00036"></a><a class="code" href="namespaceandroid.html#c21980d4be1e0cc458399ecf5374d473">00036</a> <span class="keyword">typedef</span> void (*<a class="code" href="namespaceandroid.html#c21980d4be1e0cc458399ecf5374d473" title="Callback for takePicture().">jpeg_callback</a>)(<span class="keyword">const</span> sp&lt;IMemory&gt;&amp; mem, <span class="keywordtype">void</span>* user);
-<a name="l00037"></a>00037 <span class="comment"></span>
-<a name="l00038"></a>00038 <span class="comment">/** Callback for autoFocus() */</span>
-<a name="l00039"></a><a class="code" href="namespaceandroid.html#4dca8d8b824ca9a684358133da0ec8f2">00039</a> <span class="keyword">typedef</span> void (*<a class="code" href="namespaceandroid.html#4dca8d8b824ca9a684358133da0ec8f2" title="Callback for autoFocus().">autofocus_callback</a>)(<span class="keywordtype">bool</span> focused, <span class="keywordtype">void</span>* user);
-<a name="l00040"></a>00040 <span class="comment"></span>
-<a name="l00041"></a>00041 <span class="comment">/**</span>
-<a name="l00042"></a>00042 <span class="comment"> * CameraHardwareInterface.h defines the interface to the</span>
-<a name="l00043"></a>00043 <span class="comment"> * camera hardware abstraction layer, used for setting and getting</span>
-<a name="l00044"></a>00044 <span class="comment"> * parameters, live previewing, and taking pictures.</span>
-<a name="l00045"></a>00045 <span class="comment"> *</span>
-<a name="l00046"></a>00046 <span class="comment"> * It is a referenced counted interface with RefBase as its base class.</span>
-<a name="l00047"></a>00047 <span class="comment"> * CameraService calls openCameraHardware() to retrieve a strong pointer to the</span>
-<a name="l00048"></a>00048 <span class="comment"> * instance of this interface and may be called multiple times. The</span>
-<a name="l00049"></a>00049 <span class="comment"> * following steps describe a typical sequence:</span>
-<a name="l00050"></a>00050 <span class="comment"> *</span>
-<a name="l00051"></a>00051 <span class="comment"> *   -# After CameraService calls openCameraHardware(), getParameters() and</span>
-<a name="l00052"></a>00052 <span class="comment"> *      setParameters() are used to initialize the camera instance.</span>
-<a name="l00053"></a>00053 <span class="comment"> *      CameraService calls getPreviewHeap() to establish access to the</span>
-<a name="l00054"></a>00054 <span class="comment"> *      preview heap so it can be registered with SurfaceFlinger for</span>
-<a name="l00055"></a>00055 <span class="comment"> *      efficient display updating while in preview mode.</span>
-<a name="l00056"></a>00056 <span class="comment"> *   -# startPreview() is called, which is passed a preview_callback()</span>
-<a name="l00057"></a>00057 <span class="comment"> *      function and a user parameter. The camera instance then periodically</span>
-<a name="l00058"></a>00058 <span class="comment"> *      calls preview_callback() each time a new preview frame is available.</span>
-<a name="l00059"></a>00059 <span class="comment"> *      The callback routine has two parameters: the first is a pointer to</span>
-<a name="l00060"></a>00060 <span class="comment"> *      the IMemory containing the frame and the second a user parameter. If</span>
-<a name="l00061"></a>00061 <span class="comment"> *      the preview_callback code needs to use this memory after returning,</span>
-<a name="l00062"></a>00062 <span class="comment"> *      it must copy the data.</span>
-<a name="l00063"></a>00063 <span class="comment"> *</span>
-<a name="l00064"></a>00064 <span class="comment"> * Prior to taking a picture, CameraService calls autofocus() with</span>
-<a name="l00065"></a>00065 <span class="comment"> * autofocus_callback() and a user parameter. When auto focusing has</span>
-<a name="l00066"></a>00066 <span class="comment"> * completed, the camera instance calls autofocus_callback(), which informs</span>
-<a name="l00067"></a>00067 <span class="comment"> * the application whether focusing was successful. The camera instance</span>
-<a name="l00068"></a>00068 <span class="comment"> * only calls autofocus_callback() once and it is up to the application to</span>
-<a name="l00069"></a>00069 <span class="comment"> * call autoFocus() again if refocusing is desired.</span>
-<a name="l00070"></a>00070 <span class="comment"> *</span>
-<a name="l00071"></a>00071 <span class="comment"> * CameraService calls takePicture() to request the camera instance take a</span>
-<a name="l00072"></a>00072 <span class="comment"> * picture. This method has two callbacks: raw_callback() and jpeg_callback().</span>
-<a name="l00073"></a>00073 <span class="comment"> * When the raw image is available, raw_callback() is called with a pointer</span>
-<a name="l00074"></a>00074 <span class="comment"> * to the IMemory containing the raw image. When the jpeg image is available,</span>
-<a name="l00075"></a>00075 <span class="comment"> * jpeg_callback() is called with a pointer to the IMemory containing the</span>
-<a name="l00076"></a>00076 <span class="comment"> * jpeg image. As with preview_callback(), the memory must be copied if it's</span>
-<a name="l00077"></a>00077 <span class="comment"> * needed after returning.</span>
-<a name="l00078"></a>00078 <span class="comment"> */</span>
-<a name="l00079"></a><a class="code" href="classandroid_1_1_camera_hardware_interface.html">00079</a> <span class="keyword">class </span><a class="code" href="classandroid_1_1_camera_hardware_interface.html" title="CameraHardwareInterface.h defines the interface to the camera hardware abstraction...">CameraHardwareInterface</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> RefBase {
-<a name="l00080"></a>00080 <span class="keyword">public</span>:
-<a name="l00081"></a><a class="code" href="classandroid_1_1_camera_hardware_interface.html#99f4ab74b58cd4b23e0fb00a46a60cb1">00081</a>     <span class="keyword">virtual</span> <a class="code" href="classandroid_1_1_camera_hardware_interface.html#99f4ab74b58cd4b23e0fb00a46a60cb1">~CameraHardwareInterface</a>() { }
-<a name="l00082"></a>00082 <span class="comment"></span>
-<a name="l00083"></a>00083 <span class="comment">    /** Return the IMemoryHeap for the preview image heap */</span>
-<a name="l00084"></a>00084     <span class="keyword">virtual</span> sp&lt;IMemoryHeap&gt;         <a class="code" href="classandroid_1_1_camera_hardware_interface.html#9d4071fb234a0c2e7bf6ea78e723f2f4" title="Return the IMemoryHeap for the preview image heap.">getPreviewHeap</a>() <span class="keyword">const</span> = 0;
-<a name="l00085"></a>00085 <span class="comment"></span>
-<a name="l00086"></a>00086 <span class="comment">    /**</span>
-<a name="l00087"></a>00087 <span class="comment">     * Start preview mode. When a preview image is available</span>
-<a name="l00088"></a>00088 <span class="comment">     * preview_callback is called with the user parameter. The</span>
-<a name="l00089"></a>00089 <span class="comment">     * call back parameter may be null.</span>
-<a name="l00090"></a>00090 <span class="comment">     */</span>
-<a name="l00091"></a>00091     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_camera_hardware_interface.html#62def8031dee8bdab7933770708a6312" title="Start preview mode.">startPreview</a>(<a class="code" href="namespaceandroid.html#d32b08663d42356404e2eb971e271636" title="Callback for startPreview().">preview_callback</a> cb, <span class="keywordtype">void</span>* user) = 0;
-<a name="l00092"></a>00092 <span class="comment"></span>
-<a name="l00093"></a>00093 <span class="comment">    /**</span>
-<a name="l00094"></a>00094 <span class="comment">     * Stop a previously started preview.</span>
-<a name="l00095"></a>00095 <span class="comment">     */</span>
-<a name="l00096"></a>00096     <span class="keyword">virtual</span> <span class="keywordtype">void</span>        <a class="code" href="classandroid_1_1_camera_hardware_interface.html#34faa77065f415b93cb1acf84fc788bf" title="Stop a previously started preview.">stopPreview</a>() = 0;
-<a name="l00097"></a>00097 <span class="comment"></span>
-<a name="l00098"></a>00098 <span class="comment">    /**</span>
-<a name="l00099"></a>00099 <span class="comment">     * Start auto focus, the callback routine is called</span>
-<a name="l00100"></a>00100 <span class="comment">     * once when focusing is complete. autoFocus() will</span>
-<a name="l00101"></a>00101 <span class="comment">     * be called again if another auto focus is needed.</span>
-<a name="l00102"></a>00102 <span class="comment">     */</span>
-<a name="l00103"></a>00103     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_camera_hardware_interface.html#0dda73938e9b18326dd48bd721dbd515" title="Start auto focus, the callback routine is called once when focusing is complete.">autoFocus</a>(<a class="code" href="namespaceandroid.html#4dca8d8b824ca9a684358133da0ec8f2" title="Callback for autoFocus().">autofocus_callback</a>,
-<a name="l00104"></a>00104                                   <span class="keywordtype">void</span>* user) = 0;
-<a name="l00105"></a>00105 <span class="comment"></span>
-<a name="l00106"></a>00106 <span class="comment">    /**</span>
-<a name="l00107"></a>00107 <span class="comment">     * Take a picture. The raw_callback is called when</span>
-<a name="l00108"></a>00108 <span class="comment">     * the uncompressed image is available. The jpeg_callback</span>
-<a name="l00109"></a>00109 <span class="comment">     * is called when the compressed image is available. These</span>
-<a name="l00110"></a>00110 <span class="comment">     * call backs may be null. The user parameter is passed</span>
-<a name="l00111"></a>00111 <span class="comment">     * to each of the call back routines.</span>
-<a name="l00112"></a>00112 <span class="comment">     */</span>
-<a name="l00113"></a>00113     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_camera_hardware_interface.html#2aedf65cad695ce439029f37a7cb66c4" title="Take a picture.">takePicture</a>(<a class="code" href="namespaceandroid.html#04c83209c2627e2d303320712ca9ee65" title="Callback for takePicture().">shutter_callback</a>,
-<a name="l00114"></a>00114                                     <a class="code" href="namespaceandroid.html#a97926709e452d66360cb9b24736969e" title="Callback for takePicture().">raw_callback</a>,
-<a name="l00115"></a>00115                                     <a class="code" href="namespaceandroid.html#c21980d4be1e0cc458399ecf5374d473" title="Callback for takePicture().">jpeg_callback</a>,
-<a name="l00116"></a>00116                                     <span class="keywordtype">void</span>* user) = 0;
-<a name="l00117"></a>00117 <span class="comment"></span>
-<a name="l00118"></a>00118 <span class="comment">    /**</span>
-<a name="l00119"></a>00119 <span class="comment">     * Cancel a picture that was started with takePicture.  You may cancel any</span>
-<a name="l00120"></a>00120 <span class="comment">     * of the shutter, raw, or jpeg callbacks.  Calling this method when no</span>
-<a name="l00121"></a>00121 <span class="comment">     * picture is being taken is a no-op.</span>
-<a name="l00122"></a>00122 <span class="comment">     */</span>
-<a name="l00123"></a>00123     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_camera_hardware_interface.html#da8faf376215a605357d26afa1b79386" title="Cancel a picture that was started with takePicture.">cancelPicture</a>(<span class="keywordtype">bool</span> cancel_shutter,
-<a name="l00124"></a>00124                                       <span class="keywordtype">bool</span> cancel_raw,
-<a name="l00125"></a>00125                                       <span class="keywordtype">bool</span> cancel_jpeg) = 0;
-<a name="l00126"></a>00126 <span class="comment"></span>
-<a name="l00127"></a>00127 <span class="comment">    /** Set the camera parameters. */</span>
-<a name="l00128"></a>00128     <span class="keyword">virtual</span> status_t    <a class="code" href="classandroid_1_1_camera_hardware_interface.html#82e54ede14bd263274bbc8777bafc384" title="Set the camera parameters.">setParameters</a>(<span class="keyword">const</span> CameraParameters&amp; params) = 0;
-<a name="l00129"></a>00129 <span class="comment"></span>
-<a name="l00130"></a>00130 <span class="comment">    /** Return the camera parameters. */</span>
-<a name="l00131"></a>00131     <span class="keyword">virtual</span> CameraParameters  <a class="code" href="classandroid_1_1_camera_hardware_interface.html#4c748a3c0aa3c5f2333e0abcdbeb15cb" title="Return the camera parameters.">getParameters</a>() <span class="keyword">const</span> = 0;
-<a name="l00132"></a>00132 <span class="comment"></span>
-<a name="l00133"></a>00133 <span class="comment">    /**</span>
-<a name="l00134"></a>00134 <span class="comment">     * Release the hardware resources owned by this object.  Note that this is</span>
-<a name="l00135"></a>00135 <span class="comment">     * *not* done in the destructor.</span>
-<a name="l00136"></a>00136 <span class="comment">     */</span>
-<a name="l00137"></a>00137     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classandroid_1_1_camera_hardware_interface.html#df65310b8aa176e0ce5f08b87d6b7eb8" title="Release the hardware resources owned by this object.">release</a>() = 0;
-<a name="l00138"></a>00138     <span class="comment"></span>
-<a name="l00139"></a>00139 <span class="comment">    /**</span>
-<a name="l00140"></a>00140 <span class="comment">     * Dump state of the camera hardware</span>
-<a name="l00141"></a>00141 <span class="comment">     */</span>
-<a name="l00142"></a>00142     <span class="keyword">virtual</span> status_t <a class="code" href="classandroid_1_1_camera_hardware_interface.html#06df1bf91b8af07964dca314a6031b32" title="Dump state of the camera hardware.">dump</a>(<span class="keywordtype">int</span> fd, <span class="keyword">const</span> Vector&lt;String16&gt;&amp; args) <span class="keyword">const</span> = 0;
-<a name="l00143"></a>00143 };
-<a name="l00144"></a>00144 <span class="comment"></span>
-<a name="l00145"></a>00145 <span class="comment">/** factory function to instantiate a camera hardware object */</span>
-<a name="l00146"></a>00146 <span class="keyword">extern</span> <span class="stringliteral">"C"</span> sp&lt;CameraHardwareInterface&gt; <a class="code" href="namespaceandroid.html#24c243f7f9ba0d1d881be17ae06254a2" title="factory function to instantiate a camera hardware object">openCameraHardware</a>();
-<a name="l00147"></a>00147 
-<a name="l00148"></a>00148 };  <span class="comment">// namespace android</span>
-<a name="l00149"></a>00149 
-<a name="l00150"></a>00150 <span class="preprocessor">#endif</span>
-</pre></div></div>
-</body>
-</html>
diff --git a/pdk/docs/_camera_hardware_interface_8h.html b/pdk/docs/_camera_hardware_interface_8h.html
deleted file mode 100755 (executable)
index 633461f..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>CameraHardwareInterface.h File Reference</h1>
-<p>
-<a href="_camera_hardware_interface_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceandroid.html">android</a></td></tr>
-
-<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_camera_hardware_interface.html">android::CameraHardwareInterface</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="_camera_hardware_interface_8h.html">CameraHardwareInterface.h</a> defines the interface to the camera hardware abstraction layer, used for setting and getting parameters, live previewing, and taking pictures.  <a href="classandroid_1_1_camera_hardware_interface.html#_details">More...</a><br></td></tr>
-<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceandroid.html#d32b08663d42356404e2eb971e271636">android::preview_callback</a> )(const sp&lt; IMemory &gt; &amp;mem, void *user)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback for startPreview().  <a href="#d32b08663d42356404e2eb971e271636"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceandroid.html#04c83209c2627e2d303320712ca9ee65">android::shutter_callback</a> )(void *user)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback for takePicture().  <a href="#04c83209c2627e2d303320712ca9ee65"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceandroid.html#a97926709e452d66360cb9b24736969e">android::raw_callback</a> )(const sp&lt; IMemory &gt; &amp;mem, void *user)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback for takePicture().  <a href="#a97926709e452d66360cb9b24736969e"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceandroid.html#c21980d4be1e0cc458399ecf5374d473">android::jpeg_callback</a> )(const sp&lt; IMemory &gt; &amp;mem, void *user)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback for takePicture().  <a href="#c21980d4be1e0cc458399ecf5374d473"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceandroid.html#4dca8d8b824ca9a684358133da0ec8f2">android::autofocus_callback</a> )(bool focused, void *user)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback for autoFocus().  <a href="#4dca8d8b824ca9a684358133da0ec8f2"></a><br></td></tr>
-<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">sp&lt; CameraHardwareInterface &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceandroid.html#24c243f7f9ba0d1d881be17ae06254a2">android::openCameraHardware</a> ()</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">factory function to instantiate a camera hardware object  <a href="#24c243f7f9ba0d1d881be17ae06254a2"></a><br></td></tr>
-</table>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/annotated.html b/pdk/docs/annotated.html
deleted file mode 100755 (executable)
index c8ea2e2..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>Data Structures</h1>Here are the data structures with brief descriptions:<table>
-  <tr><td class="indexkey"><a class="el" href="classandroid_1_1_audio_hardware_interface.html">android::AudioHardwareInterface</a></td><td class="indexvalue"><a class="el" href="_audio_hardware_interface_8h.html">AudioHardwareInterface.h</a> defines the interface to the audio hardware abstraction layer </td></tr>
-  <tr><td class="indexkey"><a class="el" href="classandroid_1_1_audio_stream_in.html">android::AudioStreamIn</a></td><td class="indexvalue"><a class="el" href="classandroid_1_1_audio_stream_in.html" title="AudioStreamIn is the abstraction interface for the audio input hardware.">AudioStreamIn</a> is the abstraction interface for the audio input hardware </td></tr>
-  <tr><td class="indexkey"><a class="el" href="classandroid_1_1_audio_stream_out.html">android::AudioStreamOut</a></td><td class="indexvalue"><a class="el" href="classandroid_1_1_audio_stream_out.html" title="AudioStreamOut is the abstraction interface for the audio output hardware.">AudioStreamOut</a> is the abstraction interface for the audio output hardware </td></tr>
-  <tr><td class="indexkey"><a class="el" href="classandroid_1_1_camera_hardware_interface.html">android::CameraHardwareInterface</a></td><td class="indexvalue"><a class="el" href="_camera_hardware_interface_8h.html">CameraHardwareInterface.h</a> defines the interface to the camera hardware abstraction layer, used for setting and getting parameters, live previewing, and taking pictures </td></tr>
-  <tr><td class="indexkey"><a class="el" href="struct_gps_callbacks.html">GpsCallbacks</a></td><td class="indexvalue">GPS callback structure </td></tr>
-  <tr><td class="indexkey"><a class="el" href="struct_gps_interface.html">GpsInterface</a></td><td class="indexvalue">Represents the standard GPS interface </td></tr>
-  <tr><td class="indexkey"><a class="el" href="struct_gps_location.html">GpsLocation</a></td><td class="indexvalue">Represents a location </td></tr>
-  <tr><td class="indexkey"><a class="el" href="struct_gps_status.html">GpsStatus</a></td><td class="indexvalue">Represents the status </td></tr>
-  <tr><td class="indexkey"><a class="el" href="struct_gps_supl_interface.html">GpsSuplInterface</a></td><td class="indexvalue">Extended interface for SUPL support </td></tr>
-  <tr><td class="indexkey"><a class="el" href="struct_gps_sv_info.html">GpsSvInfo</a></td><td class="indexvalue">Represents SV information </td></tr>
-  <tr><td class="indexkey"><a class="el" href="struct_gps_sv_status.html">GpsSvStatus</a></td><td class="indexvalue">Represents SV status </td></tr>
-  <tr><td class="indexkey"><a class="el" href="struct_gps_xtra_callbacks.html">GpsXtraCallbacks</a></td><td class="indexvalue">Callback structure for the XTRA interface </td></tr>
-  <tr><td class="indexkey"><a class="el" href="struct_gps_xtra_interface.html">GpsXtraInterface</a></td><td class="indexvalue">Extended interface for XTRA support </td></tr>
-</table>
-</div>
-</body>
-</html>
index e0cf217..8639cf0 100755 (executable)
@@ -227,7 +227,7 @@ include $(BUILD_SHARED_LIBRARY)
 <p class="note"><strong>Note</strong>: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, <a href="audio_sub_system.html">click here</a>.</p>
 
 
-<iframe onLoad="resizeHeight();" src="_audio_hardware_interface_8h.html" scrolling="no" scroll="no" id="doxygen" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>
+<iframe onLoad="resizeHeight();" src="AudioHardwareInterface_8h.html" scrolling="no" scroll="no" id="doxygen" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>
 
 
 <p><span class="lh2"><a name="androidFooter"></a></span>
index ae44b68..1b65659 100755 (executable)
@@ -246,7 +246,7 @@ include $(BUILD_SHARED_LIBRARY)
 <p class="note"><strong>Note</strong>: This document relies on some Doxygen-generated content that appears in an iFrame below. To return to the Doxygen default content for this page, <a href="camera.html">click here</a>.</p>
 
 
-<iframe onLoad="resizeHeight();" src="_camera_hardware_interface_8h.html" scrolling="no" scroll="no" id="doxygen" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>
+<iframe onLoad="resizeHeight();" src="CameraHardwareInterface_8h.html " scrolling="no" scroll="no" id="doxygen" marginwidth="0" marginheight="0" frameborder="0" style="width:100%;"></iframe>
 
 
 <p><span class="lh2"><a name="androidFooter"></a></span>
diff --git a/pdk/docs/classandroid_1_1_audio_hardware_interface.html b/pdk/docs/classandroid_1_1_audio_hardware_interface.html
deleted file mode 100755 (executable)
index d2e9ac8..0000000
+++ /dev/null
@@ -1,584 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
-    </ul>
-  </div>
-  <div class="navpath"><a class="el" href="namespaceandroid.html">android</a>::<a class="el" href="classandroid_1_1_audio_hardware_interface.html">AudioHardwareInterface</a>
-  </div>
-</div>
-<div class="contents">
-<h1>android::AudioHardwareInterface Class Reference</h1><!-- doxytag: class="android::AudioHardwareInterface" --><a class="el" href="_audio_hardware_interface_8h.html">AudioHardwareInterface.h</a> defines the interface to the audio hardware abstraction layer.  
-<a href="#_details">More...</a>
-<p>
-<code>#include &lt;<a class="el" href="_audio_hardware_interface_8h-source.html">AudioHardwareInterface.h</a>&gt;</code>
-<p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#b7e19e09fa6cbc07c127122fa9866c50">initCheck</a> ()=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">check to see if the audio hardware interface has been initialized.  <a href="#b7e19e09fa6cbc07c127122fa9866c50"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#61121d365bb4d182bdec2c1b12fb1178">standby</a> ()=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">put the audio hardware into standby mode to conserve power.  <a href="#61121d365bb4d182bdec2c1b12fb1178"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#7b7418072df1eeaacc89cd0c725755f6">setVoiceVolume</a> (float volume)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">set the audio volume of a voice call.  <a href="#7b7418072df1eeaacc89cd0c725755f6"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#925092e556eb89f304bcebb09f90c9a3">setMasterVolume</a> (float volume)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">set the audio volume for all audio activities other than voice call.  <a href="#925092e556eb89f304bcebb09f90c9a3"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#39b2690e19219425b8cff093ef83bfb1">setRouting</a> (int mode, uint32_t routes)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Audio routing methods.  <a href="#39b2690e19219425b8cff093ef83bfb1"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#1886de8fff2342ae628dbbbc0c45ba83">getRouting</a> (int mode, uint32_t *routes)=0</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#aaf2a429c240f00b21836794849b430f">setMode</a> (int mode)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">setMode is called when the audio mode changes.  <a href="#aaf2a429c240f00b21836794849b430f"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#8466c76328a51b8a83da103032abba55">getMode</a> (int *mode)=0</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#be35b7cb738531939a3ac9abc5514621">setMicMute</a> (bool state)=0</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#15d3c33d7e3f965dc2588c537f05a133">getMicMute</a> (bool *state)=0</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#a1b477901df48b3a27103a77e6bb39c8">setParameter</a> (const char *key, const char *value)=0</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#19f68d873b2a6e4c00c017c580170395">getInputBufferSize</a> (uint32_t sampleRate, int format, int channelCount)=0</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classandroid_1_1_audio_stream_out.html">AudioStreamOut</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#eda0986e145c8dd68d21cb79051f94f9">openOutputStream</a> (int format=0, int channelCount=0, uint32_t sampleRate=0, status_t *status=0)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method creates and opens the audio hardware output stream.  <a href="#eda0986e145c8dd68d21cb79051f94f9"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classandroid_1_1_audio_stream_in.html">AudioStreamIn</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#efb777d192fcbcd65458fa4f2d976476">openInputStream</a> (int format, int channelCount, uint32_t sampleRate, status_t *status)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method creates and opens the audio hardware input stream.  <a href="#efb777d192fcbcd65458fa4f2d976476"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#05f035af60e67a22251175b44a089f69">dumpState</a> (int fd, const Vector&lt; String16 &gt; &amp;args)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method dumps the state of the audio hardware.  <a href="#05f035af60e67a22251175b44a089f69"></a><br></td></tr>
-<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classandroid_1_1_audio_hardware_interface.html">AudioHardwareInterface</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#aa5ae45e9ad969fefc494e103cf5068d">create</a> ()</td></tr>
-
-<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#d82c3e4827f275abf28eb872e8751e1f">doRouting</a> ()=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">doRouting actually initiates the routing.  <a href="#d82c3e4827f275abf28eb872e8751e1f"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html#371f198a416cb726804e0f47e8763217">dump</a> (int fd, const Vector&lt; String16 &gt; &amp;args)=0</td></tr>
-
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-<a class="el" href="_audio_hardware_interface_8h.html">AudioHardwareInterface.h</a> defines the interface to the audio hardware abstraction layer. 
-<p>
-The interface supports setting and getting parameters, selecting audio routing paths, and defining input and output streams.<p>
-AudioFlinger initializes the audio hardware and immediately opens an output stream. You can set Audio routing to output to handset, speaker, Bluetooth, or a headset.<p>
-The audio input stream is initialized when AudioFlinger is called to carry out a record operation. 
-<p>Definition at line <a class="el" href="_audio_hardware_interface_8h-source.html#l00144">144</a> of file <a class="el" href="_audio_hardware_interface_8h-source.html">AudioHardwareInterface.h</a>.</p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="b7e19e09fa6cbc07c127122fa9866c50"></a><!-- doxytag: member="android::AudioHardwareInterface::initCheck" ref="b7e19e09fa6cbc07c127122fa9866c50" args="()=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioHardwareInterface::initCheck           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-check to see if the audio hardware interface has been initialized. 
-<p>
-return status based on values defined in include/utils/Errors.h 
-</div>
-</div><p>
-<a class="anchor" name="61121d365bb4d182bdec2c1b12fb1178"></a><!-- doxytag: member="android::AudioHardwareInterface::standby" ref="61121d365bb4d182bdec2c1b12fb1178" args="()=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioHardwareInterface::standby           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-put the audio hardware into standby mode to conserve power. 
-<p>
-Returns status based on include/utils/Errors.h 
-</div>
-</div><p>
-<a class="anchor" name="7b7418072df1eeaacc89cd0c725755f6"></a><!-- doxytag: member="android::AudioHardwareInterface::setVoiceVolume" ref="7b7418072df1eeaacc89cd0c725755f6" args="(float volume)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioHardwareInterface::setVoiceVolume           </td>
-          <td>(</td>
-          <td class="paramtype">float&nbsp;</td>
-          <td class="paramname"> <em>volume</em>          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-set the audio volume of a voice call. 
-<p>
-Range is between 0.0 and 1.0 
-</div>
-</div><p>
-<a class="anchor" name="925092e556eb89f304bcebb09f90c9a3"></a><!-- doxytag: member="android::AudioHardwareInterface::setMasterVolume" ref="925092e556eb89f304bcebb09f90c9a3" args="(float volume)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioHardwareInterface::setMasterVolume           </td>
-          <td>(</td>
-          <td class="paramtype">float&nbsp;</td>
-          <td class="paramname"> <em>volume</em>          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-set the audio volume for all audio activities other than voice call. 
-<p>
-Range between 0.0 and 1.0. If any value other than NO_ERROR is returned, the software mixer will emulate this capability. 
-</div>
-</div><p>
-<a class="anchor" name="39b2690e19219425b8cff093ef83bfb1"></a><!-- doxytag: member="android::AudioHardwareInterface::setRouting" ref="39b2690e19219425b8cff093ef83bfb1" args="(int mode, uint32_t routes)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioHardwareInterface::setRouting           </td>
-          <td>(</td>
-          <td class="paramtype">int&nbsp;</td>
-          <td class="paramname"> <em>mode</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">uint32_t&nbsp;</td>
-          <td class="paramname"> <em>routes</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Audio routing methods. 
-<p>
-Routes defined in include/hardware/AudioSystem.h. Audio routes can be (ROUTE_EARPIECE | ROUTE_SPEAKER | ROUTE_BLUETOOTH | ROUTE_HEADSET)<p>
-setRouting sets the routes for a mode. This is called at startup. It is also called when a new device is connected, such as a wired headset is plugged in or a Bluetooth headset is paired. 
-</div>
-</div><p>
-<a class="anchor" name="1886de8fff2342ae628dbbbc0c45ba83"></a><!-- doxytag: member="android::AudioHardwareInterface::getRouting" ref="1886de8fff2342ae628dbbbc0c45ba83" args="(int mode, uint32_t *routes)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioHardwareInterface::getRouting           </td>
-          <td>(</td>
-          <td class="paramtype">int&nbsp;</td>
-          <td class="paramname"> <em>mode</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">uint32_t *&nbsp;</td>
-          <td class="paramname"> <em>routes</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="aaf2a429c240f00b21836794849b430f"></a><!-- doxytag: member="android::AudioHardwareInterface::setMode" ref="aaf2a429c240f00b21836794849b430f" args="(int mode)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioHardwareInterface::setMode           </td>
-          <td>(</td>
-          <td class="paramtype">int&nbsp;</td>
-          <td class="paramname"> <em>mode</em>          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-setMode is called when the audio mode changes. 
-<p>
-NORMAL mode is for standard audio playback, RINGTONE when a ringtone is playing, and IN_CALL when a call is in progress. 
-</div>
-</div><p>
-<a class="anchor" name="8466c76328a51b8a83da103032abba55"></a><!-- doxytag: member="android::AudioHardwareInterface::getMode" ref="8466c76328a51b8a83da103032abba55" args="(int *mode)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioHardwareInterface::getMode           </td>
-          <td>(</td>
-          <td class="paramtype">int *&nbsp;</td>
-          <td class="paramname"> <em>mode</em>          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="be35b7cb738531939a3ac9abc5514621"></a><!-- doxytag: member="android::AudioHardwareInterface::setMicMute" ref="be35b7cb738531939a3ac9abc5514621" args="(bool state)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioHardwareInterface::setMicMute           </td>
-          <td>(</td>
-          <td class="paramtype">bool&nbsp;</td>
-          <td class="paramname"> <em>state</em>          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="15d3c33d7e3f965dc2588c537f05a133"></a><!-- doxytag: member="android::AudioHardwareInterface::getMicMute" ref="15d3c33d7e3f965dc2588c537f05a133" args="(bool *state)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioHardwareInterface::getMicMute           </td>
-          <td>(</td>
-          <td class="paramtype">bool *&nbsp;</td>
-          <td class="paramname"> <em>state</em>          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="a1b477901df48b3a27103a77e6bb39c8"></a><!-- doxytag: member="android::AudioHardwareInterface::setParameter" ref="a1b477901df48b3a27103a77e6bb39c8" args="(const char *key, const char *value)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioHardwareInterface::setParameter           </td>
-          <td>(</td>
-          <td class="paramtype">const char *&nbsp;</td>
-          <td class="paramname"> <em>key</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const char *&nbsp;</td>
-          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="19f68d873b2a6e4c00c017c580170395"></a><!-- doxytag: member="android::AudioHardwareInterface::getInputBufferSize" ref="19f68d873b2a6e4c00c017c580170395" args="(uint32_t sampleRate, int format, int channelCount)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual size_t android::AudioHardwareInterface::getInputBufferSize           </td>
-          <td>(</td>
-          <td class="paramtype">uint32_t&nbsp;</td>
-          <td class="paramname"> <em>sampleRate</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int&nbsp;</td>
-          <td class="paramname"> <em>format</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int&nbsp;</td>
-          <td class="paramname"> <em>channelCount</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="eda0986e145c8dd68d21cb79051f94f9"></a><!-- doxytag: member="android::AudioHardwareInterface::openOutputStream" ref="eda0986e145c8dd68d21cb79051f94f9" args="(int format=0, int channelCount=0, uint32_t sampleRate=0, status_t *status=0)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual <a class="el" href="classandroid_1_1_audio_stream_out.html">AudioStreamOut</a>* android::AudioHardwareInterface::openOutputStream           </td>
-          <td>(</td>
-          <td class="paramtype">int&nbsp;</td>
-          <td class="paramname"> <em>format</em> = <code>0</code>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int&nbsp;</td>
-          <td class="paramname"> <em>channelCount</em> = <code>0</code>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">uint32_t&nbsp;</td>
-          <td class="paramname"> <em>sampleRate</em> = <code>0</code>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">status_t *&nbsp;</td>
-          <td class="paramname"> <em>status</em> = <code>0</code></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-This method creates and opens the audio hardware output stream. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="efb777d192fcbcd65458fa4f2d976476"></a><!-- doxytag: member="android::AudioHardwareInterface::openInputStream" ref="efb777d192fcbcd65458fa4f2d976476" args="(int format, int channelCount, uint32_t sampleRate, status_t *status)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual <a class="el" href="classandroid_1_1_audio_stream_in.html">AudioStreamIn</a>* android::AudioHardwareInterface::openInputStream           </td>
-          <td>(</td>
-          <td class="paramtype">int&nbsp;</td>
-          <td class="paramname"> <em>format</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int&nbsp;</td>
-          <td class="paramname"> <em>channelCount</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">uint32_t&nbsp;</td>
-          <td class="paramname"> <em>sampleRate</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">status_t *&nbsp;</td>
-          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-This method creates and opens the audio hardware input stream. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="05f035af60e67a22251175b44a089f69"></a><!-- doxytag: member="android::AudioHardwareInterface::dumpState" ref="05f035af60e67a22251175b44a089f69" args="(int fd, const Vector&lt; String16 &gt; &amp;args)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioHardwareInterface::dumpState           </td>
-          <td>(</td>
-          <td class="paramtype">int&nbsp;</td>
-          <td class="paramname"> <em>fd</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const Vector&lt; String16 &gt; &amp;&nbsp;</td>
-          <td class="paramname"> <em>args</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-This method dumps the state of the audio hardware. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="aa5ae45e9ad969fefc494e103cf5068d"></a><!-- doxytag: member="android::AudioHardwareInterface::create" ref="aa5ae45e9ad969fefc494e103cf5068d" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">static <a class="el" href="classandroid_1_1_audio_hardware_interface.html">AudioHardwareInterface</a>* android::AudioHardwareInterface::create           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [static]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="d82c3e4827f275abf28eb872e8751e1f"></a><!-- doxytag: member="android::AudioHardwareInterface::doRouting" ref="d82c3e4827f275abf28eb872e8751e1f" args="()=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioHardwareInterface::doRouting           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [protected, pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-doRouting actually initiates the routing. 
-<p>
-A call to setRouting or setMode may result in a routing change. The generic logic calls doRouting when required. If the device has any special requirements these methods can be overriden. 
-</div>
-</div><p>
-<a class="anchor" name="371f198a416cb726804e0f47e8763217"></a><!-- doxytag: member="android::AudioHardwareInterface::dump" ref="371f198a416cb726804e0f47e8763217" args="(int fd, const Vector&lt; String16 &gt; &amp;args)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioHardwareInterface::dump           </td>
-          <td>(</td>
-          <td class="paramtype">int&nbsp;</td>
-          <td class="paramname"> <em>fd</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const Vector&lt; String16 &gt; &amp;&nbsp;</td>
-          <td class="paramname"> <em>args</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td><code> [protected, pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-</div>
-</div><p>
-<hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="_audio_hardware_interface_8h-source.html">AudioHardwareInterface.h</a></ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/classandroid_1_1_audio_stream_in.html b/pdk/docs/classandroid_1_1_audio_stream_in.html
deleted file mode 100755 (executable)
index 5439194..0000000
+++ /dev/null
@@ -1,292 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
-    </ul>
-  </div>
-  <div class="navpath"><a class="el" href="namespaceandroid.html">android</a>::<a class="el" href="classandroid_1_1_audio_stream_in.html">AudioStreamIn</a>
-  </div>
-</div>
-<div class="contents">
-<h1>android::AudioStreamIn Class Reference</h1><!-- doxytag: class="android::AudioStreamIn" --><a class="el" href="classandroid_1_1_audio_stream_in.html" title="AudioStreamIn is the abstraction interface for the audio input hardware.">AudioStreamIn</a> is the abstraction interface for the audio input hardware.  
-<a href="#_details">More...</a>
-<p>
-<code>#include &lt;<a class="el" href="_audio_hardware_interface_8h-source.html">AudioHardwareInterface.h</a>&gt;</code>
-<p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_in.html#72067577568bbdd0163c1369fe80f101">~AudioStreamIn</a> ()=0</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_in.html#a458f9cde3edde82f256af7eaa7b2ddf">bufferSize</a> () const =0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return the input buffer size allowed by audio driver  <a href="#a458f9cde3edde82f256af7eaa7b2ddf"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_in.html#04f84006dd5f2e0a5e512897a039f851">channelCount</a> () const =0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return the number of audio input channels  <a href="#04f84006dd5f2e0a5e512897a039f851"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_in.html#4ade98c5243b9ed5f3a71a8f36e74b36">format</a> () const =0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return audio format in 8bit or 16bit PCM format - eg.  <a href="#4ade98c5243b9ed5f3a71a8f36e74b36"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_in.html#43d2c6b97806c005f0717a7bb6f7595c">frameSize</a> () const </td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return the frame size (number of bytes per sample).  <a href="#43d2c6b97806c005f0717a7bb6f7595c"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_in.html#339822afb3f2f2ac1b4c775d31d12440">setGain</a> (float gain)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">set the input gain for the audio driver.  <a href="#339822afb3f2f2ac1b4c775d31d12440"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual ssize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_in.html#7c313cbfbb47dafd90f3225bcd26e592">read</a> (void *buffer, ssize_t bytes)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">read audio buffer in from audio driver  <a href="#7c313cbfbb47dafd90f3225bcd26e592"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_in.html#18c3760208bfb99498715a0d4977f675">dump</a> (int fd, const Vector&lt; String16 &gt; &amp;args)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">dump the state of the audio input device  <a href="#18c3760208bfb99498715a0d4977f675"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_in.html#93fab46e8afdbaedd4d20cc6ee2b7c41">standby</a> ()=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Put the audio hardware input into standby mode.  <a href="#93fab46e8afdbaedd4d20cc6ee2b7c41"></a><br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-<a class="el" href="classandroid_1_1_audio_stream_in.html" title="AudioStreamIn is the abstraction interface for the audio input hardware.">AudioStreamIn</a> is the abstraction interface for the audio input hardware. 
-<p>
-It defines the various properties of the audio hardware input driver. 
-<p>Definition at line <a class="el" href="_audio_hardware_interface_8h-source.html#l00093">93</a> of file <a class="el" href="_audio_hardware_interface_8h-source.html">AudioHardwareInterface.h</a>.</p>
-<hr><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" name="72067577568bbdd0163c1369fe80f101"></a><!-- doxytag: member="android::AudioStreamIn::~AudioStreamIn" ref="72067577568bbdd0163c1369fe80f101" args="()=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual android::AudioStreamIn::~AudioStreamIn           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-</div>
-</div><p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="a458f9cde3edde82f256af7eaa7b2ddf"></a><!-- doxytag: member="android::AudioStreamIn::bufferSize" ref="a458f9cde3edde82f256af7eaa7b2ddf" args="() const =0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual size_t android::AudioStreamIn::bufferSize           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td> const<code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-return the input buffer size allowed by audio driver 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="04f84006dd5f2e0a5e512897a039f851"></a><!-- doxytag: member="android::AudioStreamIn::channelCount" ref="04f84006dd5f2e0a5e512897a039f851" args="() const =0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual int android::AudioStreamIn::channelCount           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td> const<code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-return the number of audio input channels 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="4ade98c5243b9ed5f3a71a8f36e74b36"></a><!-- doxytag: member="android::AudioStreamIn::format" ref="4ade98c5243b9ed5f3a71a8f36e74b36" args="() const =0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual int android::AudioStreamIn::format           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td> const<code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-return audio format in 8bit or 16bit PCM format - eg. 
-<p>
-AudioSystem:PCM_16_BIT 
-</div>
-</div><p>
-<a class="anchor" name="43d2c6b97806c005f0717a7bb6f7595c"></a><!-- doxytag: member="android::AudioStreamIn::frameSize" ref="43d2c6b97806c005f0717a7bb6f7595c" args="() const " -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">uint32_t android::AudioStreamIn::frameSize           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td> const<code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-return the frame size (number of bytes per sample). 
-<p>
-
-<p>Definition at line <a class="el" href="_audio_hardware_interface_8h-source.html#l00112">112</a> of file <a class="el" href="_audio_hardware_interface_8h-source.html">AudioHardwareInterface.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="339822afb3f2f2ac1b4c775d31d12440"></a><!-- doxytag: member="android::AudioStreamIn::setGain" ref="339822afb3f2f2ac1b4c775d31d12440" args="(float gain)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioStreamIn::setGain           </td>
-          <td>(</td>
-          <td class="paramtype">float&nbsp;</td>
-          <td class="paramname"> <em>gain</em>          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-set the input gain for the audio driver. 
-<p>
-This method is for for future use 
-</div>
-</div><p>
-<a class="anchor" name="7c313cbfbb47dafd90f3225bcd26e592"></a><!-- doxytag: member="android::AudioStreamIn::read" ref="7c313cbfbb47dafd90f3225bcd26e592" args="(void *buffer, ssize_t bytes)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual ssize_t android::AudioStreamIn::read           </td>
-          <td>(</td>
-          <td class="paramtype">void *&nbsp;</td>
-          <td class="paramname"> <em>buffer</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">ssize_t&nbsp;</td>
-          <td class="paramname"> <em>bytes</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-read audio buffer in from audio driver 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="18c3760208bfb99498715a0d4977f675"></a><!-- doxytag: member="android::AudioStreamIn::dump" ref="18c3760208bfb99498715a0d4977f675" args="(int fd, const Vector&lt; String16 &gt; &amp;args)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioStreamIn::dump           </td>
-          <td>(</td>
-          <td class="paramtype">int&nbsp;</td>
-          <td class="paramname"> <em>fd</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const Vector&lt; String16 &gt; &amp;&nbsp;</td>
-          <td class="paramname"> <em>args</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-dump the state of the audio input device 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="93fab46e8afdbaedd4d20cc6ee2b7c41"></a><!-- doxytag: member="android::AudioStreamIn::standby" ref="93fab46e8afdbaedd4d20cc6ee2b7c41" args="()=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioStreamIn::standby           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Put the audio hardware input into standby mode. 
-<p>
-Returns status based on include/utils/Errors.h 
-</div>
-</div><p>
-<hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="_audio_hardware_interface_8h-source.html">AudioHardwareInterface.h</a></ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/classandroid_1_1_audio_stream_out.html b/pdk/docs/classandroid_1_1_audio_stream_out.html
deleted file mode 100755 (executable)
index 5d727ee..0000000
+++ /dev/null
@@ -1,316 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
-    </ul>
-  </div>
-  <div class="navpath"><a class="el" href="namespaceandroid.html">android</a>::<a class="el" href="classandroid_1_1_audio_stream_out.html">AudioStreamOut</a>
-  </div>
-</div>
-<div class="contents">
-<h1>android::AudioStreamOut Class Reference</h1><!-- doxytag: class="android::AudioStreamOut" --><a class="el" href="classandroid_1_1_audio_stream_out.html" title="AudioStreamOut is the abstraction interface for the audio output hardware.">AudioStreamOut</a> is the abstraction interface for the audio output hardware.  
-<a href="#_details">More...</a>
-<p>
-<code>#include &lt;<a class="el" href="_audio_hardware_interface_8h-source.html">AudioHardwareInterface.h</a>&gt;</code>
-<p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_out.html#09074dbae95b82d4f83c513035a0034f">~AudioStreamOut</a> ()=0</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_out.html#6bb028e125d13289f26d3d74f851c921">sampleRate</a> () const =0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return audio sampling rate in hz - eg.  <a href="#6bb028e125d13289f26d3d74f851c921"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_out.html#7b3c5f2ce79b9b6f167408f63d19af0a">bufferSize</a> () const =0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">returns size of output buffer - eg.  <a href="#7b3c5f2ce79b9b6f167408f63d19af0a"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_out.html#4e880a5379c168e8f68c26827e41275b">channelCount</a> () const =0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return number of output audio channels.  <a href="#4e880a5379c168e8f68c26827e41275b"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_out.html#eb2b430bbff4eebd8fb8590507b1dce1">format</a> () const =0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return audio format in 8bit or 16bit PCM format - eg.  <a href="#eb2b430bbff4eebd8fb8590507b1dce1"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_out.html#66b7c4bb510db4060adfd03a376897d8">frameSize</a> () const </td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return the frame size (number of bytes per sample).  <a href="#66b7c4bb510db4060adfd03a376897d8"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_out.html#c698a3d95cf0829dcfe283cd5ea437cb">latency</a> () const =0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">return the audio hardware driver latency in milli seconds.  <a href="#c698a3d95cf0829dcfe283cd5ea437cb"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_out.html#e6d301925d193c25561b42239c7f44b6">setVolume</a> (float volume)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Use this method in situations where audio mixing is done in the hardware.  <a href="#e6d301925d193c25561b42239c7f44b6"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual ssize_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_out.html#cba177e4a4a35a87ab9f8aa2a9c0e78e">write</a> (const void *buffer, size_t bytes)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">write audio buffer to driver.  <a href="#cba177e4a4a35a87ab9f8aa2a9c0e78e"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_out.html#97e3cc4610ba40d6c37b3d376a032b98">dump</a> (int fd, const Vector&lt; String16 &gt; &amp;args)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">dump the state of the audio output device  <a href="#97e3cc4610ba40d6c37b3d376a032b98"></a><br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-<a class="el" href="classandroid_1_1_audio_stream_out.html" title="AudioStreamOut is the abstraction interface for the audio output hardware.">AudioStreamOut</a> is the abstraction interface for the audio output hardware. 
-<p>
-It provides information about various properties of the audio output hardware driver. 
-<p>Definition at line <a class="el" href="_audio_hardware_interface_8h-source.html#l00040">40</a> of file <a class="el" href="_audio_hardware_interface_8h-source.html">AudioHardwareInterface.h</a>.</p>
-<hr><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" name="09074dbae95b82d4f83c513035a0034f"></a><!-- doxytag: member="android::AudioStreamOut::~AudioStreamOut" ref="09074dbae95b82d4f83c513035a0034f" args="()=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual android::AudioStreamOut::~AudioStreamOut           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-</div>
-</div><p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="6bb028e125d13289f26d3d74f851c921"></a><!-- doxytag: member="android::AudioStreamOut::sampleRate" ref="6bb028e125d13289f26d3d74f851c921" args="() const =0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual uint32_t android::AudioStreamOut::sampleRate           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td> const<code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-return audio sampling rate in hz - eg. 
-<p>
-44100 
-</div>
-</div><p>
-<a class="anchor" name="7b3c5f2ce79b9b6f167408f63d19af0a"></a><!-- doxytag: member="android::AudioStreamOut::bufferSize" ref="7b3c5f2ce79b9b6f167408f63d19af0a" args="() const =0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual size_t android::AudioStreamOut::bufferSize           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td> const<code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-returns size of output buffer - eg. 
-<p>
-4800 
-</div>
-</div><p>
-<a class="anchor" name="4e880a5379c168e8f68c26827e41275b"></a><!-- doxytag: member="android::AudioStreamOut::channelCount" ref="4e880a5379c168e8f68c26827e41275b" args="() const =0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual int android::AudioStreamOut::channelCount           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td> const<code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-return number of output audio channels. 
-<p>
-Acceptable values are 1 (mono) or 2 (stereo) 
-</div>
-</div><p>
-<a class="anchor" name="eb2b430bbff4eebd8fb8590507b1dce1"></a><!-- doxytag: member="android::AudioStreamOut::format" ref="eb2b430bbff4eebd8fb8590507b1dce1" args="() const =0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual int android::AudioStreamOut::format           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td> const<code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-return audio format in 8bit or 16bit PCM format - eg. 
-<p>
-AudioSystem:PCM_16_BIT 
-</div>
-</div><p>
-<a class="anchor" name="66b7c4bb510db4060adfd03a376897d8"></a><!-- doxytag: member="android::AudioStreamOut::frameSize" ref="66b7c4bb510db4060adfd03a376897d8" args="() const " -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">uint32_t android::AudioStreamOut::frameSize           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td> const<code> [inline]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-return the frame size (number of bytes per sample). 
-<p>
-
-<p>Definition at line <a class="el" href="_audio_hardware_interface_8h-source.html#l00065">65</a> of file <a class="el" href="_audio_hardware_interface_8h-source.html">AudioHardwareInterface.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="c698a3d95cf0829dcfe283cd5ea437cb"></a><!-- doxytag: member="android::AudioStreamOut::latency" ref="c698a3d95cf0829dcfe283cd5ea437cb" args="() const =0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual uint32_t android::AudioStreamOut::latency           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td> const<code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-return the audio hardware driver latency in milli seconds. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="e6d301925d193c25561b42239c7f44b6"></a><!-- doxytag: member="android::AudioStreamOut::setVolume" ref="e6d301925d193c25561b42239c7f44b6" args="(float volume)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioStreamOut::setVolume           </td>
-          <td>(</td>
-          <td class="paramtype">float&nbsp;</td>
-          <td class="paramname"> <em>volume</em>          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Use this method in situations where audio mixing is done in the hardware. 
-<p>
-This method serves as a direct interface with hardware, allowing you to directly set the volume as apposed to via the framework. This method might produce multiple PCM outputs or hardware accelerated codecs, such as MP3 or AAC. 
-</div>
-</div><p>
-<a class="anchor" name="cba177e4a4a35a87ab9f8aa2a9c0e78e"></a><!-- doxytag: member="android::AudioStreamOut::write" ref="cba177e4a4a35a87ab9f8aa2a9c0e78e" args="(const void *buffer, size_t bytes)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual ssize_t android::AudioStreamOut::write           </td>
-          <td>(</td>
-          <td class="paramtype">const void *&nbsp;</td>
-          <td class="paramname"> <em>buffer</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&nbsp;</td>
-          <td class="paramname"> <em>bytes</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-write audio buffer to driver. 
-<p>
-Returns number of bytes written 
-</div>
-</div><p>
-<a class="anchor" name="97e3cc4610ba40d6c37b3d376a032b98"></a><!-- doxytag: member="android::AudioStreamOut::dump" ref="97e3cc4610ba40d6c37b3d376a032b98" args="(int fd, const Vector&lt; String16 &gt; &amp;args)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::AudioStreamOut::dump           </td>
-          <td>(</td>
-          <td class="paramtype">int&nbsp;</td>
-          <td class="paramname"> <em>fd</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const Vector&lt; String16 &gt; &amp;&nbsp;</td>
-          <td class="paramname"> <em>args</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-dump the state of the audio output device 
-<p>
-
-</div>
-</div><p>
-<hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="_audio_hardware_interface_8h-source.html">AudioHardwareInterface.h</a></ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/classandroid_1_1_camera_hardware_interface.html b/pdk/docs/classandroid_1_1_camera_hardware_interface.html
deleted file mode 100755 (executable)
index cddb82c..0000000
+++ /dev/null
@@ -1,393 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
-    </ul>
-  </div>
-  <div class="navpath"><a class="el" href="namespaceandroid.html">android</a>::<a class="el" href="classandroid_1_1_camera_hardware_interface.html">CameraHardwareInterface</a>
-  </div>
-</div>
-<div class="contents">
-<h1>android::CameraHardwareInterface Class Reference</h1><!-- doxytag: class="android::CameraHardwareInterface" --><a class="el" href="_camera_hardware_interface_8h.html">CameraHardwareInterface.h</a> defines the interface to the camera hardware abstraction layer, used for setting and getting parameters, live previewing, and taking pictures.  
-<a href="#_details">More...</a>
-<p>
-<code>#include &lt;<a class="el" href="_camera_hardware_interface_8h-source.html">CameraHardwareInterface.h</a>&gt;</code>
-<p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_camera_hardware_interface.html#99f4ab74b58cd4b23e0fb00a46a60cb1">~CameraHardwareInterface</a> ()</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual sp&lt; IMemoryHeap &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_camera_hardware_interface.html#9d4071fb234a0c2e7bf6ea78e723f2f4">getPreviewHeap</a> () const =0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the IMemoryHeap for the preview image heap.  <a href="#9d4071fb234a0c2e7bf6ea78e723f2f4"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_camera_hardware_interface.html#62def8031dee8bdab7933770708a6312">startPreview</a> (<a class="el" href="namespaceandroid.html#d32b08663d42356404e2eb971e271636">preview_callback</a> cb, void *user)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Start preview mode.  <a href="#62def8031dee8bdab7933770708a6312"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_camera_hardware_interface.html#34faa77065f415b93cb1acf84fc788bf">stopPreview</a> ()=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stop a previously started preview.  <a href="#34faa77065f415b93cb1acf84fc788bf"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_camera_hardware_interface.html#0dda73938e9b18326dd48bd721dbd515">autoFocus</a> (<a class="el" href="namespaceandroid.html#4dca8d8b824ca9a684358133da0ec8f2">autofocus_callback</a>, void *user)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Start auto focus, the callback routine is called once when focusing is complete.  <a href="#0dda73938e9b18326dd48bd721dbd515"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_camera_hardware_interface.html#2aedf65cad695ce439029f37a7cb66c4">takePicture</a> (<a class="el" href="namespaceandroid.html#04c83209c2627e2d303320712ca9ee65">shutter_callback</a>, <a class="el" href="namespaceandroid.html#a97926709e452d66360cb9b24736969e">raw_callback</a>, <a class="el" href="namespaceandroid.html#c21980d4be1e0cc458399ecf5374d473">jpeg_callback</a>, void *user)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Take a picture.  <a href="#2aedf65cad695ce439029f37a7cb66c4"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_camera_hardware_interface.html#da8faf376215a605357d26afa1b79386">cancelPicture</a> (bool cancel_shutter, bool cancel_raw, bool cancel_jpeg)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cancel a picture that was started with takePicture.  <a href="#da8faf376215a605357d26afa1b79386"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_camera_hardware_interface.html#82e54ede14bd263274bbc8777bafc384">setParameters</a> (const CameraParameters &amp;params)=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the camera parameters.  <a href="#82e54ede14bd263274bbc8777bafc384"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual CameraParameters&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_camera_hardware_interface.html#4c748a3c0aa3c5f2333e0abcdbeb15cb">getParameters</a> () const =0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the camera parameters.  <a href="#4c748a3c0aa3c5f2333e0abcdbeb15cb"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_camera_hardware_interface.html#df65310b8aa176e0ce5f08b87d6b7eb8">release</a> ()=0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release the hardware resources owned by this object.  <a href="#df65310b8aa176e0ce5f08b87d6b7eb8"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual status_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_camera_hardware_interface.html#06df1bf91b8af07964dca314a6031b32">dump</a> (int fd, const Vector&lt; String16 &gt; &amp;args) const =0</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dump state of the camera hardware.  <a href="#06df1bf91b8af07964dca314a6031b32"></a><br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-<a class="el" href="_camera_hardware_interface_8h.html">CameraHardwareInterface.h</a> defines the interface to the camera hardware abstraction layer, used for setting and getting parameters, live previewing, and taking pictures. 
-<p>
-It is a referenced counted interface with RefBase as its base class. CameraService calls <a class="el" href="namespaceandroid.html#24c243f7f9ba0d1d881be17ae06254a2" title="factory function to instantiate a camera hardware object">openCameraHardware()</a> to retrieve a strong pointer to the instance of this interface and may be called multiple times. The following steps describe a typical sequence:<p>
-<ol type=1>
-<li>After CameraService calls <a class="el" href="namespaceandroid.html#24c243f7f9ba0d1d881be17ae06254a2" title="factory function to instantiate a camera hardware object">openCameraHardware()</a>, <a class="el" href="classandroid_1_1_camera_hardware_interface.html#4c748a3c0aa3c5f2333e0abcdbeb15cb" title="Return the camera parameters.">getParameters()</a> and <a class="el" href="classandroid_1_1_camera_hardware_interface.html#82e54ede14bd263274bbc8777bafc384" title="Set the camera parameters.">setParameters()</a> are used to initialize the camera instance. CameraService calls <a class="el" href="classandroid_1_1_camera_hardware_interface.html#9d4071fb234a0c2e7bf6ea78e723f2f4" title="Return the IMemoryHeap for the preview image heap.">getPreviewHeap()</a> to establish access to the preview heap so it can be registered with SurfaceFlinger for efficient display updating while in preview mode.</li><li><a class="el" href="classandroid_1_1_camera_hardware_interface.html#62def8031dee8bdab7933770708a6312" title="Start preview mode.">startPreview()</a> is called, which is passed a <a class="el" href="namespaceandroid.html#d32b08663d42356404e2eb971e271636" title="Callback for startPreview().">preview_callback()</a> function and a user parameter. The camera instance then periodically calls <a class="el" href="namespaceandroid.html#d32b08663d42356404e2eb971e271636" title="Callback for startPreview().">preview_callback()</a> each time a new preview frame is available. The callback routine has two parameters: the first is a pointer to the IMemory containing the frame and the second a user parameter. If the preview_callback code needs to use this memory after returning, it must copy the data.</li></ol>
-<p>
-Prior to taking a picture, CameraService calls autofocus() with <a class="el" href="namespaceandroid.html#4dca8d8b824ca9a684358133da0ec8f2" title="Callback for autoFocus().">autofocus_callback()</a> and a user parameter. When auto focusing has completed, the camera instance calls <a class="el" href="namespaceandroid.html#4dca8d8b824ca9a684358133da0ec8f2" title="Callback for autoFocus().">autofocus_callback()</a>, which informs the application whether focusing was successful. The camera instance only calls <a class="el" href="namespaceandroid.html#4dca8d8b824ca9a684358133da0ec8f2" title="Callback for autoFocus().">autofocus_callback()</a> once and it is up to the application to call <a class="el" href="classandroid_1_1_camera_hardware_interface.html#0dda73938e9b18326dd48bd721dbd515" title="Start auto focus, the callback routine is called once when focusing is complete.">autoFocus()</a> again if refocusing is desired.<p>
-CameraService calls <a class="el" href="classandroid_1_1_camera_hardware_interface.html#2aedf65cad695ce439029f37a7cb66c4" title="Take a picture.">takePicture()</a> to request the camera instance take a picture. This method has two callbacks: <a class="el" href="namespaceandroid.html#a97926709e452d66360cb9b24736969e" title="Callback for takePicture().">raw_callback()</a> and <a class="el" href="namespaceandroid.html#c21980d4be1e0cc458399ecf5374d473" title="Callback for takePicture().">jpeg_callback()</a>. When the raw image is available, <a class="el" href="namespaceandroid.html#a97926709e452d66360cb9b24736969e" title="Callback for takePicture().">raw_callback()</a> is called with a pointer to the IMemory containing the raw image. When the jpeg image is available, <a class="el" href="namespaceandroid.html#c21980d4be1e0cc458399ecf5374d473" title="Callback for takePicture().">jpeg_callback()</a> is called with a pointer to the IMemory containing the jpeg image. As with <a class="el" href="namespaceandroid.html#d32b08663d42356404e2eb971e271636" title="Callback for startPreview().">preview_callback()</a>, the memory must be copied if it's needed after returning. 
-<p>Definition at line <a class="el" href="_camera_hardware_interface_8h-source.html#l00079">79</a> of file <a class="el" href="_camera_hardware_interface_8h-source.html">CameraHardwareInterface.h</a>.</p>
-<hr><h2>Constructor &amp; Destructor Documentation</h2>
-<a class="anchor" name="99f4ab74b58cd4b23e0fb00a46a60cb1"></a><!-- doxytag: member="android::CameraHardwareInterface::~CameraHardwareInterface" ref="99f4ab74b58cd4b23e0fb00a46a60cb1" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual android::CameraHardwareInterface::~CameraHardwareInterface           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [inline, virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-<p>Definition at line <a class="el" href="_camera_hardware_interface_8h-source.html#l00081">81</a> of file <a class="el" href="_camera_hardware_interface_8h-source.html">CameraHardwareInterface.h</a>.</p>
-
-</div>
-</div><p>
-<hr><h2>Member Function Documentation</h2>
-<a class="anchor" name="9d4071fb234a0c2e7bf6ea78e723f2f4"></a><!-- doxytag: member="android::CameraHardwareInterface::getPreviewHeap" ref="9d4071fb234a0c2e7bf6ea78e723f2f4" args="() const =0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual sp&lt;IMemoryHeap&gt; android::CameraHardwareInterface::getPreviewHeap           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td> const<code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Return the IMemoryHeap for the preview image heap. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="62def8031dee8bdab7933770708a6312"></a><!-- doxytag: member="android::CameraHardwareInterface::startPreview" ref="62def8031dee8bdab7933770708a6312" args="(preview_callback cb, void *user)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::CameraHardwareInterface::startPreview           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="namespaceandroid.html#d32b08663d42356404e2eb971e271636">preview_callback</a>&nbsp;</td>
-          <td class="paramname"> <em>cb</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">void *&nbsp;</td>
-          <td class="paramname"> <em>user</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Start preview mode. 
-<p>
-When a preview image is available preview_callback is called with the user parameter. The call back parameter may be null. 
-</div>
-</div><p>
-<a class="anchor" name="34faa77065f415b93cb1acf84fc788bf"></a><!-- doxytag: member="android::CameraHardwareInterface::stopPreview" ref="34faa77065f415b93cb1acf84fc788bf" args="()=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual void android::CameraHardwareInterface::stopPreview           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Stop a previously started preview. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="0dda73938e9b18326dd48bd721dbd515"></a><!-- doxytag: member="android::CameraHardwareInterface::autoFocus" ref="0dda73938e9b18326dd48bd721dbd515" args="(autofocus_callback, void *user)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::CameraHardwareInterface::autoFocus           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="namespaceandroid.html#4dca8d8b824ca9a684358133da0ec8f2">autofocus_callback</a>&nbsp;</td>
-          <td class="paramname">, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">void *&nbsp;</td>
-          <td class="paramname"> <em>user</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Start auto focus, the callback routine is called once when focusing is complete. 
-<p>
-<a class="el" href="classandroid_1_1_camera_hardware_interface.html#0dda73938e9b18326dd48bd721dbd515" title="Start auto focus, the callback routine is called once when focusing is complete.">autoFocus()</a> will be called again if another auto focus is needed. 
-</div>
-</div><p>
-<a class="anchor" name="2aedf65cad695ce439029f37a7cb66c4"></a><!-- doxytag: member="android::CameraHardwareInterface::takePicture" ref="2aedf65cad695ce439029f37a7cb66c4" args="(shutter_callback, raw_callback, jpeg_callback, void *user)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::CameraHardwareInterface::takePicture           </td>
-          <td>(</td>
-          <td class="paramtype"><a class="el" href="namespaceandroid.html#04c83209c2627e2d303320712ca9ee65">shutter_callback</a>&nbsp;</td>
-          <td class="paramname">, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="namespaceandroid.html#a97926709e452d66360cb9b24736969e">raw_callback</a>&nbsp;</td>
-          <td class="paramname">, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype"><a class="el" href="namespaceandroid.html#c21980d4be1e0cc458399ecf5374d473">jpeg_callback</a>&nbsp;</td>
-          <td class="paramname">, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">void *&nbsp;</td>
-          <td class="paramname"> <em>user</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Take a picture. 
-<p>
-The raw_callback is called when the uncompressed image is available. The jpeg_callback is called when the compressed image is available. These call backs may be null. The user parameter is passed to each of the call back routines. 
-</div>
-</div><p>
-<a class="anchor" name="da8faf376215a605357d26afa1b79386"></a><!-- doxytag: member="android::CameraHardwareInterface::cancelPicture" ref="da8faf376215a605357d26afa1b79386" args="(bool cancel_shutter, bool cancel_raw, bool cancel_jpeg)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::CameraHardwareInterface::cancelPicture           </td>
-          <td>(</td>
-          <td class="paramtype">bool&nbsp;</td>
-          <td class="paramname"> <em>cancel_shutter</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">bool&nbsp;</td>
-          <td class="paramname"> <em>cancel_raw</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">bool&nbsp;</td>
-          <td class="paramname"> <em>cancel_jpeg</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Cancel a picture that was started with takePicture. 
-<p>
-You may cancel any of the shutter, raw, or jpeg callbacks. Calling this method when no picture is being taken is a no-op. 
-</div>
-</div><p>
-<a class="anchor" name="82e54ede14bd263274bbc8777bafc384"></a><!-- doxytag: member="android::CameraHardwareInterface::setParameters" ref="82e54ede14bd263274bbc8777bafc384" args="(const CameraParameters &amp;params)=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::CameraHardwareInterface::setParameters           </td>
-          <td>(</td>
-          <td class="paramtype">const CameraParameters &amp;&nbsp;</td>
-          <td class="paramname"> <em>params</em>          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Set the camera parameters. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="4c748a3c0aa3c5f2333e0abcdbeb15cb"></a><!-- doxytag: member="android::CameraHardwareInterface::getParameters" ref="4c748a3c0aa3c5f2333e0abcdbeb15cb" args="() const =0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual CameraParameters android::CameraHardwareInterface::getParameters           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td> const<code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Return the camera parameters. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="df65310b8aa176e0ce5f08b87d6b7eb8"></a><!-- doxytag: member="android::CameraHardwareInterface::release" ref="df65310b8aa176e0ce5f08b87d6b7eb8" args="()=0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual void android::CameraHardwareInterface::release           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td><code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Release the hardware resources owned by this object. 
-<p>
-Note that this is *not* done in the destructor. 
-</div>
-</div><p>
-<a class="anchor" name="06df1bf91b8af07964dca314a6031b32"></a><!-- doxytag: member="android::CameraHardwareInterface::dump" ref="06df1bf91b8af07964dca314a6031b32" args="(int fd, const Vector&lt; String16 &gt; &amp;args) const =0" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">virtual status_t android::CameraHardwareInterface::dump           </td>
-          <td>(</td>
-          <td class="paramtype">int&nbsp;</td>
-          <td class="paramname"> <em>fd</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">const Vector&lt; String16 &gt; &amp;&nbsp;</td>
-          <td class="paramname"> <em>args</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td> const<code> [pure virtual]</code></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Dump state of the camera hardware. 
-<p>
-
-</div>
-</div><p>
-<hr>The documentation for this class was generated from the following file:<ul>
-<li><a class="el" href="_camera_hardware_interface_8h-source.html">CameraHardwareInterface.h</a></ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/doxygen.css b/pdk/docs/doxygen.css
deleted file mode 100755 (executable)
index 22c4843..0000000
+++ /dev/null
@@ -1,473 +0,0 @@
-BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
-       font-family: Geneva, Arial, Helvetica, sans-serif;
-}
-BODY,TD {
-       font-size: 90%;
-}
-H1 {
-       text-align: center;
-       font-size: 160%;
-}
-H2 {
-       font-size: 120%;
-}
-H3 {
-       font-size: 100%;
-}
-CAPTION { 
-       font-weight: bold 
-}
-DIV.qindex {
-       width: 100%;
-       background-color: #e8eef2;
-       border: 1px solid #84b0c7;
-       text-align: center;
-       margin: 2px;
-       padding: 2px;
-       line-height: 140%;
-}
-DIV.navpath {
-       width: 100%;
-       background-color: #e8eef2;
-       border: 1px solid #84b0c7;
-       text-align: center;
-       margin: 2px;
-       padding: 2px;
-       line-height: 140%;
-}
-DIV.navtab {
-       background-color: #e8eef2;
-       border: 1px solid #84b0c7;
-       text-align: center;
-       margin: 2px;
-       margin-right: 15px;
-       padding: 2px;
-}
-TD.navtab {
-       font-size: 70%;
-}
-A.qindex {
-       text-decoration: none;
-       font-weight: bold;
-       color: #1A419D;
-}
-A.qindex:visited {
-       text-decoration: none;
-       font-weight: bold;
-       color: #1A419D
-}
-A.qindex:hover {
-       text-decoration: none;
-       background-color: #ddddff;
-}
-A.qindexHL {
-       text-decoration: none;
-       font-weight: bold;
-       background-color: #6666cc;
-       color: #ffffff;
-       border: 1px double #9295C2;
-}
-A.qindexHL:hover {
-       text-decoration: none;
-       background-color: #6666cc;
-       color: #ffffff;
-}
-A.qindexHL:visited { 
-       text-decoration: none; 
-       background-color: #6666cc; 
-       color: #ffffff 
-}
-A.el { 
-       text-decoration: none; 
-       font-weight: bold 
-}
-A.elRef { 
-       font-weight: bold 
-}
-A.code:link { 
-       text-decoration: none; 
-       font-weight: normal; 
-       color: #0000FF
-}
-A.code:visited { 
-       text-decoration: none; 
-       font-weight: normal; 
-       color: #0000FF
-}
-A.codeRef:link { 
-       font-weight: normal; 
-       color: #0000FF
-}
-A.codeRef:visited { 
-       font-weight: normal; 
-       color: #0000FF
-}
-A:hover { 
-       text-decoration: none;  
-       background-color: #f2f2ff 
-}
-DL.el { 
-       margin-left: -1cm 
-}
-.fragment {
-       font-family: monospace, fixed;
-       font-size: 95%;
-}
-PRE.fragment {
-       border: 1px solid #CCCCCC;
-       background-color: #f5f5f5;
-       margin-top: 4px;
-       margin-bottom: 4px;
-       margin-left: 2px;
-       margin-right: 8px;
-       padding-left: 6px;
-       padding-right: 6px;
-       padding-top: 4px;
-       padding-bottom: 4px;
-}
-DIV.ah { 
-       background-color: black; 
-       font-weight: bold; 
-       color: #ffffff; 
-       margin-bottom: 3px; 
-       margin-top: 3px 
-}
-
-DIV.groupHeader {
-       margin-left: 16px;
-       margin-top: 12px;
-       margin-bottom: 6px;
-       font-weight: bold;
-}
-DIV.groupText { 
-       margin-left: 16px; 
-       font-style: italic; 
-       font-size: 90% 
-}
-BODY {
-       background: white;
-       color: black;
-       margin-right: 20px;
-       margin-left: 20px;
-}
-TD.indexkey {
-       background-color: #e8eef2;
-       font-weight: bold;
-       padding-right  : 10px;
-       padding-top    : 2px;
-       padding-left   : 10px;
-       padding-bottom : 2px;
-       margin-left    : 0px;
-       margin-right   : 0px;
-       margin-top     : 2px;
-       margin-bottom  : 2px;
-       border: 1px solid #CCCCCC;
-}
-TD.indexvalue {
-       background-color: #e8eef2;
-       font-style: italic;
-       padding-right  : 10px;
-       padding-top    : 2px;
-       padding-left   : 10px;
-       padding-bottom : 2px;
-       margin-left    : 0px;
-       margin-right   : 0px;
-       margin-top     : 2px;
-       margin-bottom  : 2px;
-       border: 1px solid #CCCCCC;
-}
-TR.memlist {
-       background-color: #f0f0f0; 
-}
-P.formulaDsp { 
-       text-align: center; 
-}
-IMG.formulaDsp {
-}
-IMG.formulaInl { 
-       vertical-align: middle; 
-}
-SPAN.keyword       { color: #008000 }
-SPAN.keywordtype   { color: #604020 }
-SPAN.keywordflow   { color: #e08000 }
-SPAN.comment       { color: #800000 }
-SPAN.preprocessor  { color: #806020 }
-SPAN.stringliteral { color: #002080 }
-SPAN.charliteral   { color: #008080 }
-SPAN.vhdldigit     { color: #ff00ff }
-SPAN.vhdlchar      { color: #000000 }
-SPAN.vhdlkeyword   { color: #700070 }
-SPAN.vhdllogic     { color: #ff0000 }
-
-.mdescLeft {
-       padding: 0px 8px 4px 8px;
-       font-size: 80%;
-       font-style: italic;
-       background-color: #FAFAFA;
-       border-top: 1px none #E0E0E0;
-       border-right: 1px none #E0E0E0;
-       border-bottom: 1px none #E0E0E0;
-       border-left: 1px none #E0E0E0;
-       margin: 0px;
-}
-.mdescRight {
-        padding: 0px 8px 4px 8px;
-       font-size: 80%;
-       font-style: italic;
-       background-color: #FAFAFA;
-       border-top: 1px none #E0E0E0;
-       border-right: 1px none #E0E0E0;
-       border-bottom: 1px none #E0E0E0;
-       border-left: 1px none #E0E0E0;
-       margin: 0px;
-}
-.memItemLeft {
-       padding: 1px 0px 0px 8px;
-       margin: 4px;
-       border-top-width: 1px;
-       border-right-width: 1px;
-       border-bottom-width: 1px;
-       border-left-width: 1px;
-       border-top-color: #E0E0E0;
-       border-right-color: #E0E0E0;
-       border-bottom-color: #E0E0E0;
-       border-left-color: #E0E0E0;
-       border-top-style: solid;
-       border-right-style: none;
-       border-bottom-style: none;
-       border-left-style: none;
-       background-color: #FAFAFA;
-       font-size: 80%;
-}
-.memItemRight {
-       padding: 1px 8px 0px 8px;
-       margin: 4px;
-       border-top-width: 1px;
-       border-right-width: 1px;
-       border-bottom-width: 1px;
-       border-left-width: 1px;
-       border-top-color: #E0E0E0;
-       border-right-color: #E0E0E0;
-       border-bottom-color: #E0E0E0;
-       border-left-color: #E0E0E0;
-       border-top-style: solid;
-       border-right-style: none;
-       border-bottom-style: none;
-       border-left-style: none;
-       background-color: #FAFAFA;
-       font-size: 80%;
-}
-.memTemplItemLeft {
-       padding: 1px 0px 0px 8px;
-       margin: 4px;
-       border-top-width: 1px;
-       border-right-width: 1px;
-       border-bottom-width: 1px;
-       border-left-width: 1px;
-       border-top-color: #E0E0E0;
-       border-right-color: #E0E0E0;
-       border-bottom-color: #E0E0E0;
-       border-left-color: #E0E0E0;
-       border-top-style: none;
-       border-right-style: none;
-       border-bottom-style: none;
-       border-left-style: none;
-       background-color: #FAFAFA;
-       font-size: 80%;
-}
-.memTemplItemRight {
-       padding: 1px 8px 0px 8px;
-       margin: 4px;
-       border-top-width: 1px;
-       border-right-width: 1px;
-       border-bottom-width: 1px;
-       border-left-width: 1px;
-       border-top-color: #E0E0E0;
-       border-right-color: #E0E0E0;
-       border-bottom-color: #E0E0E0;
-       border-left-color: #E0E0E0;
-       border-top-style: none;
-       border-right-style: none;
-       border-bottom-style: none;
-       border-left-style: none;
-       background-color: #FAFAFA;
-       font-size: 80%;
-}
-.memTemplParams {
-       padding: 1px 0px 0px 8px;
-       margin: 4px;
-       border-top-width: 1px;
-       border-right-width: 1px;
-       border-bottom-width: 1px;
-       border-left-width: 1px;
-       border-top-color: #E0E0E0;
-       border-right-color: #E0E0E0;
-       border-bottom-color: #E0E0E0;
-       border-left-color: #E0E0E0;
-       border-top-style: solid;
-       border-right-style: none;
-       border-bottom-style: none;
-       border-left-style: none;
-       color: #606060;
-       background-color: #FAFAFA;
-       font-size: 80%;
-}
-.search { 
-       color: #003399;
-       font-weight: bold;
-}
-FORM.search {
-       margin-bottom: 0px;
-       margin-top: 0px;
-}
-INPUT.search { 
-       font-size: 75%;
-       color: #000080;
-       font-weight: normal;
-       background-color: #e8eef2;
-}
-TD.tiny { 
-       font-size: 75%;
-}
-a {
-       color: #1A41A8;
-}
-a:visited {
-       color: #2A3798;
-}
-.dirtab { 
-       padding: 4px;
-       border-collapse: collapse;
-       border: 1px solid #84b0c7;
-}
-TH.dirtab { 
-       background: #e8eef2;
-       font-weight: bold;
-}
-HR { 
-       height: 1px;
-       border: none;
-       border-top: 1px solid black;
-}
-
-/* Style for detailed member documentation */
-.memtemplate {
-       font-size: 80%;
-       color: #606060;
-       font-weight: normal;
-       margin-left: 3px;
-} 
-.memnav { 
-       background-color: #e8eef2;
-       border: 1px solid #84b0c7;
-       text-align: center;
-       margin: 2px;
-       margin-right: 15px;
-       padding: 2px;
-}
-.memitem {
-       padding: 4px;
-       background-color: #eef3f5;
-       border-width: 1px;
-       border-style: solid;
-       border-color: #dedeee;
-       -moz-border-radius: 8px 8px 8px 8px;
-}
-.memname {
-       white-space: nowrap;
-       font-weight: bold;
-}
-.memdoc{
-       padding-left: 10px;
-}
-.memproto {
-       background-color: #d5e1e8;
-       width: 100%;
-       border-width: 1px;
-       border-style: solid;
-       border-color: #84b0c7;
-       font-weight: bold;
-       -moz-border-radius: 8px 8px 8px 8px;
-}
-.paramkey {
-       text-align: right;
-}
-.paramtype {
-       white-space: nowrap;
-}
-.paramname {
-       color: #602020;
-       font-style: italic;
-       white-space: nowrap;
-}
-/* End Styling for detailed member documentation */
-
-/* for the tree view */
-.ftvtree {
-       font-family: sans-serif;
-       margin:0.5em;
-}
-/* these are for tree view when used as main index */
-.directory { 
-       font-size: 9pt; 
-       font-weight: bold; 
-}
-.directory h3 { 
-       margin: 0px; 
-       margin-top: 1em; 
-       font-size: 11pt; 
-}
-
-/* The following two styles can be used to replace the root node title */
-/* with an image of your choice.  Simply uncomment the next two styles, */
-/* specify the name of your image and be sure to set 'height' to the */
-/* proper pixel height of your image. */
-
-/* .directory h3.swap { */
-/*     height: 61px; */
-/*     background-repeat: no-repeat; */
-/*     background-image: url("yourimage.gif"); */
-/* } */
-/* .directory h3.swap span { */
-/*     display: none; */
-/* } */
-
-.directory > h3 { 
-       margin-top: 0; 
-}
-.directory p { 
-       margin: 0px; 
-       white-space: nowrap; 
-}
-.directory div { 
-       display: none; 
-       margin: 0px; 
-}
-.directory img { 
-       vertical-align: -30%; 
-}
-/* these are for tree view when not used as main index */
-.directory-alt { 
-       font-size: 100%; 
-       font-weight: bold; 
-}
-.directory-alt h3 { 
-       margin: 0px; 
-       margin-top: 1em; 
-       font-size: 11pt; 
-}
-.directory-alt > h3 { 
-       margin-top: 0; 
-}
-.directory-alt p { 
-       margin: 0px; 
-       white-space: nowrap; 
-}
-.directory-alt div { 
-       display: none; 
-       margin: 0px; 
-}
-.directory-alt img { 
-       vertical-align: -30%; 
-}
-
diff --git a/pdk/docs/doxygen.png b/pdk/docs/doxygen.png
deleted file mode 100755 (executable)
index f0a274b..0000000
Binary files a/pdk/docs/doxygen.png and /dev/null differ
diff --git a/pdk/docs/files.html b/pdk/docs/files.html
deleted file mode 100755 (executable)
index ec75239..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li class="current"><a href="files.html"><span>File&nbsp;List</span></a></li>
-      <li><a href="globals.html"><span>Globals</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>File List</h1>Here is a list of all files with brief descriptions:<table>
-  <tr><td class="indexkey"><a class="el" href="_audio_hardware_interface_8h.html">AudioHardwareInterface.h</a> <a href="_audio_hardware_interface_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><a class="el" href="_camera_hardware_interface_8h.html">CameraHardwareInterface.h</a> <a href="_camera_hardware_interface_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><a class="el" href="gps_8h.html">gps.h</a> <a href="gps_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><a class="el" href="wifi_8h.html">wifi.h</a> <a href="wifi_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
-</table>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/functions.html b/pdk/docs/functions.html
deleted file mode 100755 (executable)
index c31d517..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li class="current"><a href="functions.html"><span>All</span></a></li>
-      <li><a href="functions_func.html"><span>Functions</span></a></li>
-      <li><a href="functions_vars.html"><span>Variables</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="#index_a"><span>a</span></a></li>
-      <li><a href="#index_b"><span>b</span></a></li>
-      <li><a href="#index_c"><span>c</span></a></li>
-      <li><a href="#index_d"><span>d</span></a></li>
-      <li><a href="#index_e"><span>e</span></a></li>
-      <li><a href="#index_f"><span>f</span></a></li>
-      <li><a href="#index_g"><span>g</span></a></li>
-      <li><a href="#index_i"><span>i</span></a></li>
-      <li><a href="#index_l"><span>l</span></a></li>
-      <li><a href="#index_n"><span>n</span></a></li>
-      <li><a href="#index_o"><span>o</span></a></li>
-      <li><a href="#index_p"><span>p</span></a></li>
-      <li><a href="#index_r"><span>r</span></a></li>
-      <li><a href="#index_s"><span>s</span></a></li>
-      <li><a href="#index_t"><span>t</span></a></li>
-      <li><a href="#index_u"><span>u</span></a></li>
-      <li><a href="#index_w"><span>w</span></a></li>
-      <li><a href="#index_~"><span>~</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-Here is a list of all struct and union fields with links to the structures/unions they belong to:
-<p>
-<h3><a class="anchor" name="index_a">- a -</a></h3><ul>
-<li>accuracy
-: <a class="el" href="struct_gps_location.html#801ec0db8ee69fa263a63528876d773b">GpsLocation</a>
-<li>almanac_mask
-: <a class="el" href="struct_gps_sv_status.html#6ed4b741a9882ecc2852e94e8ad60310">GpsSvStatus</a>
-<li>altitude
-: <a class="el" href="struct_gps_location.html#cb3cc5ad378a6a3864e47ae67df38778">GpsLocation</a>
-<li>autoFocus()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#0dda73938e9b18326dd48bd721dbd515">android::CameraHardwareInterface</a>
-<li>azimuth
-: <a class="el" href="struct_gps_sv_info.html#94755ad36e31a012269459d5a4ef0594">GpsSvInfo</a>
-</ul>
-<h3><a class="anchor" name="index_b">- b -</a></h3><ul>
-<li>bearing
-: <a class="el" href="struct_gps_location.html#b71bf9b61cf55f10ffcf34ba1654d082">GpsLocation</a>
-<li>bufferSize()
-: <a class="el" href="classandroid_1_1_audio_stream_in.html#a458f9cde3edde82f256af7eaa7b2ddf">android::AudioStreamIn</a>
-, <a class="el" href="classandroid_1_1_audio_stream_out.html#7b3c5f2ce79b9b6f167408f63d19af0a">android::AudioStreamOut</a>
-</ul>
-<h3><a class="anchor" name="index_c">- c -</a></h3><ul>
-<li>cancelPicture()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#da8faf376215a605357d26afa1b79386">android::CameraHardwareInterface</a>
-<li>channelCount()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#4e880a5379c168e8f68c26827e41275b">android::AudioStreamOut</a>
-, <a class="el" href="classandroid_1_1_audio_stream_in.html#04f84006dd5f2e0a5e512897a039f851">android::AudioStreamIn</a>
-<li>cleanup
-: <a class="el" href="struct_gps_interface.html#2911808e36c70259dc0db162de02dc13">GpsInterface</a>
-<li>create()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#aa5ae45e9ad969fefc494e103cf5068d">android::AudioHardwareInterface</a>
-</ul>
-<h3><a class="anchor" name="index_d">- d -</a></h3><ul>
-<li>delete_aiding_data
-: <a class="el" href="struct_gps_interface.html#a3a9b81a8a719b628ac8049344f50b58">GpsInterface</a>
-<li>doRouting()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#d82c3e4827f275abf28eb872e8751e1f">android::AudioHardwareInterface</a>
-<li>download_request_cb
-: <a class="el" href="struct_gps_xtra_callbacks.html#7e879ba4c3e32c52eaa0fb04fb9c226f">GpsXtraCallbacks</a>
-<li>dump()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#371f198a416cb726804e0f47e8763217">android::AudioHardwareInterface</a>
-, <a class="el" href="classandroid_1_1_audio_stream_in.html#18c3760208bfb99498715a0d4977f675">android::AudioStreamIn</a>
-, <a class="el" href="classandroid_1_1_audio_stream_out.html#97e3cc4610ba40d6c37b3d376a032b98">android::AudioStreamOut</a>
-, <a class="el" href="classandroid_1_1_camera_hardware_interface.html#06df1bf91b8af07964dca314a6031b32">android::CameraHardwareInterface</a>
-<li>dumpState()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#05f035af60e67a22251175b44a089f69">android::AudioHardwareInterface</a>
-</ul>
-<h3><a class="anchor" name="index_e">- e -</a></h3><ul>
-<li>elevation
-: <a class="el" href="struct_gps_sv_info.html#0634009d0476b2f06f27568b0722a04d">GpsSvInfo</a>
-<li>ephemeris_mask
-: <a class="el" href="struct_gps_sv_status.html#4751f70f8e275241dece99db0df4ab5b">GpsSvStatus</a>
-</ul>
-<h3><a class="anchor" name="index_f">- f -</a></h3><ul>
-<li>flags
-: <a class="el" href="struct_gps_location.html#07d55fee34dc28cff50062e9ac42c717">GpsLocation</a>
-<li>format()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#eb2b430bbff4eebd8fb8590507b1dce1">android::AudioStreamOut</a>
-, <a class="el" href="classandroid_1_1_audio_stream_in.html#4ade98c5243b9ed5f3a71a8f36e74b36">android::AudioStreamIn</a>
-<li>frameSize()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#66b7c4bb510db4060adfd03a376897d8">android::AudioStreamOut</a>
-, <a class="el" href="classandroid_1_1_audio_stream_in.html#43d2c6b97806c005f0717a7bb6f7595c">android::AudioStreamIn</a>
-</ul>
-<h3><a class="anchor" name="index_g">- g -</a></h3><ul>
-<li>get_extension
-: <a class="el" href="struct_gps_interface.html#19af32bd9d01ebbcdb196e36514b0e98">GpsInterface</a>
-<li>getInputBufferSize()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#19f68d873b2a6e4c00c017c580170395">android::AudioHardwareInterface</a>
-<li>getMicMute()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#15d3c33d7e3f965dc2588c537f05a133">android::AudioHardwareInterface</a>
-<li>getMode()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#8466c76328a51b8a83da103032abba55">android::AudioHardwareInterface</a>
-<li>getParameters()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#4c748a3c0aa3c5f2333e0abcdbeb15cb">android::CameraHardwareInterface</a>
-<li>getPreviewHeap()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#9d4071fb234a0c2e7bf6ea78e723f2f4">android::CameraHardwareInterface</a>
-<li>getRouting()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#1886de8fff2342ae628dbbbc0c45ba83">android::AudioHardwareInterface</a>
-</ul>
-<h3><a class="anchor" name="index_i">- i -</a></h3><ul>
-<li>init
-: <a class="el" href="struct_gps_interface.html#d5139fa13b75108bdedd8a2717f37135">GpsInterface</a>
-, <a class="el" href="struct_gps_xtra_interface.html#5532e662c68e1d3df7db86570df96bf0">GpsXtraInterface</a>
-<li>initCheck()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#b7e19e09fa6cbc07c127122fa9866c50">android::AudioHardwareInterface</a>
-<li>inject_time
-: <a class="el" href="struct_gps_interface.html#e731891e96a916271a4275eaaea47ad8">GpsInterface</a>
-<li>inject_xtra_data
-: <a class="el" href="struct_gps_xtra_interface.html#2b1962c8a5a2751702937cf469dc7435">GpsXtraInterface</a>
-</ul>
-<h3><a class="anchor" name="index_l">- l -</a></h3><ul>
-<li>latency()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#c698a3d95cf0829dcfe283cd5ea437cb">android::AudioStreamOut</a>
-<li>latitude
-: <a class="el" href="struct_gps_location.html#3a7da06efae47c66428fa2815a3eb4bd">GpsLocation</a>
-<li>location_cb
-: <a class="el" href="struct_gps_callbacks.html#1f59b4f8eeaca50620f94761536dabd3">GpsCallbacks</a>
-<li>longitude
-: <a class="el" href="struct_gps_location.html#3672d2d19087d62d7ea9b0b71418da40">GpsLocation</a>
-</ul>
-<h3><a class="anchor" name="index_n">- n -</a></h3><ul>
-<li>num_svs
-: <a class="el" href="struct_gps_sv_status.html#b90eb63a499039de996c95d98afad545">GpsSvStatus</a>
-</ul>
-<h3><a class="anchor" name="index_o">- o -</a></h3><ul>
-<li>openInputStream()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#efb777d192fcbcd65458fa4f2d976476">android::AudioHardwareInterface</a>
-<li>openOutputStream()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#eda0986e145c8dd68d21cb79051f94f9">android::AudioHardwareInterface</a>
-</ul>
-<h3><a class="anchor" name="index_p">- p -</a></h3><ul>
-<li>prn
-: <a class="el" href="struct_gps_sv_info.html#5c94e86f2efc3ed08fb5a40735a2440b">GpsSvInfo</a>
-</ul>
-<h3><a class="anchor" name="index_r">- r -</a></h3><ul>
-<li>read()
-: <a class="el" href="classandroid_1_1_audio_stream_in.html#7c313cbfbb47dafd90f3225bcd26e592">android::AudioStreamIn</a>
-<li>release()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#df65310b8aa176e0ce5f08b87d6b7eb8">android::CameraHardwareInterface</a>
-</ul>
-<h3><a class="anchor" name="index_s">- s -</a></h3><ul>
-<li>sampleRate()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#6bb028e125d13289f26d3d74f851c921">android::AudioStreamOut</a>
-<li>set_apn
-: <a class="el" href="struct_gps_supl_interface.html#145834775007930d644086393a6b9dce">GpsSuplInterface</a>
-<li>set_fix_frequency
-: <a class="el" href="struct_gps_interface.html#1e727f5862ae7132f12af44ebdfa76b2">GpsInterface</a>
-<li>set_position_mode
-: <a class="el" href="struct_gps_interface.html#924bff47462a773b669d310d87b75734">GpsInterface</a>
-<li>setGain()
-: <a class="el" href="classandroid_1_1_audio_stream_in.html#339822afb3f2f2ac1b4c775d31d12440">android::AudioStreamIn</a>
-<li>setMasterVolume()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#925092e556eb89f304bcebb09f90c9a3">android::AudioHardwareInterface</a>
-<li>setMicMute()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#be35b7cb738531939a3ac9abc5514621">android::AudioHardwareInterface</a>
-<li>setMode()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#aaf2a429c240f00b21836794849b430f">android::AudioHardwareInterface</a>
-<li>setParameter()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#a1b477901df48b3a27103a77e6bb39c8">android::AudioHardwareInterface</a>
-<li>setParameters()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#82e54ede14bd263274bbc8777bafc384">android::CameraHardwareInterface</a>
-<li>setRouting()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#39b2690e19219425b8cff093ef83bfb1">android::AudioHardwareInterface</a>
-<li>setVoiceVolume()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#7b7418072df1eeaacc89cd0c725755f6">android::AudioHardwareInterface</a>
-<li>setVolume()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#e6d301925d193c25561b42239c7f44b6">android::AudioStreamOut</a>
-<li>snr
-: <a class="el" href="struct_gps_sv_info.html#eebf16140beb95390733529bd5e7db58">GpsSvInfo</a>
-<li>speed
-: <a class="el" href="struct_gps_location.html#38ae20b9c5e7be995513dce25ed87016">GpsLocation</a>
-<li>standby()
-: <a class="el" href="classandroid_1_1_audio_stream_in.html#93fab46e8afdbaedd4d20cc6ee2b7c41">android::AudioStreamIn</a>
-, <a class="el" href="classandroid_1_1_audio_hardware_interface.html#61121d365bb4d182bdec2c1b12fb1178">android::AudioHardwareInterface</a>
-<li>start
-: <a class="el" href="struct_gps_interface.html#2b212721e0d160e24944330b2d830790">GpsInterface</a>
-<li>startPreview()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#62def8031dee8bdab7933770708a6312">android::CameraHardwareInterface</a>
-<li>status
-: <a class="el" href="struct_gps_status.html#64c9e8cd609d97533bee5c5e8ca78608">GpsStatus</a>
-<li>status_cb
-: <a class="el" href="struct_gps_callbacks.html#7b15a1bf4f9b989677fef84f4d8141df">GpsCallbacks</a>
-<li>stop
-: <a class="el" href="struct_gps_interface.html#d20b0cfcbf976d8cec17bf4ea0a027f1">GpsInterface</a>
-<li>stopPreview()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#34faa77065f415b93cb1acf84fc788bf">android::CameraHardwareInterface</a>
-<li>sv_list
-: <a class="el" href="struct_gps_sv_status.html#7a3fe2114e7a603b96fd9675adf0c5b5">GpsSvStatus</a>
-<li>sv_status_cb
-: <a class="el" href="struct_gps_callbacks.html#fb34f60ad58e80de5c04790b107bb93d">GpsCallbacks</a>
-</ul>
-<h3><a class="anchor" name="index_t">- t -</a></h3><ul>
-<li>takePicture()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#2aedf65cad695ce439029f37a7cb66c4">android::CameraHardwareInterface</a>
-<li>timestamp
-: <a class="el" href="struct_gps_location.html#3e16861f64869d6f0e15e4300bb2658b">GpsLocation</a>
-</ul>
-<h3><a class="anchor" name="index_u">- u -</a></h3><ul>
-<li>used_in_fix_mask
-: <a class="el" href="struct_gps_sv_status.html#9090a26639d97eec2b59bcd0446659c0">GpsSvStatus</a>
-</ul>
-<h3><a class="anchor" name="index_w">- w -</a></h3><ul>
-<li>write()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#cba177e4a4a35a87ab9f8aa2a9c0e78e">android::AudioStreamOut</a>
-</ul>
-<h3><a class="anchor" name="index_~">- ~ -</a></h3><ul>
-<li>~AudioStreamIn()
-: <a class="el" href="classandroid_1_1_audio_stream_in.html#72067577568bbdd0163c1369fe80f101">android::AudioStreamIn</a>
-<li>~AudioStreamOut()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#09074dbae95b82d4f83c513035a0034f">android::AudioStreamOut</a>
-<li>~CameraHardwareInterface()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#99f4ab74b58cd4b23e0fb00a46a60cb1">android::CameraHardwareInterface</a>
-</ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/functions_func.html b/pdk/docs/functions_func.html
deleted file mode 100755 (executable)
index 2d1c1dc..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="functions.html"><span>All</span></a></li>
-      <li class="current"><a href="functions_func.html"><span>Functions</span></a></li>
-      <li><a href="functions_vars.html"><span>Variables</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="#index_a"><span>a</span></a></li>
-      <li><a href="#index_b"><span>b</span></a></li>
-      <li><a href="#index_c"><span>c</span></a></li>
-      <li><a href="#index_d"><span>d</span></a></li>
-      <li><a href="#index_f"><span>f</span></a></li>
-      <li><a href="#index_g"><span>g</span></a></li>
-      <li><a href="#index_i"><span>i</span></a></li>
-      <li><a href="#index_l"><span>l</span></a></li>
-      <li><a href="#index_o"><span>o</span></a></li>
-      <li><a href="#index_r"><span>r</span></a></li>
-      <li><a href="#index_s"><span>s</span></a></li>
-      <li><a href="#index_t"><span>t</span></a></li>
-      <li><a href="#index_w"><span>w</span></a></li>
-      <li><a href="#index_~"><span>~</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-&nbsp;
-<p>
-<h3><a class="anchor" name="index_a">- a -</a></h3><ul>
-<li>autoFocus()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#0dda73938e9b18326dd48bd721dbd515">android::CameraHardwareInterface</a>
-</ul>
-<h3><a class="anchor" name="index_b">- b -</a></h3><ul>
-<li>bufferSize()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#7b3c5f2ce79b9b6f167408f63d19af0a">android::AudioStreamOut</a>
-, <a class="el" href="classandroid_1_1_audio_stream_in.html#a458f9cde3edde82f256af7eaa7b2ddf">android::AudioStreamIn</a>
-</ul>
-<h3><a class="anchor" name="index_c">- c -</a></h3><ul>
-<li>cancelPicture()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#da8faf376215a605357d26afa1b79386">android::CameraHardwareInterface</a>
-<li>channelCount()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#4e880a5379c168e8f68c26827e41275b">android::AudioStreamOut</a>
-, <a class="el" href="classandroid_1_1_audio_stream_in.html#04f84006dd5f2e0a5e512897a039f851">android::AudioStreamIn</a>
-<li>create()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#aa5ae45e9ad969fefc494e103cf5068d">android::AudioHardwareInterface</a>
-</ul>
-<h3><a class="anchor" name="index_d">- d -</a></h3><ul>
-<li>doRouting()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#d82c3e4827f275abf28eb872e8751e1f">android::AudioHardwareInterface</a>
-<li>dump()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#97e3cc4610ba40d6c37b3d376a032b98">android::AudioStreamOut</a>
-, <a class="el" href="classandroid_1_1_camera_hardware_interface.html#06df1bf91b8af07964dca314a6031b32">android::CameraHardwareInterface</a>
-, <a class="el" href="classandroid_1_1_audio_hardware_interface.html#371f198a416cb726804e0f47e8763217">android::AudioHardwareInterface</a>
-, <a class="el" href="classandroid_1_1_audio_stream_in.html#18c3760208bfb99498715a0d4977f675">android::AudioStreamIn</a>
-<li>dumpState()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#05f035af60e67a22251175b44a089f69">android::AudioHardwareInterface</a>
-</ul>
-<h3><a class="anchor" name="index_f">- f -</a></h3><ul>
-<li>format()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#eb2b430bbff4eebd8fb8590507b1dce1">android::AudioStreamOut</a>
-, <a class="el" href="classandroid_1_1_audio_stream_in.html#4ade98c5243b9ed5f3a71a8f36e74b36">android::AudioStreamIn</a>
-<li>frameSize()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#66b7c4bb510db4060adfd03a376897d8">android::AudioStreamOut</a>
-, <a class="el" href="classandroid_1_1_audio_stream_in.html#43d2c6b97806c005f0717a7bb6f7595c">android::AudioStreamIn</a>
-</ul>
-<h3><a class="anchor" name="index_g">- g -</a></h3><ul>
-<li>getInputBufferSize()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#19f68d873b2a6e4c00c017c580170395">android::AudioHardwareInterface</a>
-<li>getMicMute()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#15d3c33d7e3f965dc2588c537f05a133">android::AudioHardwareInterface</a>
-<li>getMode()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#8466c76328a51b8a83da103032abba55">android::AudioHardwareInterface</a>
-<li>getParameters()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#4c748a3c0aa3c5f2333e0abcdbeb15cb">android::CameraHardwareInterface</a>
-<li>getPreviewHeap()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#9d4071fb234a0c2e7bf6ea78e723f2f4">android::CameraHardwareInterface</a>
-<li>getRouting()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#1886de8fff2342ae628dbbbc0c45ba83">android::AudioHardwareInterface</a>
-</ul>
-<h3><a class="anchor" name="index_i">- i -</a></h3><ul>
-<li>initCheck()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#b7e19e09fa6cbc07c127122fa9866c50">android::AudioHardwareInterface</a>
-</ul>
-<h3><a class="anchor" name="index_l">- l -</a></h3><ul>
-<li>latency()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#c698a3d95cf0829dcfe283cd5ea437cb">android::AudioStreamOut</a>
-</ul>
-<h3><a class="anchor" name="index_o">- o -</a></h3><ul>
-<li>openInputStream()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#efb777d192fcbcd65458fa4f2d976476">android::AudioHardwareInterface</a>
-<li>openOutputStream()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#eda0986e145c8dd68d21cb79051f94f9">android::AudioHardwareInterface</a>
-</ul>
-<h3><a class="anchor" name="index_r">- r -</a></h3><ul>
-<li>read()
-: <a class="el" href="classandroid_1_1_audio_stream_in.html#7c313cbfbb47dafd90f3225bcd26e592">android::AudioStreamIn</a>
-<li>release()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#df65310b8aa176e0ce5f08b87d6b7eb8">android::CameraHardwareInterface</a>
-</ul>
-<h3><a class="anchor" name="index_s">- s -</a></h3><ul>
-<li>sampleRate()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#6bb028e125d13289f26d3d74f851c921">android::AudioStreamOut</a>
-<li>setGain()
-: <a class="el" href="classandroid_1_1_audio_stream_in.html#339822afb3f2f2ac1b4c775d31d12440">android::AudioStreamIn</a>
-<li>setMasterVolume()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#925092e556eb89f304bcebb09f90c9a3">android::AudioHardwareInterface</a>
-<li>setMicMute()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#be35b7cb738531939a3ac9abc5514621">android::AudioHardwareInterface</a>
-<li>setMode()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#aaf2a429c240f00b21836794849b430f">android::AudioHardwareInterface</a>
-<li>setParameter()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#a1b477901df48b3a27103a77e6bb39c8">android::AudioHardwareInterface</a>
-<li>setParameters()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#82e54ede14bd263274bbc8777bafc384">android::CameraHardwareInterface</a>
-<li>setRouting()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#39b2690e19219425b8cff093ef83bfb1">android::AudioHardwareInterface</a>
-<li>setVoiceVolume()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#7b7418072df1eeaacc89cd0c725755f6">android::AudioHardwareInterface</a>
-<li>setVolume()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#e6d301925d193c25561b42239c7f44b6">android::AudioStreamOut</a>
-<li>standby()
-: <a class="el" href="classandroid_1_1_audio_hardware_interface.html#61121d365bb4d182bdec2c1b12fb1178">android::AudioHardwareInterface</a>
-, <a class="el" href="classandroid_1_1_audio_stream_in.html#93fab46e8afdbaedd4d20cc6ee2b7c41">android::AudioStreamIn</a>
-<li>startPreview()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#62def8031dee8bdab7933770708a6312">android::CameraHardwareInterface</a>
-<li>stopPreview()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#34faa77065f415b93cb1acf84fc788bf">android::CameraHardwareInterface</a>
-</ul>
-<h3><a class="anchor" name="index_t">- t -</a></h3><ul>
-<li>takePicture()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#2aedf65cad695ce439029f37a7cb66c4">android::CameraHardwareInterface</a>
-</ul>
-<h3><a class="anchor" name="index_w">- w -</a></h3><ul>
-<li>write()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#cba177e4a4a35a87ab9f8aa2a9c0e78e">android::AudioStreamOut</a>
-</ul>
-<h3><a class="anchor" name="index_~">- ~ -</a></h3><ul>
-<li>~AudioStreamIn()
-: <a class="el" href="classandroid_1_1_audio_stream_in.html#72067577568bbdd0163c1369fe80f101">android::AudioStreamIn</a>
-<li>~AudioStreamOut()
-: <a class="el" href="classandroid_1_1_audio_stream_out.html#09074dbae95b82d4f83c513035a0034f">android::AudioStreamOut</a>
-<li>~CameraHardwareInterface()
-: <a class="el" href="classandroid_1_1_camera_hardware_interface.html#99f4ab74b58cd4b23e0fb00a46a60cb1">android::CameraHardwareInterface</a>
-</ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/functions_vars.html b/pdk/docs/functions_vars.html
deleted file mode 100755 (executable)
index 6d4b718..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="functions.html"><span>All</span></a></li>
-      <li><a href="functions_func.html"><span>Functions</span></a></li>
-      <li class="current"><a href="functions_vars.html"><span>Variables</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="#index_a"><span>a</span></a></li>
-      <li><a href="#index_b"><span>b</span></a></li>
-      <li><a href="#index_c"><span>c</span></a></li>
-      <li><a href="#index_d"><span>d</span></a></li>
-      <li><a href="#index_e"><span>e</span></a></li>
-      <li><a href="#index_f"><span>f</span></a></li>
-      <li><a href="#index_g"><span>g</span></a></li>
-      <li><a href="#index_i"><span>i</span></a></li>
-      <li><a href="#index_l"><span>l</span></a></li>
-      <li><a href="#index_n"><span>n</span></a></li>
-      <li><a href="#index_p"><span>p</span></a></li>
-      <li><a href="#index_s"><span>s</span></a></li>
-      <li><a href="#index_t"><span>t</span></a></li>
-      <li><a href="#index_u"><span>u</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-&nbsp;
-<p>
-<h3><a class="anchor" name="index_a">- a -</a></h3><ul>
-<li>accuracy
-: <a class="el" href="struct_gps_location.html#801ec0db8ee69fa263a63528876d773b">GpsLocation</a>
-<li>almanac_mask
-: <a class="el" href="struct_gps_sv_status.html#6ed4b741a9882ecc2852e94e8ad60310">GpsSvStatus</a>
-<li>altitude
-: <a class="el" href="struct_gps_location.html#cb3cc5ad378a6a3864e47ae67df38778">GpsLocation</a>
-<li>azimuth
-: <a class="el" href="struct_gps_sv_info.html#94755ad36e31a012269459d5a4ef0594">GpsSvInfo</a>
-</ul>
-<h3><a class="anchor" name="index_b">- b -</a></h3><ul>
-<li>bearing
-: <a class="el" href="struct_gps_location.html#b71bf9b61cf55f10ffcf34ba1654d082">GpsLocation</a>
-</ul>
-<h3><a class="anchor" name="index_c">- c -</a></h3><ul>
-<li>cleanup
-: <a class="el" href="struct_gps_interface.html#2911808e36c70259dc0db162de02dc13">GpsInterface</a>
-</ul>
-<h3><a class="anchor" name="index_d">- d -</a></h3><ul>
-<li>delete_aiding_data
-: <a class="el" href="struct_gps_interface.html#a3a9b81a8a719b628ac8049344f50b58">GpsInterface</a>
-<li>download_request_cb
-: <a class="el" href="struct_gps_xtra_callbacks.html#7e879ba4c3e32c52eaa0fb04fb9c226f">GpsXtraCallbacks</a>
-</ul>
-<h3><a class="anchor" name="index_e">- e -</a></h3><ul>
-<li>elevation
-: <a class="el" href="struct_gps_sv_info.html#0634009d0476b2f06f27568b0722a04d">GpsSvInfo</a>
-<li>ephemeris_mask
-: <a class="el" href="struct_gps_sv_status.html#4751f70f8e275241dece99db0df4ab5b">GpsSvStatus</a>
-</ul>
-<h3><a class="anchor" name="index_f">- f -</a></h3><ul>
-<li>flags
-: <a class="el" href="struct_gps_location.html#07d55fee34dc28cff50062e9ac42c717">GpsLocation</a>
-</ul>
-<h3><a class="anchor" name="index_g">- g -</a></h3><ul>
-<li>get_extension
-: <a class="el" href="struct_gps_interface.html#19af32bd9d01ebbcdb196e36514b0e98">GpsInterface</a>
-</ul>
-<h3><a class="anchor" name="index_i">- i -</a></h3><ul>
-<li>init
-: <a class="el" href="struct_gps_interface.html#d5139fa13b75108bdedd8a2717f37135">GpsInterface</a>
-, <a class="el" href="struct_gps_xtra_interface.html#5532e662c68e1d3df7db86570df96bf0">GpsXtraInterface</a>
-<li>inject_time
-: <a class="el" href="struct_gps_interface.html#e731891e96a916271a4275eaaea47ad8">GpsInterface</a>
-<li>inject_xtra_data
-: <a class="el" href="struct_gps_xtra_interface.html#2b1962c8a5a2751702937cf469dc7435">GpsXtraInterface</a>
-</ul>
-<h3><a class="anchor" name="index_l">- l -</a></h3><ul>
-<li>latitude
-: <a class="el" href="struct_gps_location.html#3a7da06efae47c66428fa2815a3eb4bd">GpsLocation</a>
-<li>location_cb
-: <a class="el" href="struct_gps_callbacks.html#1f59b4f8eeaca50620f94761536dabd3">GpsCallbacks</a>
-<li>longitude
-: <a class="el" href="struct_gps_location.html#3672d2d19087d62d7ea9b0b71418da40">GpsLocation</a>
-</ul>
-<h3><a class="anchor" name="index_n">- n -</a></h3><ul>
-<li>num_svs
-: <a class="el" href="struct_gps_sv_status.html#b90eb63a499039de996c95d98afad545">GpsSvStatus</a>
-</ul>
-<h3><a class="anchor" name="index_p">- p -</a></h3><ul>
-<li>prn
-: <a class="el" href="struct_gps_sv_info.html#5c94e86f2efc3ed08fb5a40735a2440b">GpsSvInfo</a>
-</ul>
-<h3><a class="anchor" name="index_s">- s -</a></h3><ul>
-<li>set_apn
-: <a class="el" href="struct_gps_supl_interface.html#145834775007930d644086393a6b9dce">GpsSuplInterface</a>
-<li>set_fix_frequency
-: <a class="el" href="struct_gps_interface.html#1e727f5862ae7132f12af44ebdfa76b2">GpsInterface</a>
-<li>set_position_mode
-: <a class="el" href="struct_gps_interface.html#924bff47462a773b669d310d87b75734">GpsInterface</a>
-<li>snr
-: <a class="el" href="struct_gps_sv_info.html#eebf16140beb95390733529bd5e7db58">GpsSvInfo</a>
-<li>speed
-: <a class="el" href="struct_gps_location.html#38ae20b9c5e7be995513dce25ed87016">GpsLocation</a>
-<li>start
-: <a class="el" href="struct_gps_interface.html#2b212721e0d160e24944330b2d830790">GpsInterface</a>
-<li>status
-: <a class="el" href="struct_gps_status.html#64c9e8cd609d97533bee5c5e8ca78608">GpsStatus</a>
-<li>status_cb
-: <a class="el" href="struct_gps_callbacks.html#7b15a1bf4f9b989677fef84f4d8141df">GpsCallbacks</a>
-<li>stop
-: <a class="el" href="struct_gps_interface.html#d20b0cfcbf976d8cec17bf4ea0a027f1">GpsInterface</a>
-<li>sv_list
-: <a class="el" href="struct_gps_sv_status.html#7a3fe2114e7a603b96fd9675adf0c5b5">GpsSvStatus</a>
-<li>sv_status_cb
-: <a class="el" href="struct_gps_callbacks.html#fb34f60ad58e80de5c04790b107bb93d">GpsCallbacks</a>
-</ul>
-<h3><a class="anchor" name="index_t">- t -</a></h3><ul>
-<li>timestamp
-: <a class="el" href="struct_gps_location.html#3e16861f64869d6f0e15e4300bb2658b">GpsLocation</a>
-</ul>
-<h3><a class="anchor" name="index_u">- u -</a></h3><ul>
-<li>used_in_fix_mask
-: <a class="el" href="struct_gps_sv_status.html#9090a26639d97eec2b59bcd0446659c0">GpsSvStatus</a>
-</ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/globals.html b/pdk/docs/globals.html
deleted file mode 100755 (executable)
index 2ae967f..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
-      <li class="current"><a href="globals.html"><span>Globals</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li class="current"><a href="globals.html"><span>All</span></a></li>
-      <li><a href="globals_func.html"><span>Functions</span></a></li>
-      <li><a href="globals_type.html"><span>Typedefs</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
-<p>
-<ul>
-<li>do_dhcp_request()
-: <a class="el" href="wifi_8h.html#c6876a5403aaeee922d000043a47b25a">wifi.h</a>
-<li>get_dhcp_error_string()
-: <a class="el" href="wifi_8h.html#8f25ea8ec313efb45affe65fd7c108ee">wifi.h</a>
-<li>gps_get_hardware_interface()
-: <a class="el" href="gps_8h.html#6d15bb02f1f91dd760e3e172bd7711a1">gps.h</a>
-<li>gps_get_interface()
-: <a class="el" href="gps_8h.html#b582931ddf4bafa2cc5044963be66987">gps.h</a>
-<li>gps_get_qemu_interface()
-: <a class="el" href="gps_8h.html#f73f4a220fb97545e81d82fbff54b47e">gps.h</a>
-<li>gps_location_callback
-: <a class="el" href="gps_8h.html#88f19d3da70dc0e951b51091ce0631ae">gps.h</a>
-<li>gps_status_callback
-: <a class="el" href="gps_8h.html#1d9ef60ab0b91f7c106867a6aa1e4412">gps.h</a>
-<li>gps_sv_status_callback
-: <a class="el" href="gps_8h.html#67274e784834c6c2547f4b5344fc4ea9">gps.h</a>
-<li>gps_xtra_download_request
-: <a class="el" href="gps_8h.html#08fcfb3f85c2ac3008c9c73cf9136515">gps.h</a>
-<li>GpsAidingData
-: <a class="el" href="gps_8h.html#93f0283aeabd20211499991a29db7377">gps.h</a>
-<li>GpsLocationFlags
-: <a class="el" href="gps_8h.html#4ae31616d5e232ad7a346a2d4e723e31">gps.h</a>
-<li>GpsPositionMode
-: <a class="el" href="gps_8h.html#2461a6f0dd56a1f7dc94e93207a1f740">gps.h</a>
-<li>GpsStatusValue
-: <a class="el" href="gps_8h.html#de8fa0020d3aa1748a8e26759b768ec5">gps.h</a>
-<li>GpsUtcTime
-: <a class="el" href="gps_8h.html#f2b0ea531a44c010f81a4abd27504c15">gps.h</a>
-<li>wifi_close_supplicant_connection()
-: <a class="el" href="wifi_8h.html#a3f8c99b26cfd95e90012cae63ec4826">wifi.h</a>
-<li>wifi_command()
-: <a class="el" href="wifi_8h.html#b84f92e035b7bc6a5d669b3738c93e32">wifi.h</a>
-<li>wifi_connect_to_supplicant()
-: <a class="el" href="wifi_8h.html#d81473c3f314ba581e88bb9f1ae37904">wifi.h</a>
-<li>wifi_load_driver()
-: <a class="el" href="wifi_8h.html#ef0be2b5d0603acb8e0ab99051969bb7">wifi.h</a>
-<li>wifi_start_supplicant()
-: <a class="el" href="wifi_8h.html#3372e235a7899484912d7f85887e8a47">wifi.h</a>
-<li>wifi_stop_supplicant()
-: <a class="el" href="wifi_8h.html#08b97e58f2909489f1f3d59fb31f2c19">wifi.h</a>
-<li>wifi_unload_driver()
-: <a class="el" href="wifi_8h.html#a0c054da650a0162e40f327eb05679cb">wifi.h</a>
-<li>wifi_wait_for_event()
-: <a class="el" href="wifi_8h.html#656495e1beea1e39a144cdff776cdb96">wifi.h</a>
-</ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/globals_func.html b/pdk/docs/globals_func.html
deleted file mode 100755 (executable)
index 436cbf7..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
-      <li class="current"><a href="globals.html"><span>Globals</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="globals.html"><span>All</span></a></li>
-      <li class="current"><a href="globals_func.html"><span>Functions</span></a></li>
-      <li><a href="globals_type.html"><span>Typedefs</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-&nbsp;
-<p>
-<ul>
-<li>do_dhcp_request()
-: <a class="el" href="wifi_8h.html#c6876a5403aaeee922d000043a47b25a">wifi.h</a>
-<li>get_dhcp_error_string()
-: <a class="el" href="wifi_8h.html#8f25ea8ec313efb45affe65fd7c108ee">wifi.h</a>
-<li>gps_get_hardware_interface()
-: <a class="el" href="gps_8h.html#6d15bb02f1f91dd760e3e172bd7711a1">gps.h</a>
-<li>gps_get_interface()
-: <a class="el" href="gps_8h.html#b582931ddf4bafa2cc5044963be66987">gps.h</a>
-<li>gps_get_qemu_interface()
-: <a class="el" href="gps_8h.html#f73f4a220fb97545e81d82fbff54b47e">gps.h</a>
-<li>wifi_close_supplicant_connection()
-: <a class="el" href="wifi_8h.html#a3f8c99b26cfd95e90012cae63ec4826">wifi.h</a>
-<li>wifi_command()
-: <a class="el" href="wifi_8h.html#b84f92e035b7bc6a5d669b3738c93e32">wifi.h</a>
-<li>wifi_connect_to_supplicant()
-: <a class="el" href="wifi_8h.html#d81473c3f314ba581e88bb9f1ae37904">wifi.h</a>
-<li>wifi_load_driver()
-: <a class="el" href="wifi_8h.html#ef0be2b5d0603acb8e0ab99051969bb7">wifi.h</a>
-<li>wifi_start_supplicant()
-: <a class="el" href="wifi_8h.html#3372e235a7899484912d7f85887e8a47">wifi.h</a>
-<li>wifi_stop_supplicant()
-: <a class="el" href="wifi_8h.html#08b97e58f2909489f1f3d59fb31f2c19">wifi.h</a>
-<li>wifi_unload_driver()
-: <a class="el" href="wifi_8h.html#a0c054da650a0162e40f327eb05679cb">wifi.h</a>
-<li>wifi_wait_for_event()
-: <a class="el" href="wifi_8h.html#656495e1beea1e39a144cdff776cdb96">wifi.h</a>
-</ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/globals_type.html b/pdk/docs/globals_type.html
deleted file mode 100755 (executable)
index ec0afbc..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
-      <li class="current"><a href="globals.html"><span>Globals</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="globals.html"><span>All</span></a></li>
-      <li><a href="globals_func.html"><span>Functions</span></a></li>
-      <li class="current"><a href="globals_type.html"><span>Typedefs</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-&nbsp;
-<p>
-<ul>
-<li>gps_location_callback
-: <a class="el" href="gps_8h.html#88f19d3da70dc0e951b51091ce0631ae">gps.h</a>
-<li>gps_status_callback
-: <a class="el" href="gps_8h.html#1d9ef60ab0b91f7c106867a6aa1e4412">gps.h</a>
-<li>gps_sv_status_callback
-: <a class="el" href="gps_8h.html#67274e784834c6c2547f4b5344fc4ea9">gps.h</a>
-<li>gps_xtra_download_request
-: <a class="el" href="gps_8h.html#08fcfb3f85c2ac3008c9c73cf9136515">gps.h</a>
-<li>GpsAidingData
-: <a class="el" href="gps_8h.html#93f0283aeabd20211499991a29db7377">gps.h</a>
-<li>GpsLocationFlags
-: <a class="el" href="gps_8h.html#4ae31616d5e232ad7a346a2d4e723e31">gps.h</a>
-<li>GpsPositionMode
-: <a class="el" href="gps_8h.html#2461a6f0dd56a1f7dc94e93207a1f740">gps.h</a>
-<li>GpsStatusValue
-: <a class="el" href="gps_8h.html#de8fa0020d3aa1748a8e26759b768ec5">gps.h</a>
-<li>GpsUtcTime
-: <a class="el" href="gps_8h.html#f2b0ea531a44c010f81a4abd27504c15">gps.h</a>
-</ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/gps_8h-source.html b/pdk/docs/gps_8h-source.html
deleted file mode 100755 (executable)
index dbf6a16..0000000
+++ /dev/null
@@ -1,298 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-</div>
-<h1>gps.h</h1><a href="gps_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2008 The Android Open Source Project</span>
-<a name="l00003"></a>00003 <span class="comment"> *</span>
-<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
-<a name="l00005"></a>00005 <span class="comment"> * you may not use this file except in compliance with the License.</span>
-<a name="l00006"></a>00006 <span class="comment"> * You may obtain a copy of the License at</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> *      http://www.apache.org/licenses/LICENSE-2.0</span>
-<a name="l00009"></a>00009 <span class="comment"> *</span>
-<a name="l00010"></a>00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
-<a name="l00011"></a>00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
-<a name="l00012"></a>00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
-<a name="l00013"></a>00013 <span class="comment"> * See the License for the specific language governing permissions and</span>
-<a name="l00014"></a>00014 <span class="comment"> * limitations under the License.</span>
-<a name="l00015"></a>00015 <span class="comment"> */</span>
-<a name="l00016"></a>00016 
-<a name="l00017"></a>00017 <span class="preprocessor">#ifndef _HARDWARE_GPS_H</span>
-<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define _HARDWARE_GPS_H</span>
-<a name="l00019"></a>00019 <span class="preprocessor"></span>
-<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
-<a name="l00021"></a>00021 
-<a name="l00022"></a>00022 <span class="preprocessor">#if __cplusplus</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
-<a name="l00024"></a>00024 <span class="preprocessor">#endif</span>
-<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="comment"></span>
-<a name="l00026"></a>00026 <span class="comment">/** Milliseconds since January 1, 1970 */</span>
-<a name="l00027"></a><a class="code" href="gps_8h.html#f2b0ea531a44c010f81a4abd27504c15">00027</a> <span class="keyword">typedef</span> int64_t <a class="code" href="gps_8h.html#f2b0ea531a44c010f81a4abd27504c15" title="Milliseconds since January 1, 1970.">GpsUtcTime</a>;
-<a name="l00028"></a>00028 <span class="comment"></span>
-<a name="l00029"></a>00029 <span class="comment">/** Maximum number of SVs for gps_sv_status_callback(). */</span>
-<a name="l00030"></a>00030 <span class="preprocessor">#define GPS_MAX_SVS 32</span>
-<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="comment"></span>
-<a name="l00032"></a>00032 <span class="comment">/** Requested mode for GPS operation. */</span>
-<a name="l00033"></a><a class="code" href="gps_8h.html#2461a6f0dd56a1f7dc94e93207a1f740">00033</a> <span class="keyword">typedef</span> uint16_t <a class="code" href="gps_8h.html#2461a6f0dd56a1f7dc94e93207a1f740" title="Requested mode for GPS operation.">GpsPositionMode</a>;
-<a name="l00034"></a>00034 <span class="comment">// IMPORTANT: Note that the following values must match</span>
-<a name="l00035"></a>00035 <span class="comment">// constants in GpsLocationProvider.java.</span><span class="comment"></span>
-<a name="l00036"></a>00036 <span class="comment">/** Mode for running GPS standalone (no assistance). */</span>
-<a name="l00037"></a>00037 <span class="preprocessor">#define GPS_POSITION_MODE_STANDALONE    0</span>
-<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="comment">/** SUPL MS-Based mode. */</span>
-<a name="l00039"></a>00039 <span class="preprocessor">#define GPS_POSITION_MODE_MS_BASED      1</span>
-<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="comment">/** SUPL MS-Assisted mode. */</span>
-<a name="l00041"></a>00041 <span class="preprocessor">#define GPS_POSITION_MODE_MS_ASSISTED   2</span>
-<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="comment"></span>
-<a name="l00043"></a>00043 <span class="comment">/** GPS status event values. */</span>
-<a name="l00044"></a><a class="code" href="gps_8h.html#de8fa0020d3aa1748a8e26759b768ec5">00044</a> <span class="keyword">typedef</span> uint16_t <a class="code" href="gps_8h.html#de8fa0020d3aa1748a8e26759b768ec5" title="GPS status event values.">GpsStatusValue</a>;
-<a name="l00045"></a>00045 <span class="comment">// IMPORTANT: Note that the following values must match</span>
-<a name="l00046"></a>00046 <span class="comment">// constants in GpsLocationProvider.java.</span><span class="comment"></span>
-<a name="l00047"></a>00047 <span class="comment">/** GPS status unknown. */</span>
-<a name="l00048"></a>00048 <span class="preprocessor">#define GPS_STATUS_NONE             0</span>
-<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="comment">/** GPS has begun navigating. */</span>
-<a name="l00050"></a>00050 <span class="preprocessor">#define GPS_STATUS_SESSION_BEGIN    1</span>
-<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="comment">/** GPS has stopped navigating. */</span>
-<a name="l00052"></a>00052 <span class="preprocessor">#define GPS_STATUS_SESSION_END      2</span>
-<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="comment">/** GPS has powered on but is not navigating. */</span>
-<a name="l00054"></a>00054 <span class="preprocessor">#define GPS_STATUS_ENGINE_ON        3</span>
-<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="comment">/** GPS is powered off. */</span>
-<a name="l00056"></a>00056 <span class="preprocessor">#define GPS_STATUS_ENGINE_OFF       4</span>
-<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="comment"></span>
-<a name="l00058"></a>00058 <span class="comment">/** Flags to indicate which values are valid in a GpsLocation. */</span>
-<a name="l00059"></a><a class="code" href="gps_8h.html#4ae31616d5e232ad7a346a2d4e723e31">00059</a> <span class="keyword">typedef</span> uint16_t <a class="code" href="gps_8h.html#4ae31616d5e232ad7a346a2d4e723e31" title="Flags to indicate which values are valid in a GpsLocation.">GpsLocationFlags</a>;
-<a name="l00060"></a>00060 <span class="comment">// IMPORTANT: Note that the following values must match</span>
-<a name="l00061"></a>00061 <span class="comment">// constants in GpsLocationProvider.java.</span><span class="comment"></span>
-<a name="l00062"></a>00062 <span class="comment">/** GpsLocation has valid latitude and longitude. */</span>
-<a name="l00063"></a>00063 <span class="preprocessor">#define GPS_LOCATION_HAS_LAT_LONG   0x0001</span>
-<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="comment">/** GpsLocation has valid altitude. */</span>
-<a name="l00065"></a>00065 <span class="preprocessor">#define GPS_LOCATION_HAS_ALTITUDE   0x0002</span>
-<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="comment">/** GpsLocation has valid speed. */</span>
-<a name="l00067"></a>00067 <span class="preprocessor">#define GPS_LOCATION_HAS_SPEED      0x0004</span>
-<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="comment">/** GpsLocation has valid bearing. */</span>
-<a name="l00069"></a>00069 <span class="preprocessor">#define GPS_LOCATION_HAS_BEARING    0x0008</span>
-<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="comment">/** GpsLocation has valid accuracy. */</span>
-<a name="l00071"></a>00071 <span class="preprocessor">#define GPS_LOCATION_HAS_ACCURACY   0x0010</span>
-<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="comment"></span>
-<a name="l00073"></a>00073 <span class="comment">/** Flags used to specify which aiding data to delete</span>
-<a name="l00074"></a>00074 <span class="comment">    when calling delete_aiding_data(). */</span>
-<a name="l00075"></a><a class="code" href="gps_8h.html#93f0283aeabd20211499991a29db7377">00075</a> <span class="keyword">typedef</span> uint16_t <a class="code" href="gps_8h.html#93f0283aeabd20211499991a29db7377" title="Flags used to specify which aiding data to delete when calling delete_aiding_data()...">GpsAidingData</a>;
-<a name="l00076"></a>00076 <span class="comment">// IMPORTANT: Note that the following values must match</span>
-<a name="l00077"></a>00077 <span class="comment">// constants in GpsLocationProvider.java.</span>
-<a name="l00078"></a>00078 <span class="preprocessor">#define GPS_DELETE_EPHEMERIS        0x0001</span>
-<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#define GPS_DELETE_ALMANAC          0x0002</span>
-<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#define GPS_DELETE_POSITION         0x0004</span>
-<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#define GPS_DELETE_TIME             0x0008</span>
-<a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">#define GPS_DELETE_IONO             0x0010</span>
-<a name="l00083"></a>00083 <span class="preprocessor"></span><span class="preprocessor">#define GPS_DELETE_UTC              0x0020</span>
-<a name="l00084"></a>00084 <span class="preprocessor"></span><span class="preprocessor">#define GPS_DELETE_HEALTH           0x0040</span>
-<a name="l00085"></a>00085 <span class="preprocessor"></span><span class="preprocessor">#define GPS_DELETE_SVDIR            0x0080</span>
-<a name="l00086"></a>00086 <span class="preprocessor"></span><span class="preprocessor">#define GPS_DELETE_SVSTEER          0x0100</span>
-<a name="l00087"></a>00087 <span class="preprocessor"></span><span class="preprocessor">#define GPS_DELETE_SADATA           0x0200</span>
-<a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor">#define GPS_DELETE_RTI              0x0400</span>
-<a name="l00089"></a>00089 <span class="preprocessor"></span><span class="preprocessor">#define GPS_DELETE_CELLDB_INFO      0x8000</span>
-<a name="l00090"></a>00090 <span class="preprocessor"></span><span class="preprocessor">#define GPS_DELETE_ALL              0xFFFF</span>
-<a name="l00091"></a>00091 <span class="preprocessor"></span><span class="comment"></span>
-<a name="l00092"></a>00092 <span class="comment">/**</span>
-<a name="l00093"></a>00093 <span class="comment"> * Name for the GPS XTRA interface.</span>
-<a name="l00094"></a>00094 <span class="comment"> */</span>
-<a name="l00095"></a>00095 <span class="preprocessor">#define GPS_XTRA_INTERFACE      "gps-xtra"</span>
-<a name="l00096"></a>00096 <span class="preprocessor"></span><span class="comment"></span>
-<a name="l00097"></a>00097 <span class="comment">/**</span>
-<a name="l00098"></a>00098 <span class="comment"> * Name for the GPS SUPL interface.</span>
-<a name="l00099"></a>00099 <span class="comment"> */</span>
-<a name="l00100"></a>00100 <span class="preprocessor">#define GPS_SUPL_INTERFACE      "gps-supl"</span>
-<a name="l00101"></a>00101 <span class="preprocessor"></span><span class="comment"></span>
-<a name="l00102"></a>00102 <span class="comment">/** Represents a location. */</span>
-<a name="l00103"></a><a class="code" href="struct_gps_location.html">00103</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{<span class="comment"></span>
-<a name="l00104"></a>00104 <span class="comment">    /** Contains GpsLocationFlags bits. */</span>
-<a name="l00105"></a><a class="code" href="struct_gps_location.html#07d55fee34dc28cff50062e9ac42c717">00105</a>     uint16_t        flags;<span class="comment"></span>
-<a name="l00106"></a>00106 <span class="comment">    /** Represents latitude in degrees. */</span>
-<a name="l00107"></a><a class="code" href="struct_gps_location.html#3a7da06efae47c66428fa2815a3eb4bd">00107</a>     <span class="keywordtype">double</span>          latitude;<span class="comment"></span>
-<a name="l00108"></a>00108 <span class="comment">    /** Represents longitude in degrees. */</span>
-<a name="l00109"></a><a class="code" href="struct_gps_location.html#3672d2d19087d62d7ea9b0b71418da40">00109</a>     <span class="keywordtype">double</span>          longitude;<span class="comment"></span>
-<a name="l00110"></a>00110 <span class="comment">    /** Represents altitude in meters above the WGS 84 reference</span>
-<a name="l00111"></a>00111 <span class="comment">     * ellipsoid. */</span>
-<a name="l00112"></a><a class="code" href="struct_gps_location.html#cb3cc5ad378a6a3864e47ae67df38778">00112</a>     <span class="keywordtype">double</span>          altitude;<span class="comment"></span>
-<a name="l00113"></a>00113 <span class="comment">    /** Represents speed in meters per second. */</span>
-<a name="l00114"></a><a class="code" href="struct_gps_location.html#38ae20b9c5e7be995513dce25ed87016">00114</a>     <span class="keywordtype">float</span>           speed;<span class="comment"></span>
-<a name="l00115"></a>00115 <span class="comment">    /** Represents heading in degrees. */</span>
-<a name="l00116"></a><a class="code" href="struct_gps_location.html#b71bf9b61cf55f10ffcf34ba1654d082">00116</a>     <span class="keywordtype">float</span>           bearing;<span class="comment"></span>
-<a name="l00117"></a>00117 <span class="comment">    /** Represents expected accuracy in meters. */</span>
-<a name="l00118"></a><a class="code" href="struct_gps_location.html#801ec0db8ee69fa263a63528876d773b">00118</a>     <span class="keywordtype">float</span>           accuracy;<span class="comment"></span>
-<a name="l00119"></a>00119 <span class="comment">    /** Timestamp for the location fix. */</span>
-<a name="l00120"></a><a class="code" href="struct_gps_location.html#3e16861f64869d6f0e15e4300bb2658b">00120</a>     GpsUtcTime      timestamp;
-<a name="l00121"></a>00121 } <a class="code" href="struct_gps_location.html" title="Represents a location.">GpsLocation</a>;
-<a name="l00122"></a>00122 <span class="comment"></span>
-<a name="l00123"></a>00123 <span class="comment">/** Represents the status. */</span>
-<a name="l00124"></a><a class="code" href="struct_gps_status.html">00124</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00125"></a><a class="code" href="struct_gps_status.html#64c9e8cd609d97533bee5c5e8ca78608">00125</a>     GpsStatusValue status;
-<a name="l00126"></a>00126 } <a class="code" href="struct_gps_status.html" title="Represents the status.">GpsStatus</a>;
-<a name="l00127"></a>00127 <span class="comment"></span>
-<a name="l00128"></a>00128 <span class="comment">/** Represents SV information. */</span>
-<a name="l00129"></a><a class="code" href="struct_gps_sv_info.html">00129</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{<span class="comment"></span>
-<a name="l00130"></a>00130 <span class="comment">    /** Pseudo-random number for the SV. */</span>
-<a name="l00131"></a><a class="code" href="struct_gps_sv_info.html#5c94e86f2efc3ed08fb5a40735a2440b">00131</a>     <span class="keywordtype">int</span>     prn;<span class="comment"></span>
-<a name="l00132"></a>00132 <span class="comment">    /** Signal to noise ratio. */</span>
-<a name="l00133"></a><a class="code" href="struct_gps_sv_info.html#eebf16140beb95390733529bd5e7db58">00133</a>     <span class="keywordtype">float</span>   snr;<span class="comment"></span>
-<a name="l00134"></a>00134 <span class="comment">    /** Elevation of SV in degrees. */</span>
-<a name="l00135"></a><a class="code" href="struct_gps_sv_info.html#0634009d0476b2f06f27568b0722a04d">00135</a>     <span class="keywordtype">float</span>   elevation;<span class="comment"></span>
-<a name="l00136"></a>00136 <span class="comment">    /** Azimuth of SV in degrees. */</span>
-<a name="l00137"></a><a class="code" href="struct_gps_sv_info.html#94755ad36e31a012269459d5a4ef0594">00137</a>     <span class="keywordtype">float</span>   azimuth;
-<a name="l00138"></a>00138 } <a class="code" href="struct_gps_sv_info.html" title="Represents SV information.">GpsSvInfo</a>;
-<a name="l00139"></a>00139 <span class="comment"></span>
-<a name="l00140"></a>00140 <span class="comment">/** Represents SV status. */</span>
-<a name="l00141"></a><a class="code" href="struct_gps_sv_status.html">00141</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{<span class="comment"></span>
-<a name="l00142"></a>00142 <span class="comment">        /** Number of SVs currently visible. */</span>
-<a name="l00143"></a><a class="code" href="struct_gps_sv_status.html#b90eb63a499039de996c95d98afad545">00143</a>         <span class="keywordtype">int</span>         num_svs;
-<a name="l00144"></a>00144 <span class="comment"></span>
-<a name="l00145"></a>00145 <span class="comment">        /** Contains an array of SV information. */</span>
-<a name="l00146"></a><a class="code" href="struct_gps_sv_status.html#7a3fe2114e7a603b96fd9675adf0c5b5">00146</a>         <a class="code" href="struct_gps_sv_info.html" title="Represents SV information.">GpsSvInfo</a>   sv_list[GPS_MAX_SVS];
-<a name="l00147"></a>00147 <span class="comment"></span>
-<a name="l00148"></a>00148 <span class="comment">        /** Represents a bit mask indicating which SVs</span>
-<a name="l00149"></a>00149 <span class="comment">         * have ephemeris data.</span>
-<a name="l00150"></a>00150 <span class="comment">         */</span>
-<a name="l00151"></a><a class="code" href="struct_gps_sv_status.html#4751f70f8e275241dece99db0df4ab5b">00151</a>         uint32_t    ephemeris_mask;
-<a name="l00152"></a>00152 <span class="comment"></span>
-<a name="l00153"></a>00153 <span class="comment">        /** Represents a bit mask indicating which SVs</span>
-<a name="l00154"></a>00154 <span class="comment">         * have almanac data.</span>
-<a name="l00155"></a>00155 <span class="comment">         */</span>
-<a name="l00156"></a><a class="code" href="struct_gps_sv_status.html#6ed4b741a9882ecc2852e94e8ad60310">00156</a>         uint32_t    almanac_mask;
-<a name="l00157"></a>00157 <span class="comment"></span>
-<a name="l00158"></a>00158 <span class="comment">        /**</span>
-<a name="l00159"></a>00159 <span class="comment">         * Represents a bit mask indicating which SVs</span>
-<a name="l00160"></a>00160 <span class="comment">         * were used for computing the most recent position fix.</span>
-<a name="l00161"></a>00161 <span class="comment">         */</span>
-<a name="l00162"></a><a class="code" href="struct_gps_sv_status.html#9090a26639d97eec2b59bcd0446659c0">00162</a>         uint32_t    used_in_fix_mask;
-<a name="l00163"></a>00163 } <a class="code" href="struct_gps_sv_status.html" title="Represents SV status.">GpsSvStatus</a>;
-<a name="l00164"></a>00164 <span class="comment"></span>
-<a name="l00165"></a>00165 <span class="comment">/** Callback with location information. */</span>
-<a name="l00166"></a><a class="code" href="gps_8h.html#88f19d3da70dc0e951b51091ce0631ae">00166</a> <span class="keyword">typedef</span> void (* <a class="code" href="gps_8h.html#88f19d3da70dc0e951b51091ce0631ae" title="Callback with location information.">gps_location_callback</a>)(<a class="code" href="struct_gps_location.html" title="Represents a location.">GpsLocation</a>* location);
-<a name="l00167"></a>00167 <span class="comment"></span>
-<a name="l00168"></a>00168 <span class="comment">/** Callback with status information. */</span>
-<a name="l00169"></a><a class="code" href="gps_8h.html#1d9ef60ab0b91f7c106867a6aa1e4412">00169</a> <span class="keyword">typedef</span> void (* <a class="code" href="gps_8h.html#1d9ef60ab0b91f7c106867a6aa1e4412" title="Callback with status information.">gps_status_callback</a>)(<a class="code" href="struct_gps_status.html" title="Represents the status.">GpsStatus</a>* status);
-<a name="l00170"></a>00170 <span class="comment"></span>
-<a name="l00171"></a>00171 <span class="comment">/** Callback with SV status information. */</span>
-<a name="l00172"></a><a class="code" href="gps_8h.html#67274e784834c6c2547f4b5344fc4ea9">00172</a> <span class="keyword">typedef</span> void (* <a class="code" href="gps_8h.html#67274e784834c6c2547f4b5344fc4ea9" title="Callback with SV status information.">gps_sv_status_callback</a>)(<a class="code" href="struct_gps_sv_status.html" title="Represents SV status.">GpsSvStatus</a>* sv_info);
-<a name="l00173"></a>00173 <span class="comment"></span>
-<a name="l00174"></a>00174 <span class="comment">/** GPS callback structure. */</span>
-<a name="l00175"></a><a class="code" href="struct_gps_callbacks.html">00175</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00176"></a><a class="code" href="struct_gps_callbacks.html#1f59b4f8eeaca50620f94761536dabd3">00176</a>         <a class="code" href="gps_8h.html#88f19d3da70dc0e951b51091ce0631ae" title="Callback with location information.">gps_location_callback</a> location_cb;
-<a name="l00177"></a><a class="code" href="struct_gps_callbacks.html#7b15a1bf4f9b989677fef84f4d8141df">00177</a>         <a class="code" href="gps_8h.html#1d9ef60ab0b91f7c106867a6aa1e4412" title="Callback with status information.">gps_status_callback</a> status_cb;
-<a name="l00178"></a><a class="code" href="struct_gps_callbacks.html#fb34f60ad58e80de5c04790b107bb93d">00178</a>         <a class="code" href="gps_8h.html#67274e784834c6c2547f4b5344fc4ea9" title="Callback with SV status information.">gps_sv_status_callback</a> sv_status_cb;
-<a name="l00179"></a>00179 } <a class="code" href="struct_gps_callbacks.html" title="GPS callback structure.">GpsCallbacks</a>;
-<a name="l00180"></a>00180 
-<a name="l00181"></a>00181 <span class="comment"></span>
-<a name="l00182"></a>00182 <span class="comment">/** Represents the standard GPS interface. */</span>
-<a name="l00183"></a><a class="code" href="struct_gps_interface.html">00183</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{<span class="comment"></span>
-<a name="l00184"></a>00184 <span class="comment">    /**</span>
-<a name="l00185"></a>00185 <span class="comment">     * Opens the interface and provides the callback routines</span>
-<a name="l00186"></a>00186 <span class="comment">     * to the implemenation of this interface.</span>
-<a name="l00187"></a>00187 <span class="comment">     */</span>
-<a name="l00188"></a>00188     int   (*init)( <a class="code" href="struct_gps_callbacks.html" title="GPS callback structure.">GpsCallbacks</a>* callbacks );
-<a name="l00189"></a>00189 <span class="comment"></span>
-<a name="l00190"></a>00190 <span class="comment">    /** Starts navigating. */</span>
-<a name="l00191"></a>00191     int   (*start)( void );
-<a name="l00192"></a>00192 <span class="comment"></span>
-<a name="l00193"></a>00193 <span class="comment">    /** Stops navigating. */</span>
-<a name="l00194"></a>00194     int   (*stop)( void );
-<a name="l00195"></a>00195 <span class="comment"></span>
-<a name="l00196"></a>00196 <span class="comment">    /** Sets requested frequency of fixes in seconds. */</span>
-<a name="l00197"></a>00197     void  (*set_fix_frequency)( <span class="keywordtype">int</span> frequency );
-<a name="l00198"></a>00198 <span class="comment"></span>
-<a name="l00199"></a>00199 <span class="comment">    /** Closes the interface. */</span>
-<a name="l00200"></a>00200     void  (*cleanup)( void );
-<a name="l00201"></a>00201 <span class="comment"></span>
-<a name="l00202"></a>00202 <span class="comment">    /** Injects the current time. */</span>
-<a name="l00203"></a>00203     int   (*inject_time)(GpsUtcTime time, int64_t timeReference,
-<a name="l00204"></a>00204                          <span class="keywordtype">int</span> uncertainty);
-<a name="l00205"></a>00205 <span class="comment"></span>
-<a name="l00206"></a>00206 <span class="comment">    /**</span>
-<a name="l00207"></a>00207 <span class="comment">     * Specifies that the next call to start will not use the</span>
-<a name="l00208"></a>00208 <span class="comment">     * information defined in the flags. GPS_DELETE_ALL is passed for</span>
-<a name="l00209"></a>00209 <span class="comment">     * a cold start.</span>
-<a name="l00210"></a>00210 <span class="comment">     */</span>
-<a name="l00211"></a>00211     void  (*delete_aiding_data)(GpsAidingData flags);
-<a name="l00212"></a>00212 <span class="comment"></span>
-<a name="l00213"></a>00213 <span class="comment">    /**</span>
-<a name="l00214"></a>00214 <span class="comment">     * fix_frequency represents the time between fixes in seconds.</span>
-<a name="l00215"></a>00215 <span class="comment">     * Set fix_frequency to zero for a single-shot fix.</span>
-<a name="l00216"></a>00216 <span class="comment">     */</span>
-<a name="l00217"></a>00217     int   (*set_position_mode)(GpsPositionMode mode, <span class="keywordtype">int</span> fix_frequency);
-<a name="l00218"></a>00218 <span class="comment"></span>
-<a name="l00219"></a>00219 <span class="comment">    /** Get a pointer to extension information. */</span>
-<a name="l00220"></a>00220     <span class="keyword">const</span> <span class="keywordtype">void</span>* (*get_extension)(<span class="keyword">const</span> <span class="keywordtype">char</span>* name);
-<a name="l00221"></a>00221 } <a class="code" href="struct_gps_interface.html" title="Represents the standard GPS interface.">GpsInterface</a>;
-<a name="l00222"></a>00222 <span class="comment"></span>
-<a name="l00223"></a>00223 <span class="comment">/** Callback to request the client to download XTRA data.</span>
-<a name="l00224"></a>00224 <span class="comment">    The client should download XTRA data and inject it by calling</span>
-<a name="l00225"></a>00225 <span class="comment">     inject_xtra_data(). */</span>
-<a name="l00226"></a><a class="code" href="gps_8h.html#08fcfb3f85c2ac3008c9c73cf9136515">00226</a> <span class="keyword">typedef</span> void (* <a class="code" href="gps_8h.html#08fcfb3f85c2ac3008c9c73cf9136515" title="Callback to request the client to download XTRA data.">gps_xtra_download_request</a>)();
-<a name="l00227"></a>00227 <span class="comment"></span>
-<a name="l00228"></a>00228 <span class="comment">/** Callback structure for the XTRA interface. */</span>
-<a name="l00229"></a><a class="code" href="struct_gps_xtra_callbacks.html">00229</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00230"></a><a class="code" href="struct_gps_xtra_callbacks.html#7e879ba4c3e32c52eaa0fb04fb9c226f">00230</a>         <a class="code" href="gps_8h.html#08fcfb3f85c2ac3008c9c73cf9136515" title="Callback to request the client to download XTRA data.">gps_xtra_download_request</a> download_request_cb;
-<a name="l00231"></a>00231 } <a class="code" href="struct_gps_xtra_callbacks.html" title="Callback structure for the XTRA interface.">GpsXtraCallbacks</a>;
-<a name="l00232"></a>00232 <span class="comment"></span>
-<a name="l00233"></a>00233 <span class="comment">/** Extended interface for XTRA support. */</span>
-<a name="l00234"></a><a class="code" href="struct_gps_xtra_interface.html">00234</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{<span class="comment"></span>
-<a name="l00235"></a>00235 <span class="comment">    /**</span>
-<a name="l00236"></a>00236 <span class="comment">     * Opens the XTRA interface and provides the callback routines</span>
-<a name="l00237"></a>00237 <span class="comment">     * to the implemenation of this interface.</span>
-<a name="l00238"></a>00238 <span class="comment">     */</span>
-<a name="l00239"></a>00239     int  (*init)( <a class="code" href="struct_gps_xtra_callbacks.html" title="Callback structure for the XTRA interface.">GpsXtraCallbacks</a>* callbacks );<span class="comment"></span>
-<a name="l00240"></a>00240 <span class="comment">    /** Injects XTRA data into the GPS. */</span>
-<a name="l00241"></a>00241     int  (*inject_xtra_data)( <span class="keywordtype">char</span>* data, <span class="keywordtype">int</span> length );
-<a name="l00242"></a>00242 } <a class="code" href="struct_gps_xtra_interface.html" title="Extended interface for XTRA support.">GpsXtraInterface</a>;
-<a name="l00243"></a>00243 <span class="comment"></span>
-<a name="l00244"></a>00244 <span class="comment">/** Extended interface for SUPL support. */</span>
-<a name="l00245"></a><a class="code" href="struct_gps_supl_interface.html">00245</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{<span class="comment"></span>
-<a name="l00246"></a>00246 <span class="comment">    /**</span>
-<a name="l00247"></a>00247 <span class="comment">     * Sets the name of the APN to be used for SUPL.</span>
-<a name="l00248"></a>00248 <span class="comment">     */</span>
-<a name="l00249"></a>00249     int  (*set_apn)( <span class="keyword">const</span> <span class="keywordtype">char</span>* apn );
-<a name="l00250"></a>00250 } <a class="code" href="struct_gps_supl_interface.html" title="Extended interface for SUPL support.">GpsSuplInterface</a>;
-<a name="l00251"></a>00251 <span class="comment"></span>
-<a name="l00252"></a>00252 <span class="comment">/** Returns the hardware GPS interface. */</span>
-<a name="l00253"></a>00253 <span class="keyword">const</span> <a class="code" href="struct_gps_interface.html" title="Represents the standard GPS interface.">GpsInterface</a>* <a class="code" href="gps_8h.html#6d15bb02f1f91dd760e3e172bd7711a1" title="Returns the hardware GPS interface.">gps_get_hardware_interface</a>();
-<a name="l00254"></a>00254 <span class="comment"></span>
-<a name="l00255"></a>00255 <span class="comment">/**</span>
-<a name="l00256"></a>00256 <span class="comment"> * Returns the qemu emulated GPS interface.</span>
-<a name="l00257"></a>00257 <span class="comment"> */</span>
-<a name="l00258"></a>00258 <span class="keyword">const</span> <a class="code" href="struct_gps_interface.html" title="Represents the standard GPS interface.">GpsInterface</a>* <a class="code" href="gps_8h.html#f73f4a220fb97545e81d82fbff54b47e" title="Returns the qemu emulated GPS interface.">gps_get_qemu_interface</a>();
-<a name="l00259"></a>00259 <span class="comment"></span>
-<a name="l00260"></a>00260 <span class="comment">/**</span>
-<a name="l00261"></a>00261 <span class="comment"> * Returns the default GPS interface.</span>
-<a name="l00262"></a>00262 <span class="comment"> */</span>
-<a name="l00263"></a>00263 <span class="keyword">const</span> <a class="code" href="struct_gps_interface.html" title="Represents the standard GPS interface.">GpsInterface</a>* <a class="code" href="gps_8h.html#b582931ddf4bafa2cc5044963be66987" title="Returns the default GPS interface.">gps_get_interface</a>();
-<a name="l00264"></a>00264 
-<a name="l00265"></a>00265 <span class="preprocessor">#if __cplusplus</span>
-<a name="l00266"></a>00266 <span class="preprocessor"></span>}  <span class="comment">// extern "C"</span>
-<a name="l00267"></a>00267 <span class="preprocessor">#endif</span>
-<a name="l00268"></a>00268 <span class="preprocessor"></span>
-<a name="l00269"></a>00269 <span class="preprocessor">#endif  // _HARDWARE_GPS_H</span>
-</pre></div></div>
-</body>
-</html>
diff --git a/pdk/docs/gps_8h.html b/pdk/docs/gps_8h.html
deleted file mode 100755 (executable)
index 726d25e..0000000
+++ /dev/null
@@ -1,337 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>gps.h File Reference</h1>
-<p>
-<a href="gps_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_location.html">GpsLocation</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents a location.  <a href="struct_gps_location.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_status.html">GpsStatus</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents the status.  <a href="struct_gps_status.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_sv_info.html">GpsSvInfo</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents SV information.  <a href="struct_gps_sv_info.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_sv_status.html">GpsSvStatus</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents SV status.  <a href="struct_gps_sv_status.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_callbacks.html">GpsCallbacks</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">GPS callback structure.  <a href="struct_gps_callbacks.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_interface.html">GpsInterface</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents the standard GPS interface.  <a href="struct_gps_interface.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_xtra_callbacks.html">GpsXtraCallbacks</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback structure for the XTRA interface.  <a href="struct_gps_xtra_callbacks.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_xtra_interface.html">GpsXtraInterface</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Extended interface for XTRA support.  <a href="struct_gps_xtra_interface.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_supl_interface.html">GpsSuplInterface</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Extended interface for SUPL support.  <a href="struct_gps_supl_interface.html#_details">More...</a><br></td></tr>
-<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef int64_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="gps_8h.html#f2b0ea531a44c010f81a4abd27504c15">GpsUtcTime</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Milliseconds since January 1, 1970.  <a href="#f2b0ea531a44c010f81a4abd27504c15"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="gps_8h.html#2461a6f0dd56a1f7dc94e93207a1f740">GpsPositionMode</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Requested mode for GPS operation.  <a href="#2461a6f0dd56a1f7dc94e93207a1f740"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="gps_8h.html#de8fa0020d3aa1748a8e26759b768ec5">GpsStatusValue</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">GPS status event values.  <a href="#de8fa0020d3aa1748a8e26759b768ec5"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="gps_8h.html#4ae31616d5e232ad7a346a2d4e723e31">GpsLocationFlags</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flags to indicate which values are valid in a <a class="el" href="struct_gps_location.html" title="Represents a location.">GpsLocation</a>.  <a href="#4ae31616d5e232ad7a346a2d4e723e31"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef uint16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="gps_8h.html#93f0283aeabd20211499991a29db7377">GpsAidingData</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flags used to specify which aiding data to delete when calling delete_aiding_data().  <a href="#93f0283aeabd20211499991a29db7377"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="gps_8h.html#88f19d3da70dc0e951b51091ce0631ae">gps_location_callback</a> )(<a class="el" href="struct_gps_location.html">GpsLocation</a> *location)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback with location information.  <a href="#88f19d3da70dc0e951b51091ce0631ae"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="gps_8h.html#1d9ef60ab0b91f7c106867a6aa1e4412">gps_status_callback</a> )(<a class="el" href="struct_gps_status.html">GpsStatus</a> *status)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback with status information.  <a href="#1d9ef60ab0b91f7c106867a6aa1e4412"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="gps_8h.html#67274e784834c6c2547f4b5344fc4ea9">gps_sv_status_callback</a> )(<a class="el" href="struct_gps_sv_status.html">GpsSvStatus</a> *sv_info)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback with SV status information.  <a href="#67274e784834c6c2547f4b5344fc4ea9"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="gps_8h.html#08fcfb3f85c2ac3008c9c73cf9136515">gps_xtra_download_request</a> )()</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback to request the client to download XTRA data.  <a href="#08fcfb3f85c2ac3008c9c73cf9136515"></a><br></td></tr>
-<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="struct_gps_interface.html">GpsInterface</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="gps_8h.html#6d15bb02f1f91dd760e3e172bd7711a1">gps_get_hardware_interface</a> ()</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the hardware GPS interface.  <a href="#6d15bb02f1f91dd760e3e172bd7711a1"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="struct_gps_interface.html">GpsInterface</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="gps_8h.html#f73f4a220fb97545e81d82fbff54b47e">gps_get_qemu_interface</a> ()</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the qemu emulated GPS interface.  <a href="#f73f4a220fb97545e81d82fbff54b47e"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="struct_gps_interface.html">GpsInterface</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="gps_8h.html#b582931ddf4bafa2cc5044963be66987">gps_get_interface</a> ()</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the default GPS interface.  <a href="#b582931ddf4bafa2cc5044963be66987"></a><br></td></tr>
-</table>
-<hr><h2>Typedef Documentation</h2>
-<a class="anchor" name="88f19d3da70dc0e951b51091ce0631ae"></a><!-- doxytag: member="gps.h::gps_location_callback" ref="88f19d3da70dc0e951b51091ce0631ae" args=")(GpsLocation *location)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef void(*  <a class="el" href="gps_8h.html#88f19d3da70dc0e951b51091ce0631ae">gps_location_callback</a>)(<a class="el" href="struct_gps_location.html">GpsLocation</a> *location)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Callback with location information. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00166">166</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="1d9ef60ab0b91f7c106867a6aa1e4412"></a><!-- doxytag: member="gps.h::gps_status_callback" ref="1d9ef60ab0b91f7c106867a6aa1e4412" args=")(GpsStatus *status)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef void(*  <a class="el" href="gps_8h.html#1d9ef60ab0b91f7c106867a6aa1e4412">gps_status_callback</a>)(<a class="el" href="struct_gps_status.html">GpsStatus</a> *status)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Callback with status information. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00169">169</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="67274e784834c6c2547f4b5344fc4ea9"></a><!-- doxytag: member="gps.h::gps_sv_status_callback" ref="67274e784834c6c2547f4b5344fc4ea9" args=")(GpsSvStatus *sv_info)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef void(*  <a class="el" href="gps_8h.html#67274e784834c6c2547f4b5344fc4ea9">gps_sv_status_callback</a>)(<a class="el" href="struct_gps_sv_status.html">GpsSvStatus</a> *sv_info)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Callback with SV status information. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00172">172</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="08fcfb3f85c2ac3008c9c73cf9136515"></a><!-- doxytag: member="gps.h::gps_xtra_download_request" ref="08fcfb3f85c2ac3008c9c73cf9136515" args=")()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef void(*  <a class="el" href="gps_8h.html#08fcfb3f85c2ac3008c9c73cf9136515">gps_xtra_download_request</a>)()          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Callback to request the client to download XTRA data. 
-<p>
-The client should download XTRA data and inject it by calling inject_xtra_data(). 
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00226">226</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="93f0283aeabd20211499991a29db7377"></a><!-- doxytag: member="gps.h::GpsAidingData" ref="93f0283aeabd20211499991a29db7377" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef uint16_t <a class="el" href="gps_8h.html#93f0283aeabd20211499991a29db7377">GpsAidingData</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Flags used to specify which aiding data to delete when calling delete_aiding_data(). 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00075">75</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="4ae31616d5e232ad7a346a2d4e723e31"></a><!-- doxytag: member="gps.h::GpsLocationFlags" ref="4ae31616d5e232ad7a346a2d4e723e31" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef uint16_t <a class="el" href="gps_8h.html#4ae31616d5e232ad7a346a2d4e723e31">GpsLocationFlags</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Flags to indicate which values are valid in a <a class="el" href="struct_gps_location.html" title="Represents a location.">GpsLocation</a>. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00059">59</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="2461a6f0dd56a1f7dc94e93207a1f740"></a><!-- doxytag: member="gps.h::GpsPositionMode" ref="2461a6f0dd56a1f7dc94e93207a1f740" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef uint16_t <a class="el" href="gps_8h.html#2461a6f0dd56a1f7dc94e93207a1f740">GpsPositionMode</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Requested mode for GPS operation. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00033">33</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="de8fa0020d3aa1748a8e26759b768ec5"></a><!-- doxytag: member="gps.h::GpsStatusValue" ref="de8fa0020d3aa1748a8e26759b768ec5" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef uint16_t <a class="el" href="gps_8h.html#de8fa0020d3aa1748a8e26759b768ec5">GpsStatusValue</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-GPS status event values. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00044">44</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="f2b0ea531a44c010f81a4abd27504c15"></a><!-- doxytag: member="gps.h::GpsUtcTime" ref="f2b0ea531a44c010f81a4abd27504c15" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef int64_t <a class="el" href="gps_8h.html#f2b0ea531a44c010f81a4abd27504c15">GpsUtcTime</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Milliseconds since January 1, 1970. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00027">27</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<hr><h2>Function Documentation</h2>
-<a class="anchor" name="6d15bb02f1f91dd760e3e172bd7711a1"></a><!-- doxytag: member="gps.h::gps_get_hardware_interface" ref="6d15bb02f1f91dd760e3e172bd7711a1" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">const <a class="el" href="struct_gps_interface.html">GpsInterface</a>* gps_get_hardware_interface           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Returns the hardware GPS interface. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="b582931ddf4bafa2cc5044963be66987"></a><!-- doxytag: member="gps.h::gps_get_interface" ref="b582931ddf4bafa2cc5044963be66987" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">const <a class="el" href="struct_gps_interface.html">GpsInterface</a>* gps_get_interface           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Returns the default GPS interface. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="f73f4a220fb97545e81d82fbff54b47e"></a><!-- doxytag: member="gps.h::gps_get_qemu_interface" ref="f73f4a220fb97545e81d82fbff54b47e" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">const <a class="el" href="struct_gps_interface.html">GpsInterface</a>* gps_get_qemu_interface           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Returns the qemu emulated GPS interface. 
-<p>
-
-</div>
-</div><p>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/groups_8dox.html b/pdk/docs/groups_8dox.html
deleted file mode 100755 (executable)
index fe63ada..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>groups.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-</table>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/main_8dox.html b/pdk/docs/main_8dox.html
deleted file mode 100755 (executable)
index b4bf177..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>main.dox File Reference</h1><table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-</table>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/namespaceandroid.html b/pdk/docs/namespaceandroid.html
deleted file mode 100755 (executable)
index ee0b03f..0000000
+++ /dev/null
@@ -1,214 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="namespaces.html"><span>Namespace List</span></a></li>
-      <li><a href="namespacemembers.html"><span>Namespace&nbsp;Members</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>android Namespace Reference</h1>
-<p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_out.html">AudioStreamOut</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classandroid_1_1_audio_stream_out.html" title="AudioStreamOut is the abstraction interface for the audio output hardware.">AudioStreamOut</a> is the abstraction interface for the audio output hardware.  <a href="classandroid_1_1_audio_stream_out.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_stream_in.html">AudioStreamIn</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classandroid_1_1_audio_stream_in.html" title="AudioStreamIn is the abstraction interface for the audio input hardware.">AudioStreamIn</a> is the abstraction interface for the audio input hardware.  <a href="classandroid_1_1_audio_stream_in.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_audio_hardware_interface.html">AudioHardwareInterface</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="_audio_hardware_interface_8h.html">AudioHardwareInterface.h</a> defines the interface to the audio hardware abstraction layer.  <a href="classandroid_1_1_audio_hardware_interface.html#_details">More...</a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classandroid_1_1_camera_hardware_interface.html">CameraHardwareInterface</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="_camera_hardware_interface_8h.html">CameraHardwareInterface.h</a> defines the interface to the camera hardware abstraction layer, used for setting and getting parameters, live previewing, and taking pictures.  <a href="classandroid_1_1_camera_hardware_interface.html#_details">More...</a><br></td></tr>
-<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceandroid.html#d32b08663d42356404e2eb971e271636">preview_callback</a> )(const sp&lt; IMemory &gt; &amp;mem, void *user)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback for startPreview().  <a href="#d32b08663d42356404e2eb971e271636"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceandroid.html#04c83209c2627e2d303320712ca9ee65">shutter_callback</a> )(void *user)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback for takePicture().  <a href="#04c83209c2627e2d303320712ca9ee65"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceandroid.html#a97926709e452d66360cb9b24736969e">raw_callback</a> )(const sp&lt; IMemory &gt; &amp;mem, void *user)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback for takePicture().  <a href="#a97926709e452d66360cb9b24736969e"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceandroid.html#c21980d4be1e0cc458399ecf5374d473">jpeg_callback</a> )(const sp&lt; IMemory &gt; &amp;mem, void *user)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback for takePicture().  <a href="#c21980d4be1e0cc458399ecf5374d473"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceandroid.html#4dca8d8b824ca9a684358133da0ec8f2">autofocus_callback</a> )(bool focused, void *user)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Callback for autoFocus().  <a href="#4dca8d8b824ca9a684358133da0ec8f2"></a><br></td></tr>
-<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classandroid_1_1_audio_hardware_interface.html">AudioHardwareInterface</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceandroid.html#dcc80314ddffcb0981a9e9c5468662f8">createAudioHardware</a> (void)</td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top">sp&lt; <a class="el" href="classandroid_1_1_camera_hardware_interface.html">CameraHardwareInterface</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceandroid.html#24c243f7f9ba0d1d881be17ae06254a2">openCameraHardware</a> ()</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">factory function to instantiate a camera hardware object  <a href="#24c243f7f9ba0d1d881be17ae06254a2"></a><br></td></tr>
-</table>
-<hr><h2>Typedef Documentation</h2>
-<a class="anchor" name="4dca8d8b824ca9a684358133da0ec8f2"></a><!-- doxytag: member="android::autofocus_callback" ref="4dca8d8b824ca9a684358133da0ec8f2" args=")(bool focused, void *user)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef void(* <a class="el" href="namespaceandroid.html#4dca8d8b824ca9a684358133da0ec8f2">android::autofocus_callback</a>)(bool focused, void *user)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Callback for autoFocus(). 
-<p>
-
-<p>Definition at line <a class="el" href="_camera_hardware_interface_8h-source.html#l00039">39</a> of file <a class="el" href="_camera_hardware_interface_8h-source.html">CameraHardwareInterface.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="c21980d4be1e0cc458399ecf5374d473"></a><!-- doxytag: member="android::jpeg_callback" ref="c21980d4be1e0cc458399ecf5374d473" args=")(const sp&lt; IMemory &gt; &amp;mem, void *user)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef void(* <a class="el" href="namespaceandroid.html#c21980d4be1e0cc458399ecf5374d473">android::jpeg_callback</a>)(const sp&lt; IMemory &gt; &amp;mem, void *user)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Callback for takePicture(). 
-<p>
-
-<p>Definition at line <a class="el" href="_camera_hardware_interface_8h-source.html#l00036">36</a> of file <a class="el" href="_camera_hardware_interface_8h-source.html">CameraHardwareInterface.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="d32b08663d42356404e2eb971e271636"></a><!-- doxytag: member="android::preview_callback" ref="d32b08663d42356404e2eb971e271636" args=")(const sp&lt; IMemory &gt; &amp;mem, void *user)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef void(* <a class="el" href="namespaceandroid.html#d32b08663d42356404e2eb971e271636">android::preview_callback</a>)(const sp&lt; IMemory &gt; &amp;mem, void *user)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Callback for startPreview(). 
-<p>
-
-<p>Definition at line <a class="el" href="_camera_hardware_interface_8h-source.html#l00027">27</a> of file <a class="el" href="_camera_hardware_interface_8h-source.html">CameraHardwareInterface.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="a97926709e452d66360cb9b24736969e"></a><!-- doxytag: member="android::raw_callback" ref="a97926709e452d66360cb9b24736969e" args=")(const sp&lt; IMemory &gt; &amp;mem, void *user)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef void(* <a class="el" href="namespaceandroid.html#a97926709e452d66360cb9b24736969e">android::raw_callback</a>)(const sp&lt; IMemory &gt; &amp;mem, void *user)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Callback for takePicture(). 
-<p>
-
-<p>Definition at line <a class="el" href="_camera_hardware_interface_8h-source.html#l00033">33</a> of file <a class="el" href="_camera_hardware_interface_8h-source.html">CameraHardwareInterface.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="04c83209c2627e2d303320712ca9ee65"></a><!-- doxytag: member="android::shutter_callback" ref="04c83209c2627e2d303320712ca9ee65" args=")(void *user)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">typedef void(* <a class="el" href="namespaceandroid.html#04c83209c2627e2d303320712ca9ee65">android::shutter_callback</a>)(void *user)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Callback for takePicture(). 
-<p>
-
-<p>Definition at line <a class="el" href="_camera_hardware_interface_8h-source.html#l00030">30</a> of file <a class="el" href="_camera_hardware_interface_8h-source.html">CameraHardwareInterface.h</a>.</p>
-
-</div>
-</div><p>
-<hr><h2>Function Documentation</h2>
-<a class="anchor" name="dcc80314ddffcb0981a9e9c5468662f8"></a><!-- doxytag: member="android::createAudioHardware" ref="dcc80314ddffcb0981a9e9c5468662f8" args="(void)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="classandroid_1_1_audio_hardware_interface.html">AudioHardwareInterface</a>* android::createAudioHardware           </td>
-          <td>(</td>
-          <td class="paramtype">void&nbsp;</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="24c243f7f9ba0d1d881be17ae06254a2"></a><!-- doxytag: member="android::openCameraHardware" ref="24c243f7f9ba0d1d881be17ae06254a2" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">sp&lt;<a class="el" href="classandroid_1_1_camera_hardware_interface.html">CameraHardwareInterface</a>&gt; android::openCameraHardware           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-factory function to instantiate a camera hardware object 
-<p>
-
-</div>
-</div><p>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/namespacemembers.html b/pdk/docs/namespacemembers.html
deleted file mode 100755 (executable)
index 9644de2..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="namespaces.html"><span>Namespace List</span></a></li>
-      <li class="current"><a href="namespacemembers.html"><span>Namespace&nbsp;Members</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li class="current"><a href="namespacemembers.html"><span>All</span></a></li>
-      <li><a href="namespacemembers_func.html"><span>Functions</span></a></li>
-      <li><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-Here is a list of all namespace members with links to the namespace documentation for each member:
-<p>
-<ul>
-<li>autofocus_callback
-: <a class="el" href="namespaceandroid.html#4dca8d8b824ca9a684358133da0ec8f2">android</a>
-<li>createAudioHardware()
-: <a class="el" href="namespaceandroid.html#dcc80314ddffcb0981a9e9c5468662f8">android</a>
-<li>jpeg_callback
-: <a class="el" href="namespaceandroid.html#c21980d4be1e0cc458399ecf5374d473">android</a>
-<li>openCameraHardware()
-: <a class="el" href="namespaceandroid.html#24c243f7f9ba0d1d881be17ae06254a2">android</a>
-<li>preview_callback
-: <a class="el" href="namespaceandroid.html#d32b08663d42356404e2eb971e271636">android</a>
-<li>raw_callback
-: <a class="el" href="namespaceandroid.html#a97926709e452d66360cb9b24736969e">android</a>
-<li>shutter_callback
-: <a class="el" href="namespaceandroid.html#04c83209c2627e2d303320712ca9ee65">android</a>
-</ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/namespacemembers_func.html b/pdk/docs/namespacemembers_func.html
deleted file mode 100755 (executable)
index eaa31a5..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="namespaces.html"><span>Namespace List</span></a></li>
-      <li class="current"><a href="namespacemembers.html"><span>Namespace&nbsp;Members</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="namespacemembers.html"><span>All</span></a></li>
-      <li class="current"><a href="namespacemembers_func.html"><span>Functions</span></a></li>
-      <li><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-&nbsp;
-<p>
-<ul>
-<li>createAudioHardware()
-: <a class="el" href="namespaceandroid.html#dcc80314ddffcb0981a9e9c5468662f8">android</a>
-<li>openCameraHardware()
-: <a class="el" href="namespaceandroid.html#24c243f7f9ba0d1d881be17ae06254a2">android</a>
-</ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/namespacemembers_type.html b/pdk/docs/namespacemembers_type.html
deleted file mode 100755 (executable)
index 29c17f1..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="namespaces.html"><span>Namespace List</span></a></li>
-      <li class="current"><a href="namespacemembers.html"><span>Namespace&nbsp;Members</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="namespacemembers.html"><span>All</span></a></li>
-      <li><a href="namespacemembers_func.html"><span>Functions</span></a></li>
-      <li class="current"><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-&nbsp;
-<p>
-<ul>
-<li>autofocus_callback
-: <a class="el" href="namespaceandroid.html#4dca8d8b824ca9a684358133da0ec8f2">android</a>
-<li>jpeg_callback
-: <a class="el" href="namespaceandroid.html#c21980d4be1e0cc458399ecf5374d473">android</a>
-<li>preview_callback
-: <a class="el" href="namespaceandroid.html#d32b08663d42356404e2eb971e271636">android</a>
-<li>raw_callback
-: <a class="el" href="namespaceandroid.html#a97926709e452d66360cb9b24736969e">android</a>
-<li>shutter_callback
-: <a class="el" href="namespaceandroid.html#04c83209c2627e2d303320712ca9ee65">android</a>
-</ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/namespaces.html b/pdk/docs/namespaces.html
deleted file mode 100755 (executable)
index 23a9679..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li class="current"><a href="namespaces.html"><span>Namespace List</span></a></li>
-      <li><a href="namespacemembers.html"><span>Namespace&nbsp;Members</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>Namespace List</h1>Here is a list of all namespaces with brief descriptions:<table>
-  <tr><td class="indexkey"><a class="el" href="namespaceandroid.html">android</a></td><td class="indexvalue"></td></tr>
-</table>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/struct_gps_callbacks.html b/pdk/docs/struct_gps_callbacks.html
deleted file mode 100755 (executable)
index 42a148f..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>GpsCallbacks Struct Reference</h1><!-- doxytag: class="GpsCallbacks" -->GPS callback structure.  
-<a href="#_details">More...</a>
-<p>
-<code>#include &lt;<a class="el" href="gps_8h-source.html">gps.h</a>&gt;</code>
-<p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="gps_8h.html#88f19d3da70dc0e951b51091ce0631ae">gps_location_callback</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_callbacks.html#1f59b4f8eeaca50620f94761536dabd3">location_cb</a></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="gps_8h.html#1d9ef60ab0b91f7c106867a6aa1e4412">gps_status_callback</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_callbacks.html#7b15a1bf4f9b989677fef84f4d8141df">status_cb</a></td></tr>
-
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="gps_8h.html#67274e784834c6c2547f4b5344fc4ea9">gps_sv_status_callback</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_callbacks.html#fb34f60ad58e80de5c04790b107bb93d">sv_status_cb</a></td></tr>
-
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-GPS callback structure. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00175">175</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-<hr><h2>Field Documentation</h2>
-<a class="anchor" name="1f59b4f8eeaca50620f94761536dabd3"></a><!-- doxytag: member="GpsCallbacks::location_cb" ref="1f59b4f8eeaca50620f94761536dabd3" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="gps_8h.html#88f19d3da70dc0e951b51091ce0631ae">gps_location_callback</a> <a class="el" href="struct_gps_callbacks.html#1f59b4f8eeaca50620f94761536dabd3">GpsCallbacks::location_cb</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00176">176</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="7b15a1bf4f9b989677fef84f4d8141df"></a><!-- doxytag: member="GpsCallbacks::status_cb" ref="7b15a1bf4f9b989677fef84f4d8141df" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="gps_8h.html#1d9ef60ab0b91f7c106867a6aa1e4412">gps_status_callback</a> <a class="el" href="struct_gps_callbacks.html#7b15a1bf4f9b989677fef84f4d8141df">GpsCallbacks::status_cb</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00177">177</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="fb34f60ad58e80de5c04790b107bb93d"></a><!-- doxytag: member="GpsCallbacks::sv_status_cb" ref="fb34f60ad58e80de5c04790b107bb93d" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="gps_8h.html#67274e784834c6c2547f4b5344fc4ea9">gps_sv_status_callback</a> <a class="el" href="struct_gps_callbacks.html#fb34f60ad58e80de5c04790b107bb93d">GpsCallbacks::sv_status_cb</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00178">178</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="gps_8h-source.html">gps.h</a></ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/struct_gps_interface.html b/pdk/docs/struct_gps_interface.html
deleted file mode 100755 (executable)
index f99e824..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>GpsInterface Struct Reference</h1><!-- doxytag: class="GpsInterface" -->Represents the standard GPS interface.  
-<a href="#_details">More...</a>
-<p>
-<code>#include &lt;<a class="el" href="gps_8h-source.html">gps.h</a>&gt;</code>
-<p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_interface.html#d5139fa13b75108bdedd8a2717f37135">init</a> )(<a class="el" href="struct_gps_callbacks.html">GpsCallbacks</a> *callbacks)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens the interface and provides the callback routines to the implemenation of this interface.  <a href="#d5139fa13b75108bdedd8a2717f37135"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_interface.html#2b212721e0d160e24944330b2d830790">start</a> )(void)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Starts navigating.  <a href="#2b212721e0d160e24944330b2d830790"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_interface.html#d20b0cfcbf976d8cec17bf4ea0a027f1">stop</a> )(void)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stops navigating.  <a href="#d20b0cfcbf976d8cec17bf4ea0a027f1"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_interface.html#1e727f5862ae7132f12af44ebdfa76b2">set_fix_frequency</a> )(int frequency)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets requested frequency of fixes in seconds.  <a href="#1e727f5862ae7132f12af44ebdfa76b2"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_interface.html#2911808e36c70259dc0db162de02dc13">cleanup</a> )(void)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes the interface.  <a href="#2911808e36c70259dc0db162de02dc13"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_interface.html#e731891e96a916271a4275eaaea47ad8">inject_time</a> )(<a class="el" href="gps_8h.html#f2b0ea531a44c010f81a4abd27504c15">GpsUtcTime</a> time, int64_t timeReference, int uncertainty)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Injects the current time.  <a href="#e731891e96a916271a4275eaaea47ad8"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_interface.html#a3a9b81a8a719b628ac8049344f50b58">delete_aiding_data</a> )(<a class="el" href="gps_8h.html#93f0283aeabd20211499991a29db7377">GpsAidingData</a> flags)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specifies that the next call to start will not use the information defined in the flags.  <a href="#a3a9b81a8a719b628ac8049344f50b58"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_interface.html#924bff47462a773b669d310d87b75734">set_position_mode</a> )(<a class="el" href="gps_8h.html#2461a6f0dd56a1f7dc94e93207a1f740">GpsPositionMode</a> mode, int fix_frequency)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">fix_frequency represents the time between fixes in seconds.  <a href="#924bff47462a773b669d310d87b75734"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">const void *(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_interface.html#19af32bd9d01ebbcdb196e36514b0e98">get_extension</a> )(const char *name)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a pointer to extension information.  <a href="#19af32bd9d01ebbcdb196e36514b0e98"></a><br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-Represents the standard GPS interface. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00183">183</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-<hr><h2>Field Documentation</h2>
-<a class="anchor" name="d5139fa13b75108bdedd8a2717f37135"></a><!-- doxytag: member="GpsInterface::init" ref="d5139fa13b75108bdedd8a2717f37135" args=")(GpsCallbacks *callbacks)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int(* <a class="el" href="struct_gps_interface.html#d5139fa13b75108bdedd8a2717f37135">GpsInterface::init</a>)(<a class="el" href="struct_gps_callbacks.html">GpsCallbacks</a> *callbacks)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Opens the interface and provides the callback routines to the implemenation of this interface. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="2b212721e0d160e24944330b2d830790"></a><!-- doxytag: member="GpsInterface::start" ref="2b212721e0d160e24944330b2d830790" args=")(void)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int(* <a class="el" href="struct_gps_interface.html#2b212721e0d160e24944330b2d830790">GpsInterface::start</a>)(void)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Starts navigating. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="d20b0cfcbf976d8cec17bf4ea0a027f1"></a><!-- doxytag: member="GpsInterface::stop" ref="d20b0cfcbf976d8cec17bf4ea0a027f1" args=")(void)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int(* <a class="el" href="struct_gps_interface.html#d20b0cfcbf976d8cec17bf4ea0a027f1">GpsInterface::stop</a>)(void)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Stops navigating. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="1e727f5862ae7132f12af44ebdfa76b2"></a><!-- doxytag: member="GpsInterface::set_fix_frequency" ref="1e727f5862ae7132f12af44ebdfa76b2" args=")(int frequency)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* <a class="el" href="struct_gps_interface.html#1e727f5862ae7132f12af44ebdfa76b2">GpsInterface::set_fix_frequency</a>)(int frequency)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Sets requested frequency of fixes in seconds. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="2911808e36c70259dc0db162de02dc13"></a><!-- doxytag: member="GpsInterface::cleanup" ref="2911808e36c70259dc0db162de02dc13" args=")(void)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* <a class="el" href="struct_gps_interface.html#2911808e36c70259dc0db162de02dc13">GpsInterface::cleanup</a>)(void)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Closes the interface. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="e731891e96a916271a4275eaaea47ad8"></a><!-- doxytag: member="GpsInterface::inject_time" ref="e731891e96a916271a4275eaaea47ad8" args=")(GpsUtcTime time, int64_t timeReference, int uncertainty)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int(* <a class="el" href="struct_gps_interface.html#e731891e96a916271a4275eaaea47ad8">GpsInterface::inject_time</a>)(<a class="el" href="gps_8h.html#f2b0ea531a44c010f81a4abd27504c15">GpsUtcTime</a> time, int64_t timeReference, int uncertainty)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Injects the current time. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="a3a9b81a8a719b628ac8049344f50b58"></a><!-- doxytag: member="GpsInterface::delete_aiding_data" ref="a3a9b81a8a719b628ac8049344f50b58" args=")(GpsAidingData flags)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void(* <a class="el" href="struct_gps_interface.html#a3a9b81a8a719b628ac8049344f50b58">GpsInterface::delete_aiding_data</a>)(<a class="el" href="gps_8h.html#93f0283aeabd20211499991a29db7377">GpsAidingData</a> flags)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Specifies that the next call to start will not use the information defined in the flags. 
-<p>
-GPS_DELETE_ALL is passed for a cold start. 
-</div>
-</div><p>
-<a class="anchor" name="924bff47462a773b669d310d87b75734"></a><!-- doxytag: member="GpsInterface::set_position_mode" ref="924bff47462a773b669d310d87b75734" args=")(GpsPositionMode mode, int fix_frequency)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int(* <a class="el" href="struct_gps_interface.html#924bff47462a773b669d310d87b75734">GpsInterface::set_position_mode</a>)(<a class="el" href="gps_8h.html#2461a6f0dd56a1f7dc94e93207a1f740">GpsPositionMode</a> mode, int fix_frequency)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-fix_frequency represents the time between fixes in seconds. 
-<p>
-Set fix_frequency to zero for a single-shot fix. 
-</div>
-</div><p>
-<a class="anchor" name="19af32bd9d01ebbcdb196e36514b0e98"></a><!-- doxytag: member="GpsInterface::get_extension" ref="19af32bd9d01ebbcdb196e36514b0e98" args=")(const char *name)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">const void*(* <a class="el" href="struct_gps_interface.html#19af32bd9d01ebbcdb196e36514b0e98">GpsInterface::get_extension</a>)(const char *name)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Get a pointer to extension information. 
-<p>
-
-</div>
-</div><p>
-<hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="gps_8h-source.html">gps.h</a></ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/struct_gps_location.html b/pdk/docs/struct_gps_location.html
deleted file mode 100755 (executable)
index 33a61fd..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>GpsLocation Struct Reference</h1><!-- doxytag: class="GpsLocation" -->Represents a location.  
-<a href="#_details">More...</a>
-<p>
-<code>#include &lt;<a class="el" href="gps_8h-source.html">gps.h</a>&gt;</code>
-<p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">uint16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_location.html#07d55fee34dc28cff50062e9ac42c717">flags</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Contains GpsLocationFlags bits.  <a href="#07d55fee34dc28cff50062e9ac42c717"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_location.html#3a7da06efae47c66428fa2815a3eb4bd">latitude</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents latitude in degrees.  <a href="#3a7da06efae47c66428fa2815a3eb4bd"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_location.html#3672d2d19087d62d7ea9b0b71418da40">longitude</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents longitude in degrees.  <a href="#3672d2d19087d62d7ea9b0b71418da40"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_location.html#cb3cc5ad378a6a3864e47ae67df38778">altitude</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents altitude in meters above the WGS 84 reference ellipsoid.  <a href="#cb3cc5ad378a6a3864e47ae67df38778"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_location.html#38ae20b9c5e7be995513dce25ed87016">speed</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents speed in meters per second.  <a href="#38ae20b9c5e7be995513dce25ed87016"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_location.html#b71bf9b61cf55f10ffcf34ba1654d082">bearing</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents heading in degrees.  <a href="#b71bf9b61cf55f10ffcf34ba1654d082"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_location.html#801ec0db8ee69fa263a63528876d773b">accuracy</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents expected accuracy in meters.  <a href="#801ec0db8ee69fa263a63528876d773b"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="gps_8h.html#f2b0ea531a44c010f81a4abd27504c15">GpsUtcTime</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_location.html#3e16861f64869d6f0e15e4300bb2658b">timestamp</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Timestamp for the location fix.  <a href="#3e16861f64869d6f0e15e4300bb2658b"></a><br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-Represents a location. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00103">103</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-<hr><h2>Field Documentation</h2>
-<a class="anchor" name="07d55fee34dc28cff50062e9ac42c717"></a><!-- doxytag: member="GpsLocation::flags" ref="07d55fee34dc28cff50062e9ac42c717" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">uint16_t <a class="el" href="struct_gps_location.html#07d55fee34dc28cff50062e9ac42c717">GpsLocation::flags</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Contains GpsLocationFlags bits. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00105">105</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="3a7da06efae47c66428fa2815a3eb4bd"></a><!-- doxytag: member="GpsLocation::latitude" ref="3a7da06efae47c66428fa2815a3eb4bd" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">double <a class="el" href="struct_gps_location.html#3a7da06efae47c66428fa2815a3eb4bd">GpsLocation::latitude</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Represents latitude in degrees. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00107">107</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="3672d2d19087d62d7ea9b0b71418da40"></a><!-- doxytag: member="GpsLocation::longitude" ref="3672d2d19087d62d7ea9b0b71418da40" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">double <a class="el" href="struct_gps_location.html#3672d2d19087d62d7ea9b0b71418da40">GpsLocation::longitude</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Represents longitude in degrees. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00109">109</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="cb3cc5ad378a6a3864e47ae67df38778"></a><!-- doxytag: member="GpsLocation::altitude" ref="cb3cc5ad378a6a3864e47ae67df38778" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">double <a class="el" href="struct_gps_location.html#cb3cc5ad378a6a3864e47ae67df38778">GpsLocation::altitude</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Represents altitude in meters above the WGS 84 reference ellipsoid. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00112">112</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="38ae20b9c5e7be995513dce25ed87016"></a><!-- doxytag: member="GpsLocation::speed" ref="38ae20b9c5e7be995513dce25ed87016" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float <a class="el" href="struct_gps_location.html#38ae20b9c5e7be995513dce25ed87016">GpsLocation::speed</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Represents speed in meters per second. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00114">114</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="b71bf9b61cf55f10ffcf34ba1654d082"></a><!-- doxytag: member="GpsLocation::bearing" ref="b71bf9b61cf55f10ffcf34ba1654d082" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float <a class="el" href="struct_gps_location.html#b71bf9b61cf55f10ffcf34ba1654d082">GpsLocation::bearing</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Represents heading in degrees. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00116">116</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="801ec0db8ee69fa263a63528876d773b"></a><!-- doxytag: member="GpsLocation::accuracy" ref="801ec0db8ee69fa263a63528876d773b" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float <a class="el" href="struct_gps_location.html#801ec0db8ee69fa263a63528876d773b">GpsLocation::accuracy</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Represents expected accuracy in meters. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00118">118</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="3e16861f64869d6f0e15e4300bb2658b"></a><!-- doxytag: member="GpsLocation::timestamp" ref="3e16861f64869d6f0e15e4300bb2658b" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="gps_8h.html#f2b0ea531a44c010f81a4abd27504c15">GpsUtcTime</a> <a class="el" href="struct_gps_location.html#3e16861f64869d6f0e15e4300bb2658b">GpsLocation::timestamp</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Timestamp for the location fix. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00120">120</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="gps_8h-source.html">gps.h</a></ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/struct_gps_status.html b/pdk/docs/struct_gps_status.html
deleted file mode 100755 (executable)
index c4a767f..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>GpsStatus Struct Reference</h1><!-- doxytag: class="GpsStatus" -->Represents the status.  
-<a href="#_details">More...</a>
-<p>
-<code>#include &lt;<a class="el" href="gps_8h-source.html">gps.h</a>&gt;</code>
-<p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="gps_8h.html#de8fa0020d3aa1748a8e26759b768ec5">GpsStatusValue</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_status.html#64c9e8cd609d97533bee5c5e8ca78608">status</a></td></tr>
-
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-Represents the status. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00124">124</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-<hr><h2>Field Documentation</h2>
-<a class="anchor" name="64c9e8cd609d97533bee5c5e8ca78608"></a><!-- doxytag: member="GpsStatus::status" ref="64c9e8cd609d97533bee5c5e8ca78608" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="gps_8h.html#de8fa0020d3aa1748a8e26759b768ec5">GpsStatusValue</a> <a class="el" href="struct_gps_status.html#64c9e8cd609d97533bee5c5e8ca78608">GpsStatus::status</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00125">125</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="gps_8h-source.html">gps.h</a></ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/struct_gps_sv_info.html b/pdk/docs/struct_gps_sv_info.html
deleted file mode 100755 (executable)
index b7ee8a1..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>GpsSvInfo Struct Reference</h1><!-- doxytag: class="GpsSvInfo" -->Represents SV information.  
-<a href="#_details">More...</a>
-<p>
-<code>#include &lt;<a class="el" href="gps_8h-source.html">gps.h</a>&gt;</code>
-<p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_sv_info.html#5c94e86f2efc3ed08fb5a40735a2440b">prn</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pseudo-random number for the SV.  <a href="#5c94e86f2efc3ed08fb5a40735a2440b"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_sv_info.html#eebf16140beb95390733529bd5e7db58">snr</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Signal to noise ratio.  <a href="#eebf16140beb95390733529bd5e7db58"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_sv_info.html#0634009d0476b2f06f27568b0722a04d">elevation</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Elevation of SV in degrees.  <a href="#0634009d0476b2f06f27568b0722a04d"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_sv_info.html#94755ad36e31a012269459d5a4ef0594">azimuth</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Azimuth of SV in degrees.  <a href="#94755ad36e31a012269459d5a4ef0594"></a><br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-Represents SV information. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00129">129</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-<hr><h2>Field Documentation</h2>
-<a class="anchor" name="5c94e86f2efc3ed08fb5a40735a2440b"></a><!-- doxytag: member="GpsSvInfo::prn" ref="5c94e86f2efc3ed08fb5a40735a2440b" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int <a class="el" href="struct_gps_sv_info.html#5c94e86f2efc3ed08fb5a40735a2440b">GpsSvInfo::prn</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Pseudo-random number for the SV. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00131">131</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="eebf16140beb95390733529bd5e7db58"></a><!-- doxytag: member="GpsSvInfo::snr" ref="eebf16140beb95390733529bd5e7db58" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float <a class="el" href="struct_gps_sv_info.html#eebf16140beb95390733529bd5e7db58">GpsSvInfo::snr</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Signal to noise ratio. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00133">133</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="0634009d0476b2f06f27568b0722a04d"></a><!-- doxytag: member="GpsSvInfo::elevation" ref="0634009d0476b2f06f27568b0722a04d" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float <a class="el" href="struct_gps_sv_info.html#0634009d0476b2f06f27568b0722a04d">GpsSvInfo::elevation</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Elevation of SV in degrees. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00135">135</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="94755ad36e31a012269459d5a4ef0594"></a><!-- doxytag: member="GpsSvInfo::azimuth" ref="94755ad36e31a012269459d5a4ef0594" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">float <a class="el" href="struct_gps_sv_info.html#94755ad36e31a012269459d5a4ef0594">GpsSvInfo::azimuth</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Azimuth of SV in degrees. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00137">137</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="gps_8h-source.html">gps.h</a></ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/struct_gps_sv_status.html b/pdk/docs/struct_gps_sv_status.html
deleted file mode 100755 (executable)
index c18fead..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>GpsSvStatus Struct Reference</h1><!-- doxytag: class="GpsSvStatus" -->Represents SV status.  
-<a href="#_details">More...</a>
-<p>
-<code>#include &lt;<a class="el" href="gps_8h-source.html">gps.h</a>&gt;</code>
-<p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_sv_status.html#b90eb63a499039de996c95d98afad545">num_svs</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of SVs currently visible.  <a href="#b90eb63a499039de996c95d98afad545"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="struct_gps_sv_info.html">GpsSvInfo</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_sv_status.html#7a3fe2114e7a603b96fd9675adf0c5b5">sv_list</a> [GPS_MAX_SVS]</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Contains an array of SV information.  <a href="#7a3fe2114e7a603b96fd9675adf0c5b5"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_sv_status.html#4751f70f8e275241dece99db0df4ab5b">ephemeris_mask</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents a bit mask indicating which SVs have ephemeris data.  <a href="#4751f70f8e275241dece99db0df4ab5b"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_sv_status.html#6ed4b741a9882ecc2852e94e8ad60310">almanac_mask</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents a bit mask indicating which SVs have almanac data.  <a href="#6ed4b741a9882ecc2852e94e8ad60310"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_sv_status.html#9090a26639d97eec2b59bcd0446659c0">used_in_fix_mask</a></td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents a bit mask indicating which SVs were used for computing the most recent position fix.  <a href="#9090a26639d97eec2b59bcd0446659c0"></a><br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-Represents SV status. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00141">141</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-<hr><h2>Field Documentation</h2>
-<a class="anchor" name="b90eb63a499039de996c95d98afad545"></a><!-- doxytag: member="GpsSvStatus::num_svs" ref="b90eb63a499039de996c95d98afad545" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int <a class="el" href="struct_gps_sv_status.html#b90eb63a499039de996c95d98afad545">GpsSvStatus::num_svs</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Number of SVs currently visible. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00143">143</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="7a3fe2114e7a603b96fd9675adf0c5b5"></a><!-- doxytag: member="GpsSvStatus::sv_list" ref="7a3fe2114e7a603b96fd9675adf0c5b5" args="[GPS_MAX_SVS]" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="struct_gps_sv_info.html">GpsSvInfo</a> <a class="el" href="struct_gps_sv_status.html#7a3fe2114e7a603b96fd9675adf0c5b5">GpsSvStatus::sv_list</a>[GPS_MAX_SVS]          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Contains an array of SV information. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00146">146</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="4751f70f8e275241dece99db0df4ab5b"></a><!-- doxytag: member="GpsSvStatus::ephemeris_mask" ref="4751f70f8e275241dece99db0df4ab5b" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">uint32_t <a class="el" href="struct_gps_sv_status.html#4751f70f8e275241dece99db0df4ab5b">GpsSvStatus::ephemeris_mask</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Represents a bit mask indicating which SVs have ephemeris data. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00151">151</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="6ed4b741a9882ecc2852e94e8ad60310"></a><!-- doxytag: member="GpsSvStatus::almanac_mask" ref="6ed4b741a9882ecc2852e94e8ad60310" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">uint32_t <a class="el" href="struct_gps_sv_status.html#6ed4b741a9882ecc2852e94e8ad60310">GpsSvStatus::almanac_mask</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Represents a bit mask indicating which SVs have almanac data. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00156">156</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<a class="anchor" name="9090a26639d97eec2b59bcd0446659c0"></a><!-- doxytag: member="GpsSvStatus::used_in_fix_mask" ref="9090a26639d97eec2b59bcd0446659c0" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">uint32_t <a class="el" href="struct_gps_sv_status.html#9090a26639d97eec2b59bcd0446659c0">GpsSvStatus::used_in_fix_mask</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Represents a bit mask indicating which SVs were used for computing the most recent position fix. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00162">162</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="gps_8h-source.html">gps.h</a></ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/struct_gps_xtra_callbacks.html b/pdk/docs/struct_gps_xtra_callbacks.html
deleted file mode 100755 (executable)
index 08130e3..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>GpsXtraCallbacks Struct Reference</h1><!-- doxytag: class="GpsXtraCallbacks" -->Callback structure for the XTRA interface.  
-<a href="#_details">More...</a>
-<p>
-<code>#include &lt;<a class="el" href="gps_8h-source.html">gps.h</a>&gt;</code>
-<p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="gps_8h.html#08fcfb3f85c2ac3008c9c73cf9136515">gps_xtra_download_request</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_xtra_callbacks.html#7e879ba4c3e32c52eaa0fb04fb9c226f">download_request_cb</a></td></tr>
-
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-Callback structure for the XTRA interface. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00229">229</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-<hr><h2>Field Documentation</h2>
-<a class="anchor" name="7e879ba4c3e32c52eaa0fb04fb9c226f"></a><!-- doxytag: member="GpsXtraCallbacks::download_request_cb" ref="7e879ba4c3e32c52eaa0fb04fb9c226f" args="" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname"><a class="el" href="gps_8h.html#08fcfb3f85c2ac3008c9c73cf9136515">gps_xtra_download_request</a> <a class="el" href="struct_gps_xtra_callbacks.html#7e879ba4c3e32c52eaa0fb04fb9c226f">GpsXtraCallbacks::download_request_cb</a>          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00230">230</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-
-</div>
-</div><p>
-<hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="gps_8h-source.html">gps.h</a></ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/struct_gps_xtra_interface.html b/pdk/docs/struct_gps_xtra_interface.html
deleted file mode 100755 (executable)
index d21fa10..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-  <div class="tabs">
-    <ul>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>GpsXtraInterface Struct Reference</h1><!-- doxytag: class="GpsXtraInterface" -->Extended interface for XTRA support.  
-<a href="#_details">More...</a>
-<p>
-<code>#include &lt;<a class="el" href="gps_8h-source.html">gps.h</a>&gt;</code>
-<p>
-<table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_xtra_interface.html#5532e662c68e1d3df7db86570df96bf0">init</a> )(<a class="el" href="struct_gps_xtra_callbacks.html">GpsXtraCallbacks</a> *callbacks)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens the XTRA interface and provides the callback routines to the implemenation of this interface.  <a href="#5532e662c68e1d3df7db86570df96bf0"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_gps_xtra_interface.html#2b1962c8a5a2751702937cf469dc7435">inject_xtra_data</a> )(char *data, int length)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Injects XTRA data into the GPS.  <a href="#2b1962c8a5a2751702937cf469dc7435"></a><br></td></tr>
-</table>
-<hr><a name="_details"></a><h2>Detailed Description</h2>
-Extended interface for XTRA support. 
-<p>
-
-<p>Definition at line <a class="el" href="gps_8h-source.html#l00234">234</a> of file <a class="el" href="gps_8h-source.html">gps.h</a>.</p>
-<hr><h2>Field Documentation</h2>
-<a class="anchor" name="5532e662c68e1d3df7db86570df96bf0"></a><!-- doxytag: member="GpsXtraInterface::init" ref="5532e662c68e1d3df7db86570df96bf0" args=")(GpsXtraCallbacks *callbacks)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int(* <a class="el" href="struct_gps_xtra_interface.html#5532e662c68e1d3df7db86570df96bf0">GpsXtraInterface::init</a>)(<a class="el" href="struct_gps_xtra_callbacks.html">GpsXtraCallbacks</a> *callbacks)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Opens the XTRA interface and provides the callback routines to the implemenation of this interface. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="2b1962c8a5a2751702937cf469dc7435"></a><!-- doxytag: member="GpsXtraInterface::inject_xtra_data" ref="2b1962c8a5a2751702937cf469dc7435" args=")(char *data, int length)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int(* <a class="el" href="struct_gps_xtra_interface.html#2b1962c8a5a2751702937cf469dc7435">GpsXtraInterface::inject_xtra_data</a>)(char *data, int length)          </td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Injects XTRA data into the GPS. 
-<p>
-
-</div>
-</div><p>
-<hr>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="gps_8h-source.html">gps.h</a></ul>
-</div>
-</body>
-</html>
diff --git a/pdk/docs/tab_b.gif b/pdk/docs/tab_b.gif
deleted file mode 100755 (executable)
index 0d62348..0000000
Binary files a/pdk/docs/tab_b.gif and /dev/null differ
diff --git a/pdk/docs/tab_l.gif b/pdk/docs/tab_l.gif
deleted file mode 100755 (executable)
index 9b1e633..0000000
Binary files a/pdk/docs/tab_l.gif and /dev/null differ
diff --git a/pdk/docs/tab_r.gif b/pdk/docs/tab_r.gif
deleted file mode 100755 (executable)
index ce9dd9f..0000000
Binary files a/pdk/docs/tab_r.gif and /dev/null differ
diff --git a/pdk/docs/tabs.css b/pdk/docs/tabs.css
deleted file mode 100755 (executable)
index 95f00a9..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */
-
-DIV.tabs
-{
-   float            : left;
-   width            : 100%;
-   background       : url("tab_b.gif") repeat-x bottom;
-   margin-bottom    : 4px;
-}
-
-DIV.tabs UL
-{
-   margin           : 0px;
-   padding-left     : 10px;
-   list-style       : none;
-}
-
-DIV.tabs LI, DIV.tabs FORM
-{
-   display          : inline;
-   margin           : 0px;
-   padding          : 0px;
-}
-
-DIV.tabs FORM
-{
-   float            : right;
-}
-
-DIV.tabs A
-{
-   float            : left;
-   background       : url("tab_r.gif") no-repeat right top;
-   border-bottom    : 1px solid #84B0C7;
-   font-size        : x-small;
-   font-weight      : bold;
-   text-decoration  : none;
-}
-
-DIV.tabs A:hover
-{
-   background-position: 100% -150px;
-}
-
-DIV.tabs A:link, DIV.tabs A:visited,
-DIV.tabs A:active, DIV.tabs A:hover
-{
-       color: #1A419D;
-}
-
-DIV.tabs SPAN
-{
-   float            : left;
-   display          : block;
-   background       : url("tab_l.gif") no-repeat left top;
-   padding          : 5px 9px;
-   white-space      : nowrap;
-}
-
-DIV.tabs INPUT
-{
-   float            : right;
-   display          : inline;
-   font-size        : 1em;
-}
-
-DIV.tabs TD
-{
-   font-size        : x-small;
-   font-weight      : bold;
-   text-decoration  : none;
-}
-
-
-
-/* Commented Backslash Hack hides rule from IE5-Mac \*/
-DIV.tabs SPAN {float : none;}
-/* End IE5-Mac hack */
-
-DIV.tabs A:hover SPAN
-{
-   background-position: 0% -150px;
-}
-
-DIV.tabs LI.current A
-{
-   background-position: 100% -150px;
-   border-width     : 0px;
-}
-
-DIV.tabs LI.current SPAN
-{
-   background-position: 0% -150px;
-   padding-bottom   : 6px;
-}
-
-DIV.navpath
-{
-   background       : none;
-   border           : none;
-   border-bottom    : 1px solid #84B0C7;
-}
diff --git a/pdk/docs/wifi_8h-source.html b/pdk/docs/wifi_8h-source.html
deleted file mode 100755 (executable)
index 806dd79..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-</div>
-<h1>wifi.h</h1><a href="wifi_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2008 The Android Open Source Project</span>
-<a name="l00003"></a>00003 <span class="comment"> *</span>
-<a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
-<a name="l00005"></a>00005 <span class="comment"> * you may not use this file except in compliance with the License.</span>
-<a name="l00006"></a>00006 <span class="comment"> * You may obtain a copy of the License at</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> *      http://www.apache.org/licenses/LICENSE-2.0</span>
-<a name="l00009"></a>00009 <span class="comment"> *</span>
-<a name="l00010"></a>00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
-<a name="l00011"></a>00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
-<a name="l00012"></a>00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
-<a name="l00013"></a>00013 <span class="comment"> * See the License for the specific language governing permissions and</span>
-<a name="l00014"></a>00014 <span class="comment"> * limitations under the License.</span>
-<a name="l00015"></a>00015 <span class="comment"> */</span>
-<a name="l00016"></a>00016 
-<a name="l00017"></a>00017 <span class="preprocessor">#ifndef _WIFI_H</span>
-<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define _WIFI_H</span>
-<a name="l00019"></a>00019 <span class="preprocessor"></span>
-<a name="l00020"></a>00020 <span class="preprocessor">#if __cplusplus</span>
-<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
-<a name="l00022"></a>00022 <span class="preprocessor">#endif</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="comment"></span>
-<a name="l00024"></a>00024 <span class="comment">/**</span>
-<a name="l00025"></a>00025 <span class="comment"> * Load the Wi-Fi driver.</span>
-<a name="l00026"></a>00026 <span class="comment"> *</span>
-<a name="l00027"></a>00027 <span class="comment"> * @return 0 on success, &lt; 0 on failure.</span>
-<a name="l00028"></a>00028 <span class="comment"> */</span>
-<a name="l00029"></a>00029 <span class="keywordtype">int</span> <a class="code" href="wifi_8h.html#ef0be2b5d0603acb8e0ab99051969bb7" title="Load the Wi-Fi driver.">wifi_load_driver</a>();
-<a name="l00030"></a>00030 <span class="comment"></span>
-<a name="l00031"></a>00031 <span class="comment">/**</span>
-<a name="l00032"></a>00032 <span class="comment"> * Unload the Wi-Fi driver.</span>
-<a name="l00033"></a>00033 <span class="comment"> *</span>
-<a name="l00034"></a>00034 <span class="comment"> * @return 0 on success, &lt; 0 on failure.</span>
-<a name="l00035"></a>00035 <span class="comment"> */</span>
-<a name="l00036"></a>00036 <span class="keywordtype">int</span> <a class="code" href="wifi_8h.html#a0c054da650a0162e40f327eb05679cb" title="Unload the Wi-Fi driver.">wifi_unload_driver</a>();
-<a name="l00037"></a>00037 <span class="comment"></span>
-<a name="l00038"></a>00038 <span class="comment">/**</span>
-<a name="l00039"></a>00039 <span class="comment"> * Start supplicant.</span>
-<a name="l00040"></a>00040 <span class="comment"> *</span>
-<a name="l00041"></a>00041 <span class="comment"> * @return 0 on success, &lt; 0 on failure.</span>
-<a name="l00042"></a>00042 <span class="comment"> */</span>
-<a name="l00043"></a>00043 <span class="keywordtype">int</span> <a class="code" href="wifi_8h.html#3372e235a7899484912d7f85887e8a47" title="Start supplicant.">wifi_start_supplicant</a>();
-<a name="l00044"></a>00044 <span class="comment"></span>
-<a name="l00045"></a>00045 <span class="comment">/**</span>
-<a name="l00046"></a>00046 <span class="comment"> * Stop supplicant.</span>
-<a name="l00047"></a>00047 <span class="comment"> *</span>
-<a name="l00048"></a>00048 <span class="comment"> * @return 0 on success, &lt; 0 on failure.</span>
-<a name="l00049"></a>00049 <span class="comment"> */</span>
-<a name="l00050"></a>00050 <span class="keywordtype">int</span> <a class="code" href="wifi_8h.html#08b97e58f2909489f1f3d59fb31f2c19" title="Stop supplicant.">wifi_stop_supplicant</a>();
-<a name="l00051"></a>00051 <span class="comment"></span>
-<a name="l00052"></a>00052 <span class="comment">/**</span>
-<a name="l00053"></a>00053 <span class="comment"> * Open a connection to supplicant.</span>
-<a name="l00054"></a>00054 <span class="comment"> *</span>
-<a name="l00055"></a>00055 <span class="comment"> * @return 0 on success, &lt; 0 on failure.</span>
-<a name="l00056"></a>00056 <span class="comment"> */</span>
-<a name="l00057"></a>00057 <span class="keywordtype">int</span> <a class="code" href="wifi_8h.html#d81473c3f314ba581e88bb9f1ae37904" title="Open a connection to supplicant.">wifi_connect_to_supplicant</a>();
-<a name="l00058"></a>00058 <span class="comment"></span>
-<a name="l00059"></a>00059 <span class="comment">/**</span>
-<a name="l00060"></a>00060 <span class="comment"> * Close connection supplicant.</span>
-<a name="l00061"></a>00061 <span class="comment"> *</span>
-<a name="l00062"></a>00062 <span class="comment"> * @return 0 on success, &lt; 0 on failure.</span>
-<a name="l00063"></a>00063 <span class="comment"> */</span>
-<a name="l00064"></a>00064 <span class="keywordtype">void</span> <a class="code" href="wifi_8h.html#a3f8c99b26cfd95e90012cae63ec4826" title="Close connection supplicant.">wifi_close_supplicant_connection</a>();
-<a name="l00065"></a>00065 <span class="comment"></span>
-<a name="l00066"></a>00066 <span class="comment">/**</span>
-<a name="l00067"></a>00067 <span class="comment"> * wifi_wait_for_event() performs a blocking call to </span>
-<a name="l00068"></a>00068 <span class="comment"> * get a Wi-Fi event and returns a string representing </span>
-<a name="l00069"></a>00069 <span class="comment"> * a Wi-Fi event when it occurs.</span>
-<a name="l00070"></a>00070 <span class="comment"> *</span>
-<a name="l00071"></a>00071 <span class="comment"> * @param buf is the buffer that receives the event</span>
-<a name="l00072"></a>00072 <span class="comment"> * @param len is the maximum length of the buffer</span>
-<a name="l00073"></a>00073 <span class="comment"> *</span>
-<a name="l00074"></a>00074 <span class="comment"> * @returns number of bytes in buffer, 0 if no</span>
-<a name="l00075"></a>00075 <span class="comment"> * event (for instance, no connection), and less than 0</span>
-<a name="l00076"></a>00076 <span class="comment"> * if there is an error.</span>
-<a name="l00077"></a>00077 <span class="comment"> */</span>
-<a name="l00078"></a>00078 <span class="keywordtype">int</span> <a class="code" href="wifi_8h.html#656495e1beea1e39a144cdff776cdb96" title="wifi_wait_for_event() performs a blocking call to get a Wi-Fi event and returns a...">wifi_wait_for_event</a>(<span class="keywordtype">char</span> *buf, <span class="keywordtype">size_t</span> len);
-<a name="l00079"></a>00079 <span class="comment"></span>
-<a name="l00080"></a>00080 <span class="comment">/**</span>
-<a name="l00081"></a>00081 <span class="comment"> * wifi_command() issues a command to the Wi-Fi driver.</span>
-<a name="l00082"></a>00082 <span class="comment"> *</span>
-<a name="l00083"></a>00083 <span class="comment"> * Android extends the standard commands listed at </span>
-<a name="l00084"></a>00084 <span class="comment"> * /link http://hostap.epitest.fi/wpa_supplicant/devel/ctrl_iface_page.html </span>
-<a name="l00085"></a>00085 <span class="comment"> * to include support for sending commands to the driver:</span>
-<a name="l00086"></a>00086 <span class="comment"> *</span>
-<a name="l00087"></a>00087 <span class="comment"> * &lt;table border="2" cellspacing="2" cellpadding="2"&gt;</span>
-<a name="l00088"></a>00088 <span class="comment"> *   &lt;tr&gt;</span>
-<a name="l00089"></a>00089 <span class="comment"> *     &lt;td&gt;&lt;strong&gt;Command / Command summary&lt;/strong&gt;&lt;/td&gt;</span>
-<a name="l00090"></a>00090 <span class="comment"> *     &lt;td&gt;&lt;strong&gt;Form of Response&lt;/strong&gt;&lt;/td&gt;</span>
-<a name="l00091"></a>00091 <span class="comment"> *     &lt;td&gt;&lt;strong&gt;Processing&lt;/strong&gt;&lt;/td&gt;</span>
-<a name="l00092"></a>00092 <span class="comment"> *   &lt;/tr&gt;</span>
-<a name="l00093"></a>00093 <span class="comment"> *   &lt;tr&gt;</span>
-<a name="l00094"></a>00094 <span class="comment"> *     &lt;td&gt;DRIVER START&lt;BR&gt;&amp;nbsp;&amp;nbsp;Turn on Wi-Fi Hardware&lt;/td&gt;</span>
-<a name="l00095"></a>00095 <span class="comment"> *     &lt;td&gt;OK if successful&lt;/td&gt;</span>
-<a name="l00096"></a>00096 <span class="comment"> *     &lt;td&gt;OK ? true : false&lt;/td&gt;</span>
-<a name="l00097"></a>00097 <span class="comment"> *   &lt;/tr&gt;</span>
-<a name="l00098"></a>00098 <span class="comment"> *   &lt;tr&gt;</span>
-<a name="l00099"></a>00099 <span class="comment"> *     &lt;td&gt;DRIVER STOP&lt;BR&gt;&amp;nbsp;&amp;nbsp;Turn off Wi-Fi hardware&lt;/td&gt;</span>
-<a name="l00100"></a>00100 <span class="comment"> *     &lt;td&gt;OK if successful&lt;/td&gt;</span>
-<a name="l00101"></a>00101 <span class="comment"> *     &lt;td&gt;OK ? true : false&lt;/td&gt;</span>
-<a name="l00102"></a>00102 <span class="comment"> *   &lt;/tr&gt;</span>
-<a name="l00103"></a>00103 <span class="comment"> *   &lt;tr&gt;</span>
-<a name="l00104"></a>00104 <span class="comment"> *     &lt;td&gt;DRIVER RSSI&lt;BR&gt;&amp;nbsp;&amp;nbsp;Return received signal strength indicator in -db for current AP&lt;/td&gt;</span>
-<a name="l00105"></a>00105 <span class="comment"> *     &lt;td&gt;&amp;lt;ssid&amp;gt; Rssi xx&lt;/td&gt;</span>
-<a name="l00106"></a>00106 <span class="comment"> *     &lt;td&gt;%*s %*s %d", &amp;rssi&lt;/td&gt;</span>
-<a name="l00107"></a>00107 <span class="comment"> *   &lt;/tr&gt;</span>
-<a name="l00108"></a>00108 <span class="comment"> *   &lt;tr&gt;</span>
-<a name="l00109"></a>00109 <span class="comment"> *     &lt;td&gt;DRIVER LINKSPEED&lt;BR&gt;&amp;nbsp;&amp;nbsp;Return link speed in MBPS&lt;/td&gt;</span>
-<a name="l00110"></a>00110 <span class="comment"> *     &lt;td&gt;LinkSpeed xx&lt;/td&gt;</span>
-<a name="l00111"></a>00111 <span class="comment"> *     &lt;td&gt;%*s %d", &amp;linkspd&lt;/td&gt;</span>
-<a name="l00112"></a>00112 <span class="comment"> *   &lt;/tr&gt;</span>
-<a name="l00113"></a>00113 <span class="comment"> *   &lt;tr&gt;</span>
-<a name="l00114"></a>00114 <span class="comment"> *     &lt;td&gt;DRIVER MACADDR&lt;BR&gt;&amp;nbsp;&amp;nbsp;Return mac address of the station&lt;/td&gt;</span>
-<a name="l00115"></a>00115 <span class="comment"> *     &lt;td&gt;Macaddr = xx.xx.xx.xx.xx.xx&lt;/td&gt;</span>
-<a name="l00116"></a>00116 <span class="comment"> *     &lt;td&gt;"%*s = %s", &amp;macadr&lt;/td&gt;</span>
-<a name="l00117"></a>00117 <span class="comment"> *   &lt;/tr&gt;</span>
-<a name="l00118"></a>00118 <span class="comment"> *   &lt;tr&gt;</span>
-<a name="l00119"></a>00119 <span class="comment"> *     &lt;td&gt;DRIVER SCAN-ACTIVE&lt;BR&gt;&amp;nbsp;&amp;nbsp;Set scan type to active&lt;/td&gt;</span>
-<a name="l00120"></a>00120 <span class="comment"> *     &lt;td&gt;"OK" if successful&lt;/td&gt;</span>
-<a name="l00121"></a>00121 <span class="comment"> *     &lt;td&gt;"OK" ? true : false&lt;/td&gt;</span>
-<a name="l00122"></a>00122 <span class="comment"> *   &lt;/tr&gt;</span>
-<a name="l00123"></a>00123 <span class="comment"> *   &lt;tr&gt;</span>
-<a name="l00124"></a>00124 <span class="comment"> *     &lt;td&gt;DRIVER SCAN-PASSIVE&lt;BR&gt;&amp;nbsp;&amp;nbsp;Set scan type to passive&lt;/td&gt;</span>
-<a name="l00125"></a>00125 <span class="comment"> *     &lt;td&gt;"OK" if successful&lt;/td&gt;</span>
-<a name="l00126"></a>00126 <span class="comment"> *     &lt;td&gt;"OK" ? true : false&lt;/td&gt;</span>
-<a name="l00127"></a>00127 <span class="comment"> *   &lt;/tr&gt;</span>
-<a name="l00128"></a>00128 <span class="comment"> * &lt;/table&gt;</span>
-<a name="l00129"></a>00129 <span class="comment"> *</span>
-<a name="l00130"></a>00130 <span class="comment"> * See libs/android_runtime/android_net_wifi_Wifi.cpp for more information</span>
-<a name="l00131"></a>00131 <span class="comment"> * describing how these and other commands are invoked.</span>
-<a name="l00132"></a>00132 <span class="comment"> *</span>
-<a name="l00133"></a>00133 <span class="comment"> * @param command is the string command</span>
-<a name="l00134"></a>00134 <span class="comment"> * @param reply is a buffer to receive a reply string</span>
-<a name="l00135"></a>00135 <span class="comment"> * @param reply_len on entry, this is the maximum length of</span>
-<a name="l00136"></a>00136 <span class="comment"> *        the reply buffer. On exit, the number of</span>
-<a name="l00137"></a>00137 <span class="comment"> *        bytes in the reply buffer.</span>
-<a name="l00138"></a>00138 <span class="comment"> *</span>
-<a name="l00139"></a>00139 <span class="comment"> * @return 0 if successful, &lt; 0 if an error.</span>
-<a name="l00140"></a>00140 <span class="comment"> */</span>
-<a name="l00141"></a>00141 <span class="keywordtype">int</span> <a class="code" href="wifi_8h.html#b84f92e035b7bc6a5d669b3738c93e32" title="wifi_command() issues a command to the Wi-Fi driver.">wifi_command</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *command, <span class="keywordtype">char</span> *reply, <span class="keywordtype">size_t</span> *reply_len);
-<a name="l00142"></a>00142 <span class="comment"></span>
-<a name="l00143"></a>00143 <span class="comment">/**</span>
-<a name="l00144"></a>00144 <span class="comment"> * do_dhcp_request() issues a dhcp request and returns the acquired</span>
-<a name="l00145"></a>00145 <span class="comment"> * information. </span>
-<a name="l00146"></a>00146 <span class="comment"> * </span>
-<a name="l00147"></a>00147 <span class="comment"> * All IPV4 addresses/mask are in network byte order.</span>
-<a name="l00148"></a>00148 <span class="comment"> *</span>
-<a name="l00149"></a>00149 <span class="comment"> * @param ipaddr return the assigned IPV4 address</span>
-<a name="l00150"></a>00150 <span class="comment"> * @param gateway return the gateway being used</span>
-<a name="l00151"></a>00151 <span class="comment"> * @param mask return the IPV4 mask</span>
-<a name="l00152"></a>00152 <span class="comment"> * @param dns1 return the IPV4 address of a DNS server</span>
-<a name="l00153"></a>00153 <span class="comment"> * @param dns2 return the IPV4 address of a DNS server</span>
-<a name="l00154"></a>00154 <span class="comment"> * @param server return the IPV4 address of DHCP server</span>
-<a name="l00155"></a>00155 <span class="comment"> * @param lease return the length of lease in seconds.</span>
-<a name="l00156"></a>00156 <span class="comment"> *</span>
-<a name="l00157"></a>00157 <span class="comment"> * @return 0 if successful, &lt; 0 if error.</span>
-<a name="l00158"></a>00158 <span class="comment"> */</span>
-<a name="l00159"></a>00159 <span class="keywordtype">int</span> <a class="code" href="wifi_8h.html#c6876a5403aaeee922d000043a47b25a" title="do_dhcp_request() issues a dhcp request and returns the acquired information.">do_dhcp_request</a>(<span class="keywordtype">int</span> *ipaddr, <span class="keywordtype">int</span> *gateway, <span class="keywordtype">int</span> *mask,
-<a name="l00160"></a>00160                    <span class="keywordtype">int</span> *dns1, <span class="keywordtype">int</span> *dns2, <span class="keywordtype">int</span> *server, <span class="keywordtype">int</span> *lease);
-<a name="l00161"></a>00161 <span class="comment"></span>
-<a name="l00162"></a>00162 <span class="comment">/**</span>
-<a name="l00163"></a>00163 <span class="comment"> * Return the error string of the last do_dhcp_request().</span>
-<a name="l00164"></a>00164 <span class="comment"> */</span>
-<a name="l00165"></a>00165 <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="wifi_8h.html#8f25ea8ec313efb45affe65fd7c108ee" title="Return the error string of the last do_dhcp_request().">get_dhcp_error_string</a>();
-<a name="l00166"></a>00166 
-<a name="l00167"></a>00167 <span class="preprocessor">#if __cplusplus</span>
-<a name="l00168"></a>00168 <span class="preprocessor"></span>};  <span class="comment">// extern "C"</span>
-<a name="l00169"></a>00169 <span class="preprocessor">#endif</span>
-<a name="l00170"></a>00170 <span class="preprocessor"></span>
-<a name="l00171"></a>00171 <span class="preprocessor">#endif  // _WIFI_H</span>
-</pre></div></div>
-</body>
-</html>
diff --git a/pdk/docs/wifi_8h.html b/pdk/docs/wifi_8h.html
deleted file mode 100755 (executable)
index c8285d0..0000000
+++ /dev/null
@@ -1,405 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Doxygen-Generated Content</title>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-<style type="text/css">
-<!--
-.navigation {
-       display: none;
-}
--->
-</style>
-</head>
-<body>
-<!-- Generated by Doxygen 1.5.6 -->
-<div class="navigation" id="top">
-  <div class="tabs">
-    <ul>
-      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
-      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
-      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
-      <li class="current"><a href="files.html"><span>Files</span></a></li>
-    </ul>
-  </div>
-</div>
-<div class="contents">
-<h1>wifi.h File Reference</h1>
-<p>
-<a href="wifi_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
-<tr><td></td></tr>
-<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wifi_8h.html#ef0be2b5d0603acb8e0ab99051969bb7">wifi_load_driver</a> ()</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Load the Wi-Fi driver.  <a href="#ef0be2b5d0603acb8e0ab99051969bb7"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wifi_8h.html#a0c054da650a0162e40f327eb05679cb">wifi_unload_driver</a> ()</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unload the Wi-Fi driver.  <a href="#a0c054da650a0162e40f327eb05679cb"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wifi_8h.html#3372e235a7899484912d7f85887e8a47">wifi_start_supplicant</a> ()</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Start supplicant.  <a href="#3372e235a7899484912d7f85887e8a47"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wifi_8h.html#08b97e58f2909489f1f3d59fb31f2c19">wifi_stop_supplicant</a> ()</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stop supplicant.  <a href="#08b97e58f2909489f1f3d59fb31f2c19"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wifi_8h.html#d81473c3f314ba581e88bb9f1ae37904">wifi_connect_to_supplicant</a> ()</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open a connection to supplicant.  <a href="#d81473c3f314ba581e88bb9f1ae37904"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wifi_8h.html#a3f8c99b26cfd95e90012cae63ec4826">wifi_close_supplicant_connection</a> ()</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close connection supplicant.  <a href="#a3f8c99b26cfd95e90012cae63ec4826"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wifi_8h.html#656495e1beea1e39a144cdff776cdb96">wifi_wait_for_event</a> (char *buf, size_t len)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="wifi_8h.html#656495e1beea1e39a144cdff776cdb96" title="wifi_wait_for_event() performs a blocking call to get a Wi-Fi event and returns a...">wifi_wait_for_event()</a> performs a blocking call to get a Wi-Fi event and returns a string representing a Wi-Fi event when it occurs.  <a href="#656495e1beea1e39a144cdff776cdb96"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wifi_8h.html#b84f92e035b7bc6a5d669b3738c93e32">wifi_command</a> (const char *command, char *reply, size_t *reply_len)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="wifi_8h.html#b84f92e035b7bc6a5d669b3738c93e32" title="wifi_command() issues a command to the Wi-Fi driver.">wifi_command()</a> issues a command to the Wi-Fi driver.  <a href="#b84f92e035b7bc6a5d669b3738c93e32"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wifi_8h.html#c6876a5403aaeee922d000043a47b25a">do_dhcp_request</a> (int *ipaddr, int *gateway, int *mask, int *dns1, int *dns2, int *server, int *lease)</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="wifi_8h.html#c6876a5403aaeee922d000043a47b25a" title="do_dhcp_request() issues a dhcp request and returns the acquired information.">do_dhcp_request()</a> issues a dhcp request and returns the acquired information.  <a href="#c6876a5403aaeee922d000043a47b25a"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="wifi_8h.html#8f25ea8ec313efb45affe65fd7c108ee">get_dhcp_error_string</a> ()</td></tr>
-
-<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the error string of the last <a class="el" href="wifi_8h.html#c6876a5403aaeee922d000043a47b25a" title="do_dhcp_request() issues a dhcp request and returns the acquired information.">do_dhcp_request()</a>.  <a href="#8f25ea8ec313efb45affe65fd7c108ee"></a><br></td></tr>
-</table>
-<hr><h2>Function Documentation</h2>
-<a class="anchor" name="c6876a5403aaeee922d000043a47b25a"></a><!-- doxytag: member="wifi.h::do_dhcp_request" ref="c6876a5403aaeee922d000043a47b25a" args="(int *ipaddr, int *gateway, int *mask, int *dns1, int *dns2, int *server, int *lease)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int do_dhcp_request           </td>
-          <td>(</td>
-          <td class="paramtype">int *&nbsp;</td>
-          <td class="paramname"> <em>ipaddr</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int *&nbsp;</td>
-          <td class="paramname"> <em>gateway</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int *&nbsp;</td>
-          <td class="paramname"> <em>mask</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int *&nbsp;</td>
-          <td class="paramname"> <em>dns1</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int *&nbsp;</td>
-          <td class="paramname"> <em>dns2</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int *&nbsp;</td>
-          <td class="paramname"> <em>server</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">int *&nbsp;</td>
-          <td class="paramname"> <em>lease</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-<a class="el" href="wifi_8h.html#c6876a5403aaeee922d000043a47b25a" title="do_dhcp_request() issues a dhcp request and returns the acquired information.">do_dhcp_request()</a> issues a dhcp request and returns the acquired information. 
-<p>
-All IPV4 addresses/mask are in network byte order.<p>
-<dl compact><dt><b>Parameters:</b></dt><dd>
-  <table border="0" cellspacing="2" cellpadding="0">
-    <tr><td valign="top"></td><td valign="top"><em>ipaddr</em>&nbsp;</td><td>return the assigned IPV4 address </td></tr>
-    <tr><td valign="top"></td><td valign="top"><em>gateway</em>&nbsp;</td><td>return the gateway being used </td></tr>
-    <tr><td valign="top"></td><td valign="top"><em>mask</em>&nbsp;</td><td>return the IPV4 mask </td></tr>
-    <tr><td valign="top"></td><td valign="top"><em>dns1</em>&nbsp;</td><td>return the IPV4 address of a DNS server </td></tr>
-    <tr><td valign="top"></td><td valign="top"><em>dns2</em>&nbsp;</td><td>return the IPV4 address of a DNS server </td></tr>
-    <tr><td valign="top"></td><td valign="top"><em>server</em>&nbsp;</td><td>return the IPV4 address of DHCP server </td></tr>
-    <tr><td valign="top"></td><td valign="top"><em>lease</em>&nbsp;</td><td>return the length of lease in seconds.</td></tr>
-  </table>
-</dl>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if successful, &lt; 0 if error. </dd></dl>
-
-</div>
-</div><p>
-<a class="anchor" name="8f25ea8ec313efb45affe65fd7c108ee"></a><!-- doxytag: member="wifi.h::get_dhcp_error_string" ref="8f25ea8ec313efb45affe65fd7c108ee" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">const char* get_dhcp_error_string           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Return the error string of the last <a class="el" href="wifi_8h.html#c6876a5403aaeee922d000043a47b25a" title="do_dhcp_request() issues a dhcp request and returns the acquired information.">do_dhcp_request()</a>. 
-<p>
-
-</div>
-</div><p>
-<a class="anchor" name="a3f8c99b26cfd95e90012cae63ec4826"></a><!-- doxytag: member="wifi.h::wifi_close_supplicant_connection" ref="a3f8c99b26cfd95e90012cae63ec4826" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">void wifi_close_supplicant_connection           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Close connection supplicant. 
-<p>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success, &lt; 0 on failure. </dd></dl>
-
-</div>
-</div><p>
-<a class="anchor" name="b84f92e035b7bc6a5d669b3738c93e32"></a><!-- doxytag: member="wifi.h::wifi_command" ref="b84f92e035b7bc6a5d669b3738c93e32" args="(const char *command, char *reply, size_t *reply_len)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int wifi_command           </td>
-          <td>(</td>
-          <td class="paramtype">const char *&nbsp;</td>
-          <td class="paramname"> <em>command</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">char *&nbsp;</td>
-          <td class="paramname"> <em>reply</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t *&nbsp;</td>
-          <td class="paramname"> <em>reply_len</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-<a class="el" href="wifi_8h.html#b84f92e035b7bc6a5d669b3738c93e32" title="wifi_command() issues a command to the Wi-Fi driver.">wifi_command()</a> issues a command to the Wi-Fi driver. 
-<p>
-Android extends the standard commands listed at /link <a href="http://hostap.epitest.fi/wpa_supplicant/devel/ctrl_iface_page.html">http://hostap.epitest.fi/wpa_supplicant/devel/ctrl_iface_page.html</a> to include support for sending commands to the driver:<p>
-<table border="2" cellspacing="2" cellpadding="2">
-<tr>
-<td><b>Command / Command summary</b> </td><td><b>Form of Response</b> </td><td><b>Processing</b>  </td></tr>
-<tr>
-<td>DRIVER START<br>
-&nbsp;&nbsp;Turn on Wi-Fi Hardware </td><td>OK if successful </td><td>OK ? true : false  </td></tr>
-<tr>
-<td>DRIVER STOP<br>
-&nbsp;&nbsp;Turn off Wi-Fi hardware </td><td>OK if successful </td><td>OK ? true : false  </td></tr>
-<tr>
-<td>DRIVER RSSI<br>
-&nbsp;&nbsp;Return received signal strength indicator in -db for current AP </td><td>&lt;ssid&gt; Rssi xx </td><td>*s *s d", &amp;rssi  </td></tr>
-<tr>
-<td>DRIVER LINKSPEED<br>
-&nbsp;&nbsp;Return link speed in MBPS </td><td>LinkSpeed xx </td><td>*s d", &amp;linkspd  </td></tr>
-<tr>
-<td>DRIVER MACADDR<br>
-&nbsp;&nbsp;Return mac address of the station </td><td>Macaddr = xx.xx.xx.xx.xx.xx </td><td>"%*s = %s", &amp;macadr  </td></tr>
-<tr>
-<td>DRIVER SCAN-ACTIVE<br>
-&nbsp;&nbsp;Set scan type to active </td><td>"OK" if successful </td><td>"OK" ? true : false  </td></tr>
-<tr>
-<td>DRIVER SCAN-PASSIVE<br>
-&nbsp;&nbsp;Set scan type to passive </td><td>"OK" if successful </td><td>"OK" ? true : false  </td></tr>
-</table>
-<p>
-See libs/android_runtime/android_net_wifi_Wifi.cpp for more information describing how these and other commands are invoked.<p>
-<dl compact><dt><b>Parameters:</b></dt><dd>
-  <table border="0" cellspacing="2" cellpadding="0">
-    <tr><td valign="top"></td><td valign="top"><em>command</em>&nbsp;</td><td>is the string command </td></tr>
-    <tr><td valign="top"></td><td valign="top"><em>reply</em>&nbsp;</td><td>is a buffer to receive a reply string </td></tr>
-    <tr><td valign="top"></td><td valign="top"><em>reply_len</em>&nbsp;</td><td>on entry, this is the maximum length of the reply buffer. On exit, the number of bytes in the reply buffer.</td></tr>
-  </table>
-</dl>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if successful, &lt; 0 if an error. </dd></dl>
-
-</div>
-</div><p>
-<a class="anchor" name="d81473c3f314ba581e88bb9f1ae37904"></a><!-- doxytag: member="wifi.h::wifi_connect_to_supplicant" ref="d81473c3f314ba581e88bb9f1ae37904" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int wifi_connect_to_supplicant           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Open a connection to supplicant. 
-<p>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success, &lt; 0 on failure. </dd></dl>
-
-</div>
-</div><p>
-<a class="anchor" name="ef0be2b5d0603acb8e0ab99051969bb7"></a><!-- doxytag: member="wifi.h::wifi_load_driver" ref="ef0be2b5d0603acb8e0ab99051969bb7" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int wifi_load_driver           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Load the Wi-Fi driver. 
-<p>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success, &lt; 0 on failure. </dd></dl>
-
-</div>
-</div><p>
-<a class="anchor" name="3372e235a7899484912d7f85887e8a47"></a><!-- doxytag: member="wifi.h::wifi_start_supplicant" ref="3372e235a7899484912d7f85887e8a47" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int wifi_start_supplicant           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Start supplicant. 
-<p>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success, &lt; 0 on failure. </dd></dl>
-
-</div>
-</div><p>
-<a class="anchor" name="08b97e58f2909489f1f3d59fb31f2c19"></a><!-- doxytag: member="wifi.h::wifi_stop_supplicant" ref="08b97e58f2909489f1f3d59fb31f2c19" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int wifi_stop_supplicant           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Stop supplicant. 
-<p>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success, &lt; 0 on failure. </dd></dl>
-
-</div>
-</div><p>
-<a class="anchor" name="a0c054da650a0162e40f327eb05679cb"></a><!-- doxytag: member="wifi.h::wifi_unload_driver" ref="a0c054da650a0162e40f327eb05679cb" args="()" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int wifi_unload_driver           </td>
-          <td>(</td>
-          <td class="paramname">          </td>
-          <td>&nbsp;)&nbsp;</td>
-          <td></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-Unload the Wi-Fi driver. 
-<p>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success, &lt; 0 on failure. </dd></dl>
-
-</div>
-</div><p>
-<a class="anchor" name="656495e1beea1e39a144cdff776cdb96"></a><!-- doxytag: member="wifi.h::wifi_wait_for_event" ref="656495e1beea1e39a144cdff776cdb96" args="(char *buf, size_t len)" -->
-<div class="memitem">
-<div class="memproto">
-      <table class="memname">
-        <tr>
-          <td class="memname">int wifi_wait_for_event           </td>
-          <td>(</td>
-          <td class="paramtype">char *&nbsp;</td>
-          <td class="paramname"> <em>buf</em>, </td>
-        </tr>
-        <tr>
-          <td class="paramkey"></td>
-          <td></td>
-          <td class="paramtype">size_t&nbsp;</td>
-          <td class="paramname"> <em>len</em></td><td>&nbsp;</td>
-        </tr>
-        <tr>
-          <td></td>
-          <td>)</td>
-          <td></td><td></td><td></td>
-        </tr>
-      </table>
-</div>
-<div class="memdoc">
-
-<p>
-<a class="el" href="wifi_8h.html#656495e1beea1e39a144cdff776cdb96" title="wifi_wait_for_event() performs a blocking call to get a Wi-Fi event and returns a...">wifi_wait_for_event()</a> performs a blocking call to get a Wi-Fi event and returns a string representing a Wi-Fi event when it occurs. 
-<p>
-<dl compact><dt><b>Parameters:</b></dt><dd>
-  <table border="0" cellspacing="2" cellpadding="0">
-    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>is the buffer that receives the event </td></tr>
-    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>is the maximum length of the buffer</td></tr>
-  </table>
-</dl>
-<dl class="return" compact><dt><b>Returns:</b></dt><dd>number of bytes in buffer, 0 if no event (for instance, no connection), and less than 0 if there is an error. </dd></dl>
-
-</div>
-</div><p>
-</div>
-</body>
-</html>
diff --git a/pdk/doxygen_config/docsfiles/groups.dox b/pdk/doxygen_config/docsfiles/groups.dox
new file mode 100644 (file)
index 0000000..79f9d3f
--- /dev/null
@@ -0,0 +1,3 @@
+\r
+/*!\r
+*/\r
diff --git a/pdk/doxygen_config/docsfiles/main.dox b/pdk/doxygen_config/docsfiles/main.dox
new file mode 100644 (file)
index 0000000..069c1a2
--- /dev/null
@@ -0,0 +1,5 @@
+/*! \mainpage Google Client Location Library (CLL): location Interface\r
+ *  <p>This documentation is part of Google's Client Location Library (CLL) Getting Started Guide.</p>\r
+ *  <p>In most cases, this Doxygen-generated content opens in a new window (or tab), so look for this window's parent to return to the Getting Started guide. If you maintained \r
+ *  the original directory structure when you unzipped the documentation, you may also return to the Getting Started guide by clicking <a href="../cll_getting_started.html">Client Location Library (CLL) Getting Started Guide</a>.</p>\r
+ */
\ No newline at end of file
diff --git a/pdk/doxygen_config/overrideconfig.conf b/pdk/doxygen_config/overrideconfig.conf
new file mode 100644 (file)
index 0000000..f1e3819
--- /dev/null
@@ -0,0 +1,50 @@
+\r
+#---------------------------------------------------------------------------\r
+# Project related configuration options\r
+#---------------------------------------------------------------------------\r
+DOXYFILE_ENCODING      = UTF-8\r
+PROJECT_NAME           = pdk\r
+PROJECT_NUMBER         = \r
+\r
+INPUT                  = sources \\r
+                         docsfiles\r
+\r
+OUTPUT_DIRECTORY       = generatedDocs\r
+HTML_HEADER            = header.html\r
+HTML_FOOTER            = footer.html\r
+# FILL IN PATH TO HEADER BLOB WANTED IN EVERY FILE\r
+# RELATIVE PATH TO WHER ERUNNING DOXYGEN FROM\r
+HTML_STYLESHEET        =\r
+# PATH TO STYLE SHEET\\r
+\r
+BRIEF_MEMBER_DESC      = YES \r
+REPEAT_BRIEF           = YES\r
+\r
+OPTIMIZE_OUTPUT_FOR_C  = YES\r
+\r
+ALWAYS_DETAILED_SEC    = YES\r
+INLINE_INHERITED_MEMB  = NO\r
+FULL_PATH_NAMES        = NO\r
+STRIP_FROM_PATH        = \r
+STRIP_FROM_INC_PATH    = \r
+SHORT_NAMES            = NO\r
+JAVADOC_AUTOBRIEF      = YES\r
+QT_AUTOBRIEF           = NO\r
+MULTILINE_CPP_IS_BRIEF = NO\r
+DETAILS_AT_TOP         = NO\r
+INHERIT_DOCS           = YES\r
+SEPARATE_MEMBER_PAGES  = NO\r
+\r
+QUIET                  = NO\r
+WARNINGS               = YES\r
+\r
+\r
+\r
+SOURCE_BROWSER         = YES\r
+\r
+GENERATE_HTML          = YES\r
+ENABLE_PREPROCESSING   = NO\r
+\r
+# ADDED JULY 08 TO TRY TO FIGURE OUT DOCUMENING C FILES\r
+EXTRACT_ALL            = YES\r
+STRIP_CODE_COMMENTS    = NO 
diff --git a/pdk/doxygen_config/pdk_config.conf b/pdk/doxygen_config/pdk_config.conf
new file mode 100644 (file)
index 0000000..1f1f349
--- /dev/null
@@ -0,0 +1,273 @@
+# Doxyfile 1.5.6\r
+\r
+#---------------------------------------------------------------------------\r
+# Project related configuration options\r
+#---------------------------------------------------------------------------\r
+DOXYFILE_ENCODING      = UTF-8\r
+PROJECT_NAME           = pdk\r
+PROJECT_NUMBER         = \r
+OUTPUT_DIRECTORY       = \r
+CREATE_SUBDIRS         = NO\r
+OUTPUT_LANGUAGE        = English\r
+BRIEF_MEMBER_DESC      = YES \r
+REPEAT_BRIEF           = YES\r
+ABBREVIATE_BRIEF       = "The $name class" \\r
+                         "The $name widget" \\r
+                         "The $name file" \\r
+                         is \\r
+                         provides \\r
+                         specifies \\r
+                         contains \\r
+                         represents \\r
+                         a \\r
+                         an \\r
+                         the\r
+ALWAYS_DETAILED_SEC    = YES\r
+INLINE_INHERITED_MEMB  = NO\r
+FULL_PATH_NAMES        = NO\r
+STRIP_FROM_PATH        = \r
+STRIP_FROM_INC_PATH    = \r
+SHORT_NAMES            = NO\r
+JAVADOC_AUTOBRIEF      = YES\r
+QT_AUTOBRIEF           = NO\r
+MULTILINE_CPP_IS_BRIEF = NO\r
+DETAILS_AT_TOP         = NO\r
+INHERIT_DOCS           = YES\r
+SEPARATE_MEMBER_PAGES  = NO\r
+TAB_SIZE               = 8\r
+ALIASES                = \r
+OPTIMIZE_OUTPUT_FOR_C  = NO\r
+OPTIMIZE_OUTPUT_JAVA   = NO\r
+OPTIMIZE_FOR_FORTRAN   = NO\r
+OPTIMIZE_OUTPUT_VHDL   = NO\r
+BUILTIN_STL_SUPPORT    = NO\r
+CPP_CLI_SUPPORT        = NO\r
+SIP_SUPPORT            = NO\r
+IDL_PROPERTY_SUPPORT   = YES\r
+DISTRIBUTE_GROUP_DOC   = NO\r
+SUBGROUPING            = YES\r
+TYPEDEF_HIDES_STRUCT   = NO\r
+#---------------------------------------------------------------------------\r
+# Build related configuration options\r
+#---------------------------------------------------------------------------\r
+EXTRACT_ALL            = YES\r
+EXTRACT_PRIVATE        = NO\r
+EXTRACT_STATIC         = NO\r
+EXTRACT_LOCAL_CLASSES  = NO\r
+EXTRACT_LOCAL_METHODS  = NO\r
+EXTRACT_ANON_NSPACES   = YES\r
+HIDE_UNDOC_MEMBERS     = NO\r
+HIDE_UNDOC_CLASSES     = NO\r
+HIDE_FRIEND_COMPOUNDS  = NO\r
+HIDE_IN_BODY_DOCS      = NO\r
+INTERNAL_DOCS          = NO\r
+CASE_SENSE_NAMES       = YES\r
+HIDE_SCOPE_NAMES       = NO\r
+SHOW_INCLUDE_FILES     = NO\r
+# MIGHT WANT TO TWEAK LEATER\r
+INLINE_INFO            = YES\r
+SORT_MEMBER_DOCS       = YES\r
+SORT_BRIEF_DOCS        = YES\r
+SORT_GROUP_NAMES       = NO\r
+SORT_BY_SCOPE_NAME     = NO\r
+GENERATE_TODOLIST      = NO\r
+GENERATE_TESTLIST      = NO\r
+GENERATE_BUGLIST       = NO\r
+GENERATE_DEPRECATEDLIST= YES\r
+ENABLED_SECTIONS       = \r
+MAX_INITIALIZER_LINES  = 30\r
+SHOW_USED_FILES        = NO\r
+SHOW_DIRECTORIES       = NO\r
+SHOW_FILES             = YES\r
+SHOW_NAMESPACES        = YES\r
+FILE_VERSION_FILTER    = \r
+#---------------------------------------------------------------------------\r
+# configuration options related to warning and progress messages\r
+#---------------------------------------------------------------------------\r
+QUIET                  = NO\r
+WARNINGS               = YES\r
+WARN_IF_UNDOCUMENTED   = YES\r
+WARN_IF_DOC_ERROR      = YES\r
+WARN_NO_PARAMDOC       = NO\r
+WARN_FORMAT            = "$file:$line: $text"\r
+WARN_LOGFILE           = \r
+#---------------------------------------------------------------------------\r
+# configuration options related to the input files\r
+#---------------------------------------------------------------------------\r
+INPUT                  = \r
+INPUT_ENCODING         = UTF-8\r
+FILE_PATTERNS          = *.c \\r
+                        *.cpp \\r
+                         *.dox \\r
+                         *.h \\r
+                         *.htm \\r
+                         *.html\r
+RECURSIVE              = YES\r
+EXCLUDE                = \r
+# ecxlude entire directories or files\r
+EXCLUDE_SYMLINKS       = NO\r
+EXCLUDE_PATTERNS       = \r
+EXCLUDE_SYMBOLS        = \r
+EXAMPLE_PATH           = \r
+EXAMPLE_PATTERNS       = *\r
+EXAMPLE_RECURSIVE      = NO\r
+IMAGE_PATH             = \r
+INPUT_FILTER           = \r
+FILTER_PATTERNS        = \r
+FILTER_SOURCE_FILES    = NO\r
+#---------------------------------------------------------------------------\r
+# configuration options related to source browsing\r
+#---------------------------------------------------------------------------\r
+SOURCE_BROWSER         = YES\r
+INLINE_SOURCES         = NO\r
+STRIP_CODE_COMMENTS    = YES\r
+REFERENCED_BY_RELATION = NO\r
+REFERENCES_RELATION    = YES\r
+REFERENCES_LINK_SOURCE = NO\r
+USE_HTAGS              = NO\r
+VERBATIM_HEADERS       = NO\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the alphabetical class index\r
+#---------------------------------------------------------------------------\r
+ALPHABETICAL_INDEX     = NO\r
+COLS_IN_ALPHA_INDEX    = 1\r
+IGNORE_PREFIX          = \r
+#---------------------------------------------------------------------------\r
+# configuration options related to the HTML output\r
+#---------------------------------------------------------------------------\r
+GENERATE_HTML          = YES\r
+HTML_OUTPUT            = html\r
+HTML_FILE_EXTENSION    = .html\r
+HTML_HEADER            = \r
+# FILL IN PATH TO HEADER BLOB WANTED IN EVERY FILE\r
+# RELATIVE PATH TO WHER ERUNNING DOXYGEN FROM\r
+HTML_FOOTER            = \r
+HTML_STYLESHEET        =\r
+# PATH TO STYLE SHEET\r
+HTML_ALIGN_MEMBERS     = YES\r
+GENERATE_HTMLHELP      = NO\r
+GENERATE_DOCSET        = NO\r
+DOCSET_FEEDNAME        = "Doxygen generated docs"\r
+DOCSET_BUNDLE_ID       = org.doxygen.Project\r
+HTML_DYNAMIC_SECTIONS  = NO\r
+CHM_FILE               = \r
+HHC_LOCATION           = \r
+GENERATE_CHI           = NO\r
+CHM_INDEX_ENCODING     = \r
+BINARY_TOC             = NO\r
+TOC_EXPAND             = NO\r
+DISABLE_INDEX          = NO\r
+ENUM_VALUES_PER_LINE   = 4\r
+GENERATE_TREEVIEW      = NONE\r
+TREEVIEW_WIDTH         = 250\r
+FORMULA_FONTSIZE       = 10\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the LaTeX output\r
+#---------------------------------------------------------------------------\r
+GENERATE_LATEX         = NO\r
+LATEX_OUTPUT           = latex\r
+LATEX_CMD_NAME         = latex\r
+MAKEINDEX_CMD_NAME     = makeindex\r
+COMPACT_LATEX          = NO\r
+PAPER_TYPE             = a4wide\r
+EXTRA_PACKAGES         = \r
+LATEX_HEADER           = \r
+PDF_HYPERLINKS         = YES\r
+USE_PDFLATEX           = YES\r
+LATEX_BATCHMODE        = NO\r
+LATEX_HIDE_INDICES     = NO\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the RTF output\r
+#---------------------------------------------------------------------------\r
+GENERATE_RTF           = NO\r
+RTF_OUTPUT             = rtf\r
+COMPACT_RTF            = NO\r
+RTF_HYPERLINKS         = NO\r
+RTF_STYLESHEET_FILE    = \r
+RTF_EXTENSIONS_FILE    = \r
+#---------------------------------------------------------------------------\r
+# configuration options related to the man page output\r
+#---------------------------------------------------------------------------\r
+GENERATE_MAN           = NO\r
+MAN_OUTPUT             = man\r
+MAN_EXTENSION          = .3\r
+MAN_LINKS              = NO\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the XML output\r
+#---------------------------------------------------------------------------\r
+GENERATE_XML           = NO\r
+XML_OUTPUT             = xml\r
+XML_SCHEMA             = \r
+XML_DTD                = \r
+XML_PROGRAMLISTING     = YES\r
+#---------------------------------------------------------------------------\r
+# configuration options for the AutoGen Definitions output\r
+#---------------------------------------------------------------------------\r
+GENERATE_AUTOGEN_DEF   = NO\r
+#---------------------------------------------------------------------------\r
+# configuration options related to the Perl module output\r
+#---------------------------------------------------------------------------\r
+GENERATE_PERLMOD       = NO\r
+PERLMOD_LATEX          = NO\r
+PERLMOD_PRETTY         = YES\r
+PERLMOD_MAKEVAR_PREFIX = \r
+#---------------------------------------------------------------------------\r
+# Configuration options related to the preprocessor   \r
+#---------------------------------------------------------------------------\r
+ENABLE_PREPROCESSING   = NO\r
+# KEY CONSIDERATION TWEAK BACK AND FORTH. function in an # if/def preprocessor directive. Processor evalutes whether true. Should doxygen follow compiles behavior or document everything?\r
+# usually have optional things that people may want to tweak. \r
+MACRO_EXPANSION        = YES\r
+EXPAND_ONLY_PREDEF     = YES\r
+SEARCH_INCLUDES        = NO\r
+INCLUDE_PATH           = \r
+INCLUDE_FILE_PATTERNS  = \r
+PREDEFINED             = \r
+#to mimic preprocessor behaviors.\r
+EXPAND_AS_DEFINED      = \r
+SKIP_FUNCTION_MACROS   = YES\r
+#---------------------------------------------------------------------------\r
+# Configuration::additions related to external references   \r
+#---------------------------------------------------------------------------\r
+TAGFILES               = \r
+GENERATE_TAGFILE       = \r
+ALLEXTERNALS           = NO\r
+EXTERNAL_GROUPS        = NO\r
+PERL_PATH              = \r
+#---------------------------------------------------------------------------\r
+# Configuration options related to the dot tool   \r
+#---------------------------------------------------------------------------\r
+CLASS_DIAGRAMS         = NO\r
+#CHANGE WHEN HAVE DIAGRAMS\r
+MSCGEN_PATH            = YES\r
+HIDE_UNDOC_RELATIONS   = YES\r
+HAVE_DOT               = NO\r
+DOT_FONTNAME           = FreeSans\r
+DOT_FONTPATH           = \r
+CLASS_GRAPH            = YES\r
+COLLABORATION_GRAPH    = YES\r
+GROUP_GRAPHS           = YES\r
+UML_LOOK               = NO\r
+TEMPLATE_RELATIONS     = NO\r
+INCLUDE_GRAPH          = YES\r
+INCLUDED_BY_GRAPH      = YES\r
+CALL_GRAPH             = NO\r
+CALLER_GRAPH           = NO\r
+GRAPHICAL_HIERARCHY    = YES\r
+DIRECTORY_GRAPH        = YES\r
+DOT_IMAGE_FORMAT       = png\r
+DOT_PATH               = \r
+DOTFILE_DIRS           = \r
+DOT_GRAPH_MAX_NODES    = 50\r
+MAX_DOT_GRAPH_DEPTH    = 1000\r
+DOT_TRANSPARENT        = YES\r
+DOT_MULTI_TARGETS      = NO\r
+GENERATE_LEGEND        = YES\r
+DOT_CLEANUP            = YES\r
+#---------------------------------------------------------------------------\r
+# Configuration::additions related to the search engine   \r
+#---------------------------------------------------------------------------\r
+SEARCHENGINE           = NO\r
+@INCLUDE = overrideconfig.conf\r
+# relative to where running doxygen from\r
+# @INCLUDE = $(PROJECTCONF)
index d5d0b1b..32400e3 100644 (file)
@@ -60,7 +60,7 @@ endef
 # The JNI-only version is provided for partners that want to create shared
 # libraries that can be packaged with APK files and called from Java code.
 
-LOCAL_PATH := $(my-dir)
+LOCAL_PATH := $(call my-dir)
 
 # Source trees for the ndk
 samples_src_dir := $(LOCAL_PATH)/samples
@@ -183,9 +183,9 @@ ndk_with_src: $(ndk_with_src_tarfile_zipped)
 ndk_jni_with_src: $(ndk_jni_with_src_tarfile_zipped)
 
 # Put the ndk zip files in the distribution directory
-$(call dist-for-goals,pdk,$(ndk_tarfile_zipped))
-$(call dist-for-goals,pdk,$(ndk_with_src_tarfile_zipped))
-$(call dist-for-goals,pdk,$(ndk_jni_with_src_tarfile_zipped))
+$(call dist-for-goals,ndk,$(ndk_tarfile_zipped))
+$(call dist-for-goals,ndk,$(ndk_with_src_tarfile_zipped))
+$(call dist-for-goals,ndk,$(ndk_jni_with_src_tarfile_zipped))
 
 # zip up tar files
 %.tar.gz: %.tar
index bfefbf0..f8fc1b2 100644 (file)
             </intent-filter>
         </activity>
 
+        <!-- Intent Samples -->
+
+        <activity android:name=".app.Intents" android:label="@string/activity_intents">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.SAMPLE_CODE" />
+            </intent-filter>
+        </activity>
+
         <!-- Service Samples -->
 
         <service android:name=".app.LocalService" />
diff --git a/samples/ApiDemos/res/layout/intents.xml b/samples/ApiDemos/res/layout/intents.xml
new file mode 100644 (file)
index 0000000..023e4e8
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!-- Demonstrates launching various intents.
+     See corresponding Java code com.example.android.apis.app.Intents.java. -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:padding="4dip"
+    android:gravity="center_horizontal"
+    android:layout_width="fill_parent" android:layout_height="fill_parent">
+
+    <TextView
+        android:layout_width="fill_parent" android:layout_height="wrap_content"
+        android:layout_weight="0"
+        android:paddingBottom="4dip"
+        android:text="@string/intents"/>
+
+    <Button android:id="@+id/get_music"
+        android:layout_width="wrap_content" android:layout_height="wrap_content" 
+        android:text="@string/get_music">
+        <requestFocus />
+    </Button>
+
+</LinearLayout>
+
index 2b2cc16..7db3e1b 100644 (file)
     <string name="activity_themes">Content/Resources/Themes</string>
     <string name="activity_resources">Content/Resources/Resources</string>
 
+    <!-- ============================== -->
+    <!--  app/intents examples strings     -->
+    <!-- ============================== -->
+    
+    <string name="activity_intents">App/Intents</string>
+    <string name="intents">Example of launching various Intents.</string>
+    <string name="get_music">Get Music</string>
+        
     <!-- =================================== -->
     <!--  app/notification examples strings  -->
     <!-- =================================== -->
index aa45c8e..35d9430 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * Copyright (C) 2008 Google Inc.
+ * Copyright (C) 2008 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -29,7 +29,10 @@ import com.example.android.apis.R;
 
 import java.util.ArrayList;
 
-public class VoiceRecognition extends Activity {
+/**
+ * Sample code that invokes the speech recognition intent API.
+ */
+public class VoiceRecognition extends Activity implements OnClickListener {
     
     private static final int VOICE_RECOGNITION_REQUEST_CODE = 1234;
     
@@ -51,34 +54,41 @@ public class VoiceRecognition extends Activity {
         mList = (ListView) findViewById(R.id.list);
 
         // Attach actions to buttons
-        speakButton.setOnClickListener(new OnClickListener() {
-            public void onClick(View v) {
-                startVoiceRecognitionActivity();
-            }
-        });
+        speakButton.setOnClickListener(this);
+    }
+
+    /**
+     * Handle the click on the start recognition button.
+     */
+    public void onClick(View v) {
+        if (v.getId() == R.id.btn_speak) {
+            startVoiceRecognitionActivity();
+        }
     }
 
-    void startVoiceRecognitionActivity() {
-        Intent intent = new Intent("android.intent.action.VOICE_RECOGNITION");
-        this.startActivityForResult(intent, VOICE_RECOGNITION_REQUEST_CODE);
+    /**
+     * Fire an intent to start the speech recognition activity.
+     */
+    private void startVoiceRecognitionActivity() {
+        //TODO Get these values from constants
+        Intent intent = new Intent("android.speech.action.RECOGNIZE_SPEECH");
+        intent.putExtra("language_model", "free_form");
+        intent.putExtra("prompt", "Speech recognition demo");
+        startActivityForResult(intent, VOICE_RECOGNITION_REQUEST_CODE);
     }
 
+    /**
+     * Handle the results from the recognition activity.
+     */
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        
-        android.util.Log.d("mike", "**************  onActivityResult" + data );
-        
         if (requestCode == VOICE_RECOGNITION_REQUEST_CODE && resultCode == RESULT_OK) {
-            ArrayList<String>matches = data.getStringArrayListExtra("queries");
-            
-            
-            android.util.Log.d("mike", "**************  onActivityResult" + matches);
-            
-            mList.setAdapter(new ArrayAdapter<String>(this,
-                    android.R.layout.simple_list_item_1, matches));
+            //TODO get the value from a constant
+            ArrayList<String>matches = data.getStringArrayListExtra("results");
+            mList.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,
+                    matches));
         }
-        
+
         super.onActivityResult(requestCode, resultCode, data);
     }
-
 }
diff --git a/samples/ApiDemos/src/com/example/android/apis/app/Intents.java b/samples/ApiDemos/src/com/example/android/apis/app/Intents.java
new file mode 100644 (file)
index 0000000..8f02b83
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.example.android.apis.app;
+
+import com.example.android.apis.R;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
+
+public class Intents extends Activity {
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        setContentView(R.layout.intents);
+
+        // Watch for button clicks.
+        Button button = (Button)findViewById(R.id.get_music);
+        button.setOnClickListener(mGetMusicListener);
+    }
+
+    private OnClickListener mGetMusicListener = new OnClickListener() {
+        public void onClick(View v) {
+            Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
+            intent.setType("audio/*");
+            startActivity(Intent.createChooser(intent, "Select music"));
+        }
+    };
+}
diff --git a/samples/Home/res/drawable/ic_menu_gallery.png b/samples/Home/res/drawable/ic_menu_gallery.png
deleted file mode 100644 (file)
index f61bbd8..0000000
Binary files a/samples/Home/res/drawable/ic_menu_gallery.png and /dev/null differ
diff --git a/samples/Home/res/drawable/ic_menu_notifications.png b/samples/Home/res/drawable/ic_menu_notifications.png
deleted file mode 100644 (file)
index 866d4e0..0000000
Binary files a/samples/Home/res/drawable/ic_menu_notifications.png and /dev/null differ
diff --git a/samples/Home/res/drawable/ic_menu_preferences.png b/samples/Home/res/drawable/ic_menu_preferences.png
deleted file mode 100755 (executable)
index b8e7141..0000000
Binary files a/samples/Home/res/drawable/ic_menu_preferences.png and /dev/null differ
index f2fbeff..de67ef4 100644 (file)
@@ -388,13 +388,13 @@ public class Home extends Activity {
         super.onCreateOptionsMenu(menu);
 
         menu.add(0, MENU_WALLPAPER_SETTINGS, 0, R.string.menu_wallpaper)
-                 .setIcon(R.drawable.ic_menu_gallery)
+                 .setIcon(android.R.drawable.ic_menu_gallery)
                  .setAlphabeticShortcut('W');
         menu.add(0, MENU_SEARCH, 0, R.string.menu_search)
                 .setIcon(android.R.drawable.ic_search_category_default)
                 .setAlphabeticShortcut(SearchManager.MENU_KEY);
         menu.add(0, MENU_SETTINGS, 0, R.string.menu_settings)
-                .setIcon(R.drawable.ic_menu_preferences)
+                .setIcon(android.R.drawable.ic_menu_preferences)
                 .setIntent(new Intent(android.provider.Settings.ACTION_SETTINGS));
 
         return true;
index d700386..afb54a2 100644 (file)
@@ -35,6 +35,23 @@ LOCAL_SRC_FILES := $(call all-java-files-under, java)
 include $(BUILD_JAVA_LIBRARY)
 
 # ============================================================
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := com.example.android.platform_library.xml
+
+LOCAL_MODULE_TAGS := samples
+
+LOCAL_MODULE_CLASS := ETC
+
+# This will install the file in /system/etc/permissions
+#
+LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/permissions
+
+LOCAL_SRC_FILES := $(LOCAL_MODULE)
+
+include $(BUILD_PREBUILT)
+
+# ============================================================
 
 # Also build all of the sub-targets under this one: the library's
 # associated JNI code, and a sample client of the library.
index e2a7c80..5ce9d2f 100644 (file)
@@ -12,18 +12,14 @@ create a system image that will be delivered on a device which will include
 a custom library as shown here.  It can not be used to create a third party
 shared library, which is not currently supported in Android.
 
-Note that while this example is almost entirely self-contained -- you can
-build it and run the client app without any changes to the framework -- there
-is one change you must make so that the system will recognize your library:
-
-In frameworks/base/data/etc/permissions.xml is a list of all of the optional
-shared libraries available in the system.  You will need to add an entry at
-the bottom of this file for your own shared library, which looks like this
-for our sample code here:
+To declare your library to the framework, you must place a file with a .xml
+extension in the /system/etc/permissions directory with the following contents:
 
+<?xml version="1.0" encoding="utf-8"?>
+<permissions>
     <library name="com.example.android.platform_library"
             file="/system/framework/com.example.android.platform_library.jar"/>
-
+</permissions>
 
 There are three major parts of this example, supplying three distinct
 build targets and corresponding build outputs:
diff --git a/samples/PlatformLibrary/com.example.android.platform_library.xml b/samples/PlatformLibrary/com.example.android.platform_library.xml
new file mode 100644 (file)
index 0000000..b9491d8
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<permissions>
+    <library name="com.example.android.platform_library"
+            file="/system/framework/com.example.android.platform_library.jar"/>
+</permissions>
index cea6e50..cdaf27a 100644 (file)
@@ -21,4 +21,5 @@
 <resources>
     <dimen name="key_height">50px</dimen>
     <dimen name="candidate_font_height">16sp</dimen>
+    <dimen name="candidate_vertical_padding">6sp</dimen>
 </resources>
\ No newline at end of file
index 1e79cd7..7cadead 100755 (executable)
@@ -55,6 +55,7 @@ public class CandidateView extends View {
     private int mColorNormal;
     private int mColorRecommended;
     private int mColorOther;
+    private int mVerticalPadding;
     private Paint mPaint;
     private boolean mScrolled;
     private int mTargetScrollX;
@@ -86,6 +87,7 @@ public class CandidateView extends View {
         mColorNormal = r.getColor(R.color.candidate_normal);
         mColorRecommended = r.getColor(R.color.candidate_recommended);
         mColorOther = r.getColor(R.color.candidate_other);
+        mVerticalPadding = r.getDimensionPixelSize(R.dimen.candidate_vertical_padding);
         
         mPaint = new Paint();
         mPaint.setColor(mColorNormal);
@@ -139,7 +141,7 @@ public class CandidateView extends View {
         // not have a divider below)
         Rect padding = new Rect();
         mSelectionHighlight.getPadding(padding);
-        final int desiredHeight = ((int)mPaint.getTextSize()) + 1
+        final int desiredHeight = ((int)mPaint.getTextSize()) + mVerticalPadding
                 + padding.top + padding.bottom;
         
         // Maximum possible width and desired height
@@ -174,7 +176,7 @@ public class CandidateView extends View {
         final int scrollX = getScrollX();
         final boolean scrolled = mScrolled;
         final boolean typedWordValid = mTypedWordValid;
-        final int y = (int) (height + mPaint.getTextSize()) / 2;
+        final int y = (int) (((height - mPaint.getTextSize()) / 2) - mPaint.ascent());
 
         for (int i = 0; i < count; i++) {
             String suggestion = mSuggestions.get(i);
index baa4594..5d68b56 100644 (file)
@@ -20,8 +20,9 @@ import android.content.Context;
 import android.inputmethodservice.InputMethodService;
 import android.inputmethodservice.Keyboard;
 import android.inputmethodservice.KeyboardView;
-import android.text.TextUtils;
+import android.text.method.MetaKeyKeyListener;
 import android.util.Log;
+import android.view.KeyCharacterMap;
 import android.view.KeyEvent;
 import android.view.View;
 import android.view.WindowManager;
@@ -48,12 +49,12 @@ public class SoftKeyboard extends InputMethodService
     private CompletionInfo[] mCompletions;
     
     private StringBuilder mComposing = new StringBuilder();
-    private boolean mPredicting;
     private boolean mPredictionOn;
     private boolean mCompletionOn;
     private int mLastDisplayWidth;
     private boolean mCapsLock;
     private long mLastShiftTime;
+    private long mMetaState;
     
     private Keyboard mSymbolsKeyboard;
     private Keyboard mSymbolsShiftedKeyboard;
@@ -61,8 +62,6 @@ public class SoftKeyboard extends InputMethodService
     
     private String mWordSeparators;
     
-    private InputConnection mOldConnection;
-
     private void makeKeyboards() {
         // Configuration change is coming after the keyboard gets recreated. So don't rely on that.
         // If keyboards have already been made, check if we have a screen width change and 
@@ -80,7 +79,6 @@ public class SoftKeyboard extends InputMethodService
     
     @Override public void onCreate() {
         super.onCreate();
-        //setStatusIcon(R.drawable.ime_qwerty);
         makeKeyboards();
         mWordSeparators = getResources().getString(R.string.word_separators);
     }
@@ -97,7 +95,6 @@ public class SoftKeyboard extends InputMethodService
 
     @Override
     public View onCreateCandidatesView() {
-        makeKeyboards();
         mCandidateView = new CandidateView(this);
         mCandidateView.setService(this);
         return mCandidateView;
@@ -105,33 +102,28 @@ public class SoftKeyboard extends InputMethodService
 
     @Override 
     public void onStartInputView(EditorInfo attribute, boolean restarting) {
-        // In landscape mode, this method gets called without the input view being created.
-        if (mInputView == null) {
-            return;
-        }
-
-        if (mQwertyKeyboard == null) {
-            makeKeyboards();
-        }
-
-        if (mOldConnection != null) {
-            commitTyped(mOldConnection);
+        mComposing.setLength(0);
+        updateCandidates();
+        
+        if (!restarting) {
+            // Clear shift states.
+            mMetaState = 0;
         }
         
         mPredictionOn = false;
         mCompletionOn = false;
         mCompletions = null;
+        Keyboard keyboard;
         switch (attribute.inputType&EditorInfo.TYPE_MASK_CLASS) {
             case EditorInfo.TYPE_CLASS_NUMBER:
             case EditorInfo.TYPE_CLASS_DATETIME:
-                mInputView.setKeyboard(mSymbolsKeyboard);
+                keyboard = mSymbolsKeyboard;
                 break;
             case EditorInfo.TYPE_CLASS_PHONE:
-                mInputView.setKeyboard(mSymbolsKeyboard);
+                keyboard = mSymbolsKeyboard;
                 break;
             default:
-                mInputView.setKeyboard(mQwertyKeyboard);
-                //startPrediction();
+                keyboard = mQwertyKeyboard;
                 mPredictionOn = true;
                 // Make sure that passwords are not displayed in candidate view
                 int variation = attribute.inputType &  EditorInfo.TYPE_MASK_VARIATION;
@@ -149,34 +141,49 @@ public class SoftKeyboard extends InputMethodService
                 updateShiftKeyState(attribute);
                 break;
         }
-        mInputView.closing();
+        
+        if (mInputView != null) {
+            mInputView.setKeyboard(keyboard);
+            mInputView.closing();
+        }
+        
         mComposing.setLength(0);
-        mCandidateView.setSuggestions(null, false, false);
-        mOldConnection = getCurrentInputConnection();
-        setCandidatesViewShown(mPredictionOn || mCompletionOn);
+        setSuggestions(null, false, false);
     }
 
     @Override
     public void onFinishInput() {
         super.onFinishInput();
-        commitTyped(mOldConnection);
+        mComposing.setLength(0);
+        updateCandidates();
         if (mInputView != null) {
             mInputView.closing();
         }
     }
     
     @Override
-    public void onDisplayCompletions(CompletionInfo[] completions) {
-        if (false) {
-            Log.i("foo", "Received completions:");
-            for (int i=0; i<(completions != null ? completions.length : 0); i++) {
-                Log.i("foo", "  #" + i + ": " + completions[i]);
+    public void onUpdateSelection(int oldSelStart, int oldSelEnd,
+            int newSelStart, int newSelEnd,
+            int candidatesStart, int candidatesEnd) {
+        // If the current selection in the text view changes, we should
+        // clear whatever candidate text we have.
+        if (mComposing.length() > 0 && (newSelStart != candidatesEnd
+                || newSelEnd != candidatesEnd)) {
+            mComposing.setLength(0);
+            updateCandidates();
+            InputConnection ic = getCurrentInputConnection();
+            if (ic != null) {
+                ic.finishComposingText();
             }
         }
+    }
+
+    @Override
+    public void onDisplayCompletions(CompletionInfo[] completions) {
         if (mCompletionOn) {
             mCompletions = completions;
             if (completions == null) {
-                mCandidateView.setSuggestions(null, false, false);
+                setSuggestions(null, false, false);
                 return;
             }
             
@@ -185,8 +192,40 @@ public class SoftKeyboard extends InputMethodService
                 CompletionInfo ci = completions[i];
                 if (ci != null) stringList.add(ci.getText().toString());
             }
-            mCandidateView.setSuggestions(stringList, true, true);
+            setSuggestions(stringList, true, true);
+        }
+    }
+    
+    private boolean translateKeyDown(int keyCode, KeyEvent event) {
+        mMetaState = MetaKeyKeyListener.handleKeyDown(mMetaState,
+                keyCode, event);
+        int c = event.getUnicodeChar(MetaKeyKeyListener.getMetaState(mMetaState));
+        mMetaState = MetaKeyKeyListener.adjustMetaAfterKeypress(mMetaState);
+        InputConnection ic = getCurrentInputConnection();
+        if (c == 0 || ic == null) {
+            return false;
+        }
+        
+        boolean dead = false;
+
+        if ((c & KeyCharacterMap.COMBINING_ACCENT) != 0) {
+            dead = true;
+            c = c & KeyCharacterMap.COMBINING_ACCENT_MASK;
+        }
+        
+        if (mComposing.length() > 0) {
+            char accent = mComposing.charAt(mComposing.length() -1 );
+            int composed = KeyEvent.getDeadChar(accent, c);
+
+            if (composed != 0) {
+                c = composed;
+                mComposing.setLength(mComposing.length()-1);
+            }
         }
+        
+        onKey(c, null);
+        
+        return true;
     }
     
     @Override
@@ -199,12 +238,16 @@ public class SoftKeyboard extends InputMethodService
                     }
                 }
                 break;
-            case KeyEvent.KEYCODE_DPAD_DOWN:
-            case KeyEvent.KEYCODE_DPAD_UP:
-            case KeyEvent.KEYCODE_DPAD_LEFT:
-            case KeyEvent.KEYCODE_DPAD_RIGHT:
-                abortComposition();
+            case KeyEvent.KEYCODE_DEL:
+                if (mComposing.length() > 0) {
+                    onKey(Keyboard.KEYCODE_DELETE, null);
+                    return true;
+                }
                 break;
+            default:
+                if (mPredictionOn && translateKeyDown(keyCode, event)) {
+                    return true;
+                }
         }
         return super.onKeyDown(keyCode, event);
     }
@@ -225,6 +268,11 @@ public class SoftKeyboard extends InputMethodService
                     return true;
                 }
                 break;
+            default:
+                if (mPredictionOn) {
+                    mMetaState = MetaKeyKeyListener.handleKeyUp(mMetaState,
+                            keyCode, event);
+                }
         }
         return super.onKeyUp(keyCode, event);
     }
@@ -262,7 +310,7 @@ public class SoftKeyboard extends InputMethodService
     
     private void sendKey(int keyCode) {
         switch (keyCode) {
-            case 10:
+            case '\n':
                 keyDownUp(KeyEvent.KEYCODE_ENTER);
                 break;
             default:
@@ -280,11 +328,11 @@ public class SoftKeyboard extends InputMethodService
     public void onKey(int primaryCode, int[] keyCodes) {
         if (isWordSeparator(primaryCode)) {
             // Handle separator
-            if (mPredicting) {
+            if (mComposing.length() > 0) {
                 commitTyped(getCurrentInputConnection());
             }
             sendKey(primaryCode);
-            updateShiftKeyState(getCurrentInputInfo());
+            updateShiftKeyState(getCurrentInputEditorInfo());
         } else if (primaryCode == Keyboard.KEYCODE_DELETE) {
             handleBackspace();
         } else if (primaryCode == Keyboard.KEYCODE_SHIFT) {
@@ -294,7 +342,8 @@ public class SoftKeyboard extends InputMethodService
             return;
         } else if (primaryCode == LatinKeyboardView.KEYCODE_OPTIONS) {
             // Show a menu or somethin'
-        } else if (primaryCode == Keyboard.KEYCODE_MODE_CHANGE) {
+        } else if (primaryCode == Keyboard.KEYCODE_MODE_CHANGE
+                && mInputView != null) {
             Keyboard current = mInputView.getKeyboard();
             if (current == mSymbolsKeyboard || current == mSymbolsShiftedKeyboard) {
                 current = mQwertyKeyboard;
@@ -320,34 +369,47 @@ public class SoftKeyboard extends InputMethodService
             if (mComposing.length() > 0) {
                 ArrayList<String> list = new ArrayList<String>();
                 list.add(mComposing.toString());
-                mCandidateView.setSuggestions(list, true, true);
+                setSuggestions(list, true, true);
             } else {
-                mCandidateView.setSuggestions(null, false, false);
+                setSuggestions(null, false, false);
             }
         }
     }
     
+    public void setSuggestions(List<String> suggestions, boolean completions,
+            boolean typedWordValid) {
+        mCandidateView.setSuggestions(suggestions, completions, typedWordValid);
+        if (suggestions != null && suggestions.size() > 0) {
+            setCandidatesViewShown(true);
+        } else if (isFullscreenMode()) {
+            setCandidatesViewShown(true);
+        } else {
+            setCandidatesViewShown(false);
+        }
+    }
+    
     private void handleBackspace() {
-        if (mPredicting) {
-            final int length = mComposing.length();
-            if (length > 0) {
-                mComposing.delete(length - 1, length);
-                getCurrentInputConnection().setComposingText(mComposing, mComposing.length());
-                updateCandidates();
-                if (mComposing.length() == 0) {
-                    mPredicting = false;
-                }
-            } else {
-                getCurrentInputConnection().deleteSurroundingText(1, 0);
-            }
+        final int length = mComposing.length();
+        if (length > 1) {
+            mComposing.delete(length - 1, length);
+            getCurrentInputConnection().setComposingText(mComposing, mComposing.length());
+            updateCandidates();
+        } else if (length > 0) {
+            mComposing.setLength(0);
+            getCurrentInputConnection().commitText("", 0);
+            updateCandidates();
         } else {
             //getCurrentInputConnection().deleteSurroundingText(1, 0);
             keyDownUp(KeyEvent.KEYCODE_DEL);
         }
-        updateShiftKeyState(getCurrentInputInfo());
+        updateShiftKeyState(getCurrentInputEditorInfo());
     }
 
     private void handleShift() {
+        if (mInputView == null) {
+            return;
+        }
+        
         Keyboard currentKeyboard = mInputView.getKeyboard();
         if (mQwertyKeyboard == currentKeyboard) {
             // Alphabet keyboard
@@ -365,19 +427,20 @@ public class SoftKeyboard extends InputMethodService
     }
     
     private void handleCharacter(int primaryCode, int[] keyCodes) {
-        if (isAlphabet(primaryCode) && mPredictionOn && !isCursorTouchingWord()) {
-            if (!mPredicting) {
-                mPredicting = true;
-                mComposing.setLength(0);
+        if (isInputViewShown()) {
+            if (mInputView.isShifted()) {
+                primaryCode = Character.toUpperCase(primaryCode);
             }
         }
-        if (mInputView.isShifted()) {
-            primaryCode = Character.toUpperCase(primaryCode);
+        if (isAlphabet(primaryCode) && mPredictionOn) {
+            mComposing.append((char) primaryCode);
+            getCurrentInputConnection().setComposingText(mComposing, mComposing.length());
+            updateShiftKeyState(getCurrentInputEditorInfo());
+            updateCandidates();
+        } else {
+            getCurrentInputConnection().commitText(
+                    String.valueOf((char) primaryCode), 0);
         }
-        mComposing.append((char) primaryCode);
-        getCurrentInputConnection().setComposingText(mComposing, mComposing.length());
-        updateShiftKeyState(getCurrentInputInfo());
-        updateCandidates();
     }
 
     private void handleClose() {
@@ -396,20 +459,6 @@ public class SoftKeyboard extends InputMethodService
         }
     }
     
-    private boolean isCursorTouchingWord() {
-        CharSequence toLeft = getCurrentInputConnection().getTextBeforeCursor(1);
-        CharSequence toRight = getCurrentInputConnection().getTextAfterCursor(1);
-        if (!TextUtils.isEmpty(toLeft)
-                && !isWordSeparator(toLeft.charAt(0))) {
-            return true;
-        }
-        if (!TextUtils.isEmpty(toRight) 
-                && !isWordSeparator(toRight.charAt(0))) {
-            return true;
-        }
-        return false;
-    }
-    
     protected String getWordSeparators() {
         return mWordSeparators;
     }
@@ -431,7 +480,12 @@ public class SoftKeyboard extends InputMethodService
             if (mCandidateView != null) {
                 mCandidateView.clear();
             }
-            updateShiftKeyState(getCurrentInputInfo());
+            updateShiftKeyState(getCurrentInputEditorInfo());
+        } else if (mComposing.length() > 0) {
+            // If we were generating candidate suggestions for the current
+            // text, we would commit one of them here.  But for this sample,
+            // we will just commit the current text.
+            commitTyped(getCurrentInputConnection());
         }
     }
     
@@ -452,10 +506,4 @@ public class SoftKeyboard extends InputMethodService
     public void swipeUp() {
         // ?
     }
-
-    private void abortComposition() {
-        commitTyped(getCurrentInputConnection());
-        mComposing.setLength(0); // Don't want to allow uncommit after this
-        updateCandidates();
-    }
 }
diff --git a/tools/anttasks/.classpath b/tools/anttasks/.classpath
new file mode 100644 (file)
index 0000000..08ced21
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry combineaccessrules="false" kind="src" path="/SdkLib"/>
+       <classpathentry kind="var" path="ANDROID_SRC/prebuilt/common/ant/ant.jar"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tools/anttasks/.project b/tools/anttasks/.project
new file mode 100644 (file)
index 0000000..aed1b61
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>ant-tasks</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/tools/anttasks/Android.mk b/tools/anttasks/Android.mk
new file mode 100644 (file)
index 0000000..15ee903
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2008 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+ANTTASKS_LOCAL_DIR := $(call my-dir)
+include $(ANTTASKS_LOCAL_DIR)/src/Android.mk
diff --git a/tools/anttasks/src/Android.mk b/tools/anttasks/src/Android.mk
new file mode 100644 (file)
index 0000000..dbaf2bc
--- /dev/null
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2008 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_JAVA_LIBRARIES := \
+        sdklib \
+        ant
+
+LOCAL_MODULE := anttasks
+
+include $(BUILD_HOST_JAVA_LIBRARY)
+
diff --git a/tools/anttasks/src/com/android/ant/AndroidInitTask.java b/tools/anttasks/src/com/android/ant/AndroidInitTask.java
new file mode 100644 (file)
index 0000000..84c1d27
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Eclipse Public License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.eclipse.org/org/documents/epl-v10.php
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.ant;
+
+import com.android.sdklib.IAndroidTarget;
+import com.android.sdklib.ISdkLog;
+import com.android.sdklib.SdkManager;
+import com.android.sdklib.project.ProjectProperties;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.taskdefs.ImportTask;
+
+import java.io.File;
+import java.util.ArrayList;
+
+/**
+ * Import Target Ant task. This task accomplishes:
+ * <ul>
+ * <li>Gets the project target hash string from {@link ProjectProperties#PROPERTY_TARGET},
+ * and resolves it.</li>
+ * <li>Sets up ant properties so that the rest of the Ant scripts finds:
+ *    <ul>
+ *       <li>Path to the underlying platform to access the build rules ('android-platform')<li>
+ *    </ul>
+ * </li>
+ * </ul>
+ * 
+ * This is used in build.xml/template.
+ *
+ */
+public class AndroidInitTask extends ImportTask {
+    private final static String ANDROID_RULES = "android_rules.xml";
+    
+    private final static String PROPERTY_ANDROID_JAR = "android-jar";
+    private final static String PROPERTY_ANDROID_AIDL = "android-aidl";
+
+    @Override
+    public void execute() throws BuildException {
+        Project antProject = getProject();
+        
+        // get the SDK location
+        String sdkLocation = antProject.getProperty(ProjectProperties.PROPERTY_SDK);
+        
+        // check if it's valid and exists
+        if (sdkLocation == null || sdkLocation.length() == 0) {
+            throw new BuildException("SDK Location is not set.");
+        }
+        
+        File sdk = new File(sdkLocation);
+        if (sdk.isDirectory() == false) {
+            throw new BuildException(String.format("SDK Location '%s' is not valid.", sdkLocation));
+        }
+
+        // get the target property value
+        String targetHashString = antProject.getProperty(ProjectProperties.PROPERTY_TARGET);
+        if (targetHashString == null) {
+            throw new BuildException("Android Target is not set.");
+        }
+
+        // load up the sdk targets.
+        final ArrayList<String> messages = new ArrayList<String>();
+        SdkManager manager = SdkManager.createManager(sdkLocation, new ISdkLog() {
+            public void error(Throwable t, String errorFormat, Object... args) {
+                if (errorFormat != null) {
+                    messages.add(String.format("Error: " + errorFormat, args));
+                }
+                if (t != null) {
+                    messages.add("Error: " + t.getMessage());
+                }
+            }
+
+            public void printf(String msgFormat, Object... args) {
+                messages.add(String.format(msgFormat, args));
+            }
+
+            public void warning(String warningFormat, Object... args) {
+                messages.add(String.format("Warning: " + warningFormat, args));
+            }
+        });
+
+        if (manager == null) {
+            // since we failed to parse the SDK, lets display the parsing output.
+            for (String msg : messages) {
+                System.out.println(msg);
+            }
+            throw new BuildException("Failed to parse SDK content.");
+        }
+
+        // resolve it
+        IAndroidTarget androidTarget = manager.getTargetFromHashString(targetHashString);
+        
+        if (androidTarget == null) {
+            throw new BuildException(String.format(
+                    "Unable to resolve target '%s'", targetHashString));
+        }
+        
+        // display it
+        System.out.println("Project Target: " + androidTarget.getName());
+        if (androidTarget.isPlatform() == false) {
+            System.out.println("Vendor: " + androidTarget.getVendor());
+        }
+        System.out.println("Platform Version: " + androidTarget.getApiVersionName());
+        System.out.println("API level: " + androidTarget.getApiVersionNumber());
+        
+        // sets up the properties.
+        String androidJar = androidTarget.getPath(IAndroidTarget.ANDROID_JAR);
+        String androidAidl = androidTarget.getPath(IAndroidTarget.ANDROID_AIDL);
+        
+        antProject.setProperty(PROPERTY_ANDROID_JAR, androidJar);
+        antProject.setProperty(PROPERTY_ANDROID_AIDL, androidAidl);
+        
+        // find the file to import, and import it.
+        String templateFolder = androidTarget.getPath(IAndroidTarget.TEMPLATES);
+        
+        // make sure the file exists.
+        File templates = new File(templateFolder);
+        if (templates.isDirectory() == false) {
+            throw new BuildException(String.format("Template directory '%s' is missing.",
+                    templateFolder));
+        }
+        
+        // now check the rules file exists.
+        File rules = new File(templateFolder, ANDROID_RULES);
+        if (rules.isFile() == false) {
+            throw new BuildException(String.format("Build rules file '%s' is missing.",
+                    templateFolder));
+       }
+        
+        // set the file location to import
+        setFile(rules.getAbsolutePath());
+        
+        // and import it
+        super.execute();
+    }
+}
index a031a1b..8291f59 100644 (file)
@@ -69,6 +69,9 @@ public final class Device implements IDevice {
     /** Serial number of the device */
     String serialNumber = null;
 
+    /** Name of the vm */
+    String mVmName = null;
+
     /** State of the device. */
     DeviceState state = null;
     
@@ -91,6 +94,11 @@ public final class Device implements IDevice {
         return serialNumber;
     }
     
+    public String getVmName() {
+        return mVmName;
+    }
+
+    
     /* 
      * (non-Javadoc)
      * @see com.android.ddmlib.IDevice#getState()
index 4b81116..8547ac1 100644 (file)
@@ -349,7 +349,7 @@ final class DeviceMonitor {
                                     }
 
                                     if (device.getPropertyCount() == 0) {
-                                        queryForBuild(device);
+                                        queryNewDeviceForInfo(device);
                                     }
                                 }
                             }
@@ -387,7 +387,7 @@ final class DeviceMonitor {
     
                     // look for their build info.
                     if (newDevice.isOnline()) {
-                        queryForBuild(newDevice);
+                        queryNewDeviceForInfo(newDevice);
                     }
                 }
             }
@@ -413,11 +413,20 @@ final class DeviceMonitor {
      * Queries a device for its build info.
      * @param device the device to query.
      */
-    private void queryForBuild(Device device) {
+    private void queryNewDeviceForInfo(Device device) {
         // TODO: do this in a separate thread.
         try {
+            // first get the list of properties.
             device.executeShellCommand(GetPropReceiver.GETPROP_COMMAND,
                     new GetPropReceiver(device));
+            
+            // now get the emulator VM name (if applicable).
+            if (device.isEmulator()) {
+                EmulatorConsole console = EmulatorConsole.getConsole(device);
+                if (console != null) {
+                    device.mVmName = console.getVmName();
+                }
+            }
         } catch (IOException e) {
             // if we can't get the build info, it doesn't matter too much
         }
index 4aac0e1..e00073c 100644 (file)
@@ -54,6 +54,7 @@ public final class EmulatorConsole {
     private final static String HOST = "127.0.0.1";  //$NON-NLS-1$
 
     private final static String COMMAND_PING = "help\r\n"; //$NON-NLS-1$
+    private final static String COMMAND_VM_NAME = "vm name\r\n"; //$NON-NLS-1$
     private final static String COMMAND_KILL = "kill\r\n"; //$NON-NLS-1$
     private final static String COMMAND_GSM_STATUS = "gsm status\r\n"; //$NON-NLS-1$
     private final static String COMMAND_GSM_CALL = "gsm call %1$s\r\n"; //$NON-NLS-1$
@@ -307,6 +308,24 @@ public final class EmulatorConsole {
             RemoveConsole(mPort);
         }
     }
+    
+    public synchronized String getVmName() {
+        if (sendCommand(COMMAND_VM_NAME)) {
+            String[] result = readLines();
+            if (result != null && result.length == 2) { // this should be the name on first line,
+                                                        // and ok on 2nd line
+                return result[0];
+            } else {
+                // try to see if there's a message after KO
+                Matcher m = RE_KO.matcher(result[result.length-1]);
+                if (m.matches()) {
+                    return m.group(1);
+                }
+            }
+        }
+        
+        return null;
+    }
 
     /**
      * Get the network status of the emulator.
index 106b76f..61d1ca4 100755 (executable)
@@ -44,6 +44,15 @@ public interface IDevice {
      * Returns the serial number of the device.
      */
     public String getSerialNumber();
+    
+    /**
+     * Returns the name of the VM the emulator is running.
+     * <p/>This is only valid if {@link #isEmulator()} returns true.
+     * <p/>If the emulator is not running any VM (for instance it's running from an Android source
+     * tree build), this method will return "<code>&lt;build&gt;</code>".
+     * @return the name of the VM or <code>null</code> if there isn't any.
+     */
+    public String getVmName();
 
     /**
      * Returns the state of the device.
index cd4aa26..556fc9b 100644 (file)
@@ -201,6 +201,10 @@ public class RemoteAndroidTestRunnerTest extends TestCase {
             throw new UnsupportedOperationException();
         }
 
+        public String getVmName() {
+            return "";
+        }
+
     }
     
     /** An empty implementation of TestRunListener
index adaa3c3..1331a09 100644 (file)
@@ -200,12 +200,22 @@ public final class DevicePanel extends Panel implements IDebugBridgeChangeListen
                     case DEVICE_COL_STATE:
                         return getStateString(device);
                     case DEVICE_COL_BUILD: {
+                        String vmName = device.getVmName();
                         String debuggable = device.getProperty(Device.PROP_DEBUGGABLE);
                         String version = device.getProperty(Device.PROP_BUILD_VERSION);
-                        if (debuggable != null && debuggable.equals("1")) { //$NON-NLS-1$
-                            return String.format("%1$s (debug)", version); //$NON-NLS-1$
+                        if (device.isEmulator()) {
+                            if (debuggable != null && debuggable.equals("1")) { //$NON-NLS-1$
+                                return String.format("%1$s [%2$s, debug]", vmName, //$NON-NLS-1$
+                                        version);
+                            } else {
+                                return String.format("%1$s [%2$s]", vmName, version); //$NON-NLS-1$
+                            }
                         } else {
-                            return String.format("%1$s", version); //$NON-NLS-1$
+                            if (debuggable != null && debuggable.equals("1")) { //$NON-NLS-1$
+                                return String.format("%1$s, debug", version); //$NON-NLS-1$
+                            } else {
+                                return String.format("%1$s", version); //$NON-NLS-1$
+                            }
                         }
                     }
                 }
index 191b76d..676a89e 100644 (file)
       <import plugin="org.eclipse.ui"/>
       <import plugin="org.eclipse.ui.ide"/>
       <import plugin="org.eclipse.ui.forms"/>
+      <import plugin="org.eclipse.gef"/>
+      <import plugin="org.eclipse.ui.browser"/>
+      <import plugin="org.eclipse.ui.views"/>
+      <import plugin="org.eclipse.wst.sse.core"/>
+      <import plugin="org.eclipse.wst.sse.ui"/>
+      <import plugin="org.eclipse.wst.xml.core"/>
+      <import plugin="org.eclipse.wst.xml.ui"/>
    </requires>
 
    <plugin
index 61b3f4d..7304e5e 100644 (file)
@@ -16,6 +16,7 @@
 
 package com.android.ide.eclipse.adt;
 
+import com.android.ide.eclipse.adt.project.internal.AndroidClasspathContainerInitializer;
 
 
 /**
@@ -42,8 +43,8 @@ public class AdtConstants {
 
     /** Marker for Android Target errors.
      * This is not cleared on each like other markers. Instead, it's cleared
-     * when a ContainerClasspathInitialized has succeeded in creating an
-     * {@link AndroidClasspathContainer}*/
+     * when an {@link AndroidClasspathContainerInitializer} has succeeded in creating an
+     * AndroidClasspathContainer */
     public final static String MARKER_TARGET = AdtPlugin.PLUGIN_ID + ".targetProblem"; //$NON-NLS-1$
 
     /** Build verbosity "Always". Those messages are always displayed. */
index d9c18cf..62bc7ed 100644 (file)
@@ -1201,7 +1201,7 @@ public class AdtPlugin extends AbstractUIPlugin {
                     if (file.getFullPath().segmentCount() == 4) {
                         // check if we are inside the res folder.
                         String segment = file.getFullPath().segment(1); 
-                        if (segment.equalsIgnoreCase(AndroidConstants.FD_RESOURCES)) {
+                        if (segment.equalsIgnoreCase(SdkConstants.FD_RESOURCES)) {
                             // we are inside a res/ folder, get the actual ResourceFolder
                             ProjectResources resources = ResourceManager.getInstance().
                                 getProjectResources(file.getProject());
index 4d16120..e38419a 100644 (file)
@@ -31,6 +31,7 @@ import com.android.jarutils.DebugKeyProvider.KeytoolException;
 import com.android.jarutils.SignedJarBuilder.IZipEntryFilter;
 import com.android.prefs.AndroidLocation.AndroidLocationException;
 import com.android.sdklib.IAndroidTarget;
+import com.android.sdklib.SdkConstants;
 
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
@@ -120,6 +121,10 @@ public class ApkBuilder extends BaseBuilder {
             }
         }
 
+        /**
+         * {@inheritDoc}
+         * @throws CoreException
+         */
         public boolean visit(IResourceDelta delta) throws CoreException {
             //  no need to keep looking if we already know we need to convert
             // to dex and make the final package.
@@ -589,7 +594,7 @@ public class ApkBuilder extends BaseBuilder {
      * @param osBinPath the path to the output folder of the project
      * @param osOutFilePath the path of the dex file to create.
      * @param referencedJavaProjects the list of referenced projects for this project.
-     * @return
+     *
      * @throws CoreException
      */
     private boolean executeDx(IJavaProject javaProject, String osBinPath, String osOutFilePath,
@@ -756,8 +761,7 @@ public class ApkBuilder extends BaseBuilder {
 
             // now write the native libraries.
             // First look if the lib folder is there.
-            IResource libFolder = javaProject.getProject().findMember(
-                    AndroidConstants.FD_NATIVE_LIBS);
+            IResource libFolder = javaProject.getProject().findMember(SdkConstants.FD_NATIVE_LIBS);
             if (libFolder != null && libFolder.exists() &&
                     libFolder.getType() == IResource.FOLDER) {
                 // look inside and put .so in lib/* by keeping the relative folder path.
@@ -829,7 +833,7 @@ public class ApkBuilder extends BaseBuilder {
      * lib folder directly goes in this "lib" folder in the archive.
      * 
      *  
-     * @param rooSegmentCount The number of segment of the path of the folder containing the
+     * @param rootSegmentCount The number of segment of the path of the folder containing the
      * libraries. This is used to compute the path in the archive.
      * @param jarBuilder the {@link SignedJarBuilder} used to create the archive.
      * @param resource the IResource to write.
@@ -847,7 +851,7 @@ public class ApkBuilder extends BaseBuilder {
                 path = path.removeFirstSegments(rootSegmentCount);
                 
                 // add it to the archive.
-                IPath apkPath = new Path(AndroidConstants.FD_APK_NATIVE_LIBS);
+                IPath apkPath = new Path(SdkConstants.FD_APK_NATIVE_LIBS);
                 apkPath = apkPath.append(path);
                 
                 // writes the file in the apk.
index 47ef626..aec703d 100644 (file)
@@ -18,6 +18,7 @@ package com.android.ide.eclipse.adt.build;
 
 import com.android.ide.eclipse.adt.build.BaseBuilder.BaseDeltaVisitor;
 import com.android.ide.eclipse.common.AndroidConstants;
+import com.android.sdklib.SdkConstants;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IFolder;
@@ -98,17 +99,17 @@ public class ApkDeltaVisitor extends BaseDeltaVisitor
             mOutputPath = outputfolder.getFullPath();
         }
         
-        IResource assetFolder = builder.getProject().findMember(AndroidConstants.FD_ASSETS);
+        IResource assetFolder = builder.getProject().findMember(SdkConstants.FD_ASSETS);
         if (assetFolder != null) {
             mAssetPath = assetFolder.getFullPath();
         }
 
-        IResource resFolder = builder.getProject().findMember(AndroidConstants.FD_RESOURCES);
+        IResource resFolder = builder.getProject().findMember(SdkConstants.FD_RESOURCES);
         if (resFolder != null) {
             mResPath = resFolder.getFullPath();
         }
         
-        IResource libFolder = builder.getProject().findMember(AndroidConstants.FD_NATIVE_LIBS);
+        IResource libFolder = builder.getProject().findMember(SdkConstants.FD_NATIVE_LIBS);
         if (libFolder != null) {
             mLibFolder = libFolder.getFullPath();
         }
@@ -126,8 +127,9 @@ public class ApkDeltaVisitor extends BaseDeltaVisitor
         return mMakeFinalPackage;
     }
 
-    /*
-     * (non-Javadoc)
+    /**
+     * {@inheritDoc}
+     * @throws CoreException 
      *
      * @see org.eclipse.core.resources.IResourceDeltaVisitor
      *      #visit(org.eclipse.core.resources.IResourceDelta)
index f94bdc7..534c123 100644 (file)
@@ -69,15 +69,15 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
     /**
      * First line of dual line aapt error.<br>
      * "ERROR at line &lt;line&gt;: &lt;error&gt;"<br>
-     * " (Occured while parsing &lt;path&gt;)"
+     * " (Occurred while parsing &lt;path&gt;)"
      */
     private final static Pattern sPattern1Line1 = Pattern.compile(
             "^ERROR\\s+at\\s+line\\s+(\\d+):\\s+(.*)$"); //$NON-NLS-1$
     /**
      * Second line of dual line aapt error.<br>
      * "ERROR at line &lt;line&gt;: &lt;error&gt;"<br>
-     * " (Occured while parsing &lt;path&gt;)"<br>
-     * @see sPattern1Line1
+     * " (Occurred while parsing &lt;path&gt;)"<br>
+     * @see #sPattern1Line1
      */
     private final static Pattern sPattern1Line2 = Pattern.compile(
             "^\\s+\\(Occurred while parsing\\s+(.*)\\)$");  //$NON-NLS-1$
@@ -92,7 +92,7 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
      * Second line of dual line aapt error.<br>
      * "ERROR: &lt;error&gt;"<br>
      * "Defined at file &lt;path&gt; line &lt;line&gt;"<br>
-     * @see sPattern2Line1
+     * @see #sPattern2Line1
      */
     private final static Pattern sPattern2Line2 = Pattern.compile(
             "Defined\\s+at\\s+file\\s+(.+)\\s+line\\s+(\\d+)"); //$NON-NLS-1$
@@ -113,7 +113,7 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
      * Second line of dual line aapt error.<br>
      * "ERROR parsing XML file &lt;path&gt;"<br>
      * "&lt;error&gt; at line &lt;line&gt;"<br>
-     * @see sPattern4Line1
+     * @see #sPattern4Line1
      */
     private final static Pattern sPattern4Line2 = Pattern.compile(
             "^(.+)\\s+at\\s+line\\s+(\\d+)$"); //$NON-NLS-1$
@@ -263,7 +263,7 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
 
     /**
      * Adds a marker to the current project.
-     * @param file the file to be marked
+     * 
      * @param markerId The id of the marker to add.
      * @param message the message associated with the mark
      * @param severity the severity of the marker.
@@ -292,12 +292,11 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
 
     /**
      * Removes markers from a container and its children.
-     * @param container The container from which to delete the markers.
+     * @param folder The container from which to delete the markers.
      * @param markerId The id of the markers to remove. If null, all marker of
      * type <code>IMarker.PROBLEM</code> will be removed.
      */
-    protected final void removeMarkersFromContainer(IContainer folder,
-            String markerId) {
+    protected final void removeMarkersFromContainer(IContainer folder, String markerId) {
         try {
             if (folder.exists()) {
                 folder.deleteMarkers(markerId, true, IResource.DEPTH_INFINITE);
index 1a4aa8c..9fc4348 100644 (file)
@@ -1128,10 +1128,8 @@ public class PreCompilerBuilder extends BaseBuilder {
      * Finish a file created/modified by an outside command line process.
      * The file is marked as modified by Android, and the parent folder is refreshed, so that,
      * in case the file didn't exist beforehand, the file appears in the package explorer.
-     * @param file The file to "finish".
-     * @param parent The parent container. Can be null (in which case it'll be
-     *  figured out from the file's IResource.
-     * @param monitor a monitor to display progress.
+     * @param rFile The R file to "finish".
+     * @param manifestFile The manifest file to "finish".
      * @throws CoreException
      */
     private void finishJavaFilesAfterExternalModification(IFile rFile, IFile manifestFile)
@@ -1150,9 +1148,7 @@ public class PreCompilerBuilder extends BaseBuilder {
      * The file is marked as modified by Android, and the parent folder is refreshed, so that,
      * in case the file didn't exist beforehand, the file appears in the package explorer.
      * @param file The file to "finish".
-     * @param parent The parent container. Can be null (in which case it'll be
-     *  figured out from the file's IResource.
-     * @param monitor a monitor to display progress.
+     * @param aidlFile The AIDL file to "finish".
      * @throws CoreException
      */
     private void finishFileAfterExternalModification(IFile file, IFile aidlFile)
index 33d5fa6..f4778d7 100644 (file)
@@ -23,6 +23,7 @@ import com.android.ide.eclipse.adt.project.ProjectHelper;
 import com.android.ide.eclipse.common.AndroidConstants;
 import com.android.ide.eclipse.common.project.AndroidManifestParser;
 import com.android.ide.eclipse.common.project.BaseProjectHelper;
+import com.android.sdklib.SdkConstants;
 
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
@@ -154,7 +155,7 @@ class PreCompilerDeltaVisitor extends BaseDeltaVisitor implements
             // then we are not yet in a source or resource folder
             mInRes = mInSrc = false;
 
-            if (AndroidConstants.FD_RESOURCES.equalsIgnoreCase(segments[1])) {
+            if (SdkConstants.FD_RESOURCES.equalsIgnoreCase(segments[1])) {
                 // this is the resource folder that was modified. we want to
                 // see its content.
 
index 48ec7c3..2b7d01d 100644 (file)
@@ -31,8 +31,12 @@ import com.android.ide.eclipse.adt.AdtPlugin;
 import com.android.ide.eclipse.adt.debug.launching.DeviceChooserDialog.DeviceChooserResponse;
 import com.android.ide.eclipse.adt.debug.ui.EmulatorConfigTab;
 import com.android.ide.eclipse.adt.project.ProjectHelper;
+import com.android.ide.eclipse.adt.sdk.Sdk;
 import com.android.ide.eclipse.common.project.AndroidManifestHelper;
-import com.android.sdklib.SdkConstants;
+import com.android.sdklib.IAndroidTarget;
+import com.android.sdklib.SdkManager;
+import com.android.sdklib.vm.VmManager;
+import com.android.sdklib.vm.VmManager.VmInfo;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
@@ -58,6 +62,7 @@ import java.io.IOException;
 import java.io.InputStreamReader;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.Map.Entry;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -69,9 +74,9 @@ import java.util.regex.Pattern;
 public final class AndroidLaunchController implements IDebugBridgeChangeListener,
         IDeviceChangeListener, IClientChangeListener {
     
+    private static final String FLAG_VM = "-vm"; //$NON-NLS-1$
     private static final String FLAG_NETDELAY = "-netdelay"; //$NON-NLS-1$
     private static final String FLAG_NETSPEED = "-netspeed"; //$NON-NLS-1$
-    private static final String FLAG_SKIN = "-skin"; //$NON-NLS-1$
     private static final String FLAG_WIPE_DATA = "-wipe-data"; //$NON-NLS-1$
     private static final String FLAG_NO_BOOT_ANIM = "-no-boot-anim"; //$NON-NLS-1$
 
@@ -223,11 +228,10 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
         public boolean mNoBootAnim = LaunchConfigDelegate.DEFAULT_NO_BOOT_ANIM;
         
         /**
-         * Screen size parameters.
-         * This value can be provided to the emulator directly for the option "-skin"
+         * Vm Name.
          */
-        public String mSkin = null;
-
+        public String mVmName = null;
+        
         public String mNetworkSpeed = EmulatorConfigTab.getSpeed(
                 LaunchConfigDelegate.DEFAULT_SPEED);
         public String mNetworkDelay = EmulatorConfigTab.getDelay(
@@ -258,12 +262,8 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
             }
 
             try {
-                mSkin = config.getAttribute(LaunchConfigDelegate.ATTR_SKIN, mSkin);
-                if (mSkin == null) {
-                    mSkin = SdkConstants.SKIN_DEFAULT;
-                }
+                mVmName = config.getAttribute(LaunchConfigDelegate.ATTR_VM_NAME, mVmName);
             } catch (CoreException e) {
-                mSkin = SdkConstants.SKIN_DEFAULT;
             }
 
             int index = LaunchConfigDelegate.DEFAULT_SPEED;
@@ -526,11 +526,14 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
                 // set the launch mode to default.
                 wc.setAttribute(LaunchConfigDelegate.ATTR_LAUNCH_ACTION,
                         LaunchConfigDelegate.DEFAULT_LAUNCH_ACTION);
-                
+
                 // set default target mode
                 wc.setAttribute(LaunchConfigDelegate.ATTR_TARGET_MODE,
                         LaunchConfigDelegate.DEFAULT_TARGET_MODE);
 
+                // default VM: None
+                wc.setAttribute(LaunchConfigDelegate.ATTR_VM_NAME, (String)null);
+
                 // set the default network speed
                 wc.setAttribute(LaunchConfigDelegate.ATTR_SPEED,
                         LaunchConfigDelegate.DEFAULT_SPEED);
@@ -539,9 +542,6 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
                 wc.setAttribute(LaunchConfigDelegate.ATTR_DELAY,
                         LaunchConfigDelegate.DEFAULT_DELAY);
                 
-                // default skin
-                wc.setAttribute(LaunchConfigDelegate.ATTR_SKIN, SdkConstants.SKIN_DEFAULT);
-                
                 // default wipe data mode
                 wc.setAttribute(LaunchConfigDelegate.ATTR_WIPE_DATA,
                         LaunchConfigDelegate.DEFAULT_WIPE_DATA);
@@ -627,32 +627,171 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
         // set the debug mode
         launchInfo.mDebugMode = mode.equals(ILaunchManager.DEBUG_MODE);
 
-        // device chooser response.
+        // get the SDK
+        Sdk currentSdk = Sdk.getCurrent();
+        VmManager vmManager = currentSdk.getVmManager();
+        
+        // get the project target
+        final IAndroidTarget projectTarget = currentSdk.getTarget(project);
+        
+        // FIXME: check errors on missing sdk, vm manager, or project target.
+        
+        // device chooser response object.
         final DeviceChooserResponse response = new DeviceChooserResponse();
         
+        /*
+         * Launch logic:
+         * - Manually Mode
+         *       Always display a UI that lets a user see the current running emulators/devices.
+         *       The UI must show which devices are compatibles, and allow launching new emulators
+         *       with compatible (and not yet running) VM.
+         * - Automatic Way
+         *     * Preferred VM set.
+         *           If Preferred VM is not running: launch it.
+         *           Launch the application on the preferred VM.
+         *     * No preferred VM.
+         *           Count the number of compatible emulators/devices.
+         *           If != 1, display a UI similar to manual mode.
+         *           If == 1, launch the application on this VM/device.
+         */
+        
         if (config.mTargetMode == AndroidLaunchConfiguration.AUTO_TARGET_MODE) {
             // if we are in automatic target mode, we need to find the current devices
             Device[] devices = AndroidDebugBridge.getBridge().getDevices();
             
-            // depending on the number of devices, we'll simulate an automatic choice
-            // from the device chooser or simply show up the device chooser.
-            if (devices.length == 0) {
-                // if zero devices, we launch the device.
-                AdtPlugin.printToConsole(project, "Automatic Target Mode: launching new emulator.");
+            // first check if we have a preferred VM name, and if it actually exists, and is valid
+            // (ie able to run the project).
+            // We need to check this in case the VM was recreated with a different target that is
+            // not compatible.
+            VmInfo preferredVm = null;
+            if (config.mVmName != null) {
+                preferredVm = vmManager.getVm(config.mVmName);
+                if (projectTarget.isCompatibleBaseFor(preferredVm.getTarget()) == false) {
+                    preferredVm = null;
+
+                    AdtPlugin.printErrorToConsole(project, String.format(
+                            "Preferred VM '%1$s' is not compatible with the project target '%2$s'. Looking for a compatible VM...",
+                            config.mVmName, projectTarget.getName()));
+                }
+            }
+                
+            if (preferredVm != null) {
+                // look for a matching device
+                for (Device d : devices) {
+                    String deviceVm = d.getVmName();
+                    if (deviceVm != null && deviceVm.equals(config.mVmName)) {
+                        response.mustContinue = true;
+                        response.mustLaunchEmulator = false;
+                        response.deviceToUse = d;
+
+                        AdtPlugin.printToConsole(project, String.format(
+                                "Automatic Target Mode: Preferred VM '%1$s' is available on emulator '%2$s'",
+                                config.mVmName, d));
+
+                        continueLaunch(response, project, launch, launchInfo, config);
+                        return;
+                    }
+                }
+                
+                // at this point we have a valid preferred VM that is not running.
+                // We need to start it.
                 response.mustContinue = true;
                 response.mustLaunchEmulator = true;
+                response.vmToLaunch = preferredVm;
+
+                AdtPlugin.printToConsole(project, String.format(
+                        "Automatic Target Mode: Preferred VM '%1$s' is not available. Launching new emulator.",
+                        config.mVmName));
+
                 continueLaunch(response, project, launch, launchInfo, config);
                 return;
-            } else if (devices.length == 1) {
+            }
+
+            // no (valid) preferred VM? look for one.
+            HashMap<Device, VmInfo> compatibleRunningVms = new HashMap<Device, VmInfo>();
+            boolean hasDevice = false; // if there's 1+ device running, we may force manual mode,
+                                       // as we cannot always detect proper compatibility with
+                                       // devices. This is the case if the project target is not
+                                       // a standard platform
+            for (Device d : devices) {
+                String deviceVm = d.getVmName();
+                if (deviceVm != null) { // physical devices return null.
+                    VmInfo info = vmManager.getVm(deviceVm);
+                    if (info != null && projectTarget.isCompatibleBaseFor(info.getTarget())) {
+                        compatibleRunningVms.put(d, info);
+                    }
+                } else {
+                    if (projectTarget.isPlatform()) { // means this can run on any device as long
+                                                      // as api level is high enough
+                        String apiString = d.getProperty(SdkManager.PROP_VERSION_SDK);
+                        try {
+                            int apiNumber = Integer.parseInt(apiString);
+                            if (apiNumber >= projectTarget.getApiVersionNumber()) {
+                                // device is compatible with project
+                                compatibleRunningVms.put(d, null);
+                                continue;
+                            }
+                        } catch (NumberFormatException e) {
+                            // do nothing, we'll consider it a non compatible device below.
+                        }
+                    }
+                    hasDevice = true;
+                }
+            }
+            
+            // depending on the number of devices, we'll simulate an automatic choice
+            // from the device chooser or simply show up the device chooser.
+            if (hasDevice == false && compatibleRunningVms.size() == 0) {
+                // if zero emulators/devices, we launch an emulator.
+                // We need to figure out which VM first.
+                
+                // we are going to take the closest VM. ie a compatible VM that has the API level
+                // closest to the project target.
+                VmInfo[] vms = vmManager.getVms();
+                VmInfo defaultVm = null;
+                for (VmInfo vm : vms) {
+                    if (projectTarget.isCompatibleBaseFor(vm.getTarget())) {
+                        if (defaultVm == null ||
+                                vm.getTarget().getApiVersionNumber() <
+                                    defaultVm.getTarget().getApiVersionNumber()) {
+                            defaultVm = vm;
+                        }
+                    }
+                }
+
+                if (defaultVm != null) {
+                    response.mustContinue = true;
+                    response.mustLaunchEmulator = true;
+                    response.vmToLaunch = defaultVm;
+
+                    AdtPlugin.printToConsole(project, String.format(
+                            "Automatic Target Mode: launching new emulator with compatible VM '%1$s'",
+                            defaultVm.getName()));
+
+                    continueLaunch(response, project, launch, launchInfo, config);
+                    return;
+                } else {
+                    // FIXME: ask the user if he wants to create a VM.
+                    // we found no compatible VM.
+                    AdtPlugin.printErrorToConsole(project, String.format(
+                            "Failed to find a VM compatible with target '%1$s'. Launch aborted.",
+                            projectTarget.getName()));
+                    launch.stopLaunch();
+                    return;
+                }
+            } else if (hasDevice == false && compatibleRunningVms.size() == 1) {
+                Entry<Device, VmInfo> e = compatibleRunningVms.entrySet().iterator().next();
                 response.mustContinue = true;
                 response.mustLaunchEmulator = false;
-                response.deviceToUse = devices[0];
+                response.deviceToUse = e.getKey();
 
-                if (response.deviceToUse.isEmulator()) {
-                    message = String.format("Automatic Target Mode: using existing emulator: %1$s",
-                            response.deviceToUse);
+                // get the VmInfo, if null, the device is a physical device.
+                VmInfo vmInfo = e.getValue();
+                if (vmInfo != null) {
+                    message = String.format("Automatic Target Mode: using existing emulator '%1$s' running compatible VM '%2$s'",
+                            response.deviceToUse, e.getValue().getName());
                 } else {
-                    message = String.format("Automatic Target Mode: using existing device: %1$s",
+                    message = String.format("Automatic Target Mode: using device '%1$s'",
                             response.deviceToUse);
                 }
                 AdtPlugin.printToConsole(project, message);
@@ -662,8 +801,13 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
             }
 
             // if more than one device, we'll bring up the DeviceChooser dialog below.
-            AdtPlugin.printToConsole(project,
-                    "Automatic Target Mode: user selection for 2+ devices.");
+            if (compatibleRunningVms.size() >= 2) {
+                message = "Automatic Target Mode: Several compatible targets. Please select a target device."; 
+            } else if (hasDevice) {
+                message = "Automatic Target Mode: Unable to detect device compatibility. Please select a target device."; 
+            }
+
+            AdtPlugin.printToConsole(project, message);
         }
         
         // bring up the device chooser.
@@ -671,7 +815,7 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
             public void run() {
                 DeviceChooserDialog dialog = new DeviceChooserDialog(
                         AdtPlugin.getDisplay().getActiveShell());
-                dialog.open(response, project, launch, launchInfo, config);
+                dialog.open(response, project, projectTarget, launch, launchInfo, config);
             }
         });
         
@@ -705,7 +849,7 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
                     synchronized (sListLock) {
                         mWaitingForEmulatorLaunches.add(launchInfo);
                         AdtPlugin.printToConsole(project, "Launching a new emulator.");
-                        boolean status = launchEmulator(config);
+                        boolean status = launchEmulator(config, response.vmToLaunch);
             
                         if (status == false) {
                             // launching the emulator failed!
@@ -775,9 +919,6 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
      * the device requires it and it is not set in the manifest, the launch will be forced to
      * "release" mode instead of "debug"</li>
      * <ul>
-     * @param launchInfo
-     * @param device
-     * @return
      */
     private boolean checkBuildInfo(DelayedLaunchInfo launchInfo, Device device) {
         if (device != null) {
@@ -1122,7 +1263,7 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
     /**
      * launches an application on a device or emulator
      *
-     * @param classToLaunch the fully-qualified name of the activity to launch
+     * @param info the {@link DelayedLaunchInfo} that indicates the activity to launch
      * @param device the device or emulator to launch the application on
      */
     private void launchApp(final DelayedLaunchInfo info, Device device) {
@@ -1182,7 +1323,7 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
         }
     }
 
-    private boolean launchEmulator(AndroidLaunchConfiguration config) {
+    private boolean launchEmulator(AndroidLaunchConfiguration config, VmInfo vmToLaunch) {
 
         // split the custom command line in segments
         ArrayList<String> customArgs = new ArrayList<String>();
@@ -1212,10 +1353,8 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
         ArrayList<String> list = new ArrayList<String>();
 
         list.add(AdtPlugin.getOsAbsoluteEmulator());
-        if (config.mSkin != null) {
-            list.add(FLAG_SKIN);
-            list.add(config.mSkin);
-        }
+        list.add(FLAG_VM);
+        list.add(vmToLaunch.getName());
         
         if (config.mNetworkSpeed != null) {
             list.add(FLAG_NETSPEED);
@@ -1329,7 +1468,7 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
      * @param debugPort The port to connect the debugger to
      * @param androidLaunch The associated AndroidLaunch object.
      * @param monitor A Progress monitor
-     * @see connectRemoveDebugger()
+     * @see #connectRemoteDebugger(int, AndroidLaunch, IProgressMonitor)
      */
     public static void launchRemoteDebugger( final int debugPort, final AndroidLaunch androidLaunch,
             final IProgressMonitor monitor) {
@@ -1352,7 +1491,7 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
      * This is sent from a non UI thread.
      * @param bridge the new {@link AndroidDebugBridge} object.
      * 
-     * @see IDebugBridgeChangeListener#serverChanged(AndroidDebugBridge)
+     * @see IDebugBridgeChangeListener#bridgeChanged(AndroidDebugBridge)
      */
     public void bridgeChanged(AndroidDebugBridge bridge) {
         // The adb server has changed. We cancel any pending launches.
@@ -1447,7 +1586,7 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
      * @param device the device that was updated.
      * @param changeMask the mask indicating what changed.
      * 
-     * @see IDeviceChangeListener#deviceChanged(Device)
+     * @see IDeviceChangeListener#deviceChanged(Device, int)
      */
     public void deviceChanged(Device device, int changeMask) {
         // We could check if any starting device we care about is now ready, but we can wait for
@@ -1622,7 +1761,6 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
      * Get the stderr/stdout outputs of a process and return when the process is done.
      * Both <b>must</b> be read or the process will block on windows.
      * @param process The process to get the ouput from
-     * @throws InterruptedException
      */
     private void grabEmulatorOutput(final Process process) {
         // read the lines as they come. if null is returned, it's
index 2cb11c3..19ec9a7 100644 (file)
@@ -19,6 +19,7 @@ package com.android.ide.eclipse.adt.debug.launching;
 import com.android.ddmlib.AndroidDebugBridge;
 import com.android.ddmlib.Client;
 import com.android.ddmlib.Device;
+import com.android.ddmlib.IDevice;
 import com.android.ddmlib.AndroidDebugBridge.IDeviceChangeListener;
 import com.android.ddmlib.Device.DeviceState;
 import com.android.ddmuilib.IImageLoader;
@@ -27,7 +28,10 @@ import com.android.ddmuilib.TableHelper;
 import com.android.ide.eclipse.adt.AdtPlugin;
 import com.android.ide.eclipse.adt.debug.launching.AndroidLaunchController.AndroidLaunchConfiguration;
 import com.android.ide.eclipse.adt.debug.launching.AndroidLaunchController.DelayedLaunchInfo;
+import com.android.ide.eclipse.adt.sdk.Sdk;
 import com.android.ide.eclipse.ddms.DdmsPlugin;
+import com.android.sdklib.IAndroidTarget;
+import com.android.sdklib.vm.VmManager.VmInfo;
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.jface.preference.IPreferenceStore;
@@ -67,19 +71,26 @@ public class DeviceChooserDialog extends Dialog implements IDeviceChangeListener
 
     private final static String PREFS_COL_SERIAL = "deviceChooser.serial"; //$NON-NLS-1$
     private final static String PREFS_COL_STATE = "deviceChooser.state"; //$NON-NLS-1$
-    private final static String PREFS_COL_BUILD = "deviceChooser.build"; //$NON-NLS-1$
+    private final static String PREFS_COL_VM = "deviceChooser.vm"; //$NON-NLS-1$
+    private final static String PREFS_COL_TARGET = "deviceChooser.target"; //$NON-NLS-1$
+    private final static String PREFS_COL_DEBUG = "deviceChooser.debug"; //$NON-NLS-1$
 
     private Table mDeviceTable;
     private TableViewer mViewer;
     
     private Image mDeviceImage;
     private Image mEmulatorImage;
+    private Image mMatchImage;
+    private Image mNoMatchImage;
+    private Image mWarningImage;
 
     private Button mOkButton;
     private Button mCreateButton;
     
     private DeviceChooserResponse mResponse;
     private DelayedLaunchInfo mLaunchInfo;
+    private IAndroidTarget mProjectTarget;
+    private Sdk mSdk;
     
     /**
      * Basic Content Provider for a table full of {@link Device} objects. The input is
@@ -111,13 +122,44 @@ public class DeviceChooserDialog extends Dialog implements IDeviceChangeListener
     private class LabelProvider implements ITableLabelProvider {
 
         public Image getColumnImage(Object element, int columnIndex) {
-            if (columnIndex == 0 && element instanceof Device) {
-                if (((Device)element).isEmulator()) {
-                    return mEmulatorImage;
+            if (element instanceof Device) {
+                Device device = (Device)element;
+                switch (columnIndex) {
+                    case 0:
+                        return device.isEmulator() ? mEmulatorImage : mDeviceImage;
+                        
+                    case 2:
+                        // check for compatibility.
+                        if (device.isEmulator() == false) { // physical device
+                            // get the api level of the device
+                            try {
+                                String apiValue = device.getProperty(
+                                        IDevice.PROP_BUILD_VERSION_NUMBER);
+                                int api = Integer.parseInt(apiValue);
+                                if (api >= mProjectTarget.getApiVersionNumber()) {
+                                    // if the project is compiling against an add-on, the optional
+                                    // API may be missing from the device.
+                                    return mProjectTarget.isPlatform() ?
+                                            mMatchImage : mWarningImage;
+                                } else {
+                                    return mNoMatchImage;
+                                }
+                            } catch (NumberFormatException e) {
+                                // lets consider the device non compatible
+                                return mNoMatchImage;
+                            }
+                        } else {
+                            // get the VmInfo
+                            VmInfo info = mSdk.getVmManager().getVm(device.getVmName());
+                            if (info == null) {
+                                return mWarningImage;
+                            }
+                            return mProjectTarget.isCompatibleBaseFor(info.getTarget()) ?
+                                    mMatchImage : mNoMatchImage;
+                        }
                 }
-
-                return mDeviceImage;
             }
+
             return null;
         }
 
@@ -128,15 +170,30 @@ public class DeviceChooserDialog extends Dialog implements IDeviceChangeListener
                     case 0:
                         return device.getSerialNumber();
                     case 1:
-                        return getStateString(device);
+                        if (device.isEmulator()) {
+                            return device.getVmName();
+                        } else {
+                            return "N/A"; // devices don't have VM names.
+                        }
                     case 2:
-                        String debuggable = device.getProperty(Device.PROP_DEBUGGABLE);
-                        String version = device.getProperty(Device.PROP_BUILD_VERSION);
+                        if (device.isEmulator()) {
+                            VmInfo info = mSdk.getVmManager().getVm(device.getVmName());
+                            if (info == null) {
+                                return "?";
+                            }
+                            return info.getTarget().getFullName();
+                        } else {
+                            return device.getProperty(IDevice.PROP_BUILD_VERSION);
+                        }
+                    case 3:
+                        String debuggable = device.getProperty(IDevice.PROP_DEBUGGABLE);
                         if (debuggable != null && debuggable.equals("1")) { //$NON-NLS-1$
-                            return String.format("%1$s (debug)", version); //$NON-NLS-1$
+                            return "Yes";
                         } else {
-                            return String.format("%1$s", version); //$NON-NLS-1$
+                            return "";
                         }
+                    case 4:
+                        return getStateString(device);
                 }
             }
 
@@ -164,6 +221,7 @@ public class DeviceChooserDialog extends Dialog implements IDeviceChangeListener
     public static class DeviceChooserResponse {
         public boolean mustContinue;
         public boolean mustLaunchEmulator;
+        public VmInfo vmToLaunch;
         public Device deviceToUse;
     }
     
@@ -175,14 +233,18 @@ public class DeviceChooserDialog extends Dialog implements IDeviceChangeListener
      * Prepare and display the dialog.
      * @param response
      * @param project 
+     * @param projectTarget 
      * @param launch 
      * @param launchInfo 
      * @param config 
      */
     public void open(DeviceChooserResponse response, IProject project,
-            AndroidLaunch launch, DelayedLaunchInfo launchInfo, AndroidLaunchConfiguration config) {
+            IAndroidTarget projectTarget, AndroidLaunch launch, DelayedLaunchInfo launchInfo,
+            AndroidLaunchConfiguration config) {
         mResponse = response;
+        mProjectTarget = projectTarget;
         mLaunchInfo = launchInfo;
+        mSdk = Sdk.getCurrent();
 
         Shell parent = getParent();
         Shell shell = new Shell(parent, getStyle());
@@ -218,6 +280,9 @@ public class DeviceChooserDialog extends Dialog implements IDeviceChangeListener
 
         mEmulatorImage.dispose();
         mDeviceImage.dispose();
+        mMatchImage.dispose();
+        mNoMatchImage.dispose();
+        mWarningImage.dispose();
 
         AndroidLaunchController.getInstance().continueLaunch(response, project, launch,
                 launchInfo, config);
@@ -249,14 +314,22 @@ public class DeviceChooserDialog extends Dialog implements IDeviceChangeListener
                 SWT.LEFT, "AAA+AAAAAAAAAAAAAAAAAAA", //$NON-NLS-1$
                 PREFS_COL_SERIAL, store);
 
+        TableHelper.createTableColumn(mDeviceTable, "VM Name",
+                SWT.LEFT, "engineering", //$NON-NLS-1$
+                PREFS_COL_VM, store);
+
+        TableHelper.createTableColumn(mDeviceTable, "Target",
+                SWT.LEFT, "AAA+Android 9.9.9", //$NON-NLS-1$
+                PREFS_COL_TARGET, store);
+
+        TableHelper.createTableColumn(mDeviceTable, "Debug",
+                SWT.LEFT, "Debug", //$NON-NLS-1$
+                PREFS_COL_DEBUG, store);
+
         TableHelper.createTableColumn(mDeviceTable, "State",
                 SWT.LEFT, "bootloader", //$NON-NLS-1$
                 PREFS_COL_STATE, store);
 
-        TableHelper.createTableColumn(mDeviceTable, "Build Info",
-                SWT.LEFT, "engineering", //$NON-NLS-1$
-                PREFS_COL_BUILD, store);
-        
         // create the viewer for it
         mViewer = new TableViewer(mDeviceTable);
         mViewer.setContentProvider(new ContentProvider());
@@ -357,20 +430,42 @@ public class DeviceChooserDialog extends Dialog implements IDeviceChangeListener
     }
     
     private void loadImages() {
-        IImageLoader loader = DdmsPlugin.getImageLoader();
+        IImageLoader ddmsLoader = DdmsPlugin.getImageLoader();
         Display display = DdmsPlugin.getDisplay();
+        IImageLoader adtLoader = AdtPlugin.getImageLoader();
 
         if (mDeviceImage == null) {
-            mDeviceImage = ImageHelper.loadImage(loader, display,
+            mDeviceImage = ImageHelper.loadImage(ddmsLoader, display,
                     "device.png", //$NON-NLS-1$
                     ICON_WIDTH, ICON_WIDTH,
                     display.getSystemColor(SWT.COLOR_RED));
         }
         if (mEmulatorImage == null) {
-            mEmulatorImage = ImageHelper.loadImage(loader, display,
+            mEmulatorImage = ImageHelper.loadImage(ddmsLoader, display,
                     "emulator.png", ICON_WIDTH, ICON_WIDTH, //$NON-NLS-1$
                     display.getSystemColor(SWT.COLOR_BLUE));
         }
+        
+        if (mMatchImage == null) {
+            mMatchImage = ImageHelper.loadImage(adtLoader, display,
+                    "match.png", //$NON-NLS-1$
+                    ICON_WIDTH, ICON_WIDTH,
+                    display.getSystemColor(SWT.COLOR_GREEN));
+        }
+
+        if (mNoMatchImage == null) {
+            mNoMatchImage = ImageHelper.loadImage(adtLoader, display,
+                    "error.png", //$NON-NLS-1$
+                    ICON_WIDTH, ICON_WIDTH,
+                    display.getSystemColor(SWT.COLOR_RED));
+        }
+
+        if (mWarningImage == null) {
+            mWarningImage = ImageHelper.loadImage(adtLoader, display,
+                    "warning.png", //$NON-NLS-1$
+                    ICON_WIDTH, ICON_WIDTH,
+                    display.getSystemColor(SWT.COLOR_YELLOW));
+        }
 
     }
     
@@ -438,7 +533,7 @@ public class DeviceChooserDialog extends Dialog implements IDeviceChangeListener
      * @param device the device that was updated.
      * @param changeMask the mask indicating what changed.
      * 
-     * @see IDeviceChangeListener#deviceChanged(Device)
+     * @see IDeviceChangeListener#deviceChanged(Device, int)
      */
     public void deviceChanged(final Device device, int changeMask) {
         if ((changeMask & (Device.CHANGE_STATE | Device.CHANGE_BUILD_INFO)) != 0) {
index 5d3e349..68deec3 100644 (file)
@@ -80,9 +80,8 @@ public class LaunchConfigDelegate extends LaunchConfigurationDelegate {
      */
     public static final String ATTR_ACTIVITY = AdtPlugin.PLUGIN_ID + ".activity"; //$NON-NLS-1$
 
-    /** Skin to be used to launch the emulator */
-    public static final String ATTR_SKIN = AdtPlugin.PLUGIN_ID + ".skin"; //$NON-NLS-1$
-
+    public static final String ATTR_VM_NAME = AdtPlugin.PLUGIN_ID + ".vm"; //$NON-NLS-1$
+    
     public static final String ATTR_SPEED = AdtPlugin.PLUGIN_ID + ".speed"; //$NON-NLS-1$
 
     /**
@@ -317,6 +316,10 @@ public class LaunchConfigDelegate extends LaunchConfigurationDelegate {
                         1 /* code, unused */, "Can't find the project!", null /* exception */));
     }
 
+    /**
+     * {@inheritDoc}
+     * @throws CoreException
+     */
     @Override
     public ILaunch getLaunch(ILaunchConfiguration configuration, String mode)
             throws CoreException {
@@ -406,8 +409,6 @@ public class LaunchConfigDelegate extends LaunchConfigurationDelegate {
 
     /**
      * Returns the name of the activity.
-     * @param configuration
-     * @return
      */
     private String getActivityName(ILaunchConfiguration configuration) {
         String empty = "";
index c7b340c..f4f5281 100644 (file)
@@ -22,7 +22,9 @@ import com.android.ide.eclipse.adt.sdk.Sdk;
 import com.android.ide.eclipse.common.project.BaseProjectHelper;
 import com.android.ide.eclipse.ddms.DdmsPlugin;
 import com.android.sdklib.IAndroidTarget;
-import com.android.sdklib.SdkConstants;
+import com.android.sdklib.vm.VmManager;
+import com.android.sdklib.vm.VmManager.VmInfo;
+import com.android.sdkuilib.VmSelector;
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
@@ -70,6 +72,11 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
         { "UMTS", "umts" }, //$NON-NLS-2$
     };
 
+    private Button mAutoTargetButton;
+    private Button mManualTargetButton;
+
+    private VmSelector mPreferredVmSelector;
+
     private Combo mSpeedCombo;
 
     private Combo mDelayCombo;
@@ -78,18 +85,10 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
 
     private Text mEmulatorCLOptions;
 
-    private Combo mSkinCombo;
-
-    private Button mAutoTargetButton;
-
-    private Button mManualTargetButton;
-
     private Button mWipeDataButton;
 
     private Button mNoBootAnimButton;
 
-    private IAndroidTarget mTarget;
-
     /**
      * Returns the emulator ready speed option value.
      * @param value The index of the combo selection.
@@ -147,6 +146,11 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
         targetModeGroup.setLayout(layout);
         targetModeGroup.setFont(font);
 
+        mManualTargetButton = new Button(targetModeGroup, SWT.RADIO);
+        mManualTargetButton.setText("Manual");
+        // Since there are only 2 radio buttons, we can put a listener on only one (they
+        // are both called on select and unselect event.
+
         // add the radio button
         mAutoTargetButton = new Button(targetModeGroup, SWT.RADIO);
         mAutoTargetButton.setText("Automatic");
@@ -159,11 +163,16 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
             }
         });
 
-        mManualTargetButton = new Button(targetModeGroup, SWT.RADIO);
-        mManualTargetButton.setText("Manual");
-        // Since there are only 2 radio buttons, we can put a listener on only
-        // one (they
-        // are both called on select and unselect event.
+        new Label(targetModeGroup, SWT.NONE).setText("Preferred VM");
+        VmInfo[] vms = new VmInfo[0];
+        mPreferredVmSelector = new VmSelector(targetModeGroup, vms,
+                false /*allowMultipleSelection*/);
+        mPreferredVmSelector.setSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                updateLaunchConfigurationDialog();
+            }
+        });
 
         // emulator size
         mEmulatorOptionsGroup = new Group(topComp, SWT.NONE);
@@ -174,17 +183,6 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
         mEmulatorOptionsGroup.setLayout(layout);
         mEmulatorOptionsGroup.setFont(font);
 
-        new Label(mEmulatorOptionsGroup, SWT.NONE).setText("Screen Size:");
-
-        mSkinCombo = new Combo(mEmulatorOptionsGroup, SWT.READ_ONLY);
-        mSkinCombo.addSelectionListener(new SelectionAdapter() {
-            // called when selection changes
-            @Override
-            public void widgetSelected(SelectionEvent e) {
-                updateLaunchConfigurationDialog();
-            }
-        });
-
         // network options
         new Label(mEmulatorOptionsGroup, SWT.NONE).setText("Network Speed:");
 
@@ -279,8 +277,9 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
      * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
      */
     public void initializeFrom(ILaunchConfiguration configuration) {
-        boolean value = LaunchConfigDelegate.DEFAULT_TARGET_MODE; // true ==
-                                                                    // automatic
+        VmManager vmManager = Sdk.getCurrent().getVmManager();
+
+        boolean value = LaunchConfigDelegate.DEFAULT_TARGET_MODE; // true == automatic
         try {
             value = configuration.getAttribute(LaunchConfigDelegate.ATTR_TARGET_MODE, value);
         } catch (CoreException e) {
@@ -290,11 +289,12 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
         mManualTargetButton.setSelection(!value);
         
         // look for the project name to get its target.
-        String projectName = "";
+        String stringValue = "";
         try {
-            projectName = configuration.getAttribute(
-                    IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectName);
+            stringValue = configuration.getAttribute(
+                    IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, stringValue);
         } catch (CoreException ce) {
+            // let's not do anything here, we'll use the default value
         }
 
         IProject project = null;
@@ -304,25 +304,41 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
         if (projects != null) {
             // look for the project whose name we read from the configuration.
             for (IJavaProject p : projects) {
-                if (p.getElementName().equals(projectName)) {
+                if (p.getElementName().equals(stringValue)) {
                     project = p.getProject();
                     break;
                 }
             }
         }
 
-        mSkinCombo.removeAll();
+        // update the VM list
+        VmInfo[] vms = null;
+        if (vmManager != null) {
+            vms = vmManager.getVms();
+        }
+
+        IAndroidTarget projectTarget = null;
         if (project != null) {
-            mTarget = Sdk.getCurrent().getTarget(project);
-            if (mTarget != null) {
-                String[] skins = mTarget.getSkins();
-                if (skins != null) {
-                    for (String skin : skins) {
-                        mSkinCombo.add(skin);
-                    }
-                    mSkinCombo.pack();
-                }
-            }
+            projectTarget = Sdk.getCurrent().getTarget(project);
+        } else {
+            vms = null; // no project? we don't want to display any "compatible" VMs.
+        }
+        
+        mPreferredVmSelector.setVms(vms, projectTarget);
+
+        stringValue = "";
+        try {
+            stringValue = configuration.getAttribute(LaunchConfigDelegate.ATTR_VM_NAME,
+                    stringValue);
+        } catch (CoreException e) {
+            // let's not do anything here, we'll use the default value
+        }
+
+        if (stringValue != null && stringValue.length() > 0 && vmManager != null) {
+            VmInfo targetVm = vmManager.getVm(stringValue);
+            mPreferredVmSelector.setSelection(targetVm);
+        } else {
+            mPreferredVmSelector.setSelection(null);
         }
 
         value = LaunchConfigDelegate.DEFAULT_WIPE_DATA;
@@ -342,23 +358,6 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
         mNoBootAnimButton.setSelection(value);
 
         int index = -1;
-        try {
-            String skin = configuration.getAttribute(LaunchConfigDelegate.ATTR_SKIN, (String)null);
-            if (skin == null) {
-                skin = SdkConstants.SKIN_DEFAULT;
-            }
-
-            index = getSkinIndex(skin);
-        } catch (CoreException e) {
-            index = getSkinIndex(SdkConstants.SKIN_DEFAULT);
-        }
-
-        if (index == -1) {
-            mSkinCombo.select(0);
-            updateLaunchConfigurationDialog();
-        } else {
-            mSkinCombo.select(index);
-        }
 
         index = LaunchConfigDelegate.DEFAULT_SPEED;
         try {
@@ -405,8 +404,12 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
     public void performApply(ILaunchConfigurationWorkingCopy configuration) {
         configuration.setAttribute(LaunchConfigDelegate.ATTR_TARGET_MODE,
                 mAutoTargetButton.getSelection());
-        configuration.setAttribute(LaunchConfigDelegate.ATTR_SKIN,
-                getSkinNameByIndex(mSkinCombo.getSelectionIndex()));
+        VmInfo vm = mPreferredVmSelector.getFirstSelected();
+        if (vm != null) {
+            configuration.setAttribute(LaunchConfigDelegate.ATTR_VM_NAME, vm.getName());
+        } else {
+            configuration.setAttribute(LaunchConfigDelegate.ATTR_VM_NAME, (String)null);
+        }
         configuration.setAttribute(LaunchConfigDelegate.ATTR_SPEED,
                 mSpeedCombo.getSelectionIndex());
         configuration.setAttribute(LaunchConfigDelegate.ATTR_DELAY,
@@ -425,8 +428,6 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
     public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
         configuration.setAttribute(LaunchConfigDelegate.ATTR_TARGET_MODE,
                 LaunchConfigDelegate.DEFAULT_TARGET_MODE);
-        configuration.setAttribute(LaunchConfigDelegate.ATTR_SKIN,
-                SdkConstants.SKIN_DEFAULT);
         configuration.setAttribute(LaunchConfigDelegate.ATTR_SPEED,
                 LaunchConfigDelegate.DEFAULT_SPEED);
         configuration.setAttribute(LaunchConfigDelegate.ATTR_DELAY,
@@ -440,33 +441,4 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
         String emuOptions = store.getString(AdtPlugin.PREFS_EMU_OPTIONS);
         configuration.setAttribute(LaunchConfigDelegate.ATTR_COMMANDLINE, emuOptions);
    }
-
-    private String getSkinNameByIndex(int index) {
-        if (mTarget != null && index > 0) {
-            String[] skins = mTarget.getSkins();
-            if (skins != null && index < skins.length) {
-                return skins[index];
-            }
-        }
-        
-        return null;
-    }
-
-    private int getSkinIndex(String name) {
-        if (mTarget != null) {
-            String[] skins = mTarget.getSkins();
-            if (skins != null) {
-                int index = 0;
-                for (String skin : skins) {
-                    if (skin.equalsIgnoreCase(name)) {
-                        return index;
-                    }
-                    index++;
-                }
-            }
-        }
-        
-        return -1;
-    }
-
 }
index af7f2bb..6a40ed0 100644 (file)
@@ -398,11 +398,13 @@ public class MainLaunchConfigTab extends AbstractLaunchConfigurationTab {
         config.setMappedResources(resources);
     }
 
-    /** Loads the ui with the activities of the specified project, and store the
-     * activities in <code>mActivities</code>
+    /**
+     * Loads the ui with the activities of the specified project, and stores the
+     * activities in <code>mActivities</code>.
+     * <p/>
      * First activity is selected by default if present.
-     * @param project The project to load the activities from
-     * @return The array of activities or null if none could be found.
+     * 
+     * @param project The project to load the activities from.
      */
     private void loadActivities(IProject project) {
         if (project != null) {
index 434269c..e64c2f4 100644 (file)
@@ -199,7 +199,7 @@ public class BuildPreferencePage extends FieldEditorPreferencePage implements
          */
         private void handleException(Throwable t) {
             String msg = t.getMessage();
-            if (t == null) {
+            if (msg == null) {
                 Throwable cause = t.getCause();
                 if (cause != null) {
                     handleException(cause);
index 1ca89cd..7fc3318 100644 (file)
@@ -18,6 +18,7 @@ package com.android.ide.eclipse.adt.project;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
 import com.android.ide.eclipse.common.AndroidConstants;
+import com.android.sdklib.SdkConstants;
 
 import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IProject;
@@ -53,13 +54,13 @@ public class FolderDecorator implements ILightweightLabelDecorator {
                     // check the folder is directly under the project.
                     if (folder.getParent().getType() == IResource.PROJECT) {
                         String name = folder.getName();
-                        if (name.equals(AndroidConstants.FD_ASSETS)) {
+                        if (name.equals(SdkConstants.FD_ASSETS)) {
                             decorate(decoration, " [Android assets]");
                             decoration.addOverlay(mDescriptor, IDecoration.TOP_RIGHT);
-                        } else if (name.equals(AndroidConstants.FD_RESOURCES)) {
+                        } else if (name.equals(SdkConstants.FD_RESOURCES)) {
                             decorate(decoration, " [Android resources]");
                             decoration.addOverlay(mDescriptor, IDecoration.TOP_RIGHT);
-                        } else if (name.equals(AndroidConstants.FD_NATIVE_LIBS)) {
+                        } else if (name.equals(SdkConstants.FD_NATIVE_LIBS)) {
                             decorate(decoration, " [Native Libraries]");
                         }
                     }
index de4b339..399eac9 100644 (file)
@@ -493,7 +493,7 @@ public final class ExportWizard extends Wizard implements IExportWizard {
             }
 
             // no more cause and still no message. display the first exception.
-            return cause.getClass().getCanonicalName();
+            return t.getClass().getCanonicalName();
         }
         
         return message;
index 3614be3..e161e18 100644 (file)
@@ -256,7 +256,6 @@ final class ProjectCheckPage extends ExportWizardPage {
     
     /**
      * Checks the parameters for correctness, and update the error message and buttons.
-     * @return the current IProject of this launch config.
      */
     private void handleProjectNameChange() {
         setPageComplete(false);
index 2cafa01..4da216c 100644 (file)
@@ -28,8 +28,12 @@ import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jdt.core.ClasspathContainerInitializer;
 import org.eclipse.jdt.core.IAccessRule;
 import org.eclipse.jdt.core.IClasspathAttribute;
@@ -125,7 +129,7 @@ public class AndroidClasspathContainerInitializer extends ClasspathContainerInit
      */
     private static IClasspathContainer allocateAndroidContainer(String containerId,
             IJavaProject javaProject) {
-        IProject iProject = javaProject.getProject();
+        final IProject iProject = javaProject.getProject();
 
         // remove potential MARKER_TARGETs.
         try {
@@ -139,7 +143,9 @@ public class AndroidClasspathContainerInitializer extends ClasspathContainerInit
         }
 
         
-        // first we check if the SDK has been loaded
+        // First we check if the SDK has been loaded.
+        // By passing the javaProject to getSdkLoadStatus(), we ensure that, should the SDK
+        // not be loaded yet, the classpath container will be resolved again once the SDK is loaded.
         boolean sdkIsLoaded = AdtPlugin.getDefault().getSdkLoadStatus(javaProject) ==
             LoadStatus.LOADED;
 
@@ -172,8 +178,14 @@ public class AndroidClasspathContainerInitializer extends ClasspathContainerInit
         String message = null;
         boolean outputToConsole = true;
         if (hashString == null || hashString.length() == 0) {
-            message = String.format(
-                    "Project has no target set. Edit the project properties to set one.");
+            // if there is no hash string we only show this if the SDK is loaded.
+            // For a project opened at start-up with no target, this would be displayed twice,
+            // once when the project is opened, and once after the SDK has finished loading.
+            // By testing the sdk is loaded, we only show this once in the console.
+            if (sdkIsLoaded) {
+                message = String.format(
+                        "Project has no target set. Edit the project properties to set one.");
+            }
         } else if (sdkIsLoaded) {
             message = String.format(
                     "Unable to resolve target '%s'", hashString);
@@ -187,23 +199,41 @@ public class AndroidClasspathContainerInitializer extends ClasspathContainerInit
             // and it's expected. (we do keep the error marker though).
             outputToConsole = false;
         }
-
-        // log the error and put the marker on the project
-        if (outputToConsole) {
-            AdtPlugin.printBuildToConsole(AdtConstants.BUILD_ALWAYS, iProject, message);
-        }
-        IMarker marker = BaseProjectHelper.addMarker(iProject, AdtConstants.MARKER_TARGET, message,
-                IMarker.SEVERITY_ERROR);
         
-        // add a marker priority as this is an more important error than the error that will
-        // spring from the lack of library
-        try {
-            marker.setAttribute(IMarker.PRIORITY, IMarker.PRIORITY_HIGH);
-        } catch (CoreException e) {
-            // just log the error
-            AdtPlugin.log(e, "Error changing target marker priority.");
+        if (message != null) {
+            // log the error and put the marker on the project if we can.
+            if (outputToConsole) {
+                AdtPlugin.printBuildToConsole(AdtConstants.BUILD_ALWAYS, iProject, message);
+            }
+            
+            try {
+                BaseProjectHelper.addMarker(iProject, AdtConstants.MARKER_TARGET, message, -1,
+                        IMarker.SEVERITY_ERROR, IMarker.PRIORITY_HIGH);
+            } catch (CoreException e) {
+                // In some cases, the workspace may be locked for modification when we pass here.
+                // We schedule a new job to put the marker after.
+                final String fmessage = message;
+                Job markerJob = new Job("Android SDK: Resolving error markers") {
+                    @SuppressWarnings("unchecked")
+                    @Override
+                    protected IStatus run(IProgressMonitor monitor) {
+                        try {
+                            BaseProjectHelper.addMarker(iProject, AdtConstants.MARKER_TARGET,
+                                    fmessage, -1, IMarker.SEVERITY_ERROR, IMarker.PRIORITY_HIGH);
+                        } catch (CoreException e2) {
+                            return e2.getStatus();
+                        }
+
+                        return Status.OK_STATUS;
+                    }
+                };
+
+                // build jobs are run after other interactive jobs
+                markerJob.setPriority(Job.BUILD);
+                markerJob.schedule();
+            }
         }
-        
+
         // return a dummy container to replace the one we may have had before.
         return new IClasspathContainer() {
             public IClasspathEntry[] getClasspathEntries() {
index fad4f19..1f6ebf1 100644 (file)
@@ -37,7 +37,8 @@ import javax.management.InvalidAttributeValueException;
 public class AndroidJarLoader extends ClassLoader implements IAndroidClassLoader {
     
     /**
-     * Wrapper around a {@link Class} to provide the methods of {@link IClassDescriptor}.
+     * Wrapper around a {@link Class} to provide the methods of
+     * {@link IAndroidClassLoader.IClassDescriptor}.
      */
     public final static class ClassWrapper implements IClassDescriptor {
         private Class<?> mClass;
@@ -416,7 +417,7 @@ public class AndroidJarLoader extends ClassLoader implements IAndroidClassLoader
     }
 
     /**
-     * Returns a {@link IClass} by its fully-qualified name.
+     * Returns a {@link IAndroidClassLoader.IClassDescriptor} by its fully-qualified name.
      * @param className the fully-qualified name of the class to return.
      * @throws ClassNotFoundException
      */
index 232b9e8..dfe876f 100644 (file)
@@ -82,11 +82,8 @@ public final class AndroidTargetParser {
     
     /**
      * Parses the framework, collects all interesting information and stores them in the
-     * {@link FrameworkResourceManager} given to the constructor.
+     * {@link IAndroidTarget} given to the constructor.
      * 
-     * @param osSdkPath the OS path of the SDK directory.
-     * @param resourceManager the {@link FrameworkResourceManager} that will store the parsed
-     * resources.
      * @param monitor A progress monitor. Can be null. Caller is responsible for calling done.
      * @return True if the SDK path was valid and parsing has been attempted.
      */
@@ -400,7 +397,6 @@ public final class AndroidTargetParser {
      * Loads and collects the action and category default values from the framework.
      * The values are added to the <code>actions</code> and <code>categories</code> lists.
      * 
-     * @param osLibPath The OS path to the SDK tools/lib folder, ending with a separator.
      * @param activityActions the list which will receive the activity action values.
      * @param broadcastActions the list which will receive the broadcast action values.
      * @param serviceActions the list which will receive the service action values.
index 50d319e..35057d1 100644 (file)
@@ -64,7 +64,7 @@ public interface IAndroidClassLoader {
         throws IOException, InvalidAttributeValueException, ClassFormatError;
 
     /**
-     * Returns a {@link IClass} by its fully-qualified name.
+     * Returns a {@link IClassDescriptor} by its fully-qualified name.
      * @param className the fully-qualified name of the class to return.
      * @throws ClassNotFoundException
      */
index 3b9d10e..19f8f45 100644 (file)
@@ -18,17 +18,17 @@ package com.android.ide.eclipse.adt.sdk;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
 import com.android.ide.eclipse.adt.project.internal.AndroidClasspathContainerInitializer;
+import com.android.prefs.AndroidLocation.AndroidLocationException;
 import com.android.sdklib.IAndroidTarget;
 import com.android.sdklib.ISdkLog;
 import com.android.sdklib.SdkConstants;
 import com.android.sdklib.SdkManager;
 import com.android.sdklib.project.ProjectProperties;
+import com.android.sdklib.project.ProjectProperties.PropertyType;
+import com.android.sdklib.vm.VmManager;
 
 import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaCore;
 
@@ -46,21 +46,20 @@ import java.util.HashMap;
  * To start using an SDK, call {@link #loadSdk(String)} which returns the instance of
  * the Sdk object.
  * 
- * To get the list of platforms present in the SDK, call {@link #getPlatforms()}.
- * To get the list of add-ons present in the SDK, call {@link #getAddons()}.
- * 
+ * To get the list of platforms or add-ons present in the SDK, call {@link #getTargets()}.
  */
 public class Sdk {
-    private final static String PROPERTY_PROJECT_TARGET = "androidTarget"; //$NON-NLS-1$
-    
     private static Sdk sCurrentSdk = null;
 
     private final SdkManager mManager;
+    private final VmManager mVmManager;
+
     private final HashMap<IProject, IAndroidTarget> mProjectMap =
             new HashMap<IProject, IAndroidTarget>();
     private final HashMap<IAndroidTarget, AndroidTargetData> mTargetMap = 
             new HashMap<IAndroidTarget, AndroidTargetData>();
     private final String mDocBaseUrl;
+
     
     /**
      * Loads an SDK and returns an {@link Sdk} object if success.
@@ -74,18 +73,33 @@ public class Sdk {
 
         final ArrayList<String> logMessages = new ArrayList<String>();
         ISdkLog log = new ISdkLog() {
-            public void error(String errorFormat, Object... arg) {
-                logMessages.add(String.format(errorFormat, arg));
+            public void error(Throwable throwable, String errorFormat, Object... arg) {
+                if (errorFormat != null) {
+                    logMessages.add(String.format(errorFormat, arg));
+                }
+                
+                if (throwable != null) {
+                    logMessages.add(throwable.getMessage());
+                }
             }
             public void warning(String warningFormat, Object... arg) {
                 logMessages.add(String.format(warningFormat, arg));
             }
+            public void printf(String msgFormat, Object... arg) {
+                logMessages.add(String.format(msgFormat, arg));
+            }
         };
 
         // get an SdkManager object for the location
         SdkManager manager = SdkManager.createManager(sdkLocation, log);
         if (manager != null) {
-            sCurrentSdk = new Sdk(manager);
+            VmManager vmManager = null;
+            try {
+                vmManager = new VmManager(manager, log);
+            } catch (AndroidLocationException e) {
+                log.error(e, "Error parsing the VMs");
+            }
+            sCurrentSdk = new Sdk(manager, vmManager);
             return sCurrentSdk;
         } else {
             StringBuilder sb = new StringBuilder("Error Loading the SDK:\n");
@@ -106,6 +120,13 @@ public class Sdk {
     }
     
     /**
+     * Returns the location (OS path) of the current SDK.
+     */
+    public String getSdkLocation() {
+        return mManager.getLocation();
+    }
+    
+    /**
      * Returns the URL to the local documentation.
      * Can return null if no documentation is found in the current SDK.
      * 
@@ -181,7 +202,8 @@ public class Sdk {
      */
     public static String getProjectTargetHashString(IProject project) {
         // load the default.properties from the project folder.
-        ProjectProperties properties = ProjectProperties.load(project.getLocation().toOSString());
+        ProjectProperties properties = ProjectProperties.load(project.getLocation().toOSString(),
+                PropertyType.DEFAULT);
         if (properties == null) {
             AdtPlugin.log(IStatus.ERROR, "Failed to load properties file for project '%s'",
                     project.getName());
@@ -200,10 +222,12 @@ public class Sdk {
     public static void setProjectTargetHashString(IProject project, String targetHashString) {
         // because we don't want to erase other properties from default.properties, we first load
         // them
-        ProjectProperties properties = ProjectProperties.load(project.getLocation().toOSString());
+        ProjectProperties properties = ProjectProperties.load(project.getLocation().toOSString(),
+                PropertyType.DEFAULT);
         if (properties == null) {
             // doesn't exist yet? we create it.
-            properties = ProjectProperties.create(project.getLocation().toOSString());
+            properties = ProjectProperties.create(project.getLocation().toOSString(),
+                    PropertyType.DEFAULT);
         }
         
         // add/change the target hash string.
@@ -218,7 +242,7 @@ public class Sdk {
         }
     }
     /**
-     * Return the {@link PlatformData} for a given {@link IAndroidTarget}.
+     * Return the {@link AndroidTargetData} for a given {@link IAndroidTarget}.
      */
     public AndroidTargetData getTargetData(IAndroidTarget target) {
         synchronized (mTargetMap) {
@@ -226,8 +250,17 @@ public class Sdk {
         }
     }
     
-    private Sdk(SdkManager manager) {
+    /**
+     * Returns the {@link VmManager}. If the VmManager failed to parse the VM folder, this could
+     * be <code>null</code>.
+     */
+    public VmManager getVmManager() {
+        return mVmManager;
+    }
+    
+    private Sdk(SdkManager manager, VmManager vmManager) {
         mManager = manager;
+        mVmManager = vmManager;
         
         // pre-compute some paths
         mDocBaseUrl = getDocumentationBaseUrl(mManager.getLocation() +
index 8db09f2..0e60f8a 100644 (file)
@@ -323,7 +323,7 @@ public final class WidgetClassLoader implements IAndroidClassLoader {
     }
 
     /**
-     * Returns a {@link IClass} by its fully-qualified name.
+     * Returns a {@link IAndroidClassLoader.IClassDescriptor} by its fully-qualified name.
      * @param className the fully-qualified name of the class to return.
      * @throws ClassNotFoundException
      */
index 8044bcb..7fc94ef 100644 (file)
@@ -26,6 +26,7 @@ import com.android.ide.eclipse.adt.sdk.Sdk;
 import com.android.ide.eclipse.common.AndroidConstants;
 import com.android.ide.eclipse.common.project.AndroidManifestHelper;
 import com.android.sdklib.IAndroidTarget;
+import com.android.sdklib.SdkConstants;
 import com.android.sdkuilib.SdkTargetSelector;
 
 import org.eclipse.core.filesystem.URIUtil;
@@ -64,9 +65,11 @@ import java.util.regex.Pattern;
  * NewAndroidProjectCreationPage is a project creation page that provides the
  * following fields:
  * <ul>
+ * <li> Project name
+ * <li> SDK Target
+ * <li> Application name
  * <li> Package name
  * <li> Activity name
- * <li> Location of the SDK
  * </ul>
  * Note: this class is public so that it can be accessed from unit tests.
  * It is however an internal class. Its API may change without notice.
@@ -93,13 +96,14 @@ public class NewProjectCreationPage extends WizardPage {
     private static final Pattern sProjectNamePattern = Pattern.compile("^[\\w][\\w. -]*$");  //$NON-NLS-1$
     /** Last user-browsed location, static so that it be remembered for the whole session */
     private static String sCustomLocationOsPath = "";  //$NON-NLS-1$
+    private static boolean sAutoComputeCustomLocation = true;
 
     private final int MSG_NONE = 0;
     private final int MSG_WARNING = 1;
     private final int MSG_ERROR = 2;
     
     private String mUserPackageName = "";       //$NON-NLS-1$
-    private String mUserActivityName = "";    //$NON-NLS-1$
+    private String mUserActivityName = "";      //$NON-NLS-1$
     private boolean mUserCreateActivityCheck = INITIAL_CREATE_ACTIVITY;
     private String mSourceFolder = "";          //$NON-NLS-1$
 
@@ -114,6 +118,8 @@ public class NewProjectCreationPage extends WizardPage {
     private Text mLocationPathField;
     private Button mBrowseButton;
     private Button mCreateActivityCheck;
+    private Text mMinSdkVersionField;
+    private SdkTargetSelector mSdkTargetSelector;
 
     private boolean mInternalLocationPathUpdate;
     protected boolean mInternalProjectNameUpdate;
@@ -122,7 +128,7 @@ public class NewProjectCreationPage extends WizardPage {
     private boolean mInternalActivityNameUpdate;
     protected boolean mProjectNameModifiedByUser;
     protected boolean mApplicationNameModifiedByUser;
-    private SdkTargetSelector mSdkTargetSelector;
+    private boolean mInternalMinSdkVersionUpdate;
 
 
     /**
@@ -133,13 +139,6 @@ public class NewProjectCreationPage extends WizardPage {
     public NewProjectCreationPage(String pageName) {
         super(pageName);
         setPageComplete(false);
-        if (sCustomLocationOsPath == null ||
-                sCustomLocationOsPath.length() == 0 ||
-                !new File(sCustomLocationOsPath).isDirectory()) {
-            // FIXME location of samples is pretty much impossible here.
-            //sCustomLocationOsPath = AdtPlugin.getOsSdkSamplesFolder();
-            sCustomLocationOsPath = File.listRoots()[0].getAbsolutePath();
-        }
     }
 
     // --- Getters used by NewProjectWizard ---
@@ -170,6 +169,11 @@ public class NewProjectCreationPage extends WizardPage {
         return mActivityNameField == null ? INITIAL_NAME : mActivityNameField.getText().trim();
     }
 
+    /** Returns the value of the min sdk version field with spaces trimmed. */
+    public String getMinSdkVersion() {
+        return mMinSdkVersionField == null ? "" : mMinSdkVersionField.getText().trim();
+    }
+
     /** Returns the value of the application name field with spaces trimmed. */
     public String getApplicationName() {
         // Return the name of the activity as default application name.
@@ -200,7 +204,7 @@ public class NewProjectCreationPage extends WizardPage {
      * "src" constant. */
     public String getSourceFolder() {
         if (isNewProject() || mSourceFolder == null || mSourceFolder.length() == 0) {
-            return AndroidConstants.FD_SOURCES;
+            return SdkConstants.FD_SOURCES;
         } else {
             return mSourceFolder;
         }
@@ -389,9 +393,16 @@ public class NewProjectCreationPage extends WizardPage {
         }
 
         mSdkTargetSelector = new SdkTargetSelector(group, targets, false /*multi-selection*/);
+
+        // If there's only one target, select it
+        if (targets != null && targets.length == 1) {
+            mSdkTargetSelector.setSelection(targets[0]);
+        }
+        
         mSdkTargetSelector.setSelectionListener(new SelectionAdapter() {
             @Override
             public void widgetSelected(SelectionEvent e) {
+                updateLocationPathField(null);
                 setPageComplete(validatePage());
             }
         });
@@ -506,6 +517,25 @@ public class NewProjectCreationPage extends WizardPage {
                 onActivityNameFieldModified();
             }
         });
+
+        // min sdk version label
+        label = new Label(group, SWT.NONE);
+        label.setText("Min SDK Version:");
+        label.setFont(parent.getFont());
+        label.setToolTipText("The minimum SDK version number that the application requires. Must be an integer > 0. It can be empty.");
+
+        // min sdk version entry field
+        mMinSdkVersionField = new Text(group, SWT.BORDER);
+        data = new GridData(GridData.FILL_HORIZONTAL);
+        label.setToolTipText("The minimum SDK version number that the application requires. Must be an integer > 0. It can be empty.");
+        mMinSdkVersionField.setLayoutData(data);
+        mMinSdkVersionField.setFont(parent.getFont());
+        mMinSdkVersionField.addListener(SWT.Modify, new Listener() {
+            public void handleEvent(Event event) {
+                onMinSdkVersionFieldModified();
+                setPageComplete(validatePage());
+            }
+        });
     }
 
 
@@ -588,7 +618,29 @@ public class NewProjectCreationPage extends WizardPage {
             mInternalLocationPathUpdate = true;
             if (custom_location) {
                 if (abs_dir != null) {
+                    // We get here if the user selected a directory with the "Browse" button.
+                    // Disable auto-compute of the custom location unless the user selected
+                    // the exact same path.
+                    sAutoComputeCustomLocation = sAutoComputeCustomLocation &&
+                                                 abs_dir.equals(sCustomLocationOsPath);
                     sCustomLocationOsPath = TextProcessor.process(abs_dir);
+                } else  if (sAutoComputeCustomLocation ||
+                            !new File(sCustomLocationOsPath).isDirectory()) {
+                    // By default select the samples directory of the current target
+                    IAndroidTarget target = getSdkTarget();
+                    if (target != null) {
+                        sCustomLocationOsPath = target.getPath(IAndroidTarget.SAMPLES);
+                    }
+
+                    // If we don't have a target, select the base directory of the
+                    // "universal sdk". If we don't even have that, use a root drive.
+                    if (sCustomLocationOsPath == null || sCustomLocationOsPath.length() == 0) {
+                        if (Sdk.getCurrent() != null) {
+                            sCustomLocationOsPath = Sdk.getCurrent().getSdkLocation();
+                        } else {
+                            sCustomLocationOsPath = File.listRoots()[0].getAbsolutePath();
+                        }
+                    }
                 }
                 if (!mLocationPathField.getText().equals(sCustomLocationOsPath)) {
                     mLocationPathField.setText(sCustomLocationOsPath);
@@ -615,8 +667,13 @@ public class NewProjectCreationPage extends WizardPage {
     private void onLocationPathFieldModified() {
         if (!mInternalLocationPathUpdate) {
             // When the updates doesn't come from updateLocationPathField, it must be the user
-            // editing the field manually, in which case we want to save the value internally.
-            sCustomLocationOsPath = getLocationPathFieldValue();
+            // editing the field manually, in which case we want to save the value internally
+            // and we disable auto-compute of the custom location (to avoid overriding the user
+            // value)
+            String newPath = getLocationPathFieldValue();
+            sAutoComputeCustomLocation = sAutoComputeCustomLocation &&
+                                         newPath.equals(sCustomLocationOsPath);
+            sCustomLocationOsPath = newPath;
             extractNamesFromAndroidManifest();
             setPageComplete(validatePage());
         }
@@ -665,6 +722,31 @@ public class NewProjectCreationPage extends WizardPage {
     }
 
     /**
+     * Called when the min sdk version field has been modified.
+     * 
+     * Ignore the internal modifications. When modified by the user, try to match
+     * a target with the same API level.
+     */
+    private void onMinSdkVersionFieldModified() {
+        if (mInternalMinSdkVersionUpdate) {
+            return;
+        }
+
+        try {
+            int version = Integer.parseInt(getMinSdkVersion());
+            
+            for (IAndroidTarget target : mSdkTargetSelector.getTargets()) {
+                if (target.getApiVersionNumber() == version) {
+                    mSdkTargetSelector.setSelection(target);
+                    break;
+                }
+            }
+        } catch (NumberFormatException e) {
+            // ignore
+        }
+    }
+
+    /**
      * Called when the radio buttons are changed between the "create new project" and the
      * "use existing source" mode. This reverts the fields to whatever the user manually
      * entered before.
@@ -697,89 +779,132 @@ public class NewProjectCreationPage extends WizardPage {
      * can actually be found in the custom user directory.
      */
     private void extractNamesFromAndroidManifest() {
-        if (!isNewProject()) {
-            File f = new File(getProjectLocation());
-            if (f.isDirectory()) {
-                Path path = new Path(f.getPath());
-                String osPath = path.append(AndroidConstants.FN_ANDROID_MANIFEST).toOSString();
-                AndroidManifestHelper manifest = new AndroidManifestHelper(osPath);
-                if (manifest.exists()) {
-                    String packageName = null;
-                    String activityName = null;
-                    try {
-                        packageName = manifest.getPackageName();
-                        activityName = manifest.getActivityName(1);
-                    } catch (Exception e) {
-                        // pass
-                    }
+        if (isNewProject()) {
+            return;
+        }
 
+        String projectLocation = getProjectLocation();
+        File f = new File(projectLocation);
+        if (!f.isDirectory()) {
+            return;
+        }
 
-                    if (packageName != null && packageName.length() > 0) {
-                        mPackageNameField.setText(packageName);
-                    }
+        Path path = new Path(f.getPath());
+        String osPath = path.append(AndroidConstants.FN_ANDROID_MANIFEST).toOSString();
+        AndroidManifestHelper manifest = new AndroidManifestHelper(osPath);
+        if (!manifest.exists()) {
+            return;
+        }
+        
+        String packageName = null;
+        String activityName = null;
+        String minSdkVersion = null;
+        try {
+            packageName = manifest.getPackageName();
+            activityName = manifest.getActivityName(1);
+            minSdkVersion = manifest.getMinSdkVersion();
+        } catch (Exception e) {
+            // ignore exceptions
+        }
 
-                    if (activityName != null && activityName.length() > 0) {
-                        mInternalActivityNameUpdate = true;
-                        mInternalCreateActivityUpdate = true;
-                        mActivityNameField.setText(activityName);
-                        mCreateActivityCheck.setSelection(true);
-                        mInternalCreateActivityUpdate = false;
-                        mInternalActivityNameUpdate = false;
-
-                        // If project name and application names are empty, use the activity
-                        // name as a default. If the activity name has dots, it's a part of a
-                        // package specification and only the last identifier must be used.
-                        if (activityName.indexOf('.') != -1) {
-                            String[] ids = activityName.split(AndroidConstants.RE_DOT);
-                            activityName = ids[ids.length - 1];
-                        }
-                        if (mProjectNameField.getText().length() == 0 ||
-                                !mProjectNameModifiedByUser) {
-                            mInternalProjectNameUpdate = true;
-                            mProjectNameField.setText(activityName);
-                            mInternalProjectNameUpdate = false;
-                        }
-                        if (mApplicationNameField.getText().length() == 0 ||
-                                !mApplicationNameModifiedByUser) {
-                            mInternalApplicationNameUpdate = true;
-                            mApplicationNameField.setText(activityName);
-                            mInternalApplicationNameUpdate = false;
-                        }
-                    } else {
-                        mInternalActivityNameUpdate = true;
-                        mInternalCreateActivityUpdate = true;
-                        mActivityNameField.setText("");
-                        mCreateActivityCheck.setSelection(false);
-                        mInternalCreateActivityUpdate = false;
-                        mInternalActivityNameUpdate = false;
-                        
-                        // There is no activity name to use to fill in the project and application
-                        // name. However if there's a package name, we can use this as a base.
-                        if (packageName != null && packageName.length() > 0) {
-                            // Package name is a java identifier, so it's most suitable for
-                            // an application name.
-
-                            if (mApplicationNameField.getText().length() == 0 ||
-                                    !mApplicationNameModifiedByUser) {
-                                mInternalApplicationNameUpdate = true;
-                                mApplicationNameField.setText(packageName);
-                                mInternalApplicationNameUpdate = false;
-                            }
-
-                            // For the project name, remove any dots
-                            packageName = packageName.replace('.', '_');
-                            if (mProjectNameField.getText().length() == 0 ||
-                                    !mProjectNameModifiedByUser) {
-                                mInternalProjectNameUpdate = true;
-                                mProjectNameField.setText(packageName);
-                                mInternalProjectNameUpdate = false;
-                            }
-                            
-                        }
+
+        if (packageName != null && packageName.length() > 0) {
+            mPackageNameField.setText(packageName);
+        }
+
+        if (activityName != null && activityName.length() > 0) {
+            mInternalActivityNameUpdate = true;
+            mInternalCreateActivityUpdate = true;
+            mActivityNameField.setText(activityName);
+            mCreateActivityCheck.setSelection(true);
+            mInternalCreateActivityUpdate = false;
+            mInternalActivityNameUpdate = false;
+
+            // If project name and application names are empty, use the activity
+            // name as a default. If the activity name has dots, it's a part of a
+            // package specification and only the last identifier must be used.
+            if (activityName.indexOf('.') != -1) {
+                String[] ids = activityName.split(AndroidConstants.RE_DOT);
+                activityName = ids[ids.length - 1];
+            }
+            if (mProjectNameField.getText().length() == 0 ||
+                    !mProjectNameModifiedByUser) {
+                mInternalProjectNameUpdate = true;
+                mProjectNameField.setText(activityName);
+                mInternalProjectNameUpdate = false;
+            }
+            if (mApplicationNameField.getText().length() == 0 ||
+                    !mApplicationNameModifiedByUser) {
+                mInternalApplicationNameUpdate = true;
+                mApplicationNameField.setText(activityName);
+                mInternalApplicationNameUpdate = false;
+            }
+        } else {
+            mInternalActivityNameUpdate = true;
+            mInternalCreateActivityUpdate = true;
+            mActivityNameField.setText("");  //$NON-NLS-1$
+            mCreateActivityCheck.setSelection(false);
+            mInternalCreateActivityUpdate = false;
+            mInternalActivityNameUpdate = false;
+            
+            // There is no activity name to use to fill in the project and application
+            // name. However if there's a package name, we can use this as a base.
+            if (packageName != null && packageName.length() > 0) {
+                // Package name is a java identifier, so it's most suitable for
+                // an application name.
+
+                if (mApplicationNameField.getText().length() == 0 ||
+                        !mApplicationNameModifiedByUser) {
+                    mInternalApplicationNameUpdate = true;
+                    mApplicationNameField.setText(packageName);
+                    mInternalApplicationNameUpdate = false;
+                }
+
+                // For the project name, remove any dots
+                packageName = packageName.replace('.', '_');
+                if (mProjectNameField.getText().length() == 0 ||
+                        !mProjectNameModifiedByUser) {
+                    mInternalProjectNameUpdate = true;
+                    mProjectNameField.setText(packageName);
+                    mInternalProjectNameUpdate = false;
+                }
+                
+            }
+        }
+
+        // Select the target matching the manifest's sdk, if any
+        boolean foundTarget = false;
+        if (minSdkVersion != null) {
+            try {
+                int sdkVersion = Integer.parseInt(minSdkVersion); 
+
+                for (IAndroidTarget target : mSdkTargetSelector.getTargets()) {
+                    if (target.getApiVersionNumber() == sdkVersion) {
+                        mSdkTargetSelector.setSelection(target);
+                        foundTarget = true;
+                        break;
                     }
                 }
+            } catch(NumberFormatException e) {
+                // ignore
+            }
+        }
+        
+        if (!foundTarget) {
+            for (IAndroidTarget target : mSdkTargetSelector.getTargets()) {
+                if (projectLocation.startsWith(target.getLocation())) {
+                    mSdkTargetSelector.setSelection(target);
+                    foundTarget = true;
+                    break;
+                }
             }
         }
+
+        if (!foundTarget) {
+            mInternalMinSdkVersionUpdate = true;
+            mMinSdkVersionField.setText(minSdkVersion == null ? "" : minSdkVersion); //$NON-NLS-1$
+            mInternalMinSdkVersionUpdate = false;
+        }
     }
 
     /**
@@ -805,6 +930,9 @@ public class NewProjectCreationPage extends WizardPage {
             status |= validateActivityField();
         }
         if ((status & MSG_ERROR) == 0) {
+            status |= validateMinSdkVersionField();
+        }
+        if ((status & MSG_ERROR) == 0) {
             status |= validateSourceFolder();
         }
         if (status == MSG_NONE)  {
@@ -950,6 +1078,38 @@ public class NewProjectCreationPage extends WizardPage {
     }
 
     /**
+     * Validates the sdk target choice.
+     * 
+     * @return The wizard message type, one of MSG_ERROR, MSG_WARNING or MSG_NONE.
+     */
+    private int validateMinSdkVersionField() {
+
+        // If the min sdk version is empty, it is always accepted.
+        if (getMinSdkVersion().length() == 0) {
+            return MSG_NONE;
+        }
+
+        int version = -1;
+        try {
+            // If not empty, it must be a valid integer > 0
+            version = Integer.parseInt(getMinSdkVersion());
+        } catch (NumberFormatException e) {
+            // ignore
+        }
+        
+        if (version < 1) {
+            return setStatus("Min SDK Version must be an integer > 0.", MSG_ERROR);
+        }
+                
+        if (getSdkTarget() != null && getSdkTarget().getApiVersionNumber() != version) {
+            return setStatus("The API level for the selected SDK target does not match the Min SDK version.",
+                    MSG_WARNING);
+        }
+
+        return MSG_NONE;
+    }
+
+    /**
      * Validates the activity name field.
      *
      * @return The wizard message type, one of MSG_ERROR, MSG_WARNING or MSG_NONE.
index a582217..607159a 100644 (file)
@@ -22,6 +22,7 @@ import com.android.ide.eclipse.adt.project.ProjectHelper;
 import com.android.ide.eclipse.adt.sdk.Sdk;
 import com.android.ide.eclipse.common.AndroidConstants;
 import com.android.sdklib.IAndroidTarget;
+import com.android.sdklib.SdkConstants;
 
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
@@ -85,32 +86,36 @@ public class NewProjectWizard extends Wizard implements INewWizard {
     private static final String PARAM_IS_NEW_PROJECT = "IS_NEW_PROJECT"; //$NON-NLS-1$
     private static final String PARAM_SRC_FOLDER = "SRC_FOLDER"; //$NON-NLS-1$
     private static final String PARAM_SDK_TARGET = "SDK_TARGET"; //$NON-NLS-1$
+    private static final String PARAM_MIN_SDK_VERSION = "MIN_SDK_VERSION"; //$NON-NLS-1$
 
     private static final String PH_ACTIVITIES = "ACTIVITIES"; //$NON-NLS-1$
+    private static final String PH_USES_SDK = "USES-SDK"; //$NON-NLS-1$
     private static final String PH_INTENT_FILTERS = "INTENT_FILTERS"; //$NON-NLS-1$
     private static final String PH_STRINGS = "STRINGS"; //$NON-NLS-1$
 
     private static final String BIN_DIRECTORY =
-        AndroidConstants.FD_BINARIES + AndroidConstants.WS_SEP;
+        SdkConstants.FD_OUTPUT + AndroidConstants.WS_SEP;
     private static final String RES_DIRECTORY =
-        AndroidConstants.FD_RESOURCES + AndroidConstants.WS_SEP;
+        SdkConstants.FD_RESOURCES + AndroidConstants.WS_SEP;
     private static final String ASSETS_DIRECTORY =
-        AndroidConstants.FD_ASSETS + AndroidConstants.WS_SEP;
+        SdkConstants.FD_ASSETS + AndroidConstants.WS_SEP;
     private static final String DRAWABLE_DIRECTORY =
-        AndroidConstants.FD_DRAWABLE + AndroidConstants.WS_SEP;
+        SdkConstants.FD_DRAWABLE + AndroidConstants.WS_SEP;
     private static final String LAYOUT_DIRECTORY =
-        AndroidConstants.FD_LAYOUT + AndroidConstants.WS_SEP;
+        SdkConstants.FD_LAYOUT + AndroidConstants.WS_SEP;
     private static final String VALUES_DIRECTORY =
-        AndroidConstants.FD_VALUES + AndroidConstants.WS_SEP;
+        SdkConstants.FD_VALUES + AndroidConstants.WS_SEP;
 
     private static final String TEMPLATES_DIRECTORY = "templates/"; //$NON-NLS-1$
     private static final String TEMPLATE_MANIFEST = TEMPLATES_DIRECTORY
             + "AndroidManifest.template"; //$NON-NLS-1$
     private static final String TEMPLATE_ACTIVITIES = TEMPLATES_DIRECTORY
             + "activity.template"; //$NON-NLS-1$
+    private static final String TEMPLATE_USES_SDK = TEMPLATES_DIRECTORY
+            + "uses-sdk.template"; //$NON-NLS-1$
     private static final String TEMPLATE_INTENT_LAUNCHER = TEMPLATES_DIRECTORY
                + "launcher_intent_filter.template"; //$NON-NLS-1$
-    
+
     private static final String TEMPLATE_STRINGS = TEMPLATES_DIRECTORY
             + "strings.template"; //$NON-NLS-1$
     private static final String TEMPLATE_STRING = TEMPLATES_DIRECTORY
@@ -235,6 +240,7 @@ public class NewProjectWizard extends Wizard implements INewWizard {
         parameters.put(PARAM_IS_NEW_PROJECT, mMainPage.isNewProject());
         parameters.put(PARAM_SRC_FOLDER, mMainPage.getSourceFolder());
         parameters.put(PARAM_SDK_TARGET, mMainPage.getSdkTarget());
+        parameters.put(PARAM_MIN_SDK_VERSION, mMainPage.getMinSdkVersion());
 
         if (mMainPage.isCreateActivity()) {
             // An activity name can be of the form ".package.Class" or ".Class".
@@ -449,6 +455,15 @@ public class NewProjectWizard extends Wizard implements INewWizard {
                 // remove the activity(ies) from the manifest
                 manifestTemplate = manifestTemplate.replaceAll(PH_ACTIVITIES, "");
             }
+            
+            String minSdkVersion = (String) parameters.get(PARAM_MIN_SDK_VERSION);
+            if (minSdkVersion != null && minSdkVersion.length() > 0) {
+                String usesSdkTemplate = AdtPlugin.readEmbeddedTextFile(TEMPLATE_USES_SDK);
+                String usesSdk = replaceParameters(usesSdkTemplate, parameters);
+                manifestTemplate = manifestTemplate.replaceAll(PH_USES_SDK, usesSdk);
+            } else {
+                manifestTemplate = manifestTemplate.replaceAll(PH_USES_SDK, "");
+            }
 
             // Save in the project as UTF-8
             InputStream stream = new ByteArrayInputStream(
index f3f7b79..0e780a9 100644 (file)
@@ -130,48 +130,14 @@ public class AndroidConstants {
     public final static String FN_TRACEVIEW = (CURRENT_PLATFORM == PLATFORM_WINDOWS) ?
             "traceview.exe" : "traceview"; //$NON-NLS-1$ //$NON-NLS-2$
 
-    /** Folder Names for Android Projects . */
-
-    /* Resources folder name, i.e. "res". */
-    public final static String FD_RESOURCES = "res"; //$NON-NLS-1$
-    /** Assets folder name, i.e. "assets" */
-    public final static String FD_ASSETS = "assets"; //$NON-NLS-1$
-    /** Default source folder name, i.e. "src" */
-    public final static String FD_SOURCES = "src"; //$NON-NLS-1$
-    /** Default native library folder name inside the project, i.e. "libs"
-     * While the folder inside the .apk is "lib", we call that one libs because
-     * that's what we use in ant for both .jar and .so and we need to make the 2 development ways
-     * compatible. */
-    public final static String FD_NATIVE_LIBS = "libs"; //$NON-NLS-1$
-    /** Native lib folder inside the APK: "lib" */
-    public final static String FD_APK_NATIVE_LIBS = "lib"; //$NON-NLS-1$
-    /** Default bin folder name, i.e. "bin" */
-    public final static String FD_BINARIES = "bin"; //$NON-NLS-1$
-    /** Default anim resource folder name, i.e. "anim" */
-    public final static String FD_ANIM = "anim"; //$NON-NLS-1$
-    /** Default color resource folder name, i.e. "color" */
-    public final static String FD_COLOR = "color"; //$NON-NLS-1$
-    /** Default drawable resource folder name, i.e. "drawable" */
-    public final static String FD_DRAWABLE = "drawable"; //$NON-NLS-1$
-    /** Default layout resource folder name, i.e. "layout" */
-    public final static String FD_LAYOUT = "layout"; //$NON-NLS-1$
-    /** Default menu resource folder name, i.e. "menu" */
-    public final static String FD_MENU = "menu"; //$NON-NLS-1$
-    /** Default values resource folder name, i.e. "values" */
-    public final static String FD_VALUES = "values"; //$NON-NLS-1$
-    /** Default xml resource folder name, i.e. "xml" */
-    public final static String FD_XML = "xml"; //$NON-NLS-1$
-    /** Default raw resource folder name, i.e. "raw" */
-    public final static String FD_RAW = "raw"; //$NON-NLS-1$
-
     /** Absolute path of the workspace root, i.e. "/" */
     public final static String WS_ROOT = WS_SEP;
 
     /** Absolute path of the resource folder, eg "/res".<br> This is a workspace path. */
-    public final static String WS_RESOURCES = WS_SEP + FD_RESOURCES;
+    public final static String WS_RESOURCES = WS_SEP + SdkConstants.FD_RESOURCES;
 
     /** Absolute path of the resource folder, eg "/assets".<br> This is a workspace path. */
-    public final static String WS_ASSETS = WS_SEP + FD_ASSETS;
+    public final static String WS_ASSETS = WS_SEP + SdkConstants.FD_ASSETS;
 
     /** Leaf of the javaDoc folder. Does not start with a separator. */
     public final static String WS_JAVADOC_FOLDER_LEAF = SdkConstants.FD_DOCS + "/reference"; //$NON-NLS-1$
index 2db9e9b..cd238d2 100644 (file)
@@ -97,7 +97,7 @@ public class AndroidManifestHelper {
      */
     public String getPackageName() {
         try {
-            return getPackageNameInternal(mXPath, getSource());
+            return mXPath.evaluate("/manifest/@package", getSource());  //$NON-NLS-1$
         } catch (XPathExpressionException e1) {
             // If the XPath failed to evaluate, we'll return null.
         } catch (Exception e) {
@@ -111,17 +111,39 @@ public class AndroidManifestHelper {
     }
 
     /**
+     * Returns the minSdkVersion defined in the manifest file.
+     *
+     * @return A String object with the package or null if any error happened.
+     */
+    public String getMinSdkVersion() {
+        try {
+            return mXPath.evaluate("/manifest/uses-sdk/@"                       //$NON-NLS-1$
+                    + AndroidXPathFactory.DEFAULT_NS_PREFIX
+                    + ":minSdkVersion", getSource());                           //$NON-NLS-1$
+        } catch (XPathExpressionException e1) {
+            // If the XPath failed to evaluate, we'll return null.
+        } catch (Exception e) {
+            // if this happens this is due to the resource being out of sync.
+            // so we must refresh it and do it again
+
+            // for any other kind of exception we must return null as well;
+        }
+
+        return null;
+    }
+    /**
      * Returns the i-th activity defined in the manifest file.
      *
-     * @param manifest The manifest's IFile object.
      * @param index The 1-based index of the activity to return.
-     * @param xpath An optional xpath object. If null is provided a new one will
-     *        be created.
      * @return A String object with the activity or null if any error happened.
      */
     public String getActivityName(int index) {
         try {
-            return getActivityNameInternal(index, mXPath, getSource());
+            return mXPath.evaluate("/manifest/application/activity["            //$NON-NLS-1$
+                    + index
+                    + "]/@"                                                     //$NON-NLS-1$
+                    + AndroidXPathFactory.DEFAULT_NS_PREFIX +":name",           //$NON-NLS-1$
+                    getSource());
         } catch (XPathExpressionException e1) {
             // If the XPath failed to evaluate, we'll return null.
         } catch (Exception e) {
@@ -216,26 +238,4 @@ public class AndroidManifestHelper {
         return null;
     }
 
-    /**
-     * Performs the actual XPath evaluation to get the package name.
-     * Extracted so that we can share it with AndroidManifestFromProject.
-     */
-    private static String getPackageNameInternal(XPath xpath, InputSource source)
-        throws XPathExpressionException {
-        return xpath.evaluate("/manifest/@package", source);  //$NON-NLS-1$
-    }
-
-    /**
-     * Performs the actual XPath evaluation to get the activity name.
-     * Extracted so that we can share it with AndroidManifestFromProject.
-     */
-    private static String getActivityNameInternal(int index, XPath xpath, InputSource source)
-        throws XPathExpressionException {
-        return xpath.evaluate("/manifest/application/activity[" //$NON-NLS-1$
-                              + index
-                              + "]/@" //$NON-NLS-1$
-                              + AndroidXPathFactory.DEFAULT_NS_PREFIX +":name", //$NON-NLS-1$
-                              source);
-    }
-
 }
index cb98525..2866ce2 100644 (file)
@@ -319,7 +319,7 @@ public class AndroidManifestParser {
          * @see org.xml.sax.helpers.DefaultHandler#error(org.xml.sax.SAXParseException)
          */
         @Override
-        public void error(SAXParseException e) throws SAXException {
+        public void error(SAXParseException e) {
             if (mMarkErrors) {
                 handleError(e, e.getLineNumber());
             }
@@ -329,7 +329,7 @@ public class AndroidManifestParser {
          * @see org.xml.sax.helpers.DefaultHandler#fatalError(org.xml.sax.SAXParseException)
          */
         @Override
-        public void fatalError(SAXParseException e) throws SAXException {
+        public void fatalError(SAXParseException e) {
             if (mMarkErrors) {
                 handleError(e, e.getLineNumber());
             }
@@ -348,7 +348,6 @@ public class AndroidManifestParser {
         /**
          * Processes the activity node.
          * @param attributes the attributes for the activity node.
-         * @throws CoreException 
          */
         private void processActivityNode(Attributes attributes) {
             // lets get the activity name, and add it to the list
@@ -381,7 +380,6 @@ public class AndroidManifestParser {
          * @param attributes the attributes for the activity node.
          * @param superClassName the fully qualified name of the super class that this
          * node is representing
-         * @throws CoreException 
          */
         private void processNode(Attributes attributes, String superClassName) {
             // lets get the class name, and check it if required.
@@ -567,12 +565,11 @@ public class AndroidManifestParser {
     /**
      * Parses the manifest file, collects data, and checks for errors.
      * @param javaProject The java project. Required.
-     * @param manifestFile
+     * @param manifestFile The manifest file to parse.
      * @param errorListener the {@link XmlErrorListener} object being notified of the presence
      * of errors. Optional.
      * @return an {@link AndroidManifestParser} or null if the parsing failed.
      * @throws CoreException
-     * @see {@link #parse(IJavaProject, IFile, XmlErrorListener, boolean, boolean)}
      */
     public static AndroidManifestParser parseForError(IJavaProject javaProject, IFile manifestFile,
             XmlErrorListener errorListener) throws CoreException {
@@ -581,12 +578,9 @@ public class AndroidManifestParser {
 
     /**
      * Parses the manifest file, and collects data.
-     * @param manifestFile
-     * @param errorListener the {@link XmlErrorListener} object being notified of the presence
-     * of errors. Optional.
+     * @param manifestFile The manifest file to parse.
      * @return an {@link AndroidManifestParser} or null if the parsing failed.
      * @throws CoreException
-     * @see {@link #parse(IJavaProject, IFile, XmlErrorListener, boolean, boolean)}
      */
     public static AndroidManifestParser parseForData(IFile manifestFile) throws CoreException {
         return parse(null /* javaProject */, manifestFile, null /* errorListener */,
index 530c89e..8544b25 100644 (file)
@@ -39,7 +39,7 @@ public class AndroidXPathFactory {
 
         /**
          * Construct the context with the prefix associated with the android namespace.
-         * @param prefix the Prefix
+         * @param androidPrefix the Prefix
          */
         public AndroidNamespaceContext(String androidPrefix) {
             mAndroidPrefix = androidPrefix;
@@ -71,7 +71,7 @@ public class AndroidXPathFactory {
     /**
      * Creates a new XPath object, specifying which prefix in the query is used for the
      * android namespace.
-     * @param prefix The namespace prefix.
+     * @param androidPrefix The namespace prefix.
      */
     public static XPath newXPath(String androidPrefix) {
         XPath xpath = sFactory.newXPath();
index c69e875..bd8b444 100644 (file)
@@ -82,11 +82,13 @@ public final class BaseProjectHelper {
     }
 
     /**
-     * Adds a marker to a file on a specific line
+     * Adds a marker to a file on a specific line. This methods catches thrown
+     * {@link CoreException}, and returns null instead.
      * @param file the file to be marked
      * @param markerId The id of the marker to add.
      * @param message the message associated with the mark
-     * @param lineNumber the line number where to put the mark
+     * @param lineNumber the line number where to put the mark. If line is < 1, it puts the marker
+     * on line 1.
      * @param severity the severity of the marker.
      * @return the IMarker that was added or null if it failed to add one.
      */
@@ -96,7 +98,7 @@ public final class BaseProjectHelper {
             IMarker marker = file.createMarker(markerId);
             marker.setAttribute(IMarker.MESSAGE, message);
             marker.setAttribute(IMarker.SEVERITY, severity);
-            if (lineNumber == -1) {
+            if (lineNumber 1) {
                 lineNumber = 1;
             }
             marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
@@ -108,7 +110,7 @@ public final class BaseProjectHelper {
 
             return marker;
         } catch (CoreException e) {
-            AdtPlugin.log(e, "Failed to add marker '%1$s' to '%2$s'",
+            AdtPlugin.log(e, "Failed to add marker '%1$s' to '%2$s'", //$NON-NLS-1$
                     markerId, file.getFullPath());
         }
         
@@ -116,7 +118,8 @@ public final class BaseProjectHelper {
     }
 
     /**
-     * Adds a marker to a resource.
+     * Adds a marker to a resource. This methods catches thrown {@link CoreException},
+     * and returns null instead.
      * @param resource the file to be marked
      * @param markerId The id of the marker to add.
      * @param message the message associated with the mark
@@ -129,7 +132,7 @@ public final class BaseProjectHelper {
             IMarker marker = resource.createMarker(markerId);
             marker.setAttribute(IMarker.MESSAGE, message);
             marker.setAttribute(IMarker.SEVERITY, severity);
-            
+
             // on Windows, when adding a marker to a project, it takes a refresh for the marker
             // to show. In order to fix this we're forcing a refresh of elements receiving
             // markers (and only the element, not its children), to force the marker display.
@@ -137,13 +140,43 @@ public final class BaseProjectHelper {
 
             return marker;
         } catch (CoreException e) {
-            AdtPlugin.log(e, "Failed to add marker '%1$s' to '%2$s'",
+            AdtPlugin.log(e, "Failed to add marker '%1$s' to '%2$s'", //$NON-NLS-1$
                     markerId, resource.getFullPath());
         }
         
         return null;
     }
-    
+
+    /**
+     * Adds a marker to a resource. This method does not catch {@link CoreException} and instead
+     * throw them.
+     * @param resource the file to be marked
+     * @param markerId The id of the marker to add.
+     * @param message the message associated with the mark
+     * @param lineNumber the line number where to put the mark if != -1.
+     * @param severity the severity of the marker.
+     * @param priority the priority of the marker
+     * @return the IMarker that was added.
+     * @throws CoreException 
+     */
+    public final static IMarker addMarker(IResource resource, String markerId,
+            String message, int lineNumber, int severity, int priority) throws CoreException {
+        IMarker marker = resource.createMarker(markerId);
+        marker.setAttribute(IMarker.MESSAGE, message);
+        marker.setAttribute(IMarker.SEVERITY, severity);
+        if (lineNumber != -1) {
+            marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
+        }
+        marker.setAttribute(IMarker.PRIORITY, priority);
+
+        // on Windows, when adding a marker to a project, it takes a refresh for the marker
+        // to show. In order to fix this we're forcing a refresh of elements receiving
+        // markers (and only the element, not its children), to force the marker display.
+        resource.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
+
+        return marker;
+    }
+
     /**
      * Tests that a class name is valid for usage in the manifest.
      * <p/>
index 26fbf42..fda55c4 100644 (file)
@@ -62,6 +62,7 @@ public class XmlErrorHandler extends DefaultHandler {
     /**
      * Xml Error call back
      * @param exception the parsing exception
+     * @throws SAXException 
      */
     @Override
     public void error(SAXParseException exception) throws SAXException {
@@ -71,6 +72,7 @@ public class XmlErrorHandler extends DefaultHandler {
     /**
      * Xml Fatal Error call back
      * @param exception the parsing exception
+     * @throws SAXException 
      */
     @Override
     public void fatalError(SAXParseException exception) throws SAXException {
@@ -80,6 +82,7 @@ public class XmlErrorHandler extends DefaultHandler {
     /**
      * Xml Warning call back
      * @param exception the parsing exception
+     * @throws SAXException 
      */
     @Override
     public void warning(SAXParseException exception) throws SAXException {
index 3176c8e..3875e81 100644 (file)
@@ -20,6 +20,7 @@ import com.android.ide.eclipse.adt.AdtPlugin;
 import com.android.ide.eclipse.common.resources.DeclareStyleableInfo.AttributeInfo;
 import com.android.ide.eclipse.common.resources.DeclareStyleableInfo.AttributeInfo.Format;
 import com.android.ide.eclipse.common.resources.ViewClassInfo.LayoutParamsInfo;
+import com.android.ide.eclipse.editors.descriptors.DescriptorsUtils;
 
 import org.eclipse.core.runtime.IStatus;
 import org.w3c.dom.Document;
@@ -228,7 +229,7 @@ public final class AttrsXmlParser {
                             }
                             mStyleMap.put(name, style);
                             if (lastComment != null) {
-                                style.setJavaDoc(formatJavadoc(lastComment.getNodeValue()));
+                                style.setJavaDoc(parseJavadoc(lastComment.getNodeValue()));
                             }
                         }
                     }
@@ -263,14 +264,15 @@ public final class AttrsXmlParser {
                 }
                 if (info != null) {
                     if (lastComment != null) {
-                        info.setJavaDoc(formatJavadoc(lastComment.getNodeValue()));
+                        info.setJavaDoc(parseJavadoc(lastComment.getNodeValue()));
+                        info.setDeprecatedDoc(parseDeprecatedDoc(lastComment.getNodeValue()));
                     }
                 }
             }
         }
         return info;
     }
-    
+
     /**
      * Finds all the attributes for a particular style node,
      * e.g. a declare-styleable of name "TextView" or "LinearLayout_Layout".
@@ -431,16 +433,23 @@ public final class AttrsXmlParser {
     }
     
     /**
-     * Formats the javadoc.
+     * Parses the javadoc comment.
      * Only keeps the first sentence.
-     * Removes and simplifies links and references.
+     * <p/>
+     * This does not remove nor simplify links and references. Such a transformation
+     * is done later at "display" time in {@link DescriptorsUtils#formatTooltip(String)} and co.
      */
-    private String formatJavadoc(String comment) {
+    private String parseJavadoc(String comment) {
         if (comment == null) {
             return null;
         }
+        
         // sanitize & collapse whitespace
         comment = comment.replaceAll("\\s+", " "); //$NON-NLS-1$ //$NON-NLS-2$
+
+        // Explicitly remove any @deprecated tags since they are handled separately.
+        comment = comment.replaceAll("(?:\\{@deprecated[^}]*\\}|@deprecated[^@}]*)", "");
+
         // take everything up to the first dot that is followed by a space or the end of the line.
         // I love regexps :-). For the curious, the regexp is:
         // - start of line
@@ -456,6 +465,41 @@ public final class AttrsXmlParser {
         //      - followed by a space (?= non-capturing zero-width positive look-ahead)
         // - anything else is ignored
         comment = comment.replaceFirst("^\\s*(.*?(?:$|(?<![a-zA-Z]\\.[a-zA-Z])\\.(?=\\s))).*", "$1"); //$NON-NLS-1$ //$NON-NLS-2$
+        
         return comment;
     }
+
+
+    /**
+     * Parses the javadoc and extract the first @deprecated tag, if any.
+     * Returns null if there's no @deprecated tag.
+     * The deprecated tag can be of two forms:
+     * - {+@deprecated ...text till the next bracket }
+     *   Note: there should be no space or + between { and @. I need one in this comment otherwise
+     *   this method will be tagged as deprecated ;-)
+     * - @deprecated ...text till the next @tag or end of the comment.
+     * In both cases the comment can be multi-line.
+     */
+    private String parseDeprecatedDoc(String comment) {
+        // Skip if we can't even find the tag in the comment.
+        if (comment == null) {
+            return null;
+        }
+        
+        // sanitize & collapse whitespace
+        comment = comment.replaceAll("\\s+", " "); //$NON-NLS-1$ //$NON-NLS-2$
+
+        int pos = comment.indexOf("{@deprecated");
+        if (pos >= 0) {
+            comment = comment.substring(pos + 12 /* len of {@deprecated */);
+            comment = comment.replaceFirst("^([^}]*).*", "$1");
+        } else if ((pos = comment.indexOf("@deprecated")) >= 0) {
+            comment = comment.substring(pos + 11 /* len of @deprecated */);
+            comment = comment.replaceFirst("^(.*?)(?:@.*|$)", "$1");
+        } else {
+            return null;
+        }
+        
+        return comment.trim();
+    }
 }
index 6cff62c..efa5981 100644 (file)
@@ -55,8 +55,10 @@ public class DeclareStyleableInfo {
         private String[] mEnumValues;
         /** Values for flag. null for other types. */
         private String[] mFlagValues;
-        /** Short javadoc */
+        /** Short javadoc (i.e. the first sentence). */
         private String mJavaDoc;
+        /** Documentation for deprecated attributes. Null if not deprecated. */
+        private String mDeprecatedDoc;
 
         /**
          * @param name The XML Name of the attribute
@@ -74,6 +76,7 @@ public class DeclareStyleableInfo {
             mEnumValues = info.mEnumValues;
             mFlagValues = info.mFlagValues;
             mJavaDoc = info.mJavaDoc;
+            mDeprecatedDoc = info.mDeprecatedDoc;
         }
         
         /** Returns the XML Name of the attribute */
@@ -93,10 +96,14 @@ public class DeclareStyleableInfo {
         public String[] getFlagValues() {
             return mFlagValues;
         }
-        /** Returns a short javadoc */
+        /** Returns a short javadoc, .i.e. the first sentence. */
         public String getJavaDoc() {
             return mJavaDoc;
         }
+        /** Returns the documentation for deprecated attributes. Null if not deprecated. */
+        public String getDeprecatedDoc() {
+            return mDeprecatedDoc;
+        }
 
         /** Sets the values for enums. null for other types. */
         public void setEnumValues(String[] values) {
@@ -106,10 +113,14 @@ public class DeclareStyleableInfo {
         public void setFlagValues(String[] values) {
             mFlagValues = values;
         }
-        /** Sets a short javadoc */
+        /** Sets a short javadoc, .i.e. the first sentence. */
         public void setJavaDoc(String javaDoc) {
             mJavaDoc = javaDoc;
         }
+        /** Sets the documentation for deprecated attributes. Null if not deprecated. */
+        public void setDeprecatedDoc(String deprecatedDoc) {
+            mDeprecatedDoc = deprecatedDoc;
+        }
 
     }
     
index d1b4547..50d3d28 100644 (file)
@@ -91,7 +91,12 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
 
     /**
      * Constructor for AndroidContentAssist 
-     * @param rootElementDescriptors The valid root elements of the XML hierarchy
+     * @param descriptorId An id for {@link AndroidTargetData#getDescriptorProvider(int)}.
+     *      The Id can be one of {@link AndroidTargetData#DESCRIPTOR_MANIFEST},
+     *      {@link AndroidTargetData#DESCRIPTOR_LAYOUT},
+     *      {@link AndroidTargetData#DESCRIPTOR_MENU},
+     *      or {@link AndroidTargetData#DESCRIPTOR_XML}.
+     *      All other values will throw an {@link IllegalArgumentException} later at runtime.
      */
     public AndroidContentAssist(int descriptorId) {
         mDescriptorId = descriptorId;
@@ -723,7 +728,6 @@ public abstract class AndroidContentAssist implements IContentAssistProcessor {
     
     /**
      * Computes (if needed) and returns the root descriptor.
-     * @return
      */
     private ElementDescriptor getRootDescriptor() {
         if (mRootDescriptor == null) {
index 78e0401..dca7db0 100644 (file)
@@ -722,7 +722,7 @@ public abstract class AndroidEditor extends FormEditor implements IResourceChang
     }
     
     /**
-     * Returns the {@link PlatformData} for the edited file.
+     * Returns the {@link AndroidTargetData} for the edited file.
      */
     public AndroidTargetData getTargetData() {
         IProject project = getProject();
index 2c779b2..70d03a1 100644 (file)
@@ -38,6 +38,7 @@ public abstract class AttributeDescriptor {
     private String mXmlLocalName;
     private ElementDescriptor mParent;
     private final String mNsUri;
+    private boolean mDeprecated;
     
     /**
      * Creates a new {@link AttributeDescriptor}
@@ -70,6 +71,14 @@ public abstract class AttributeDescriptor {
         return mParent;
     }
 
+    public void setDeprecated(boolean isDeprecated) {
+        mDeprecated = isDeprecated;
+    }
+    
+    public boolean isDeprecated() {
+        return mDeprecated;
+    }
+
     /** 
      * Returns an optional icon for the attribute.
      * <p/>
index 05ae922..2729565 100644 (file)
@@ -16,6 +16,7 @@
 
 package com.android.ide.eclipse.editors.descriptors;
 
+import com.android.ide.eclipse.editors.IconFactory;
 import com.android.ide.eclipse.editors.uimodel.UiAbstractTextAttributeNode;
 
 import org.eclipse.jface.viewers.ILabelProvider;
@@ -35,6 +36,17 @@ public class AttributeDescriptorLabelProvider implements ILabelProvider {
     }
 
     public Image getImage(Object element) {
+        if (element instanceof UiAbstractTextAttributeNode) {
+            UiAbstractTextAttributeNode node = (UiAbstractTextAttributeNode) element;
+            if (node.getDescriptor().isDeprecated()) {
+                String v = node.getCurrentValue();
+                if (v != null && v.length() > 0) {
+                    IconFactory factory = IconFactory.getInstance();
+                    return factory.getIcon("warning"); //$NON-NLS-1$
+                }                
+            }
+        }
+
         return null;
     }
 
index c84bf57..09f1478 100644 (file)
@@ -92,8 +92,9 @@ public final class DescriptorsUtils {
      * @param nsUri The URI of the attribute. Can be null if attribute has no namespace.
      *              See {@link AndroidConstants#NS_RESOURCES} for a common value.
      * @param infos The array of {@link AttributeInfo} to read and append to attributes
-     * @param requiredAttributes An optional list of attributes to mark as "required" (i.e. append
-     *        a "*" to their UI name as a hint for the user.)
+     * @param requiredAttributes An optional set of attributes to mark as "required" (i.e. append
+     *        a "*" to their UI name as a hint for the user.) If not null, must contains
+     *        entries in the form "elem-name/attr-name". Elem-name can be "*".
      * @param overrides A map [attribute name => TextAttributeDescriptor creator]. A creator
      *        can either by a Class<? extends TextAttributeDescriptor> or an instance of
      *        {@link ITextAttributeCreator} that instantiates the right TextAttributeDescriptor.
@@ -101,16 +102,15 @@ public final class DescriptorsUtils {
     public static void appendAttributes(ArrayList<AttributeDescriptor> attributes,
             String elementXmlName,
             String nsUri, AttributeInfo[] infos,
-            String[] requiredAttributes,
+            Set<String> requiredAttributes,
             Map<String, Object> overrides) {
         for (AttributeInfo info : infos) {
             boolean required = false;
             if (requiredAttributes != null) {
-                for(String attr_name : requiredAttributes) {
-                    if (attr_name.equals(info.getName())) {
-                        required = true;
-                        break;
-                    }
+                String attr_name = info.getName();
+                if (requiredAttributes.contains("*/" + attr_name) ||
+                        requiredAttributes.contains(elementXmlName + "/" + attr_name)) {
+                    required = true;
                 }
             }
             appendAttribute(attributes, elementXmlName, nsUri, info, required, overrides);
@@ -144,7 +144,26 @@ public final class DescriptorsUtils {
         if (required) {
             uiName += "*"; //$NON-NLS-1$
         }
-        String tooltip = formatTooltip(info.getJavaDoc()); // tooltip
+        
+        String tooltip = null;
+        String rawTooltip = info.getJavaDoc();
+        if (rawTooltip == null) {
+            rawTooltip = "";
+        }
+        
+        String deprecated = info.getDeprecatedDoc();
+        if (deprecated != null) {
+            if (rawTooltip.length() > 0) {
+                rawTooltip += "@@"; //$NON-NLS-1$ insert a break
+            }
+            rawTooltip += "* Deprecated";
+            if (deprecated.length() != 0) {
+                rawTooltip += ": " + deprecated;                            //$NON-NLS-1$
+            }
+            if (deprecated.length() == 0 || !deprecated.endsWith(".")) {    //$NON-NLS-1$
+                rawTooltip += ".";                                          //$NON-NLS-1$
+            }
+        }
 
         // Add the known types to the tooltip
         Format[] formats_list = info.getFormats();
@@ -154,11 +173,14 @@ public final class DescriptorsUtils {
             HashSet<Format> formats_set = new HashSet<Format>();
             
             StringBuilder sb = new StringBuilder();
-            if (tooltip != null) {
-                sb.append(tooltip);
-                sb.append(" "); //$NON-NLS-1$
+            if (rawTooltip != null && rawTooltip.length() > 0) {
+                sb.append(rawTooltip);
+                sb.append(" ");     //$NON-NLS-1$
             }
-            sb.append("["); //$NON-NLS-1$
+            if (sb.length() > 0) {
+                sb.append("@@");    //$NON-NLS-1$  @@ inserts a break before the types
+            }
+            sb.append("[");         //$NON-NLS-1$
             for (int i = 0; i < flen; i++) {
                 Format f = formats_list[i];
                 formats_set.add(f);
@@ -172,19 +194,21 @@ public final class DescriptorsUtils {
             sb.append("]"); //$NON-NLS-1$
 
             if (required) {
-                sb.append(". Required.");
+                sb.append(".@@* ");          //$NON-NLS-1$ @@ inserts a break.
+                sb.append("Required.");
             }
 
             // The extra space at the end makes the tooltip more readable on Windows.
             sb.append(" "); //$NON-NLS-1$
 
-            tooltip = sb.toString();
+            rawTooltip = sb.toString();
+            tooltip = formatTooltip(rawTooltip);
 
             // Create a specialized attribute if we can
             if (overrides != null) {
                 for (Entry<String, Object> entry: overrides.entrySet()) {
                     String key = entry.getKey();
-                    String elements[] = key.split("/");
+                    String elements[] = key.split("/");          //$NON-NLS-1$
                     String overrideAttrLocalName = null;
                     if (elements.length < 1) {
                         continue;
@@ -193,7 +217,7 @@ public final class DescriptorsUtils {
                         elements = null;
                     } else {
                         overrideAttrLocalName = elements[elements.length - 1];
-                        elements = elements[0].split(",");
+                        elements = elements[0].split(",");       //$NON-NLS-1$
                     }
                     
                     if (overrideAttrLocalName == null ||
@@ -204,7 +228,8 @@ public final class DescriptorsUtils {
                     boolean ok_element = elements.length < 1;
                     if (!ok_element) {
                         for (String element : elements) {
-                            if (element.equals("*") || element.equals(elementXmlName)) {
+                            if (element.equals("*")              //$NON-NLS-1$
+                                    || element.equals(elementXmlName)) {
                                 ok_element = true;
                                 break;
                             }
@@ -271,8 +296,12 @@ public final class DescriptorsUtils {
 
         // By default a simple text field is used
         if (attr == null) {
+            if (tooltip == null) {
+                tooltip = formatTooltip(rawTooltip);
+            }
             attr = new TextAttributeDescriptor(xmlLocalName, uiName, nsUri, tooltip);
         }
+        attr.setDeprecated(info.getDeprecatedDoc() != null);
         attributes.add(attr);
     }
 
@@ -582,6 +611,8 @@ public final class DescriptorsUtils {
         Pattern p_code = Pattern.compile("<code>(.+?)</code>(.*)");                 //$NON-NLS-1$
         // Detects @blah@, used in hard-coded tooltip descriptors
         Pattern p_elem = Pattern.compile("@([\\w -]+)@(.*)");                       //$NON-NLS-1$
+        // Detects a buffer that starts by @@ (request for a break)
+        Pattern p_break = Pattern.compile("@@(.*)");                                //$NON-NLS-1$
         // Detects a buffer that starts by @ < or { (one that was not matched above)
         Pattern p_open = Pattern.compile("([@<\\{])(.*)");                          //$NON-NLS-1$
         // Detects everything till the next potential separator, i.e. @ < or {
@@ -616,6 +647,10 @@ public final class DescriptorsUtils {
                 if (text != null) {
                     currentLength += text.length() - 2;
                 }
+            } else if ((m = p_break.matcher(javadoc)).matches()) {
+                spans.add(BREAK);
+                currentLength = 0;
+                javadoc = m.group(1);
             } else if ((m = p_open.matcher(javadoc)).matches()) {
                 s = m.group(1);
                 javadoc = m.group(2);
index 632471d..a9d2b2e 100644 (file)
@@ -95,6 +95,10 @@ public class TextAttributeDescriptor extends AttributeDescriptor implements IPro
     }
 
     public String getCategory() {
+        if (isDeprecated()) {
+            return "Deprecated";
+        }
+
         ElementDescriptor parent = getParent();
         if (parent != null) {
             return parent.getUiName();
index c512625..381539b 100644 (file)
@@ -20,7 +20,6 @@ import com.android.layoutlib.api.IXmlPullParser;
 
 import org.xmlpull.v1.XmlPullParserException;
 
-import java.io.IOException;
 import java.io.InputStream;
 import java.io.Reader;
 
@@ -178,7 +177,7 @@ public abstract class BasePullParser implements IXmlPullParser {
         return mParsingState;
     }
 
-    public int nextTag() throws XmlPullParserException, IOException {
+    public int nextTag() throws XmlPullParserException {
         int eventType = next();
         if (eventType != START_TAG && eventType != END_TAG) {
             throw new XmlPullParserException("expected start or end tag", this, null);
@@ -186,7 +185,7 @@ public abstract class BasePullParser implements IXmlPullParser {
         return eventType;
     }
 
-    public String nextText() throws XmlPullParserException, IOException {
+    public String nextText() throws XmlPullParserException {
         if (getEventType() != START_TAG) {
             throw new XmlPullParserException("parser must be on START_TAG to read next text", this,
                     null);
@@ -208,7 +207,7 @@ public abstract class BasePullParser implements IXmlPullParser {
         }
     }
 
-    public int nextToken() throws XmlPullParserException, IOException {
+    public int nextToken() throws XmlPullParserException {
         return next();
     }
 
index 87a14ad..a0b30ec 100644 (file)
@@ -33,8 +33,10 @@ import org.eclipse.core.runtime.IStatus;
 
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.Set;
 import java.util.TreeSet;
 import java.util.Map.Entry;
 
@@ -166,7 +168,13 @@ public final class AndroidManifestDescriptors implements IDescriptorProvider {
                 "android", //$NON-NLS-1$
                 AndroidConstants.NS_RESOURCES); 
 
+        // -- setup the required attributes overrides --
+        
+        Set<String> required = new HashSet<String>();
+        required.add("provider/authorities");  //$NON-NLS-1$
+        
         // -- setup the various attribute format overrides --
+        
         // The key for each override is "element1,element2,.../attr-xml-local-name" or
         // "*/attr-xml-local-name" to match the attribute in any element.
         
@@ -181,7 +189,7 @@ public final class AndroidManifestDescriptors implements IDescriptorProvider {
                         tooltip);
             }
         });
-
+        
         overrides.put("*/theme",         ThemeAttributeDescriptor.class);   //$NON-NLS-1$
         overrides.put("*/permission",    ListAttributeDescriptor.class);    //$NON-NLS-1$
         overrides.put("*/targetPackage", PackageAttributeDescriptor.class); //$NON-NLS-1$
@@ -212,8 +220,12 @@ public final class AndroidManifestDescriptors implements IDescriptorProvider {
 
         // --
 
-        inflateElement(manifestMap, overrides, elementDescs,
-                MANIFEST_ELEMENT, "AndroidManifest"); //$NON-NLS-1$
+        inflateElement(manifestMap,
+                overrides,
+                required,
+                elementDescs,
+                MANIFEST_ELEMENT,
+                "AndroidManifest"); //$NON-NLS-1$
         insertAttribute(MANIFEST_ELEMENT, PACKAGE_ATTR_DESC);
         
         sanityCheck(manifestMap, MANIFEST_ELEMENT);
@@ -312,16 +324,17 @@ public final class AndroidManifestDescriptors implements IDescriptorProvider {
      * "Inflates" the properties of an {@link ElementDescriptor} from the styleable declaration.
      * <p/>
      * This first creates all the attributes for the given ElementDescriptor.
-     * It then find all children of the descriptor, inflate them recursively and set them
+     * It then finds all children of the descriptor, inflate them recursively and set them
      * as child to this ElementDescriptor.
      * 
-     * @param styleMap The input styleable map for manifest elements & attributes
+     * @param styleMap The input styleable map for manifest elements & attributes.
      * @param overrides A list of attribute overrides (to customize the type of the attribute
-     *          descriptors)
+     *          descriptors).
+     * @param requiredAttributes Set of attributes to be marked as required.
      * @param existingElementDescs A map of already created element descriptors, keyed by
      *          XML local name. This is used to use the static elements created initially by this
      *          class, which are referenced directly by editors (so that reloading an SDK won't
-     *          break these references)
+     *          break these references).
      * @param elemDesc The current {@link ElementDescriptor} to inflate.
      * @param styleName The name of the {@link ElementDescriptor} to inflate. Its XML local name
      *          will be guessed automatically from the style name. 
@@ -329,6 +342,7 @@ public final class AndroidManifestDescriptors implements IDescriptorProvider {
     private void inflateElement(
             Map<String, DeclareStyleableInfo> styleMap,
             Map<String, Object> overrides,
+            Set<String> requiredAttributes,
             HashMap<String, ElementDescriptor> existingElementDescs,
             ElementDescriptor elemDesc,
             String styleName) {
@@ -342,7 +356,9 @@ public final class AndroidManifestDescriptors implements IDescriptorProvider {
             DescriptorsUtils.appendAttributes(attrDescs,
                     elemDesc.getXmlLocalName(),
                     AndroidConstants.NS_RESOURCES,
-                    style.getAttributes(), null, overrides);
+                    style.getAttributes(),
+                    requiredAttributes,
+                    overrides);
             elemDesc.setTooltip(style.getJavaDoc());
             elemDesc.setAttributes(attrDescs.toArray(new AttributeDescriptor[attrDescs.size()]));
         }
@@ -373,7 +389,12 @@ public final class AndroidManifestDescriptors implements IDescriptorProvider {
                 }
                 children.add(child);
                 
-                inflateElement(styleMap, overrides, existingElementDescs, child, childStyleName);
+                inflateElement(styleMap,
+                        overrides,
+                        requiredAttributes,
+                        existingElementDescs,
+                        child,
+                        childStyleName);
             }
         }
         elemDesc.setChildren(children.toArray(new ElementDescriptor[children.size()]));
index 1d01260..9a61d17 100644 (file)
@@ -66,7 +66,7 @@ public final class CountryCodeQualifier extends ResourceQualifier {
     /**
      * Returns the folder name segment for the given value. This is equivalent to calling
      * {@link #toString()} on a {@link CountryCodeQualifier} object.
-     * @param value the value of the qualifier, as returned by {@link #getCode()}.
+     * @param code the value of the qualifier, as returned by {@link #getCode()}.
      */
     public static String getFolderSegment(int code) {
         if (code != DEFAULT_CODE && code >= 100 && code <=999) { // code is 3 digit.) {
index ce527a4..7e30901 100644 (file)
@@ -66,7 +66,7 @@ public final class NetworkCodeQualifier extends ResourceQualifier {
     /**
      * Returns the folder name segment for the given value. This is equivalent to calling
      * {@link #toString()} on a {@link NetworkCodeQualifier} object.
-     * @param value the value of the qualifier, as returned by {@link #getCode()}.
+     * @param code the value of the qualifier, as returned by {@link #getCode()}.
      */
     public static String getFolderSegment(int code) {
         if (code != DEFAULT_CODE && code >= 1 && code <= 999) { // code is 1-3 digit.
index 0fd05bf..c47bb83 100644 (file)
@@ -39,7 +39,7 @@ public final class PixelDensityQualifier extends ResourceQualifier {
     /**
      * Creates and returns a qualifier from the given folder segment. If the segment is incorrect,
      * <code>null</code> is returned.
-     * @param segment the folder segment from which to create a qualifier.
+     * @param folderSegment the folder segment from which to create a qualifier.
      * @return a new {@link CountryCodeQualifier} object or <code>null</code>
      */
     public static PixelDensityQualifier getQualifier(String folderSegment) {
@@ -66,7 +66,7 @@ public final class PixelDensityQualifier extends ResourceQualifier {
     /**
      * Returns the folder name segment for the given value. This is equivalent to calling
      * {@link #toString()} on a {@link NetworkCodeQualifier} object.
-     * @param value the value of the qualifier, as returned by {@link #getCode()}.
+     * @param value the value of the qualifier, as returned by {@link #getValue()}.
      */
     public static String getFolderSegment(int value) {
         if (value != DEFAULT_DENSITY) {
index 72438a6..3812791 100644 (file)
@@ -132,7 +132,7 @@ public final class MultiResourceFile extends ResourceFile implements IValueResou
     /**
      * Adds a resource item to the list
      * @param resType The type of the resource
-     * @param name The name of the resource.
+     * @param value The value of the resource.
      */
     public void addResourceValue(String resType, ResourceValue value) {
         ResourceType type = ResourceType.getEnum(resType);
index 183af27..8b6c3c1 100644 (file)
@@ -107,7 +107,6 @@ public final class ProjectClassLoader extends ClassLoader {
      * @param parent the root of the file.
      * @param segments the segments containing the path of the file
      * @param index the offset at which to start looking into segments.
-     * @return
      * @throws FileNotFoundException
      */
     private File getFile(File parent, String[] segments, int index)
@@ -168,8 +167,6 @@ public final class ProjectClassLoader extends ClassLoader {
     
     /**
      * Loads a class from the 3rd party jar present in the project
-     * @param name
-     * @return
      * @throws ClassNotFoundException
      */
     private Class<?> loadClassFromJar(String name) throws ClassNotFoundException {
index b0881fa..40e4e3b 100644 (file)
@@ -393,8 +393,6 @@ public class ProjectResources implements IResourceRepository {
 
     /**
      * Resolves a compiled resource id of type int[] into the resource name.
-     * @param id
-     * @return
      */
     public String resolveResourceValue(int[] id) {
         if (mStyleableValueToNameMap != null) {
@@ -407,9 +405,6 @@ public class ProjectResources implements IResourceRepository {
 
     /**
      * Returns the value of a resource by its type and name.
-     * @param type
-     * @param name
-     * @return
      */
     public Integer getResourceValue(String type, String name) {
         if (mResourceValueMap != null) {
@@ -444,8 +439,7 @@ public class ProjectResources implements IResourceRepository {
     
     /**
      * Returns the list of regions used in the resources with the given language.
-     * @param currentLanguage the current language the region must be associated with
-     * @return
+     * @param currentLanguage the current language the region must be associated with.
      */
     public Set<String> getRegions(String currentLanguage) {
         Set<String> set = new HashSet<String>();
index 6db0d94..98f5b39 100644 (file)
@@ -185,7 +185,7 @@ public final class ResourceFolder extends Resource {
     
     /**
      * Returns the {@link ResourceFile} matching a given name.
-     * @param file The name of the file to return.
+     * @param filename The name of the file to return.
      * @return the {@link ResourceFile} or <code>null</code> if no match was found.
      */
     public ResourceFile getFile(String filename) {
index bd93301..5fc7393 100644 (file)
 
 package com.android.ide.eclipse.editors.resources.manager;
 
-import com.android.ide.eclipse.common.AndroidConstants;
 import com.android.ide.eclipse.editors.resources.configurations.FolderConfiguration;
+import com.android.sdklib.SdkConstants;
 
 /**
  * Enum representing a type of resource folder.
  */
 public enum ResourceFolderType {
-    ANIM(AndroidConstants.FD_ANIM),
-    COLOR(AndroidConstants.FD_COLOR),
-    DRAWABLE(AndroidConstants.FD_DRAWABLE),
-    LAYOUT(AndroidConstants.FD_LAYOUT),
-    MENU(AndroidConstants.FD_MENU),
-    RAW(AndroidConstants.FD_RAW),
-    VALUES(AndroidConstants.FD_VALUES),
-    XML(AndroidConstants.FD_XML);
+    ANIM(SdkConstants.FD_ANIM),
+    COLOR(SdkConstants.FD_COLOR),
+    DRAWABLE(SdkConstants.FD_DRAWABLE),
+    LAYOUT(SdkConstants.FD_LAYOUT),
+    MENU(SdkConstants.FD_MENU),
+    RAW(SdkConstants.FD_RAW),
+    VALUES(SdkConstants.FD_VALUES),
+    XML(SdkConstants.FD_XML);
 
     private final String mName;
 
index 9c5f0fc..6099008 100644 (file)
@@ -30,6 +30,7 @@ import com.android.ide.eclipse.editors.resources.manager.files.IAbstractFolder;
 import com.android.ide.eclipse.editors.resources.manager.files.IFileWrapper;
 import com.android.ide.eclipse.editors.resources.manager.files.IFolderWrapper;
 import com.android.sdklib.IAndroidTarget;
+import com.android.sdklib.SdkConstants;
 
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
@@ -269,8 +270,7 @@ public final class ResourceManager implements IProjectListener, IFolderListener,
     
     /**
      * Loads and returns the resources for a given {@link IAndroidTarget}
-     * @param osFilePath the path to the folder containing all the versions of the framework
-     * resources
+     * @param androidTarget the target from which to load the framework resources
      */
     public ProjectResources loadFrameworkResources(IAndroidTarget androidTarget) {
         String osResourcesPath = androidTarget.getPath(IAndroidTarget.RESOURCES);
@@ -329,7 +329,7 @@ public final class ResourceManager implements IProjectListener, IFolderListener,
                 return;
             }
             
-            IFolder resourceFolder = project.getFolder(AndroidConstants.FD_RESOURCES);
+            IFolder resourceFolder = project.getFolder(SdkConstants.FD_RESOURCES);
             
             ProjectResources projectResources = mMap.get(project);
             if (projectResources == null) {
@@ -478,7 +478,7 @@ public final class ResourceManager implements IProjectListener, IFolderListener,
      * @return true if the path is under /project res/
      */
     private boolean isInResFolder(IPath path) {
-        return AndroidConstants.FD_RESOURCES.equalsIgnoreCase(path.segment(1));
+        return SdkConstants.FD_RESOURCES.equalsIgnoreCase(path.segment(1));
     }
     
     /**
index 1211236..32b1107 100644 (file)
@@ -115,8 +115,6 @@ public class SingleResourceFile extends ResourceFile {
     
     /**
      * Returns the name of the resources.
-     * @param type 
-     * @return
      */
     private String getResourceName(ResourceType type) {
         // get the name from the filename.
index 0a14214..d99cb13 100644 (file)
@@ -17,7 +17,6 @@
 package com.android.ide.eclipse.editors.resources.manager.files;
 
 import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -45,7 +44,7 @@ public class FileWrapper implements IAbstractFile {
         mFile = file;
     }
 
-    public InputStream getContents() throws CoreException {
+    public InputStream getContents() {
         try {
             return new FileInputStream(mFile);
         } catch (FileNotFoundException e) {
@@ -74,7 +73,7 @@ public class FileWrapper implements IAbstractFile {
         }
         
         if (obj instanceof File) {
-            return mFile.equals((File)obj);
+            return mFile.equals(obj);
         }
 
         return super.equals(obj);
index 8afea33..9ad7460 100644 (file)
@@ -59,7 +59,7 @@ public class FolderWrapper implements IAbstractFolder {
         }
         
         if (obj instanceof File) {
-            return mFolder.equals((File)obj);
+            return mFolder.equals(obj);
         }
 
         return super.equals(obj);
index 441c65b..f0f5f2d 100644 (file)
@@ -55,7 +55,7 @@ public class IFileWrapper implements IAbstractFile {
         }
         
         if (obj instanceof IFile) {
-            return mFile.equals((IFile)obj);
+            return mFile.equals(obj);
         }
 
         return super.equals(obj);
index 92b5c07..b1fa3ef 100644 (file)
@@ -61,7 +61,7 @@ public class IFolderWrapper implements IAbstractFolder {
         }
         
         if (obj instanceof IFolder) {
-            return mFolder.equals((IFolder)obj);
+            return mFolder.equals(obj);
         }
 
         return super.equals(obj);
index 772fb52..0729881 100644 (file)
@@ -17,7 +17,6 @@
 package com.android.ide.eclipse.editors.ui.tree;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.common.AndroidConstants;
 import com.android.ide.eclipse.editors.descriptors.ElementDescriptor;
 import com.android.ide.eclipse.editors.layout.descriptors.ViewElementDescriptor;
 import com.android.ide.eclipse.editors.uimodel.UiElementNode;
index b7dffdd..4a05b1e 100644 (file)
@@ -79,8 +79,7 @@ import java.util.HashMap;
  * To use this, instantiate somewhere in the UI and then:
  * <ul>
  * <li>Use {@link #setConfiguration(String)} or {@link #setConfiguration(FolderConfiguration)}.
- * <li>Retrieve the configuration using {@link #getConfiguration(FolderConfiguration)} and
- *     test it using {@link FolderConfiguration#isValid()}.
+ * <li>Retrieve the configuration using {@link #getConfiguration(FolderConfiguration)}.
  * </ul> 
  */
 public class ConfigurationSelector extends Composite {
index b27dd4f..cc643be 100644 (file)
@@ -30,6 +30,7 @@ import com.android.ide.eclipse.editors.resources.descriptors.ResourcesDescriptor
 import com.android.ide.eclipse.editors.resources.manager.ResourceFolderType;
 import com.android.ide.eclipse.editors.wizards.ConfigurationSelector.ConfigurationState;
 import com.android.sdklib.IAndroidTarget;
+import com.android.sdklib.SdkConstants;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
@@ -243,7 +244,7 @@ class NewXmlFileCreationPage extends WizardPage {
     /** Absolute destination folder root, e.g. "/res/" */
     private static String sResFolderAbs = AndroidConstants.WS_RESOURCES + AndroidConstants.WS_SEP;
     /** Relative destination folder root, e.g. "res/" */
-    private static String sResFolderRel = AndroidConstants.FD_RESOURCES + AndroidConstants.WS_SEP;
+    private static String sResFolderRel = SdkConstants.FD_RESOURCES + AndroidConstants.WS_SEP;
     
     private IProject mProject;
     private Text mProjectTextField;
@@ -629,7 +630,7 @@ class NewXmlFileCreationPage extends WizardPage {
                 // Disregard this folder selection if it doesn't point to /res/something
                 if (wsFolderPath != null &&
                         wsFolderPath.segmentCount() > 1 &&
-                        AndroidConstants.FD_RESOURCES.equals(wsFolderPath.segment(0))) {
+                        SdkConstants.FD_RESOURCES.equals(wsFolderPath.segment(0))) {
                     score += 2;
                 } else {
                     wsFolderPath = null;
@@ -1002,7 +1003,7 @@ class NewXmlFileCreationPage extends WizardPage {
             String fileName = getFileName();
             if (fileName == null || fileName.length() == 0) {
                 error = "A destination file name is required.";
-            } else if (fileName != null && !fileName.endsWith(AndroidConstants.DOT_XML)) {
+            } else if (!fileName.endsWith(AndroidConstants.DOT_XML)) {
                 error = String.format("The filename must end with %1$s.", AndroidConstants.DOT_XML);
             }
         }
index d3ff334..6913ce0 100644 (file)
@@ -17,7 +17,6 @@
 package com.android.ide.eclipse.editors.wizards;
 
 import com.android.ide.eclipse.adt.AdtPlugin;
-import com.android.ide.eclipse.common.AndroidConstants;
 import com.android.ide.eclipse.common.resources.IResourceRepository;
 import com.android.ide.eclipse.common.resources.ResourceItem;
 import com.android.ide.eclipse.common.resources.ResourceType;
diff --git a/tools/eclipse/plugins/com.android.ide.eclipse.adt/templates/uses-sdk.template b/tools/eclipse/plugins/com.android.ide.eclipse.adt/templates/uses-sdk.template
new file mode 100644 (file)
index 0000000..8adae71
--- /dev/null
@@ -0,0 +1 @@
+    <uses-sdk android:minSdkVersion="MIN_SDK_VERSION" />
index 4700821..5a89d01 100644 (file)
@@ -60,8 +60,9 @@ public class ProjectHelperTest extends TestCase {
         ProjectHelper.fixProjectClasspathEntries(javaProject);
         
         IClasspathEntry[] fixedEntries = javaProject.getRawClasspath();
-        assertEquals(2, fixedEntries.length);
+        assertEquals(3, fixedEntries.length);
         assertEquals("Project/src", fixedEntries[0].getPath().toString());
-        assertEquals(CONTAINER_ID, fixedEntries[1].getPath().toString());
+        assertEquals(OLD_CONTAINER_ID, fixedEntries[1].getPath().toString());
+        assertEquals(CONTAINER_ID, fixedEntries[2].getPath().toString());
     }
 }
index f3d9b79..872938b 100644 (file)
@@ -45,6 +45,8 @@ public class AndroidJarLoaderTest extends TestCase {
 
     @Override
     public void tearDown() throws Exception {
+        mFrameworkClassLoader = null;
+        System.gc();
     }
 
     /** Preloads classes. They should load just fine. */
@@ -74,8 +76,9 @@ public class AndroidJarLoaderTest extends TestCase {
         Class<?> c = _findClass(mFrameworkClassLoader, "jar.example.Class2");  //$NON-NLS-1$
         assertEquals("jar.example.Class2", c.getName());              //$NON-NLS-1$
         HashMap<String, Class<?>> map = getPrivateClassCache();
+        assertTrue(map.containsKey("jar.example.Class1"));            //$NON-NLS-1$
         assertTrue(map.containsKey("jar.example.Class2"));            //$NON-NLS-1$
-        assertEquals(1, map.size());
+        assertEquals(2, map.size());
     }
     
     /** call the protected method findClass */
index 76ebfc3..8338453 100644 (file)
@@ -94,6 +94,33 @@ public class AttrsXmlParserTest extends TestCase {
         assertEquals(Integer.valueOf(0), valueMap.get("horizontal"));
         assertEquals(Integer.valueOf(1), valueMap.get("vertical"));
     }
+    
+    public final void testDeprecated() throws Exception {
+        mParser.preload();
+        
+        DeclareStyleableInfo dep = mParser.getDeclareStyleableList().get("DeprecatedTest");
+        assertNotNull(dep);
+        
+        AttributeInfo[] attrs = dep.getAttributes();
+        assertEquals(4, attrs.length);
+
+        assertEquals("deprecated-inline", attrs[0].getName());
+        assertEquals("In-line deprecated.", attrs[0].getDeprecatedDoc());
+        assertEquals("Deprecated comments using delimiters.", attrs[0].getJavaDoc());
+        
+        assertEquals("deprecated-multiline", attrs[1].getName());
+        assertEquals("Multi-line version of deprecated that works till the next tag.",
+                attrs[1].getDeprecatedDoc());
+        assertEquals("Deprecated comments on their own line.", attrs[1].getJavaDoc());
+        
+        assertEquals("deprecated-not", attrs[2].getName());
+        assertEquals(null, attrs[2].getDeprecatedDoc());
+        assertEquals("This attribute is not deprecated.", attrs[2].getJavaDoc());
+
+        assertEquals("deprecated-no-javadoc", attrs[3].getName());
+        assertEquals("There is no other javadoc here.", attrs[3].getDeprecatedDoc());
+        assertEquals("", attrs[3].getJavaDoc());
+    }
 
     //---- access to private methods
     
index 5506459..69c3ed8 100644 (file)
@@ -99,28 +99,26 @@ public class DescriptorsUtilsTest extends TestCase {
         ElementDescriptor desc = new ElementDescriptor("application");
         desc.setSdkUrl(DescriptorsUtils.MANIFEST_SDK_URL + "TagApplication");
         String docBaseUrl = "http://base";
-        assertEquals("<form><p></p></form>", DescriptorsUtils.formatFormText("", desc, docBaseUrl));
+        assertEquals("<form><li style=\"image\" value=\"image\"></li></form>", DescriptorsUtils.formatFormText("", desc, docBaseUrl));
 
-        assertEquals("<form><p><a href=\"http://base/reference/android/R.styleable.html#TagApplication\">application</a></p></form>",
+        assertEquals("<form><li style=\"image\" value=\"image\"><a href=\"http://base/reference/android/R.styleable.html#TagApplication\">application</a></li></form>",
                 DescriptorsUtils.formatFormText(
                         "<code>application</code>",
                         desc, docBaseUrl));
 
-        assertEquals("<form><p><b>android.content.Intent</b></p></form>",
+        assertEquals("<form><li style=\"image\" value=\"image\"><b>android.content.Intent</b></li></form>",
                 DescriptorsUtils.formatFormText(
                         "{@link android.content.Intent}",
                         desc, docBaseUrl));
 
-        assertEquals("<form><p><a href=\"http://base/reference/android/R.styleable.html#AndroidManifestPermission\">AndroidManifestPermission</a></p></form>",
+        assertEquals("<form><li style=\"image\" value=\"image\"><a href=\"http://base/reference/android/R.styleable.html#AndroidManifestPermission\">AndroidManifestPermission</a></li></form>",
                 DescriptorsUtils.formatFormText(
                         "{@link #AndroidManifestPermission}",
                         desc, docBaseUrl));
 
-        assertEquals("<form><p><a href=\"http://base/reference/android/R.styleable.html#AndroidManifestPermission\">\"permission\"</a></p></form>",
+        assertEquals("<form><li style=\"image\" value=\"image\"><a href=\"http://base/reference/android/R.styleable.html#AndroidManifestPermission\">\"permission\"</a></li></form>",
                 DescriptorsUtils.formatFormText(
                         "{@link #AndroidManifestPermission &lt;permission&gt;}",
                         desc, docBaseUrl));
-
     }
-
 }
index 9e01081..28f7871 100644 (file)
@@ -54,11 +54,11 @@ public class TextInputMethodQualifierTest extends TestCase {
     }
 
     public void testNoKey() {
-        assertEquals(true, timq.checkAndSet("nokey", config)); //$NON-NLS-1$
+        assertEquals(true, timq.checkAndSet("nokeys", config)); //$NON-NLS-1$
         assertTrue(config.getTextInputMethodQualifier() != null);
         assertEquals(TextInputMethodQualifier.TextInputMethod.NOKEY,
                 config.getTextInputMethodQualifier().getValue());
-        assertEquals("nokey", config.getTextInputMethodQualifier().toString()); //$NON-NLS-1$
+        assertEquals("nokeys", config.getTextInputMethodQualifier().toString()); //$NON-NLS-1$
     }
 
     public void testFailures() {
index 0c1a508..25a86c3 100644 (file)
@@ -41,7 +41,7 @@ public class ConfigMatchTest extends TestCase {
     private static final String MISC2_FILENAME = "bar.xml"; //$NON-NLS-1$
     
     private ProjectResources mResources;
-    private ArrayList<ResourceQualifier> mQualifierList;
+    private ResourceQualifier[] mQualifierList;
     private FolderConfiguration config4;
     private FolderConfiguration config3;
     private FolderConfiguration config2;
@@ -60,7 +60,7 @@ public class ConfigMatchTest extends TestCase {
         qualifierListField.setAccessible(true);
         
         // get the actual list.
-        mQualifierList = (ArrayList<ResourceQualifier>)qualifierListField.get(manager);
+        mQualifierList = (ResourceQualifier[])qualifierListField.get(manager);
         
         // create the project resources.
         mResources = new ProjectResources(false /* isFrameworkRepository */);
@@ -191,10 +191,10 @@ public class ConfigMatchTest extends TestCase {
         FolderConfiguration config = new FolderConfiguration();
         
         // those must be of the same length
-        assertEquals(qualifierValues.length, mQualifierList.size());
+        assertEquals(qualifierValues.length, mQualifierList.length);
         
         int index = 0;
-        
+
         for (ResourceQualifier qualifier : mQualifierList) {
             String value = qualifierValues[index++];
             if (value != null) {
index e51604c..aa9a1f7 100644 (file)
@@ -18,7 +18,7 @@
 -->
 <resources>
     <!-- WARNING !!! THIS IS A MOCK FILE. DO NOT USE FOR DOCUMENTATION PURPOSES.
-         This file has been trimmed down to only extract a number of interest cases 
+         This file has been trimmed down to only extract a number of interesting cases 
          for unit tests.
          
          What this contains:
         <attr name="collapseColumns" format="string" />
     </declare-styleable>
 
+       <!-- Test for deprecated attributes. -->
+       <declare-styleable name="DeprecatedTest">
+               <!-- Deprecated comments using delimiters.
+                        Ignored. {@deprecated In-line deprecated.} {@ignore Ignored}.
+                -->
+               <attr name="deprecated-inline" /> 
+
+               <!-- Deprecated comments on their own line.
+                        @deprecated Multi-line version of deprecated
+                           that works till the next tag.
+                        @ignore This tag must be ignored
+                -->
+               <attr name="deprecated-multiline" />
+               
+               <!-- This attribute is not deprecated. -->
+               <attr name="deprecated-not" />
+               
+        <!-- {@deprecated There is no other javadoc here. } -->
+        <attr name="deprecated-no-javadoc" format="boolean" />
+               
+       </declare-styleable>
+
 </resources>
 
index 1479e04..931dce8 100755 (executable)
@@ -11,32 +11,38 @@ function back() {
   echo $1 | sed 's@[^/]*@..@g'
 }
 
+HOST=`uname`
+if [ "${HOST:0:6}" == "CYGWIN" ]; then
+    # We can't use symlinks under Cygwin
+    function cpdir() { # $1=dest $2=source
+        rsync -avW --delete-after $2 $1
+    }
+
+else
+    # For all other systems which support symlinks
+    function cpdir() { # $1=dest $2=source
+        ln -svf `back $1`/$2 $1
+    }
+fi
+
 BASE="development/tools/eclipse/plugins/com.android.ide.eclipse.tests"
 DEST=$BASE
 BACK=`back $DEST`
 
-
 HOST=`uname`
 if [ "$HOST" == "Linux" ]; then
-    DIR="ln -svf"
     ln -svf $BACK/out/host/linux-x86/framework/kxml2-2.3.0.jar "$DEST/"
 
 elif [ "$HOST" == "Darwin" ]; then
-    DIR="ln -svf"
     ln -svf $BACK/out/host/darwin-x86/framework/kxml2-2.3.0.jar "$DEST/"
 
 elif [ "${HOST:0:6}" == "CYGWIN" ]; then
-    DIR="rsync -avW --delete-after"
-    JAR="kxml2-2.3.0.jar"
-    if [ ! -f "$DEST/$JAR" ]; then
-        # Get the jar from ADT if we can, otherwise download it.
-        if [ -f "$DEST/../com.android.ide.eclipse.adt/$JAR" ]; then
-            cp "$DEST/../com.android.ide.eclipse.adt/$JAR" "$DEST/$JAR"
-        else
-            wget -O "$DEST/$JAR" "http://internap.dl.sourceforge.net/sourceforge/kxml/$JAR"
-        fi
-        chmod a+rx "$DEST/$JAR"
+
+    if [ ! -f "$DEST/kxml2-2.3.0.jar" ]; then
+        cp -v "prebuilt/common/kxml2/kxml2-2.3.0.jar" "$DEST/"
+        chmod -v a+rx "$DEST"/*.jar
     fi
+
 else
     echo "Unsupported platform ($HOST). Nothing done."
 fi
@@ -44,5 +50,5 @@ fi
 # create link to ddmlib tests
 DEST=$BASE/unittests/com/android
 BACK=`back $DEST`
-$DIR $BACK/development/tools/ddms/libs/ddmlib/tests/src/com/android/ddmlib $DEST/
+cpdir $DEST development/tools/ddms/libs/ddmlib/tests/src/com/android/ddmlib
 
index 85e15b2..963e2f1 100755 (executable)
@@ -28,11 +28,21 @@ do
     if [ -d $app/res ]
     then
         appname=$(basename $app)
+
+        # find the R.java file that contains all the generated resource identifiers
         rDotJava=$(find out/target/common/obj/APPS/${appname}_intermediates/ -name R.java)
+
+        # Simplistically process the content of the file to get the names of all the constants,
+        # and try to find a reference to each constant.
         for i in $(cat $rDotJava | grep "\w*=0x\d*" | sed 's/ *public static final int //' | sed 's/=0x.*//')
         do
-            echo $i $(grep -Rw R\\..*\\.$i\\\|@style/$i\\\|@drawable/$i\\\|@anim/$i\\\|@color/$i\\\|@xml/$i\\\|@layout/$i\\\|@menu/$i\\\|@+id/$i\\\|@array/$i\\\|@string/$i $app | wc -l)
+            # Since periods in the names get translated to underscores in R.java, and you can actually
+            # refer to such constants from java by using an underscore instead of a period, we also
+            # replace all underscores with a pattern that will match periods and underscores.
+            p=$(echo $i | sed 's/_/[\\._]/g')
+            echo $i $(grep -Rw R\\..*\\.$i\\\|@style/$p\\\|@drawable/$p\\\|@anim/$p\\\|@color/$p\\\|@xml/$p\\\|@layout/$p\\\|@menu/$p\\\|@+id/$p\\\|@array/$p\\\|@string/$p $app | wc -l)
         done | grep " 0$" | {
+            # this block gets as its input a list of constants which no references were found, one per line
             if [ "$showall" == "yes" ]
             then
                 echo $app
index bed5f24..1331696 100644 (file)
 <?xml version="1.0" ?>
 <project name="android_rules" default="debug">
 
-    <!-- No user servicable parts below. -->
-
-    <property name="outdir-main" value="../${outdir}" />
-
-    <property name="android-tools" value="${sdk-folder}/tools" />
-    <property name="android-platform" value="${sdk-folder}/platforms/${target-folder}" />
-    <property name="android-framework" value="${android-platform}/framework.aidl" />
-    <property name="android-jar" value="${android-platform}/android.jar" />
+    <property name="android-tools" value="${sdk-location}/tools" />
 
     <!-- Input directories -->
-    <property name="resource-dir" value="res" />
-    <property name="asset-dir" value="assets" />
-    <property name="srcdir" value="src" />
-    <condition property="srcdir-ospath"
-            value="${basedir}\${srcdir}"
-            else="${basedir}/${srcdir}" >
-        <os family="windows"/>
-    </condition>
+    <property name="source-folder" value="src" />
+    <property name="resource-folder" value="res" />
+    <property name="asset-folder" value="assets" />
+    <property name="source-location" value="${basedir}/${source-folder}" />
+    <available file="${basedir}/${asset-folder}" property="has.asset.folder"/>
 
     <!-- folder for the 3rd party java libraries -->
     <property name="external-libs" value="libs" />
-    <condition property="external-libs-ospath"
-            value="${basedir}\${external-libs}"
-            else="${basedir}/${external-libs}" >
-        <os family="windows"/>
-    </condition>
+    <property name="external-libs-location" value="${basedir}/${external-libs}"/>
 
     <!-- folder for the native libraries -->
     <property name="native-libs" value="libs" />
-    <condition property="native-libs-ospath"
-            value="${basedir}\${native-libs}"
-            else="${basedir}/${native-libs}" >
-        <os family="windows"/>
-    </condition>
+    <property name="native-libs-location" value="${basedir}/${native-libs}"/>
 
     <!-- Output directories -->
-    <property name="outdir-classes" value="${outdir}/classes" />
-    <condition property="outdir-classes-ospath"
-            value="${basedir}\${outdir-classes}"
-            else="${basedir}/${outdir-classes}" >
-        <os family="windows"/>
-    </condition>
-    <condition property="outdir-main-classes"
-            value="${outdir-main}/classes">
-        <available file="${outdir-main}/classes"
-                type="dir"/>
-    </condition>
+    <property name="out-folder" value="bin" />
+    <property name="out-classes" value="${out-folder}/classes" />
+    <property name="out-classes-location" value="${basedir}/${out-classes}"/>
+    <!-- out folders for a parent project if this project is an instrumentation project -->
+    <property name="main-out-folder" value="../${out-folder}" />
+    <property name="main-out-classes" value="${main-out-folder}/classes"/>
 
     <!-- Create R.java in the source directory -->
-    <property name="outdir-r" value="src" />
+    <property name="r-folder" value="${source-folder}" />
 
     <!-- Intermediate files -->
     <property name="dex-file" value="classes.dex" />
-    <property name="intermediate-dex" value="${outdir}/${dex-file}" />
-    <condition property="intermediate-dex-ospath"
+    <property name="intermediate-dex" value="${out-folder}/${dex-file}" />
+    <!-- dx does not properly support incorrect / or \ based on the platform
+         and Ant cannot convert them because the parameter is not a valid path.
+         Because of this we have to compute different paths depending on the platform. -->
+    <condition property="intermediate-dex-location"
             value="${basedir}\${intermediate-dex}"
             else="${basedir}/${intermediate-dex}" >
         <os family="windows"/>
     </condition>
 
     <!-- The final package file to generate -->
-    <property name="resources-package" value="${outdir}/${ant.project.name}.ap_" />
-    <condition property="resources-package-ospath"
-            value="${basedir}\${resources-package}"
-            else="${basedir}/${resources-package}" >
-        <os family="windows"/>
-    </condition>
+    <property name="resources-package" value="${out-folder}/${ant.project.name}.ap_"/>
+    <property name="resources-package-location" value="${basedir}/${resources-package}"/>
 
-    <property name="out-debug-package" value="${outdir}/${ant.project.name}-debug.apk" />
-    <condition property="out-debug-package-ospath"
-            value="${basedir}\${out-debug-package}"
-            else="${basedir}/${out-debug-package}" >
-        <os family="windows"/>
-    </condition>
+    <property name="out-debug-package" value="${out-folder}/${ant.project.name}-debug.apk"/>
+    <property name="out-debug-package-location" value="${basedir}/${out-debug-package}"/>
 
-    <property name="out-unsigned-package" value="${outdir}/${ant.project.name}-unsigned.apk" />
-    <condition property="out-unsigned-package-ospath"
-            value="${basedir}\${out-unsigned-package}"
-            else="${basedir}/${out-unsigned-package}" >
-        <os family="windows"/>
-    </condition>
+    <property name="out-unsigned-package" value="${out-folder}/${ant.project.name}-unsigned.apk"/>
+    <property name="out-unsigned-package-location" value="${basedir}/${out-unsigned-package}"/>
 
     <!-- Tools -->
-    <condition property="aapt" value="${android-tools}/aapt.exe" else="${android-tools}/aapt" >
-        <os family="windows"/>
-    </condition>
-    <condition property="aidl" value="${android-tools}/aidl.exe" else="${android-tools}/aidl" >
-        <os family="windows"/>
-    </condition>
-    <condition property="adb" value="${android-tools}/adb.exe" else="${android-tools}/adb" >
-        <os family="windows"/>
-    </condition>
-    <condition property="dx" value="${android-tools}/dx.bat" else="${android-tools}/dx" >
-        <os family="windows"/>
-    </condition>
-    <condition property="apk-builder" value="${android-tools}/apkbuilder.bat" else="${android-tools}/apkbuilder" >
-        <os family="windows"/>
-    </condition>
+    <condition property="exe" value="exe" else=""><os family="windows"/></condition>
+    <condition property="bat" value="bat" else=""><os family="windows"/></condition>
 
-    <!-- Rules -->
+    <property name="aapt" value="${android-tools}/aapt${exe}"/>
+    <property name="aidl" value="${android-tools}/aidl${exe}"/>
+    <property name="adb" value="${android-tools}/adb${exe}"/>
+    <property name="dx" value="${android-tools}/dx${bat}"/>
+    <property name="apk-builder" value="${android-tools}/apkbuilder${bat}"/>
+
+       <!-- rules -->
 
     <!-- Create the output directories if they don't exist yet. -->
     <target name="dirs">
         <echo>Creating output directories if needed...</echo>
-        <mkdir dir="${outdir}" />
-        <mkdir dir="${outdir-classes}" />
+        <mkdir dir="${out-folder}" />
+        <mkdir dir="${out-classes}" />
     </target>
 
     <!-- Generate the R.java file for this project's resources. -->
             <arg value="package" />
             <arg value="-m" />
             <arg value="-J" />
-            <arg value="${outdir-r}" />
+            <arg path="${r-folder}" />
             <arg value="-M" />
-            <arg value="AndroidManifest.xml" />
+            <arg path="AndroidManifest.xml" />
             <arg value="-S" />
-            <arg value="${resource-dir}" />
+            <arg path="${resource-folder}" />
             <arg value="-I" />
-            <arg value="${android-jar}" />
+            <arg path="${android-jar}" />
         </exec>
     </target>
 
     <target name="aidl" depends="dirs">
         <echo>Compiling aidl files into Java classes...</echo>
         <apply executable="${aidl}" failonerror="true">
-            <arg value="-p${android-framework}" />
-            <arg value="-I${srcdir}" />
-            <fileset dir="${srcdir}">
+            <arg value="-p${android-aidl}" />
+            <arg value="-I${source-folder}" />
+            <fileset dir="${source-folder}">
                 <include name="**/*.aidl"/>
             </fileset>
         </apply>
     <!-- Compile this project's .java files into .class files. -->
     <target name="compile" depends="dirs, resource-src, aidl">
         <javac encoding="ascii" target="1.5" debug="true" extdirs=""
-                srcdir="${srcdir}"
-                destdir="${outdir-classes}"
+                srcdir="${source-folder}"
+                destdir="${out-classes}"
                 bootclasspath="${android-jar}">
             <classpath>
                 <fileset dir="${external-libs}" includes="*.jar"/>
-                <pathelement path="${outdir-main-classes}"/>
+                <pathelement path="${main-out-classes}"/>
             </classpath>
          </javac>
     </target>
 
     <!-- Convert this project's .class files into .dex files. -->
     <target name="dex" depends="compile">
-        <echo>Converting compiled files and external libraries into ${outdir}/${dex-file}...</echo>
+        <echo>Converting compiled files and external libraries into ${out-folder}/${dex-file}...</echo>
         <apply executable="${dx}" failonerror="true" parallel="true">
             <arg value="--dex" />
-            <arg value="--output=${intermediate-dex-ospath}" />
-            <arg path="${outdir-classes-ospath}" />
+            <arg value="--output=${intermediate-dex-location}" />
+            <arg path="${out-classes-location}" />
             <fileset dir="${external-libs}" includes="*.jar"/>
         </apply>
     </target>
 
     <!-- Put the project's resources into the output package file. -->
-    <target name="package-res-and-assets">
+    <target name="package-res-and-assets" if="has.asset.folder">
         <echo>Packaging resources and assets...</echo>
         <exec executable="${aapt}" failonerror="true">
             <arg value="package" />
             <arg value="-f" />
             <arg value="-M" />
-            <arg value="AndroidManifest.xml" />
+            <arg path="AndroidManifest.xml" />
             <arg value="-S" />
-            <arg value="${resource-dir}" />
+            <arg path="${resource-folder}" />
             <arg value="-A" />
-            <arg value="${asset-dir}" />
+            <arg path="${asset-folder}" />
             <arg value="-I" />
-            <arg value="${android-jar}" />
+            <arg path="${android-jar}" />
             <arg value="-F" />
             <arg value="${resources-package}" />
         </exec>
     </target>
 
-    <!-- Same as package-res-and-assets, but without "-A ${asset-dir}" -->
-    <target name="package-res-no-assets">
+    <!-- Same as package-res-and-assets, but without "-A ${asset-folder}" -->
+    <target name="package-res-no-assets" unless="has.asset.folder">
         <echo>Packaging resources...</echo>
         <exec executable="${aapt}" failonerror="true">
             <arg value="package" />
             <arg value="-f" />
             <arg value="-M" />
-            <arg value="AndroidManifest.xml" />
+            <arg path="AndroidManifest.xml" />
             <arg value="-S" />
-            <arg value="${resource-dir}" />
+            <arg path="${resource-folder}" />
             <!-- No assets directory -->
             <arg value="-I" />
-            <arg value="${android-jar}" />
+            <arg path="${android-jar}" />
             <arg value="-F" />
-            <arg value="${resources-package}" />
+            <arg path="${resources-package}" />
         </exec>
     </target>
 
-    <!-- Invoke the proper target depending on whether or not
-         an assets directory is present. -->
-    <!-- TODO: find a nicer way to include the "-A ${asset-dir}" argument
-         only when the assets dir exists. -->
-    <target name="package-res">
-        <available file="${asset-dir}" type="dir"
-                property="res-target" value="and-assets" />
-        <property name="res-target" value="no-assets" />
-        <antcall target="package-res-${res-target}" />
-    </target>
-
     <!-- Package the application and sign it with a debug key.
          This is the default target when building. It is used for debug. -->
-    <target name="debug" depends="dex, package-res">
+    <target name="debug" depends="dex, package-res-and-assets, package-res-no-assets">
         <echo>Packaging ${out-debug-package}, and signing it with a debug key...</echo>
         <exec executable="${apk-builder}" failonerror="true">
-            <arg value="${out-debug-package-ospath}" />
+            <arg value="${out-debug-package-location}" />
             <arg value="-z" />
-            <arg value="${resources-package-ospath}" />
+            <arg path="${resources-package-location}" />
             <arg value="-f" />
-            <arg value="${intermediate-dex-ospath}" />
+            <arg path="${intermediate-dex-location}" />
             <arg value="-rf" />
-            <arg value="${srcdir-ospath}" />
+            <arg path="${source-location}" />
             <arg value="-rj" />
-            <arg value="${external-libs-ospath}" />
+            <arg path="${external-libs-location}" />
             <arg value="-nf" />
-            <arg value="${native-libs-ospath}" />
+            <arg path="${native-libs-location}" />
         </exec>
     </target>
 
     <!-- Package the application without signing it.
          This allows for the application to be signed later with an official publishing key. -->
-    <target name="release" depends="dex, package-res">
+    <target name="release" depends="dex, package-res-and-assets, package-res-no-assets">
         <echo>Packaging ${out-unsigned-package} for release...</echo>
         <exec executable="${apk-builder}" failonerror="true">
-            <arg value="${out-unsigned-package-ospath}" />
+            <arg value="${out-unsigned-package-location}" />
             <arg value="-u" />
             <arg value="-z" />
-            <arg value="${resources-package-ospath}" />
+            <arg path="${resources-package-location}" />
             <arg value="-f" />
-            <arg value="${intermediate-dex-ospath}" />
+            <arg path="${intermediate-dex-location}" />
             <arg value="-rf" />
-            <arg value="${srcdir-ospath}" />
+            <arg path="${source-location}" />
             <arg value="-rj" />
-            <arg value="${external-libs-ospath}" />
+            <arg path="${external-libs-location}" />
             <arg value="-nf" />
-            <arg value="${native-libs-ospath}" />
+            <arg path="${native-libs-location}" />
         </exec>
-        <echo>It will need to be signed with jarsigner before being published.</echo>
+        <echo>It will need to be signed with jarsigner before it is published.</echo>
     </target>
 
     <!-- Install the package on the default emulator -->
         <echo>Installing ${out-debug-package} onto default emulator...</echo>
         <exec executable="${adb}" failonerror="true">
             <arg value="install" />
-            <arg value="${out-debug-package}" />
+            <arg path="${out-debug-package}" />
         </exec>
     </target>
 
         <exec executable="${adb}" failonerror="true">
             <arg value="install" />
             <arg value="-r" />
-            <arg value="${out-debug-package}" />
+            <arg path="${out-debug-package}" />
         </exec>
     </target>
 
         <echo>Uninstalling ${application-package} from the default emulator...</echo>
         <exec executable="${adb}" failonerror="true">
             <arg value="uninstall" />
-            <arg value="${application-package}" />
+            <arg path="${application-package}" />
         </exec>
     </target>
-
+    
+    <target name="help">
+        <!-- displays starts at col 13
+              |13                                                              80| -->
+        <echo>Android Ant Build. Available targets:</echo>
+        <echo>   help:      Displays this help.</echo>
+        <echo>   debug:     Builds the application and sign it with a debug key.</echo>
+        <echo>   release:   Builds the application. The generated apk file must be</echo>
+        <echo>              signed before it is published.</echo>
+        <echo>   install:   Installs the debug package onto a running emulator or</echo>
+        <echo>              device. This can only be used if the application has </echo>
+        <echo>              not yet been installed.</echo>
+        <echo>   reinstall: Installs the debug package on a running emulator or</echo>
+        <echo>              device that already has the application.</echo>
+        <echo>              The signatures must match.</echo>
+        <echo>   uninstall: uninstall the application from a running emulator or</echo>
+        <echo>              device.</echo>
+    </target>
 </project>
index f04f1d8..c1afef8 100644 (file)
@@ -1,30 +1,51 @@
 <?xml version="1.0" ?>
-<project name="ACTIVITY_NAME" default="debug">
+<project name="ACTIVITY_NAME" default="help">
+
+    <!-- The local.properties file is created and updated by the 'android' tool.
+         It contain the path to the SDK. It should *NOT* be checked in in Version
+         Control Systems. -->
+    <property file="local.properties"/>
 
     <!-- The build.properties file can be created by you and is never touched
-         by activitycreator. If you want to manually set properties, this is
-         the best place to set them. -->
-    <property file="build.properties"/>
+         by the 'android' tool. This is the place to change some of the default property values
+         used by the Ant rules.
+         Here are some properties you may want to change/update:
+         
+         application-package
+             the name of your application package as defined in the manifest. Used by the
+             'uninstall' rule.
+         source-folder
+             the name of the source folder. Default is 'src'.
+         out-folder
+             the name of the output folder. Default is 'bin'.
 
-    <!-- The default.properties file is created and updated by activitycreator.
-         It will set any properties not already defined by build.properties. -->
-    <property file="default.properties"/>
+         Properties related to the SDK location or the project target should be updated
+          using the 'android' tool with the 'update' action.
 
-    <!-- ************************************************************************************* -->
-    <!-- These settings were written by activitycreator.
-         Do not change them unless you really know what you are doing. -->
+         This file is an integral part of the build system for your application and
+         should be checked in in Version Control Systems.
 
-    <!-- Application Package Name -->
-    <property name="application-package" value="PACKAGE" />
+         -->
+    <property file="build.properties"/>
 
-    <!-- The intermediates directory, Eclipse uses "bin"
-         for its own output, so we do the same. -->
-    <property name="outdir" value="bin" />
-    
-    <!-- ************************************************************************************* -->
-    <!-- Import the default Android build rules. 
-         This requires ant 1.6.0 or above. -->
+    <!-- The default.properties file is created and updated by the 'android' tool, as well
+         as ADT. 
+         This file is an integral part of the build system for your application and
+         should be checked in in Version Control Systems. -->
+    <property file="default.properties"/>
 
-    <import file="${sdk-folder}/tools/lib/android_rules.xml" />
+    <!-- Custom Android task to deal with the project target, and import the proper rules.
+         This requires ant 1.6.0 or above. -->
+    <path id="android.antlibs">
+        <pathelement path="${sdk-location}/tools/lib/anttasks.jar" />
+        <pathelement path="${sdk-location}/tools/lib/sdklib.jar" />
+        <pathelement path="${sdk-location}/tools/lib/androidprefs.jar" />
+    </path>
+    
+    <taskdef name="androidinit" classname="com.android.ant.AndroidInitTask"
+        classpathref="android.antlibs"/>
 
+    <!-- Class the Android Init task that will import the proper rule file containing
+         all the Ant targets -->
+    <androidinit />
 </project>
diff --git a/tools/scripts/default.properties.template b/tools/scripts/default.properties.template
deleted file mode 100644 (file)
index 63df494..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-# This file is automatically generated by activitycreator.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-# Instead customize values in a "build.properties" file.
-
-# location of the SDK
-sdk-folder=ANDROID_SDK_FOLDER
-
-# target mode. Value can be "platform" or "add-on"
-target-mode=TARGET_MODE
-
-# target API level.
-target-api=TARGET_API
-
-# target name, if target-mode=add-on
-target-name=TARGET_NAME
-
-# target platform. This is either the target itself or the platform the add-on is based on.
-target-folder=TARGET_FOLDER
index 45c59d3..cbd9d37 100644 (file)
@@ -1,9 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
        <classpathentry kind="src" path="src"/>
+       <classpathentry kind="src" path="tests"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
        <classpathentry combineaccessrules="false" kind="src" path="/SdkLib"/>
        <classpathentry combineaccessrules="false" kind="src" path="/AndroidPrefs"/>
        <classpathentry combineaccessrules="false" kind="src" path="/SdkUiLib"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/tools/sdkmanager/app/src/com/android/sdkmanager/CommandLineProcessor.java b/tools/sdkmanager/app/src/com/android/sdkmanager/CommandLineProcessor.java
new file mode 100644 (file)
index 0000000..ef3d0ee
--- /dev/null
@@ -0,0 +1,580 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.sdkmanager;
+
+import java.util.HashMap;
+import java.util.Map.Entry;
+
+/**
+ * Parses the command-line and stores flags needed or requested.
+ * <p/>
+ * This is a base class. To be useful you want to:
+ * <ul>
+ * <li>override it.
+ * <li>pass an action array to the constructor.
+ * <li>define flags for your actions.
+ * </ul> 
+ * <p/>
+ * To use, call {@link #parseArgs(String[])} and then call {@link #getValue(String, String)}.
+ */
+public class CommandLineProcessor {
+    
+    /** Internal action name for all global flags. */
+    public final static String GLOBAL_FLAG = "global";
+    /** Internal action name for internally hidden flags.
+     *  This is currently used to store the requested action name. */
+    public final static String INTERNAL_FLAG = "internal";
+
+    /** The global help flag. */ 
+    public static final String KEY_HELP = "help";
+    /** The global verbose flag. */
+    public static final String KEY_VERBOSE = "verbose";
+    /** The internal action flag. */
+    public static final String KEY_ACTION = "action";
+
+    /** List of available actions.
+     * <p/>
+     * Each entry must be a 2-string array with first the action name and then
+     * a description.
+     */
+    private final String[][] mActions;
+    /** The hash of all defined arguments.
+     * <p/>
+     * The key is a string "action/longName".
+     */
+    private final HashMap<String, Arg> mArguments = new HashMap<String, Arg>();
+    
+    public CommandLineProcessor(String[][] actions) {
+        mActions = actions;
+
+        define(MODE.STRING, false, INTERNAL_FLAG, null, KEY_ACTION, "Selected Action", null);
+
+        define(MODE.BOOLEAN, false, GLOBAL_FLAG, "v", KEY_VERBOSE, "Verbose mode", false);
+        define(MODE.BOOLEAN, false, GLOBAL_FLAG, "h", KEY_HELP, "This help", false);
+    }
+    
+    //------------------
+    // Helpers to get flags values
+
+    /** Helper that returns true if --verbose was requested. */
+    public boolean isVerbose() {
+        return ((Boolean) getValue(GLOBAL_FLAG, KEY_VERBOSE)).booleanValue();
+    }
+
+    /** Helper that returns true if --help was requested. */
+    public boolean isHelpRequested() {
+        return ((Boolean) getValue(GLOBAL_FLAG, KEY_HELP)).booleanValue();
+    }
+
+    /** Helper that returns the requested action name. */
+    public String getActionRequested() {
+        return (String) getValue(INTERNAL_FLAG, KEY_ACTION);
+    }
+    
+    //------------------
+    
+    /**
+     * Raw access to parsed parameter values.
+     * @param action The action name, including {@link #GLOBAL_FLAG} and {@link #INTERNAL_FLAG}
+     * @param longFlagName The long flag name for the given action.
+     * @return The current value object stored in the parameter, which depends on the argument mode.
+     */
+    public Object getValue(String action, String longFlagName) {
+        String key = action + "/" + longFlagName;
+        Arg arg = mArguments.get(key);
+        return arg.getCurrentValue();
+    }
+
+    /**
+     * Internal setter for raw parameter value.
+     * @param action The action name, including {@link #GLOBAL_FLAG} and {@link #INTERNAL_FLAG}
+     * @param longFlagName The long flag name for the given action.
+     * @param value The new current value object stored in the parameter, which depends on the
+     *              argument mode.
+     */
+    protected void setValue(String action, String longFlagName, Object value) {
+        String key = action + "/" + longFlagName;
+        Arg arg = mArguments.get(key);
+        arg.setCurrentValue(value);
+    }
+
+    /**
+     * Parses the command-line arguments.
+     * <p/>
+     * This method will exit and not return if a parsing error arise.
+     * 
+     * @param args The arguments typically received by a main method.
+     */
+    public void parseArgs(String[] args) {
+        String needsHelp = null;
+        String action = null;
+        
+        int n = args.length;
+        for (int i = 0; i < n; i++) {
+            Arg arg = null;
+            String a = args[i];
+            if (a.startsWith("--")) {
+                arg = findLongArg(action, a.substring(2));
+            } else if (a.startsWith("-")) {
+                arg = findShortArg(action, a.substring(1));
+            }
+            
+            // Not a keyword and we don't have an action yet, this should be an action
+            if (arg == null && action == null) {
+
+                if (a.startsWith("-")) {
+                    // Got a keyword but not valid for global flags
+                    needsHelp = String.format(
+                            "Flag '%1$s' is not a valid global flag. Did you mean to specify it after the action name?",
+                            a, action);
+                    break;
+                }
+
+                for (String[] actionDesc : mActions) {
+                    if (actionDesc[0].equals(a)) {
+                        action = a;
+                        break;
+                    }
+                }
+                
+                if (action == null) {
+                    needsHelp = String.format(
+                            "Expected action name after global parameters but found %1$s instead.",
+                            a);
+                    break;
+                }
+            } else if (arg == null && action != null) {
+                // Got a keyword but not valid for the current action
+                needsHelp = String.format(
+                        "Flag '%1$s' is not valid for action '%2$s'.",
+                        a, action);
+                break;
+                
+            } else if (arg != null) {
+                // Process keyword
+                String error = null;
+                if (arg.getMode().needsExtra()) {
+                    if (++i >= n) {
+                        needsHelp = String.format("Missing argument for flag %1$s.", a);
+                        break;
+                    }
+                    
+                    error = arg.getMode().process(arg, args[i]);
+                } else {
+                    error = arg.getMode().process(arg, null);
+
+                    // If we just toggled help, we want to exit now without printing any error.
+                    // We do this test here only when a Boolean flag is toggled since booleans
+                    // are the only flags that don't take parameters and help is a boolean.
+                    if (isHelpRequested()) {
+                        printHelpAndExit(null);
+                        // The call above should terminate however in unit tests we override
+                        // it so we still need to return here.
+                        return;
+                    }
+                }
+                
+                if (error != null) {
+                    needsHelp = String.format("Invalid usage for flag %1$s: %2$s.", a, error);
+                    break;
+                }
+            }
+        }
+        
+        if (needsHelp == null) {
+            if (action == null) {
+                needsHelp = "Missing action name.";
+            } else {
+                // Validate that all mandatory arguments are non-null for this action
+                for (Entry<String, Arg> entry : mArguments.entrySet()) {
+                    Arg arg = entry.getValue();
+                    if (arg.getAction().equals(action)) {
+                        if (arg.isMandatory() && arg.getCurrentValue() == null) {
+                            needsHelp = String.format("The parameter --%1$s must be defined for action '%2$s'",
+                                    arg.getLongArg(),
+                                    action);
+                            break;
+                        }
+                    }
+                }
+                
+                setValue(INTERNAL_FLAG, KEY_ACTION, action);
+            }
+        }
+
+        if (needsHelp != null) {
+            printHelpAndExitForAction(action, needsHelp);
+        }
+    }
+    
+    /**
+     * Finds an {@link Arg} given an action name and a long flag name.
+     * @return The {@link Arg} found or null.
+     */
+    protected Arg findLongArg(String action, String longName) {
+        if (action == null) {
+            action = GLOBAL_FLAG;
+        }
+        String key = action + "/" + longName;
+        return mArguments.get(key);
+    }
+
+    /**
+     * Finds an {@link Arg} given an action name and a short flag name.
+     * @return The {@link Arg} found or null.
+     */
+    protected Arg findShortArg(String action, String shortName) {
+        if (action == null) {
+            action = GLOBAL_FLAG;
+        }
+
+        for (Entry<String, Arg> entry : mArguments.entrySet()) {
+            Arg arg = entry.getValue();
+            if (arg.getAction().equals(action)) {
+                if (shortName.equals(arg.getShortArg())) {
+                    return arg;
+                }
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Prints the help/usage and exits.
+     * 
+     * @param errorFormat Optional error message to print prior to usage using String.format 
+     * @param args Arguments for String.format
+     */
+    public void printHelpAndExit(String errorFormat, Object... args) {
+        printHelpAndExitForAction(null /*actionFilter*/, errorFormat, args);
+    }
+    
+    /**
+     * Prints the help/usage and exits.
+     * 
+     * @param actionFilter If null, displays help for all actions. If not null, display help only
+     *          for that specific action. In all cases also display general usage and action list.
+     * @param errorFormat Optional error message to print prior to usage using String.format 
+     * @param args Arguments for String.format
+     */
+    public void printHelpAndExitForAction(String actionFilter, String errorFormat, Object... args) {
+        if (errorFormat != null) {
+            stderr(errorFormat, args);
+        }
+        
+        /*
+         * usage should fit in 80 columns
+         *   12345678901234567890123456789012345678901234567890123456789012345678901234567890
+         */
+        stdout("\n" +
+            "Usage:\n" +
+            "  android [global options] action [action options]\n" +
+            "\n" +
+            "Global options:");
+        listOptions(GLOBAL_FLAG);
+
+        stdout("\nValid actions:");
+        for (String[] action : mActions) {
+            String filler = "";
+            int len = action[0].length();
+            if (len < 10) {
+                filler = "          ".substring(len);
+            }
+            
+            stdout("- %1$s:%2$s %3$s", action[0], filler, action[1]);
+        }
+        
+        for (String[] action : mActions) {
+            if (actionFilter == null || actionFilter.equals(action[0])) {
+                stdout("\nAction \"%1$s\":", action[0]);
+                stdout("  %1$s", action[1]);
+                stdout("Options:");
+                listOptions(action[0]);
+            }
+        }
+        
+        exit();
+    }
+
+    /**
+     * Internal helper to print all the option flags for a given action name.
+     */
+    protected void listOptions(String action) {
+        int numOptions = 0;
+        for (Entry<String, Arg> entry : mArguments.entrySet()) {
+            Arg arg = entry.getValue();
+            if (arg.getAction().equals(action)) {
+                
+                String value = null;
+                if (arg.getDefaultValue() instanceof String[]) {
+                    value = "";
+                    for (String v : (String[]) arg.getDefaultValue()) {
+                        if (value.length() > 0) {
+                            value += "|";
+                        }
+                        value += v;
+                    }
+                } else if (arg.getDefaultValue() != null) {
+                    value = arg.getDefaultValue().toString();
+                }
+
+                stdout("  -%1$s %2$-10s %3$s%4$s",
+                        arg.getShortArg(),
+                        "--" + arg.getLongArg(),
+                        arg.getDescription(),
+                        value == null ? "" : " (" + value + ")");
+                numOptions++;
+            }
+        }
+        
+        if (numOptions == 0) {
+            stdout("  No options");
+        }
+    }
+
+    //----
+    
+    /**
+     * The mode of an argument specifies the type of variable it represents,
+     * whether an extra parameter is required after the flag and how to parse it.
+     */
+    static enum MODE {
+        /** Argument value is a Boolean. Default value is a Boolean. */
+        BOOLEAN {
+            @Override
+            public boolean needsExtra() {
+                return false;
+            }
+            @Override
+            public String process(Arg arg, String extra) {
+                // Toggle the current value
+                arg.setCurrentValue(! ((Boolean) arg.getCurrentValue()).booleanValue());
+                return null;
+            }
+        },
+
+        /** Argument value is an Integer. Default value is an Integer. */
+        INTEGER {
+            @Override
+            public boolean needsExtra() {
+                return true;
+            }
+            @Override
+            public String process(Arg arg, String extra) {
+                try {
+                    arg.setCurrentValue(Integer.parseInt(extra));
+                    return null;
+                } catch (NumberFormatException e) {
+                    return String.format("Failed to parse '%1$s' as an integer: %2%s",
+                            extra, e.getMessage());
+                }
+            }
+        },
+        
+        /** Argument value is a String. Default value is a String[]. */
+        ENUM {
+            @Override
+            public boolean needsExtra() {
+                return true;
+            }
+            @Override
+            public String process(Arg arg, String extra) {
+                StringBuilder desc = new StringBuilder();
+                String[] values = (String[]) arg.getDefaultValue();
+                for (String value : values) {
+                    if (value.equals(extra)) {
+                        arg.setCurrentValue(extra);
+                        return null;
+                    }
+                    
+                    if (desc.length() != 0) {
+                        desc.append(", ");
+                    }
+                    desc.append(value);
+                }
+
+                return String.format("'%1$s' is not one of %2$s", extra, desc.toString());
+            }
+        },
+        
+        /** Argument value is a String. Default value is a null. */
+        STRING {
+            @Override
+            public boolean needsExtra() {
+                return true;
+            }
+            @Override
+            public String process(Arg arg, String extra) {
+                arg.setCurrentValue(extra);
+                return null;
+            }
+        };
+        
+        /**
+         * Returns true if this mode requires an extra parameter.
+         */
+        public abstract boolean needsExtra();
+
+        /**
+         * Processes the flag for this argument.
+         * 
+         * @param arg The argument being processed.
+         * @param extra The extra parameter. Null if {@link #needsExtra()} returned false. 
+         * @return An error string or null if there's no error.
+         */
+        public abstract String process(Arg arg, String extra);
+    }
+
+    /**
+     * An argument accepted by the command-line, also called "a flag".
+     * Arguments must have a short version (one letter), a long version name and a description.
+     * They can have a default value, or it can be null.
+     * Depending on the {@link MODE}, the default value can be a Boolean, an Integer, a String
+     * or a String array (in which case the first item is the current by default.)  
+     */
+    static class Arg {
+        private final String mAction;
+        private final String mShortName;
+        private final String mLongName;
+        private final String mDescription;
+        private final Object mDefaultValue;
+        private Object mCurrentValue;
+        private final MODE mMode;
+        private final boolean mMandatory;
+
+        /**
+         * Creates a new argument flag description.
+         * 
+         * @param mode The {@link MODE} for the argument.
+         * @param mandatory True if this argument is mandatory for this action. 
+         * @param action The action name. Can be #GLOBAL_FLAG or #INTERNAL_FLAG.
+         * @param shortName The one-letter short argument name. Cannot be empty nor null.
+         * @param longName The long argument name. Cannot be empty nor null.
+         * @param description The description. Cannot be null.
+         * @param defaultValue The default value (or values), which depends on the selected {@link MODE}.
+         */
+        public Arg(MODE mode,
+                   boolean mandatory,
+                   String action,
+                   String shortName,
+                   String longName,
+                   String description,
+                   Object defaultValue) {
+            mMode = mode;
+            mMandatory = mandatory;
+            mAction = action;
+            mShortName = shortName;
+            mLongName = longName;
+            mDescription = description;
+            mDefaultValue = defaultValue;
+            if (defaultValue instanceof String[]) {
+                mCurrentValue = ((String[])defaultValue)[0];
+            } else {
+                mCurrentValue = mDefaultValue;
+            }
+        }
+        
+        public boolean isMandatory() {
+            return mMandatory;
+        }
+        
+        public String getShortArg() {
+            return mShortName;
+        }
+        
+        public String getLongArg() {
+            return mLongName;
+        }
+        
+        public String getDescription() {
+            return mDescription;
+        }
+        
+        public String getAction() {
+            return mAction;
+        }
+        
+        public Object getDefaultValue() {
+            return mDefaultValue;
+        }
+        
+        public Object getCurrentValue() {
+            return mCurrentValue;
+        }
+
+        public void setCurrentValue(Object currentValue) {
+            mCurrentValue = currentValue;
+        }
+        
+        public MODE getMode() {
+            return mMode;
+        }
+    }
+    
+    /**
+     * Internal helper to define a new argument for a give action.
+     * 
+     * @param mode The {@link MODE} for the argument.
+     * @param action The action name. Can be #GLOBAL_FLAG or #INTERNAL_FLAG.
+     * @param shortName The one-letter short argument name. Cannot be empty nor null.
+     * @param longName The long argument name. Cannot be empty nor null.
+     * @param description The description. Cannot be null.
+     * @param defaultValue The default value (or values), which depends on the selected {@link MODE}.
+     */
+    protected void define(MODE mode,
+            boolean mandatory,
+            String action,
+            String shortName, String longName,
+            String description, Object defaultValue) {
+        assert(mandatory || mode == MODE.BOOLEAN); // a boolean mode cannot be mandatory
+        
+        String key = action + "/" + longName;
+        mArguments.put(key, new Arg(mode, mandatory,
+                action, shortName, longName, description, defaultValue));
+    }
+
+    /**
+     * Exits in case of error.
+     * This is protected so that it can be overridden in unit tests.
+     */
+    protected void exit() {
+        System.exit(1);
+    }
+
+    /**
+     * Prints a line to stdout.
+     * This is protected so that it can be overridden in unit tests.
+     * 
+     * @param format The string to be formatted. Cannot be null.
+     * @param args Format arguments.
+     */
+    protected void stdout(String format, Object...args) {
+        System.out.println(String.format(format, args));
+    }
+
+    /**
+     * Prints a line to stderr.
+     * This is protected so that it can be overridden in unit tests.
+     * 
+     * @param format The string to be formatted. Cannot be null.
+     * @param args Format arguments.
+     */
+    protected void stderr(String format, Object...args) {
+        System.err.println(String.format(format, args));
+    }
+}
index 72bd2aa..3bcb9a3 100644 (file)
@@ -23,6 +23,8 @@ import com.android.sdklib.ISdkLog;
 import com.android.sdklib.SdkConstants;
 import com.android.sdklib.SdkManager;
 import com.android.sdklib.IAndroidTarget.IOptionalLibrary;
+import com.android.sdklib.project.ProjectCreator;
+import com.android.sdklib.project.ProjectCreator.OutputLevel;
 import com.android.sdklib.vm.HardwareProperties;
 import com.android.sdklib.vm.VmManager;
 import com.android.sdklib.vm.HardwareProperties.HardwareProperty;
@@ -35,31 +37,20 @@ import java.util.List;
 import java.util.Map;
 
 /**
- * Main class for the 'android' application
- *
+ * Main class for the 'android' application.
  */
 class Main {
     
     private final static String TOOLSDIR = "com.android.sdkmanager.toolsdir";
     
-    private final static String ARG_LIST_TARGET = "target";
-    private final static String ARG_LIST_VM = "vm";
-    
     private final static String[] BOOLEAN_YES_REPLIES = new String[] { "yes", "y" };
     private final static String[] BOOLEAN_NO_REPLIES = new String[] { "no", "n" };
 
     private String mSdkFolder;
+    private ISdkLog mSdkLog;
     private SdkManager mSdkManager;
     private VmManager mVmManager;
-
-    /* --list parameters */
-    private String mListObject;
-
-    /* --create parameters */
-    private boolean mCreateVm;
-    private int mCreateTargetId;
-    private IAndroidTarget mCreateTarget;
-    private String mCreateName;
+    private SdkCommandLine mSdkCommandLine;
 
     public static void main(String[] args) {
         new Main().run(args);
@@ -71,7 +62,7 @@ class Main {
      */
     private void run(String[] args) {
         init();
-        parseArgs(args);
+        mSdkCommandLine.parseArgs(args);
         parseSdk();
         doAction();
     }
@@ -81,70 +72,41 @@ class Main {
      * doing basic parsing of the SDK.
      */
     private void init() {
+        mSdkCommandLine = new SdkCommandLine();
+
         /* We get passed a property for the tools dir */
         String toolsDirProp = System.getProperty(TOOLSDIR);
         if (toolsDirProp == null) {
             // for debugging, it's easier to override using the process environment
             toolsDirProp = System.getenv(TOOLSDIR);
         }
-        if (toolsDirProp == null) {
-            printHelpAndExit("ERROR: The tools directory property is not set, please make sure you are executing android or android.bat");
-        }
-        
-        // got back a level for the SDK folder
-        File tools = new File(toolsDirProp);
-        mSdkFolder = tools.getParent();
-        
-    }
     
-    /**
-     * Parses command-line arguments, or prints help/usage and exits if error.
-     * @param args arguments passed to the program
-     */
-    private void parseArgs(String[] args) {
-        final int numArgs = args.length;
-
-        try {
-            int argPos = 0;
-            for (; argPos < numArgs; argPos++) {
-                final String arg = args[argPos];
-                if (arg.equals("-l") || arg.equals("--list")) {
-                    mListObject = args[++argPos];
-                } else if (arg.equals("-c") || arg.equals("--create")) {
-                    mCreateVm = true;
-                    parseCreateArgs(args, ++argPos);
+        if (toolsDirProp != null) {
+            // got back a level for the SDK folder
+            File tools;
+            if (toolsDirProp.length() > 0) {
+                tools = new File(toolsDirProp);
+                mSdkFolder = tools.getParent();
+            } else {
+                try {
+                    tools = new File(".").getCanonicalFile();
+                    mSdkFolder = tools.getParent();
+                } catch (IOException e) {
+                    // Will print an error below since mSdkFolder is not defined
                 }
             }
-        } catch (ArrayIndexOutOfBoundsException e) {
-            /* Any OOB triggers help */
-            printHelpAndExit("ERROR: Not enough arguments.");
         }
-    }
 
-    private void parseCreateArgs(String[] args, int argPos) {
-        final int numArgs = args.length;
-
-        try {
-            for (; argPos < numArgs; argPos++) {
-                final String arg = args[argPos];
-                if (arg.equals("-t") || arg.equals("--target")) {
-                    String targetId = args[++argPos];
-                    try {
-                        // get the target id
-                        mCreateTargetId = Integer.parseInt(targetId);
-                    } catch (NumberFormatException e) {
-                        printHelpAndExit("ERROR: Target Id is not a number");
-                    }
-                } else if (arg.equals("-n") || arg.equals("--name")) {
-                    mCreateName = args[++argPos];
-                } else {
-                    printHelpAndExit("ERROR: '%s' unknown argument for --create mode",
-                            args[argPos]);
-                }
+        if (mSdkFolder == null) {
+            String os = System.getProperty("os.name");
+            String cmd = "android";
+            if (os.startsWith("Windows")) {
+                cmd += ".bat";
             }
-        } catch (ArrayIndexOutOfBoundsException e) {
-            /* Any OOB triggers help */
-            printHelpAndExit("ERROR: Not enough arguments for --create");
+
+            mSdkCommandLine.printHelpAndExit(
+                "ERROR: The tools directory property is not set, please make sure you are executing %1$s",
+                cmd);
         }
     }
 
@@ -152,10 +114,15 @@ class Main {
      * Does the basic SDK parsing required for all actions
      */
     private void parseSdk() {
-        mSdkManager = SdkManager.createManager(mSdkFolder, new ISdkLog() {
-            public void error(String errorFormat, Object... args) {
-                System.err.printf("Error: " + errorFormat, args);
-                System.err.println("");
+        mSdkLog = new ISdkLog() {
+            public void error(Throwable t, String errorFormat, Object... args) {
+                if (errorFormat != null) {
+                    System.err.printf("Error: " + errorFormat, args);
+                    System.err.println("");
+                }
+                if (t != null) {
+                    System.err.print("Error: " + t.getMessage());
+                }
             }
 
             public void warning(String warningFormat, Object... args) {
@@ -165,10 +132,15 @@ class Main {
                     System.out.println("");
                 }
             }
-        });
+
+            public void printf(String msgFormat, Object... args) {
+                System.out.printf(msgFormat, args);
+            }
+        };
+        mSdkManager = SdkManager.createManager(mSdkFolder, mSdkLog);
         
         if (mSdkManager == null) {
-            printHelpAndExit("ERROR: Unable to parse SDK content.");
+            mSdkCommandLine.printHelpAndExit("ERROR: Unable to parse SDK content.");
         }
     }
     
@@ -176,19 +148,37 @@ class Main {
      * Actually do an action...
      */
     private void doAction() {
-        if (mListObject != null) {
+        String action = mSdkCommandLine.getActionRequested();
+        
+        if (SdkCommandLine.ACTION_LIST.equals(action)) {
             // list action.
-            if (ARG_LIST_TARGET.equals(mListObject)) {
+            if (SdkCommandLine.ARG_TARGET.equals(mSdkCommandLine.getListFilter())) {
                 displayTargetList();
-            } else if (ARG_LIST_VM.equals(mListObject)) {
+            } else if (SdkCommandLine.ARG_VM.equals(mSdkCommandLine.getListFilter())) {
                 displayVmList();
             } else {
-                printHelpAndExit("'%s' is not a valid --list option", mListObject);
+                displayTargetList();
+                displayVmList();
             }
-        } else if (mCreateVm) {
+        } else if (SdkCommandLine.ACTION_NEW_VM.equals(action)) {
             createVm();
+        } else if (SdkCommandLine.ACTION_NEW_PROJECT.equals(action)) {
+            // get the target and try to resolve it.
+            int targetId = mSdkCommandLine.getNewProjectTargetId();
+            IAndroidTarget[] targets = mSdkManager.getTargets();
+            if (targetId < 1 || targetId > targets.length) {
+                mSdkCommandLine.printHelpAndExit("ERROR: Wrong target id.");
+            }
+            IAndroidTarget target = targets[targetId - 1];
+            
+            ProjectCreator creator = new ProjectCreator(mSdkFolder,
+                    OutputLevel.NORMAL, mSdkLog);
+            
+            creator.createProject(mSdkCommandLine.getNewProjectLocation(),
+                    mSdkCommandLine.getNewProjectName(), mSdkCommandLine.getNewProjectPackage(),
+                    mSdkCommandLine.getNewProjectActivity(), target, true);
         } else {
-            printHelpAndExit(null);
+            mSdkCommandLine.printHelpAndExit(null);
         }
     }
 
@@ -274,7 +264,7 @@ class Main {
                 index++;
             }
         } catch (AndroidLocationException e) {
-            printHelpAndExit(e.getMessage());
+            mSdkCommandLine.printHelpAndExit(e.getMessage());
         }
     }
     
@@ -283,11 +273,14 @@ class Main {
      */
     private void createVm() {
         // find a matching target
-        if (mCreateTargetId >= 1 && mCreateTargetId <= mSdkManager.getTargets().length) {
-            mCreateTarget = mSdkManager.getTargets()[mCreateTargetId-1]; // target it is 1-based
+        int targetId = mSdkCommandLine.getNewVmTargetId();
+        IAndroidTarget target = null;
+        
+        if (targetId >= 1 && targetId <= mSdkManager.getTargets().length) {
+            target = mSdkManager.getTargets()[targetId-1]; // target it is 1-based
         } else {
-            printHelpAndExit(
-                    "ERROR: Target Id is not a valid Id. Check android --list target for the list of targets.");
+            mSdkCommandLine.printHelpAndExit(
+                    "ERROR: Target Id is not a valid Id. Check 'android list target' for the list of targets.");
         }
         
         try {
@@ -295,19 +288,24 @@ class Main {
             String vmRoot = AndroidLocation.getFolder() + AndroidLocation.FOLDER_VMS;
             
             Map<String, String> hardwareConfig = null;
-            if (mCreateTarget.isPlatform()) {
+            if (target.isPlatform()) {
                 try {
-                    hardwareConfig = promptForHardware(mCreateTarget);
+                    hardwareConfig = promptForHardware(target);
                 } catch (IOException e) {
-                    printHelpAndExit(e.getMessage());
+                    mSdkCommandLine.printHelpAndExit(e.getMessage());
                 }
             }
             
-            VmManager.createVm(vmRoot, mCreateName, mCreateTarget, null /*skinName*/,
-                    null /*sdcardPath*/, 0 /*sdcardSize*/, hardwareConfig,
+            VmManager.createVm(vmRoot,
+                    mSdkCommandLine.getNewVmName(),
+                    target,
+                    null /*skinName*/,
+                    null /*sdcardPath*/,
+                    0 /*sdcardSize*/,
+                    hardwareConfig,
                     null /* sdklog */);
         } catch (AndroidLocationException e) {
-            printHelpAndExit(e.getMessage());
+            mSdkCommandLine.printHelpAndExit(e.getMessage());
         }
     }
 
@@ -325,7 +323,7 @@ class Main {
         System.out.print(String.format("Do you which to create a custom hardware profile [%s]",
                 defaultAnswer));
         
-        result = readLine(readLineBuffer);
+        result = readLine(readLineBuffer).trim();
         // handle default:
         if (result.length() == 0) {
             result = defaultAnswer;
@@ -391,8 +389,7 @@ class Main {
                     break;
                 case INTEGER:
                     try {
-                        @SuppressWarnings("unused")
-                        int value = Integer.parseInt(result);
+                        Integer.parseInt(result);
                         map.put(property.getName(), result);
                         i++; // valid reply, move to next property
                     } catch (NumberFormatException e) {
@@ -414,9 +411,8 @@ class Main {
     }
     
     /**
-     * Read the line from the input stream.
+     * Reads the line from the input stream.
      * @param buffer
-     * @return
      * @throws IOException
      */
     private String readLine(byte[] buffer) throws IOException {
@@ -434,7 +430,12 @@ class Main {
             return new String(buffer, 0, count) + secondHalf;
         }
 
-        return new String(buffer, 0, count - 1); // -1 to not include the carriage return
+        // ignore end whitespace
+        while (count > 0 && (buffer[count-1] == '\r' || buffer[count-1] == '\n')) {
+            count--;
+        }
+        
+        return new String(buffer, 0, count);
     }
     
     /**
@@ -442,6 +443,7 @@ class Main {
      * @throws IOException If the value is not a boolean string.
      */
     private boolean getBooleanReply(String reply) throws IOException {
+        
         for (String valid : BOOLEAN_YES_REPLIES) {
             if (valid.equalsIgnoreCase(reply)) {
                 return true;
@@ -456,32 +458,4 @@ class Main {
 
         throw new IOException(String.format("%s is not a valid reply", reply));
     }
-
-    /**
-     * Prints the help/usage and exits.
-     * @param errorFormat Optional error message to print prior to usage using String.format 
-     * @param args Arguments for String.format
-     */
-    private void printHelpAndExit(String errorFormat, Object... args) {
-        if (errorFormat != null) {
-            System.err.println(String.format(errorFormat, args));
-        }
-        
-        /*
-         * usage should fit in 80 columns
-         *   12345678901234567890123456789012345678901234567890123456789012345678901234567890
-         */
-        final String usage = "\n" +
-            "Usage:\n" +
-            "  android --list [target|vm]\n" +
-            "  android --create --target <target id> --name <name>\n" +
-            "\n" +
-            "Options:\n" +
-            " -l [target|vm], --list [target|vm]\n" +
-            "         Outputs the available targets or Virtual Machines and their Ids.\n" +
-            "\n";
-        
-        System.out.println(usage);
-        System.exit(1);
-    }
 }
\ No newline at end of file
diff --git a/tools/sdkmanager/app/src/com/android/sdkmanager/SdkCommandLine.java b/tools/sdkmanager/app/src/com/android/sdkmanager/SdkCommandLine.java
new file mode 100644 (file)
index 0000000..918c534
--- /dev/null
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.sdkmanager;
+
+import com.android.sdklib.SdkManager;
+
+
+/**
+ * Specific command-line flags for the {@link SdkManager}.
+ */
+public class SdkCommandLine extends CommandLineProcessor {
+
+    public static final String ARG_ALIAS = "alias";
+    public static final String ARG_ACTIVITY = "activity";
+    public static final String ARG_VM = "vm";
+    public static final String ARG_TARGET = "target";
+    public static final String ARG_ALL = "all";
+    
+    public static final String KEY_IN = "in";
+    public static final String KEY_ACTIVITY = ARG_ACTIVITY;
+    public static final String KEY_PACKAGE = "package";
+    public static final String KEY_MODE = "mode";
+    public static final String KEY_TARGET_ID = ARG_TARGET;
+    public static final String KEY_NAME = "name";
+    public static final String KEY_OUT = "out";
+    public static final String KEY_FILTER = "filter";
+
+    public final static String ACTION_LIST = "list";
+    public final static String ACTION_NEW_VM = ARG_VM;
+    public final static String ACTION_NEW_PROJECT = "project";
+    public final static String ACTION_UPDATE_PROJECT = "update";
+    
+    private final static String[][] ACTIONS = {
+        { ACTION_LIST,
+            "Lists existing targets or VMs." },
+        { ACTION_NEW_VM,
+            "Creates a new VM." },
+        { ACTION_NEW_PROJECT,
+            "Creates a new project using a template." },
+        { ACTION_UPDATE_PROJECT,
+            "Updates a new project from existing source (must have an AndroidManifest.xml)." },
+        };
+    
+    public SdkCommandLine() {
+        super(ACTIONS);
+
+        define(MODE.ENUM, false, ACTION_LIST, "f", KEY_FILTER,
+                "List filter", new String[] { ARG_ALL, ARG_TARGET, ARG_VM });
+
+        define(MODE.STRING, false, ACTION_NEW_VM, "o", KEY_OUT,
+                "Location path of new VM", null);
+        define(MODE.STRING, true, ACTION_NEW_VM, "n", KEY_NAME,
+                "Name of the new VM", null);
+        define(MODE.INTEGER, true, ACTION_NEW_VM, "t", KEY_TARGET_ID,
+                "Target id of the new VM", null);
+
+        define(MODE.ENUM, true, ACTION_NEW_PROJECT, "m", KEY_MODE,
+                "Project mode", new String[] { ARG_ACTIVITY, ARG_ALIAS });
+        define(MODE.STRING, false, ACTION_NEW_PROJECT, "o", KEY_OUT,
+                "Location path of new project", null);
+        define(MODE.STRING, true, ACTION_NEW_PROJECT, "n", KEY_NAME,
+                "Name of the new project", null);
+        define(MODE.INTEGER, true, ACTION_NEW_PROJECT, "t", KEY_TARGET_ID,
+                "Target id of the new project", null);
+        define(MODE.STRING, true, ACTION_NEW_PROJECT, "p", KEY_PACKAGE,
+                "Package name", null);
+        define(MODE.STRING, true, ACTION_NEW_PROJECT, "a", KEY_ACTIVITY,
+                "Activity name", null);
+
+        define(MODE.STRING, false, ACTION_UPDATE_PROJECT, "i", KEY_IN,
+                "Directory location of the project", null);
+        define(MODE.STRING, true, ACTION_UPDATE_PROJECT, "t", KEY_TARGET_ID,
+                "Target id to set for the project", null);
+    }
+    
+    // -- some helpers for list action flags
+    
+    /** Helper to retrieve the --filter for the list action. */
+    public String getListFilter() {
+        return ((String) getValue(ACTION_LIST, KEY_FILTER));
+    }
+
+    // -- some helpers for vm action flags
+    
+    /** Helper to retrieve the --out location for the new vm action. */
+    public String getNewVmLocation() {
+        return ((String) getValue(ACTION_NEW_VM, KEY_OUT));
+    }
+    
+    /** Helper to retrieve the --target id for the new vm action. */
+    public int getNewVmTargetId() {
+        return ((Integer) getValue(ACTION_NEW_VM, KEY_TARGET_ID)).intValue();
+    }
+
+    /** Helper to retrieve the --name for the new vm action. */
+    public String getNewVmName() {
+        return ((String) getValue(ACTION_NEW_VM, KEY_NAME));
+    }
+
+    // -- some helpers for project action flags
+    
+    /** Helper to retrieve the --out location for the new project action. */
+    public String getNewProjectLocation() {
+        return ((String) getValue(ACTION_NEW_PROJECT, KEY_OUT));
+    }
+    
+    /** Helper to retrieve the --target id for the new project action. */
+    public int getNewProjectTargetId() {
+        return ((Integer) getValue(ACTION_NEW_PROJECT, KEY_TARGET_ID)).intValue();
+    }
+
+    /** Helper to retrieve the --name for the new project action. */
+    public String getNewProjectName() {
+        return ((String) getValue(ACTION_NEW_PROJECT, KEY_NAME));
+    }
+
+    /** Helper to retrieve the --package for the new project action. */
+    public String getNewProjectPackage() {
+        return ((String) getValue(ACTION_NEW_PROJECT, KEY_PACKAGE));
+    }
+
+    /** Helper to retrieve the --activity for the new project action. */
+    public String getNewProjectActivity() {
+        return ((String) getValue(ACTION_NEW_PROJECT, KEY_ACTIVITY));
+    }
+
+    // -- some helpers for update action flags
+    
+    /** Helper to retrieve the --out location for the update project action. */
+    public String getUpdateProjectLocation() {
+        return ((String) getValue(ACTION_UPDATE_PROJECT, KEY_OUT));
+    }
+    
+    /** Helper to retrieve the --target id for the update project action. */
+    public int getUpdateProjectTargetId() {
+        return ((Integer) getValue(ACTION_UPDATE_PROJECT, KEY_TARGET_ID)).intValue();
+    }
+}
diff --git a/tools/sdkmanager/app/tests/com/android/sdkmanager/CommandLineProcessorTest.java b/tools/sdkmanager/app/tests/com/android/sdkmanager/CommandLineProcessorTest.java
new file mode 100644 (file)
index 0000000..e74cdbd
--- /dev/null
@@ -0,0 +1,180 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.sdkmanager;
+
+import junit.framework.TestCase;
+
+
+public class CommandLineProcessorTest extends TestCase {
+
+    /**
+     * A mock version of the {@link CommandLineProcessor} class that does not
+     * exits and captures its stdout/stderr output.
+     */
+    public static class MockCommandLineProcessor extends CommandLineProcessor {
+        private boolean mExitCalled;
+        private boolean mHelpCalled;
+        private String mStdOut = "";
+        private String mStdErr = "";
+        
+        public MockCommandLineProcessor() {
+            super(new String[][] {
+                    { "action1", "Some action" },
+                    { "action2", "Another action" },
+            });
+            define(MODE.STRING, false /*mandatory*/,
+                    "action1", "1", "first", "non-mandatory flag", null);
+            define(MODE.STRING, true /*mandatory*/,
+                    "action1", "2", "second", "mandatory flag", null);
+        }
+        
+        @Override
+        public void printHelpAndExitForAction(String actionFilter,
+                String errorFormat, Object... args) {
+            mHelpCalled = true;
+            super.printHelpAndExitForAction(actionFilter, errorFormat, args);
+        }
+        
+        @Override
+        protected void exit() {
+            mExitCalled = true;
+        }
+        
+        @Override
+        protected void stdout(String format, Object... args) {
+            String s = String.format(format, args);
+            mStdOut += s + "\n";
+            // don't call super to avoid printing stuff
+        }
+        
+        @Override
+        protected void stderr(String format, Object... args) {
+            String s = String.format(format, args);
+            mStdErr += s + "\n";
+            // don't call super to avoid printing stuff
+        }
+        
+        public boolean wasHelpCalled() {
+            return mHelpCalled;
+        }
+        
+        public boolean wasExitCalled() {
+            return mExitCalled;
+        }
+        
+        public String getStdOut() {
+            return mStdOut;
+        }
+        
+        public String getStdErr() {
+            return mStdErr;
+        }
+    }
+    
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public final void testPrintHelpAndExit() {
+        MockCommandLineProcessor c = new MockCommandLineProcessor();        
+        assertFalse(c.wasExitCalled());
+        assertFalse(c.wasHelpCalled());
+        assertTrue(c.getStdOut().equals(""));
+        assertTrue(c.getStdErr().equals(""));
+        c.printHelpAndExit(null);
+        assertTrue(c.getStdOut().indexOf("-v") != -1);
+        assertTrue(c.getStdOut().indexOf("--verbose") != -1);
+        assertTrue(c.getStdErr().equals(""));
+        assertTrue(c.wasExitCalled());
+
+        c = new MockCommandLineProcessor();        
+        assertFalse(c.wasExitCalled());
+        assertTrue(c.getStdOut().equals(""));
+        assertTrue(c.getStdErr().indexOf("Missing parameter") == -1);
+
+        c.printHelpAndExit("Missing %s", "parameter");
+        assertTrue(c.wasExitCalled());
+        assertFalse(c.getStdOut().equals(""));
+        assertTrue(c.getStdErr().indexOf("Missing parameter") != -1);
+    }
+    
+    public final void testVerbose() {
+        MockCommandLineProcessor c = new MockCommandLineProcessor();        
+
+        assertFalse(c.isVerbose());
+        c.parseArgs(new String[] { "-v" });
+        assertTrue(c.isVerbose());
+        assertTrue(c.wasExitCalled());
+        assertTrue(c.wasHelpCalled());
+        assertTrue(c.getStdErr().indexOf("Missing action name.") != -1);
+
+        c = new MockCommandLineProcessor();        
+        c.parseArgs(new String[] { "--verbose" });
+        assertTrue(c.isVerbose());
+        assertTrue(c.wasExitCalled());
+        assertTrue(c.wasHelpCalled());
+        assertTrue(c.getStdErr().indexOf("Missing action name.") != -1);
+    }
+    
+    public final void testHelp() {
+        MockCommandLineProcessor c = new MockCommandLineProcessor();        
+
+        c.parseArgs(new String[] { "-h" });
+        assertTrue(c.wasExitCalled());
+        assertTrue(c.wasHelpCalled());
+        assertTrue(c.getStdErr().indexOf("Missing action name.") == -1);
+
+        c = new MockCommandLineProcessor();        
+        c.parseArgs(new String[] { "--help" });
+        assertTrue(c.wasExitCalled());
+        assertTrue(c.wasHelpCalled());
+        assertTrue(c.getStdErr().indexOf("Missing action name.") == -1);
+    }
+
+    public final void testMandatory() {
+        MockCommandLineProcessor c = new MockCommandLineProcessor();        
+
+        c.parseArgs(new String[] { "action1", "-1", "value1", "-2", "value2" });
+        assertFalse(c.wasExitCalled());
+        assertFalse(c.wasHelpCalled());
+        assertEquals("", c.getStdErr());
+        assertEquals("value1", c.getValue("action1", "first"));
+        assertEquals("value2", c.getValue("action1", "second"));
+
+        c = new MockCommandLineProcessor();        
+        c.parseArgs(new String[] { "action1", "-2", "value2" });
+        assertFalse(c.wasExitCalled());
+        assertFalse(c.wasHelpCalled());
+        assertEquals("", c.getStdErr());
+        assertEquals(null, c.getValue("action1", "first"));
+        assertEquals("value2", c.getValue("action1", "second"));
+
+        c = new MockCommandLineProcessor();        
+        c.parseArgs(new String[] { "action1" });
+        assertTrue(c.wasExitCalled());
+        assertTrue(c.wasHelpCalled());
+        assertTrue(c.getStdErr().indexOf("must be defined") != -1);
+        assertEquals(null, c.getValue("action1", "first"));
+        assertEquals(null, c.getValue("action1", "second"));
+    }
+}
diff --git a/tools/sdkmanager/app/tests/com/android/sdkmanager/SdkCommandLineTest.java b/tools/sdkmanager/app/tests/com/android/sdkmanager/SdkCommandLineTest.java
new file mode 100644 (file)
index 0000000..b943b98
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.sdkmanager;
+
+import junit.framework.TestCase;
+
+public class SdkCommandLineTest extends TestCase {
+
+    /**
+     * A mock version of the {@link SdkCommandLine} class that does not
+     * exits and discards its stdout/stderr output.
+     */
+    public static class MockSdkCommandLine extends SdkCommandLine {
+        private boolean mExitCalled;
+        private boolean mHelpCalled;
+        
+        public MockSdkCommandLine() {
+        }
+
+        @Override
+        public void printHelpAndExitForAction(String actionFilter,
+                String errorFormat, Object... args) {
+            mHelpCalled = true;
+            super.printHelpAndExitForAction(actionFilter, errorFormat, args);
+        }
+
+        @Override
+        protected void exit() {
+            mExitCalled = true;
+        }
+        
+        @Override
+        protected void stdout(String format, Object... args) {
+            // discard
+        }
+        
+        @Override
+        protected void stderr(String format, Object... args) {
+            // discard
+        }
+
+        public boolean wasExitCalled() {
+            return mExitCalled;
+        }
+        
+        public boolean wasHelpCalled() {
+            return mHelpCalled;
+        }
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    /** Test list with long name and verbose */
+    public final void testList_Long_Verbose() {
+        MockSdkCommandLine c = new MockSdkCommandLine();
+        assertEquals("all", c.getListFilter());
+        c.parseArgs(new String[] { "-v", "list", "--filter", "vm" });
+        assertFalse(c.wasHelpCalled());
+        assertFalse(c.wasExitCalled());
+        assertEquals("vm", c.getListFilter());
+        assertTrue(c.isVerbose());
+    }
+
+    /** Test list with short name and no verbose */
+    public final void testList_Short() {
+        MockSdkCommandLine c = new MockSdkCommandLine();
+        assertEquals("all", c.getListFilter());
+        c.parseArgs(new String[] { "list", "-f", "vm" });
+        assertFalse(c.wasHelpCalled());
+        assertFalse(c.wasExitCalled());
+        assertEquals("vm", c.getListFilter());
+    }
+    
+    /** Test list with long name and missing parameter */
+    public final void testList_Long_MissingParam() {
+        MockSdkCommandLine c = new MockSdkCommandLine();
+        assertEquals("all", c.getListFilter());
+        c.parseArgs(new String[] { "list", "--filter" });
+        assertTrue(c.wasHelpCalled());
+        assertTrue(c.wasExitCalled());
+        assertEquals("all", c.getListFilter());
+    }
+}
index 5759613..2a2efe7 100644 (file)
@@ -95,6 +95,10 @@ final class AddOnTarget implements IAndroidTarget {
         }
     }
     
+    public String getLocation() {
+        return mLocation;
+    }
+    
     public String getName() {
         return mName;
     }
@@ -103,6 +107,10 @@ final class AddOnTarget implements IAndroidTarget {
         return mVendor;
     }
     
+    public String getFullName() {
+        return String.format("%1$s (%2$s)", mName, mVendor);
+    }
+    
     public String getDescription() {
         return mDescription;
     }
@@ -140,6 +148,28 @@ final class AddOnTarget implements IAndroidTarget {
         return mLibraries;
     }
     
+    public boolean isCompatibleBaseFor(IAndroidTarget target) {
+        // basic test
+        if (target == this) {
+            return true;
+        }
+
+        // if the receiver has no optional library, then anything with api version number >= to
+        // the receiver is compatible.
+        if (mLibraries.length == 0) {
+            return target.getApiVersionNumber() >= getApiVersionNumber();
+        }
+
+        // Otherwise, target is only compatible if the vendor and name are equals with the api
+        // number greater or equal (ie target is a newer version of this add-on).
+        if (target.isPlatform() == false) {
+            return (mVendor.equals(target.getVendor()) && mName.equals(target.getName()) &&
+                    target.getApiVersionNumber() >= getApiVersionNumber());
+        }
+
+        return false;
+    }
+    
     public String hashString() {
         return String.format(ADD_ON_FORMAT, mVendor, mName, mBasePlatform.getApiVersionNumber());
     }
index e5d45b2..0e2b109 100644 (file)
@@ -22,23 +22,41 @@ package com.android.sdklib;
  */
 public interface IAndroidTarget extends Comparable<IAndroidTarget> {
     
+    /** OS Path to the "android.jar" file. */
     public static int ANDROID_JAR         = 1;
+    /** OS Path to the "framework.aidl" file. */
     public static int ANDROID_AIDL        = 2;
+    /** OS Path to "images" folder which contains the emulator system images. */
     public static int IMAGES              = 3;
+    /** OS Path to the "samples" folder which contains sample projects. */
     public static int SAMPLES             = 4;
+    /** OS Path to the "skins" folder which contains the emulator skins. */ 
     public static int SKINS               = 5;
+    /** OS Path to the "templates" folder which contains the templates for new projects. */
     public static int TEMPLATES           = 6;
+    /** OS Path to the "data" folder which contains data & libraries for the SDK tools. */
     public static int DATA                = 7;
+    /** OS Path to the "attrs.xml" file. */
     public static int ATTRIBUTES          = 8;
+    /** OS Path to the "attrs_manifest.xml" file. */
     public static int MANIFEST_ATTRIBUTES = 9;
+    /** OS Path to the "data/layoutlib.jar" library. */
     public static int LAYOUT_LIB          = 10;
+    /** OS Path to the "data/res" folder. */
     public static int RESOURCES           = 11;
+    /** OS Path to the "data/fonts" folder. */
     public static int FONTS               = 12;
+    /** OS Path to the "data/widgets.txt" file. */
     public static int WIDGETS             = 13;
+    /** OS Path to the "data/activity_actions.txt" file. */
     public static int ACTIONS_ACTIVITY    = 14;
+    /** OS Path to the "data/broadcast_actions.txt" file. */
     public static int ACTIONS_BROADCAST   = 15;
+    /** OS Path to the "data/service_actions.txt" file. */
     public static int ACTIONS_SERVICE     = 16;
+    /** OS Path to the "data/categories.txt" file. */
     public static int CATEGORIES          = 17;
+    /** OS Path to the "sources" folder. */
     public static int SOURCES             = 18;
     
     public interface IOptionalLibrary {
@@ -48,6 +66,11 @@ public interface IAndroidTarget extends Comparable<IAndroidTarget> {
     }
 
     /**
+     * Returns the target location.
+     */
+    String getLocation();
+
+    /**
      * Returns the name of the vendor of the target.
      */
     String getVendor();
@@ -58,6 +81,12 @@ public interface IAndroidTarget extends Comparable<IAndroidTarget> {
     String getName();
     
     /**
+     * Returns the full name of the target, possibly including vendor name.
+     * @return
+     */
+    String getFullName();
+    
+    /**
      * Returns the description of the target.
      */
     String getDescription();
@@ -80,7 +109,7 @@ public interface IAndroidTarget extends Comparable<IAndroidTarget> {
     /**
      * Returns the path of a platform component.
      * @param pathId the id representing the path to return. Any of the constants defined in the
-     * {@link ITargetDataProvider} interface can be used.
+     * {@link IAndroidTarget} interface can be used.
      */
     String getPath(int pathId);
     
@@ -96,6 +125,15 @@ public interface IAndroidTarget extends Comparable<IAndroidTarget> {
     IOptionalLibrary[] getOptionalLibraries();
     
     /**
+     * Returns whether the given target is compatible with the receiver.
+     * <p/>A target is considered compatible if applications developed for the receiver can run on
+     * the given target.
+     *
+     * @param target the IAndroidTarget to test.
+     */
+    boolean isCompatibleBaseFor(IAndroidTarget target);
+    
+    /**
      * Returns a string able to uniquely identify a target.
      * Typically the target will encode information such as api level, whether it's a platform
      * or add-on, and if it's an add-on vendor and add-on name.
index 3eda37f..8cbe44a 100644 (file)
@@ -21,5 +21,6 @@ package com.android.sdklib;
  */
 public interface ISdkLog {
     void warning(String warningFormat, Object... args);
-    void error(String errorFormat, Object... args);
+    void error(Throwable t, String errorFormat, Object... args);
+    void printf(String msgFormat, Object... args);
 }
index f5a1f6d..59fa81c 100644 (file)
@@ -95,6 +95,10 @@ final class PlatformTarget implements IAndroidTarget {
     public String getName() {
         return mName;
     }
+    
+    public String getFullName() {
+        return mName;
+    }
 
     /*
      * (non-Javadoc)
@@ -136,7 +140,17 @@ final class PlatformTarget implements IAndroidTarget {
     public IOptionalLibrary[] getOptionalLibraries() {
         return null;
     }
+    
+    public boolean isCompatibleBaseFor(IAndroidTarget target) {
+        // basic test
+        if (target == this) {
+            return true;
+        }
 
+        // target is compatible wit the receiver as long as its api version number is greater or
+        // equal.
+        return target.getApiVersionNumber() >= mApiVersionNumber;
+    }
     
     public String hashString() {
         return String.format(PLATFORM_HASH, mApiVersionNumber);
index 78d1fda..ede0d86 100644 (file)
@@ -64,6 +64,40 @@ public final class SdkConstants {
     /** Skin layout file */
     public final static String FN_SKIN_LAYOUT = "layout";//$NON-NLS-1$
 
+    /* Folder Names for Android Projects . */
+
+    /** Resources folder name, i.e. "res". */
+    public final static String FD_RESOURCES = "res"; //$NON-NLS-1$
+    /** Assets folder name, i.e. "assets" */
+    public final static String FD_ASSETS = "assets"; //$NON-NLS-1$
+    /** Default source folder name, i.e. "src" */
+    public final static String FD_SOURCES = "src"; //$NON-NLS-1$
+    /** Default native library folder name inside the project, i.e. "libs"
+     * While the folder inside the .apk is "lib", we call that one libs because
+     * that's what we use in ant for both .jar and .so and we need to make the 2 development ways
+     * compatible. */
+    public final static String FD_NATIVE_LIBS = "libs"; //$NON-NLS-1$
+    /** Native lib folder inside the APK: "lib" */
+    public final static String FD_APK_NATIVE_LIBS = "lib"; //$NON-NLS-1$
+    /** Default output folder name, i.e. "bin" */
+    public final static String FD_OUTPUT = "bin"; //$NON-NLS-1$
+    /** Default anim resource folder name, i.e. "anim" */
+    public final static String FD_ANIM = "anim"; //$NON-NLS-1$
+    /** Default color resource folder name, i.e. "color" */
+    public final static String FD_COLOR = "color"; //$NON-NLS-1$
+    /** Default drawable resource folder name, i.e. "drawable" */
+    public final static String FD_DRAWABLE = "drawable"; //$NON-NLS-1$
+    /** Default layout resource folder name, i.e. "layout" */
+    public final static String FD_LAYOUT = "layout"; //$NON-NLS-1$
+    /** Default menu resource folder name, i.e. "menu" */
+    public final static String FD_MENU = "menu"; //$NON-NLS-1$
+    /** Default values resource folder name, i.e. "values" */
+    public final static String FD_VALUES = "values"; //$NON-NLS-1$
+    /** Default xml resource folder name, i.e. "xml" */
+    public final static String FD_XML = "xml"; //$NON-NLS-1$
+    /** Default raw resource folder name, i.e. "raw" */
+    public final static String FD_RAW = "raw"; //$NON-NLS-1$
+
     /* Folder Names for the Android SDK */
     
     /** Name of the SDK platforms folder. */
@@ -90,13 +124,12 @@ public final class SdkConstants {
     public final static String FD_RES = "res";
     /** Name of the SDK font folder, i.e. "fonts" */
     public final static String FD_FONTS = "fonts";
-    /** Default values resource folder name, i.e. "values" */
-    public final static String FD_VALUES = "values";
     /** Name of the android sources directory */
     public static final String FD_ANDROID_SOURCES = "sources";
     /** Name of the addon libs folder. */
     public final static String FD_ADDON_LIBS = "libs";
 
+    
     /* Folder path relative to the SDK root */
     /** Path of the documentation directory relative to the sdk folder.
      *  This is an OS path, ending with a separator. */
index 67b8499..b4de51a 100644 (file)
@@ -36,8 +36,8 @@ import java.util.regex.Pattern;
  */
 public final class SdkManager {
     
-    private final static String PROP_VERSION_SDK = "ro.build.version.sdk";
-    private final static String PROP_VERSION_RELEASE = "ro.build.version.release";
+    public final static String PROP_VERSION_SDK = "ro.build.version.sdk";
+    public final static String PROP_VERSION_RELEASE = "ro.build.version.release";
     
     private final static String ADDON_NAME = "name";
     private final static String ADDON_VENDOR = "vendor";
@@ -73,7 +73,7 @@ public final class SdkManager {
             return manager;
         } catch (IllegalArgumentException e) {
             if (log != null) {
-                log.error(e.getMessage());
+                log.error(e, "Error parsing the sdk.");
             }
         }
         
@@ -188,13 +188,14 @@ public final class SdkManager {
                     // looks like apiNumber does not parse to a number.
                     // Ignore this platform.
                     if (log != null) {
-                        log.error("Ignoring platform '%1$s': %2$s is not a valid number in %3$s.",
+                        log.error(null,
+                                "Ignoring platform '%1$s': %2$s is not a valid number in %3$s.",
                                 platform.getName(), PROP_VERSION_SDK, SdkConstants.FN_BUILD_PROP);
                     }
                 }
             }
         } else if (log != null) {
-            log.error("Ignoring platform '%1$s': %2$s is missing.", platform.getName(),
+            log.error(null, "Ignoring platform '%1$s': %2$s is missing.", platform.getName(),
                     SdkConstants.FN_BUILD_PROP);
         }
         
@@ -281,7 +282,7 @@ public final class SdkManager {
                         
                         if (baseTarget == null) {
                             if (log != null) {
-                                log.error(
+                                log.error(null,
                                         "Ignoring add-on '%1$s': Unable to find base platform with API level %2$d",
                                         addon.getName(), apiValue);
                             }
@@ -292,7 +293,7 @@ public final class SdkManager {
                         // looks like apiNumber does not parse to a number.
                         // Ignore this add-on.
                         if (log != null) {
-                            log.error(
+                            log.error(null,
                                     "Ignoring add-on '%1$s': %2$s is not a valid number in %3$s.",
                                     addon.getName(), ADDON_API, SdkConstants.FN_BUILD_PROP);
                         }
@@ -331,7 +332,7 @@ public final class SdkManager {
                 return target;
             }
         } else if (log != null) {
-            log.error("Ignoring add-on '%1$s': %2$s is missing.", addon.getName(),
+            log.error(null, "Ignoring add-on '%1$s': %2$s is missing.", addon.getName(),
                     SdkConstants.FN_MANIFEST_INI);
         }
         
@@ -340,7 +341,7 @@ public final class SdkManager {
     
     private void displayAddonManifestError(ISdkLog log, String addonName, String valueName) {
         if (log != null) {
-            log.error("Ignoring add-on '%1$s': '%2$s' is missing from %3$s.",
+            log.error(null, "Ignoring add-on '%1$s': '%2$s' is missing from %3$s.",
                     addonName, valueName, SdkConstants.FN_MANIFEST_INI);
         }
     }
diff --git a/tools/sdkmanager/libs/sdklib/src/com/android/sdklib/project/ProjectCreator.java b/tools/sdkmanager/libs/sdklib/src/com/android/sdklib/project/ProjectCreator.java
new file mode 100644 (file)
index 0000000..1184fc2
--- /dev/null
@@ -0,0 +1,346 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.sdklib.project;
+
+import com.android.sdklib.IAndroidTarget;
+import com.android.sdklib.ISdkLog;
+import com.android.sdklib.SdkConstants;
+import com.android.sdklib.project.ProjectProperties.PropertyType;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Creates the basic files needed to get an Android project up and running. Also
+ * allows creation of IntelliJ project files.
+ *
+ * @hide
+ */
+public class ProjectCreator {
+    
+    private final static String PH_JAVA_FOLDER = "PACKAGE_PATH";
+    private final static String PH_PACKAGE = "PACKAGE";
+    private final static String PH_ACTIVITY_NAME = "ACTIVITY_NAME";
+    
+    private final static String FOLDER_TESTS = "tests";
+    
+    public enum OutputLevel {
+        SILENT, NORMAL, VERBOSE;
+    }
+
+    private static class ProjectCreateException extends Exception {
+        /** default UID. This will not be serialized anyway. */
+        private static final long serialVersionUID = 1L;
+        
+        ProjectCreateException(String message) {
+            super(message);
+        }
+        
+        ProjectCreateException(Throwable t, String format, Object... args) {
+            super(format != null ? String.format(format, args) : format, t);
+        }
+
+        ProjectCreateException(String format, Object... args) {
+            super(String.format(format, args));
+        }
+    }
+    
+    private final OutputLevel mLevel;
+
+    private final ISdkLog mLog;
+    private final String mSdkFolder;
+    
+    public ProjectCreator(String sdkFolder, OutputLevel level, ISdkLog log) {
+        mSdkFolder = sdkFolder;
+        mLevel = level;
+        mLog = log;
+    }
+    
+    /**
+     * Creates a new project.
+     * @param folderPath the folder of the project to create. This folder must exist.
+     * @param projectName the name of the project.
+     * @param packageName the package of the project.
+     * @param activityName the activity of the project as it will appear in the manifest.
+     * @param target the project target.
+     * @param isTestProject whether the project to create is a test project.
+     */
+    public void createProject(String folderPath, String projectName,
+            String packageName, String activityName, IAndroidTarget target,
+            boolean isTestProject) {
+        
+        // check project folder exists.
+        File projectFolder = new File(folderPath);
+        if (projectFolder.isDirectory() == false) {
+            mLog.error(null, "Folder '%s' does not exist. Aborting...", folderPath);
+            return;
+        }
+        
+        try {
+            // first create the project properties.
+
+            // location of the SDK goes in localProperty
+            ProjectProperties localProperties = ProjectProperties.create(folderPath,
+                    PropertyType.LOCAL);
+            localProperties.setProperty(ProjectProperties.PROPERTY_SDK, mSdkFolder);
+            localProperties.save();
+
+            // target goes in default properties
+            ProjectProperties defaultProperties = ProjectProperties.create(folderPath,
+                    PropertyType.DEFAULT);
+            defaultProperties.setAndroidTarget(target);
+            defaultProperties.save();
+
+            // create the map for place-holders of values to replace in the templates
+            final HashMap<String, String> keywords = new HashMap<String, String>();
+
+            // create the required folders.
+            // compute src folder path
+            final String packagePath =
+                stripString(packageName.replace(".", File.separator),
+                        File.separatorChar);
+
+            // put this path in the place-holder map for project files that needs to list
+            // files manually.
+            keywords.put(PH_JAVA_FOLDER, packagePath);
+
+            keywords.put(PH_PACKAGE, packageName);
+            if (activityName != null) {
+                keywords.put(PH_ACTIVITY_NAME, activityName);
+            }
+
+            // create the source folder and the java package folders.
+            final String srcFolderPath = SdkConstants.FD_SOURCES + File.separator + packagePath;
+            File sourceFolder = createDirs(projectFolder, srcFolderPath);
+            String javaTemplate = "java_file.template";
+            String activityFileName = activityName + ".java";
+            if (isTestProject) {
+                javaTemplate = "java_tests_file.template";
+                activityFileName = activityName + "Test.java";
+            }
+            installTemplate(javaTemplate, new File(sourceFolder, activityFileName),
+                    keywords, target);
+
+            // create other useful folders
+            File resourceFodler = createDirs(projectFolder, SdkConstants.FD_RESOURCES);
+            createDirs(projectFolder, SdkConstants.FD_OUTPUT);
+            createDirs(projectFolder, SdkConstants.FD_NATIVE_LIBS);
+
+            if (isTestProject == false) {
+                /* Make res files only for non test projects */
+                File valueFolder = createDirs(resourceFodler, SdkConstants.FD_VALUES);
+                installTemplate("strings.template", new File(valueFolder, "strings.xml"),
+                        keywords, target);
+
+                File layoutFolder = createDirs(resourceFodler, SdkConstants.FD_LAYOUT);
+                installTemplate("layout.template", new File(layoutFolder, "main.xml"),
+                        keywords, target);
+            }
+
+            /* Make AndroidManifest.xml and build.xml files */
+            String manifestTemplate = "AndroidManifest.template";
+            if (isTestProject) {
+                manifestTemplate = "AndroidManifest.tests.template"; 
+            }
+
+            installTemplate(manifestTemplate, new File(projectFolder, "AndroidManifest.xml"),
+                    keywords, target);
+            
+            installTemplate("build.template", new File(projectFolder, "build.xml"), keywords);
+
+            // if this is not a test project, then we create one.
+            if (isTestProject == false) {
+                // create the test project folder.
+                createDirs(projectFolder, FOLDER_TESTS);
+                File testProjectFolder = new File(folderPath, FOLDER_TESTS);
+                
+                createProject(testProjectFolder.getAbsolutePath(), projectName, packageName,
+                        activityName, target, true /*isTestProject*/);
+            }
+        } catch (ProjectCreateException e) {
+            mLog.error(e, null);
+        } catch (IOException e) {
+            mLog.error(e, null);
+        }
+    }
+    
+    /**
+     * Installs a new file that is based on a template file provided by a given target.
+     * Each match of each key from the place-holder map in the template will be replaced with its
+     * corresponding value in the created file.
+     * 
+     * @param templateName the name of to the template file
+     * @param dest the path to the destination file, relative to the project
+     * @param placeholderMap a map of (place-holder, value) to create the file from the template.
+     * @param target the Target of the project that will be providing the template.
+     * @throws ProjectCreateException 
+     */
+    private void installTemplate(String templateName, File destFile,
+            Map<String, String> placeholderMap, IAndroidTarget target)
+            throws ProjectCreateException {
+        // query the target for its template directory
+        String templateFolder = target.getPath(IAndroidTarget.TEMPLATES);
+        final String sourcePath = templateFolder + File.separator + templateName;
+
+        installFullPathTemplate(sourcePath, destFile, placeholderMap);
+    }
+
+    /**
+     * Installs a new file that is based on a template file provided by the tools folder.
+     * Each match of each key from the place-holder map in the template will be replaced with its
+     * corresponding value in the created file.
+     * 
+     * @param templateName the name of to the template file
+     * @param dest the path to the destination file, relative to the project
+     * @param placeholderMap a map of (place-holder, value) to create the file from the template.
+     * @throws ProjectCreateException 
+     */
+    private void installTemplate(String templateName, File destFile,
+            Map<String, String> placeholderMap)
+            throws ProjectCreateException {
+        // query the target for its template directory
+        String templateFolder = mSdkFolder + File.separator + SdkConstants.OS_SDK_TOOLS_LIB_FOLDER;
+        final String sourcePath = templateFolder + File.separator + templateName;
+
+        installFullPathTemplate(sourcePath, destFile, placeholderMap);
+    }
+
+    /**
+     * Installs a new file that is based on a template.
+     * Each match of each key from the place-holder map in the template will be replaced with its
+     * corresponding value in the created file.
+     * 
+     * @param sourcePath the full path to the source template file
+     * @param destFile the destination file
+     * @param placeholderMap a map of (place-holder, value) to create the file from the template.
+     * @throws ProjectCreateException 
+     */
+    private void installFullPathTemplate(String sourcePath, File destFile,
+            Map<String, String> placeholderMap) throws ProjectCreateException {
+        try {
+            BufferedWriter out = new BufferedWriter(new FileWriter(destFile));
+            BufferedReader in = new BufferedReader(new FileReader(sourcePath));
+            String line;
+            
+            while ((line = in.readLine()) != null) {
+                for (String key : placeholderMap.keySet()) {
+                    line = line.replace(key, placeholderMap.get(key));
+                }
+                
+                out.write(line);
+                out.newLine();
+            }
+            
+            out.close();
+            in.close();
+        } catch (Exception e) {
+            throw new ProjectCreateException(e, "Could not access %1$s: %2$s",
+                    destFile, e.getMessage());
+        }
+        
+        println("Added file %1$s", destFile);
+    }
+
+    
+    /**
+     * Prints a message unless silence is enabled.
+     * @param format Format for String.format
+     * @param args Arguments for String.format
+     */
+    private void println(String format, Object... args) {
+        if (mLevel == OutputLevel.VERBOSE) {
+            System.out.println(String.format(format, args));
+        }
+    }
+
+    /**
+     * Creates a new folder, along with any parent folders that do not exists.
+     * 
+     * @param parent the parent folder
+     * @param name the name of the directory to create.
+     * @throws ProjectCreateException 
+     */
+    private File createDirs(File parent, String name) throws ProjectCreateException {
+        final File newFolder = new File(parent, name);
+        boolean existedBefore = true;
+
+        if (!newFolder.exists()) {
+            if (!newFolder.mkdirs()) {
+                throw new ProjectCreateException("Could not create directory: %1$s", newFolder);
+            }
+            existedBefore = false;
+        }
+
+        if (newFolder.isDirectory()) {
+            if (!newFolder.canWrite()) {
+                throw new ProjectCreateException("Path is not writable: %1$s", newFolder);
+            }
+        } else {
+            throw new ProjectCreateException("Path is not a directory: %1$s", newFolder);
+        }
+
+        if (!existedBefore) {
+            try {
+                println("Created directory %1$s", newFolder.getCanonicalPath());
+            } catch (IOException e) {
+                throw new ProjectCreateException(
+                        "Could not determine canonical path of created directory", e);
+            }
+        }
+        
+        return newFolder;
+    }
+
+    /**
+     * Strips the string of beginning and trailing characters (multiple
+     * characters will be stripped, example stripString("..test...", '.')
+     * results in "test";
+     * 
+     * @param s the string to strip
+     * @param strip the character to strip from beginning and end
+     * @return the stripped string or the empty string if everything is stripped.
+     */
+    private static String stripString(String s, char strip) {
+        final int sLen = s.length();
+        int newStart = 0, newEnd = sLen - 1;
+        
+        while (newStart < sLen && s.charAt(newStart) == strip) {
+          newStart++;
+        }
+        while (newEnd >= 0 && s.charAt(newEnd) == strip) {
+          newEnd--;
+        }
+        
+        /*
+         * newEnd contains a char we want, and substring takes end as being
+         * exclusive
+         */
+        newEnd++;
+        
+        if (newStart >= sLen || newEnd < 0) {
+            return "";
+        }
+        
+        return s.substring(newStart, newEnd);
+    }
+}
index c0c1fe3..473f284 100644 (file)
@@ -16,6 +16,7 @@
 
 package com.android.sdklib.project;
 
+import com.android.sdklib.IAndroidTarget;
 import com.android.sdklib.SdkManager;
 
 import java.io.File;
@@ -32,38 +33,87 @@ import java.util.Map.Entry;
 public final class ProjectProperties {
     /** The property name for the project target */
     public final static String PROPERTY_TARGET = "target";
-    public final static String PROPERTY_SDK = "sdk-folder";
+    public final static String PROPERTY_SDK = "sdk-location";
     
-    private final static String PROPERTIES_FILE = "default.properties";
+    public static enum PropertyType {
+        BUILD("build.properties", BUILD_HEADER),
+        DEFAULT("default.properties", DEFAULT_HEADER),
+        LOCAL("local.properties", LOCAL_HEADER);
+        
+        private final String mFilename;
+        private final String mHeader;
+
+        PropertyType(String filename, String header) {
+            mFilename = filename;
+            mHeader = header;
+        }
+    }
     
-    private final static String PROP_HEADER = 
+    private final static String LOCAL_HEADER =
+//           1-------10--------20--------30--------40--------50--------60--------70--------80        
             "# This file is automatically generated by Android Tools.\n" +
             "# Do not modify this file -- YOUR CHANGES WILL BE ERASED!\n" +
-            "# For customized properties when using Ant, set new values\n" +
-            "# in a \"build.properties\" file.\n\n";
+            "# \n" +
+            "# This file must *NOT* be checked in Version Control Systems,\n" +
+            "# as it contains information specific to your local configuration.\n" +
+            "\n";
+
+    private final static String DEFAULT_HEADER =
+//          1-------10--------20--------30--------40--------50--------60--------70--------80        
+           "# This file is automatically generated by Android Tools.\n" +
+           "# Do not modify this file -- YOUR CHANGES WILL BE ERASED!\n" +
+           "# \n" +
+           "# This file must be checked in Version Control Systems.\n" +
+           "# \n" +
+           "# To customize properties used by the Ant build system use,\n" +
+           "# \"build.properties\", and override values to adapt the script to your" +
+           "# project structure.\n" +
+           "\n";
+
+    private final static String BUILD_HEADER =
+//          1-------10--------20--------30--------40--------50--------60--------70--------80        
+           "# This file is used to override default values used by the Ant build system.\n" +
+           "# \n" +
+           "# This file must be checked in Version Control Systems, as it is" +
+           "# integral to the build system of your project.\n" +
+           "# \n" +
+           "# Use this file to change values like:\n" +
+           "# application-package\n:" +
+           "#     the name of your application package as defined in the manifest.\n" +
+           "#     Used by the 'uninstall' rule.\n"+
+           "# source-folder\n:" +
+           "#     the name of the source folder. Default is 'src'.\n" +
+           "# out-folder\n:" +
+           "#     the name of the output folder. Default is 'bin'\n" +
+           "\n";
 
     private final static Map<String, String> COMMENT_MAP = new HashMap<String, String>();
     static {
-        COMMENT_MAP.put(PROPERTY_TARGET, "# Project target.\n");
-        COMMENT_MAP.put(PROPERTY_SDK, "# location of the SDK. Only used by Ant.\n");
+//               1-------10--------20--------30--------40--------50--------60--------70--------80        
+        COMMENT_MAP.put(PROPERTY_TARGET,
+                "# Project target.\n");
+        COMMENT_MAP.put(PROPERTY_SDK, "# location of the SDK. This is only used by Ant\n" +
+                "# For customization when using a Version Control System, please read the\n" +
+                "# header note.\n");
     }
     
     private final String mProjectFolderOsPath;
     private final Map<String, String> mProperties;
+    private final PropertyType mType;
 
     /**
      * Loads a project properties file and return a {@link ProjectProperties} object
      * containing the properties
      * @param projectFolderOsPath the project folder.
      */
-    public static ProjectProperties load(String projectFolderOsPath) {
+    public static ProjectProperties load(String projectFolderOsPath, PropertyType type) {
         File projectFolder = new File(projectFolderOsPath);
         if (projectFolder.isDirectory()) {
-            File defaultFile = new File(projectFolder, PROPERTIES_FILE);
+            File defaultFile = new File(projectFolder, type.mFilename);
             if (defaultFile.isFile()) {
                 Map<String, String> map = SdkManager.parsePropertyFile(defaultFile, null /* log */);
                 if (map != null) {
-                    return new ProjectProperties(projectFolderOsPath, map);
+                    return new ProjectProperties(projectFolderOsPath, map, type);
                 }
             }
         }
@@ -71,13 +121,14 @@ public final class ProjectProperties {
     }
     
     /**
-     * Creates a new project properties file, with no properties.
+     * Creates a new project properties object, with no properties.
      * <p/>The file is not created until {@link #save()} is called.
      * @param projectFolderOsPath the project folder.
+     * @param type
      */
-    public static ProjectProperties create(String projectFolderOsPath) {
+    public static ProjectProperties create(String projectFolderOsPath, PropertyType type) {
         // create and return a ProjectProperties with an empty map.
-        return new ProjectProperties(projectFolderOsPath, new HashMap<String, String>());
+        return new ProjectProperties(projectFolderOsPath, new HashMap<String, String>(), type);
     }
     
     /**
@@ -90,6 +141,15 @@ public final class ProjectProperties {
     }
     
     /**
+     * Sets the target property to the given {@link IAndroidTarget} object.
+     * @param target the Android target.
+     */
+    public void setAndroidTarget(IAndroidTarget target) {
+        assert mType == PropertyType.DEFAULT;
+        mProperties.put(PROPERTY_TARGET, target.hashString());
+    }
+    
+    /**
      * Returns the value of a property.
      * @param name the name of the property.
      * @return the property value or null if the property is not set.
@@ -103,12 +163,12 @@ public final class ProjectProperties {
      * @throws IOException
      */
     public void save() throws IOException {
-        File toSave = new File(mProjectFolderOsPath, PROPERTIES_FILE);
+        File toSave = new File(mProjectFolderOsPath, mType.mFilename);
         
         FileWriter writer = new FileWriter(toSave);
         
         // write the header
-        writer.write(PROP_HEADER);
+        writer.write(mType.mHeader);
         
         // write the properties.
         for (Entry<String, String> entry : mProperties.entrySet()) {
@@ -128,9 +188,12 @@ public final class ProjectProperties {
      * Use {@link #load(String)} or {@link #create(String)} to instantiate.
      * @param projectFolderOsPath
      * @param map
+     * @param type 
      */
-    private ProjectProperties(String projectFolderOsPath, Map<String, String> map) {
+    private ProjectProperties(String projectFolderOsPath, Map<String, String> map,
+            PropertyType type) {
         mProjectFolderOsPath = projectFolderOsPath;
         mProperties = map;
+        mType = type;
     }
 }
index a9f1b17..a28561d 100644 (file)
@@ -76,9 +76,27 @@ public final class VmManager {
         buildVmList(sdk);
     }
     
+    /**
+     * Returns the existing VMs.
+     * @return a newly allocated arrays containing all the VMs.
+     */
     public VmInfo[] getVms() {
         return mVmList.toArray(new VmInfo[mVmList.size()]);
     }
+    
+    /**
+     * Returns the {@link VmInfo} matching the given <var>name</var>.
+     * @return the matching VmInfo or <code>null</code> if none were found.
+     */
+    public VmInfo getVm(String name) {
+        for (VmInfo info : mVmList) {
+            if (info.name.equals(name)) {
+                return info;
+            }
+        }
+        
+        return null;
+    }
 
     /**
      * Creates a new VM.
@@ -101,7 +119,7 @@ public final class VmManager {
             File rootDirectory = new File(parentFolder);
             if (rootDirectory.isDirectory() == false) {
                 if (log != null) {
-                    log.error("%s does not exists.", parentFolder);
+                    log.error(null, "%s does not exists.", parentFolder);
                 }
                 return;
             }
@@ -109,7 +127,7 @@ public final class VmManager {
             File vmFolder = new File(parentFolder, name + ".avm");
             if (vmFolder.exists()) {
                 if (log != null) {
-                    log.error("%s already exists.", vmFolder.getAbsolutePath());
+                    log.error(null, "%s already exists.", vmFolder.getAbsolutePath());
                 }
                 return;
             }
diff --git a/tools/sdkmanager/libs/sdkuilib/.classpath b/tools/sdkmanager/libs/sdkuilib/.classpath
new file mode 100644 (file)
index 0000000..eb5af7e
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/ANDROID_SWT"/>
+       <classpathentry combineaccessrules="false" kind="src" path="/SdkLib"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tools/sdkmanager/libs/sdkuilib/.project b/tools/sdkmanager/libs/sdkuilib/.project
new file mode 100644 (file)
index 0000000..da430c8
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>SdkUiLib</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
index ddc492e..fc951f2 100644 (file)
@@ -40,6 +40,11 @@ import java.util.ArrayList;
 
 /**
  * The SDK target selector is a table that is added to the given parent composite.
+ * <p/>
+ * To use, create it using {@link #SdkTargetSelector(Composite, IAndroidTarget[], boolean)} then
+ * call {@link #setSelection(IAndroidTarget)}, {@link #setSelectionListener(SelectionListener)}
+ * and finally use {@link #getFirstSelected()} or {@link #getAllSelected()} to retrieve the
+ * selection.
  */
 public class SdkTargetSelector {
     
@@ -49,6 +54,14 @@ public class SdkTargetSelector {
     private Table mTable;
     private Label mDescription;
 
+    /**
+     * Creates a new SDK Target Selector.
+     * 
+     * @param parent The parent composite where the selector will be added.
+     * @param targets The list of targets. This is <em>not</em> copied, the caller must not modify.
+     * @param allowMultipleSelection True if more than one SDK target can be selected at the same
+     *        time.
+     */
     public SdkTargetSelector(Composite parent, IAndroidTarget[] targets,
             boolean allowMultipleSelection) {
         mTargets = targets;
@@ -81,14 +94,25 @@ public class SdkTargetSelector {
         column1.setText("Vendor");
         final TableColumn column2 = new TableColumn(mTable, SWT.NONE);
         column2.setText("API Level");
+        final TableColumn column3 = new TableColumn(mTable, SWT.NONE);
+        column3.setText("SDK");
 
-        adjustColumnsWidth(mTable, column0, column1, column2);
+        adjustColumnsWidth(mTable, column0, column1, column2, column3);
         setupSelectionListener(mTable);
         fillTable(mTable);
         setupTooltip(mTable);
     }
 
     /**
+     * Returns the list of known targets.
+     * <p/>
+     * This is not a copy. Callers must <em>not</em> modify this array.
+     */
+    public IAndroidTarget[] getTargets() {
+        return mTargets;
+    }
+
+    /**
      * Sets a selection listener. Set it to null to remove it.
      * The listener will be called <em>after</em> this table processed its selection
      * events so that the caller can see the updated state.
@@ -107,20 +131,33 @@ public class SdkTargetSelector {
     
     /**
      * Sets the current target selection.
+     * <p/>
+     * If the selection is actually changed, this will invoke the selection listener
+     * (if any) with a null event.
+     * 
      * @param target the target to be selection
      * @return true if the target could be selected, false otherwise.
      */
     public boolean setSelection(IAndroidTarget target) {
         boolean found = false;
+        boolean modified = false;
         for (TableItem i : mTable.getItems()) {
             if ((IAndroidTarget) i.getData() == target) {
                 found = true;
-                i.setChecked(true);
-            } else {
+                if (!i.getChecked()) {
+                    modified = true;
+                    i.setChecked(true);
+                }
+            } else if (i.getChecked()) {
+                modified = true;
                 i.setChecked(false);
             }
         }
         
+        if (modified && mSelectionListener != null) {
+            mSelectionListener.widgetSelected(null);
+        }
+        
         return found;
     }
 
@@ -166,15 +203,17 @@ public class SdkTargetSelector {
     private void adjustColumnsWidth(final Table table,
             final TableColumn column0,
             final TableColumn column1,
-            final TableColumn column2) {
+            final TableColumn column2,
+            final TableColumn column3) {
         // Add a listener to resize the column to the full width of the table
         table.addControlListener(new ControlAdapter() {
             @Override
             public void controlResized(ControlEvent e) {
                 Rectangle r = table.getClientArea();
-                column0.setWidth(r.width * 3 / 10); // 30%  
-                column1.setWidth(r.width * 5 / 10); // 50%
-                column2.setWidth(r.width * 2 / 10); // 20%
+                column0.setWidth(r.width * 30 / 100); // 30%  
+                column1.setWidth(r.width * 45 / 100); // 45%
+                column2.setWidth(r.width * 15 / 100); // 15%
+                column3.setWidth(r.width * 10 / 100); // 10%
             }
         });
     }
@@ -238,6 +277,7 @@ public class SdkTargetSelector {
      * <li>column 0: sdk name
      * <li>column 1: sdk vendor
      * <li>column 2: sdk api name
+     * <li>column 3: sdk version
      * </ul>
      */
     private void fillTable(final Table table) {
@@ -249,6 +289,7 @@ public class SdkTargetSelector {
                 item.setText(0, target.getName());
                 item.setText(1, target.getVendor());
                 item.setText(2, target.getApiVersionName());
+                item.setText(3, Integer.toString(target.getApiVersionNumber()));
             }
         } else {
             table.setEnabled(false);
@@ -257,6 +298,7 @@ public class SdkTargetSelector {
             item.setText(0, "--");
             item.setText(1, "No target available");
             item.setText(2, "--");
+            item.setText(3, "--");
         }
     }
 
diff --git a/tools/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/VmSelector.java b/tools/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/VmSelector.java
new file mode 100644 (file)
index 0000000..dcc0b9e
--- /dev/null
@@ -0,0 +1,379 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Eclipse Public License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.eclipse.org/org/documents/epl-v10.php
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.sdkuilib;
+
+import com.android.sdklib.IAndroidTarget;
+import com.android.sdklib.vm.VmManager.VmInfo;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+
+import java.util.ArrayList;
+
+
+/**
+ * The VM selector is a table that is added to the given parent composite.
+ * <p/>
+ * To use, create it using {@link #VmSelector(Composite, VmInfo[], boolean)} then
+ * call {@link #setSelection(VmInfo)}, {@link #setSelectionListener(SelectionListener)}
+ * and finally use {@link #getFirstSelected()} or {@link #getAllSelected()} to retrieve the
+ * selection.
+ */
+public final class VmSelector {
+    
+    private VmInfo[] mVms;
+    private final boolean mAllowMultipleSelection;
+    private SelectionListener mSelectionListener;
+    private Table mTable;
+    private Label mDescription;
+
+    /**
+     * Creates a new SDK Target Selector.
+     * 
+     * @param parent The parent composite where the selector will be added.
+     * @param vms The list of vms. This is <em>not</em> copied, the caller must not modify.
+     * @param allowMultipleSelection True if more than one SDK target can be selected at the same
+     *        time.
+     */
+    public VmSelector(Composite parent, VmInfo[] vms, boolean allowMultipleSelection) {
+        mVms = vms;
+
+        // Layout has 1 column
+        Composite group = new Composite(parent, SWT.NONE);
+        group.setLayout(new GridLayout());
+        group.setLayoutData(new GridData(GridData.FILL_BOTH));
+        group.setFont(parent.getFont());
+        
+        mAllowMultipleSelection = allowMultipleSelection;
+        mTable = new Table(group, SWT.CHECK | SWT.FULL_SELECTION | SWT.SINGLE | SWT.BORDER);
+        mTable.setHeaderVisible(true);
+        mTable.setLinesVisible(false);
+
+        GridData data = new GridData();
+        data.grabExcessVerticalSpace = true;
+        data.grabExcessHorizontalSpace = true;
+        data.horizontalAlignment = GridData.FILL;
+        data.verticalAlignment = GridData.FILL;
+        mTable.setLayoutData(data);
+
+        mDescription = new Label(group, SWT.WRAP);
+        mDescription.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        // create the table columns
+        final TableColumn column0 = new TableColumn(mTable, SWT.NONE);
+        column0.setText("VM Name");
+        final TableColumn column1 = new TableColumn(mTable, SWT.NONE);
+        column1.setText("Target Name");
+        final TableColumn column2 = new TableColumn(mTable, SWT.NONE);
+        column2.setText("API Level");
+        final TableColumn column3 = new TableColumn(mTable, SWT.NONE);
+        column3.setText("SDK");
+
+        adjustColumnsWidth(mTable, column0, column1, column2, column3);
+        setupSelectionListener(mTable);
+        fillTable(mTable, null /* target filter */);
+        setupTooltip(mTable);
+    }
+    
+    /**
+     * Sets a new set of VM, with an optional filter.
+     * <p/>This must be called from the UI thread.
+     * 
+     * @param vms The list of vms. This is <em>not</em> copied, the caller must not modify.
+     * @param filter An IAndroidTarget. If non-null, only VM whose target are compatible with the
+     * filter target will displayed an available for selection.
+     */
+    public void setVms(VmInfo[] vms, IAndroidTarget filter) {
+        mVms = vms;
+        fillTable(mTable, filter);
+    }
+
+    /**
+     * Returns the list of known Vms.
+     * <p/>
+     * This is not a copy. Callers must <em>not</em> modify this array.
+     */
+    public VmInfo[] getVms() {
+        return mVms;
+    }
+
+    /**
+     * Sets a selection listener. Set it to null to remove it.
+     * The listener will be called <em>after</em> this table processed its selection
+     * events so that the caller can see the updated state.
+     * <p/>
+     * The event's item contains a {@link TableItem}.
+     * The {@link TableItem#getData()} contains an {@link IAndroidTarget}.
+     * <p/>
+     * It is recommended that the caller uses the {@link #getFirstSelected()} and
+     * {@link #getAllSelected()} methods instead.
+     * 
+     * @param selectionListener The new listener or null to remove it.
+     */
+    public void setSelectionListener(SelectionListener selectionListener) {
+        mSelectionListener = selectionListener;
+    }
+    
+    /**
+     * Sets the current target selection.
+     * <p/>
+     * If the selection is actually changed, this will invoke the selection listener
+     * (if any) with a null event.
+     * 
+     * @param target the target to be selection
+     * @return true if the target could be selected, false otherwise.
+     */
+    public boolean setSelection(VmInfo target) {
+        boolean found = false;
+        boolean modified = false;
+        for (TableItem i : mTable.getItems()) {
+            if ((VmInfo) i.getData() == target) {
+                found = true;
+                if (!i.getChecked()) {
+                    modified = true;
+                    i.setChecked(true);
+                }
+            } else if (i.getChecked()) {
+                modified = true;
+                i.setChecked(false);
+            }
+        }
+        
+        if (modified && mSelectionListener != null) {
+            mSelectionListener.widgetSelected(null);
+        }
+        
+        return found;
+    }
+
+    /**
+     * Returns all selected items.
+     * This is useful when the table is in multiple-selection mode.
+     * 
+     * @see #getFirstSelected()
+     * @return An array of selected items. The list can be empty but not null.
+     */
+    public VmInfo[] getAllSelected() {
+        ArrayList<IAndroidTarget> list = new ArrayList<IAndroidTarget>();
+        for (TableItem i : mTable.getItems()) {
+            if (i.getChecked()) {
+                list.add((IAndroidTarget) i.getData());
+            }
+        }
+        return list.toArray(new VmInfo[list.size()]);
+    }
+
+    /**
+     * Returns the first selected item.
+     * This is useful when the table is in single-selection mode.
+     * 
+     * @see #getAllSelected()
+     * @return The first selected item or null.
+     */
+    public VmInfo getFirstSelected() {
+        for (TableItem i : mTable.getItems()) {
+            if (i.getChecked()) {
+                return (VmInfo) i.getData();
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Adds a listener to adjust the columns width when the parent is resized.
+     * <p/>
+     * If we need something more fancy, we might want to use this:
+     * http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet77.java?view=co
+     */
+    private void adjustColumnsWidth(final Table table,
+            final TableColumn column0,
+            final TableColumn column1,
+            final TableColumn column2,
+            final TableColumn column3) {
+        // Add a listener to resize the column to the full width of the table
+        table.addControlListener(new ControlAdapter() {
+            @Override
+            public void controlResized(ControlEvent e) {
+                Rectangle r = table.getClientArea();
+                column0.setWidth(r.width * 30 / 100); // 30%  
+                column1.setWidth(r.width * 45 / 100); // 45%
+                column2.setWidth(r.width * 15 / 100); // 15%
+                column3.setWidth(r.width * 10 / 100); // 10%
+            }
+        });
+    }
+
+
+    /**
+     * Creates a selection listener that will check or uncheck the whole line when
+     * double-clicked (aka "the default selection").
+     */
+    private void setupSelectionListener(final Table table) {
+        // Add a selection listener that will check/uncheck items when they are double-clicked
+        table.addSelectionListener(new SelectionListener() {
+            /** Default selection means double-click on "most" platforms */
+            public void widgetDefaultSelected(SelectionEvent e) {
+                if (e.item instanceof TableItem) {
+                    TableItem i = (TableItem) e.item;
+                    i.setChecked(!i.getChecked());
+                    enforceSingleSelection(i);
+                    updateDescription(i);
+                }
+
+                if (mSelectionListener != null) {
+                    mSelectionListener.widgetDefaultSelected(e);
+                }
+            }
+            
+            public void widgetSelected(SelectionEvent e) {
+                if (e.item instanceof TableItem) {
+                    TableItem i = (TableItem) e.item;
+                    enforceSingleSelection(i);
+                    updateDescription(i);
+                }
+
+                if (mSelectionListener != null) {
+                    mSelectionListener.widgetSelected(e);
+                }
+            }
+
+            /**
+             * If we're not in multiple selection mode, uncheck all other
+             * items when this one is selected.
+             */
+            private void enforceSingleSelection(TableItem item) {
+                if (!mAllowMultipleSelection && item.getChecked()) {
+                    Table parentTable = item.getParent();
+                    for (TableItem i2 : parentTable.getItems()) {
+                        if (i2 != item && i2.getChecked()) {
+                            i2.setChecked(false);
+                        }
+                    }
+                }
+            }
+        });
+    }
+
+    /**
+     * Fills the table with all VM.
+     * The table columns are:
+     * <ul>
+     * <li>column 0: sdk name
+     * <li>column 1: sdk vendor
+     * <li>column 2: sdk api name
+     * <li>column 3: sdk version
+     * </ul>
+     */
+    private void fillTable(final Table table, IAndroidTarget filter) {
+        table.removeAll();
+        if (mVms != null && mVms.length > 0) {
+            table.setEnabled(true);
+            for (VmInfo vm : mVms) {
+                if (filter == null || filter.isCompatibleBaseFor(vm.getTarget())) {
+                    TableItem item = new TableItem(table, SWT.NONE);
+                    item.setData(vm);
+                    item.setText(0, vm.getName());
+                    IAndroidTarget target = vm.getTarget();
+                    item.setText(1, target.getFullName());
+                    item.setText(2, target.getApiVersionName());
+                    item.setText(3, Integer.toString(target.getApiVersionNumber()));
+                }
+            }
+        }
+        
+        if (table.getItemCount() == 0) {
+            table.setEnabled(false);
+            TableItem item = new TableItem(table, SWT.NONE);
+            item.setData(null);
+            item.setText(0, "--");
+            item.setText(1, "No VM available");
+            item.setText(2, "--");
+            item.setText(3, "--");
+        }
+    }
+
+    /**
+     * Sets up a tooltip that displays the current item description.
+     * <p/>
+     * Displaying a tooltip over the table looks kind of odd here. Instead we actually
+     * display the description in a label under the table.
+     */
+    private void setupTooltip(final Table table) {
+        /*
+         * Reference: 
+         * http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet125.java?view=markup
+         */
+        
+        final Listener listener = new Listener() {
+            public void handleEvent(Event event) {
+                
+                switch(event.type) {
+                case SWT.KeyDown:
+                case SWT.MouseExit:
+                case SWT.MouseDown:
+                    return;
+                    
+                case SWT.MouseHover:
+                    updateDescription(table.getItem(new Point(event.x, event.y)));
+                    break;
+                    
+                case SWT.Selection:
+                    if (event.item instanceof TableItem) {
+                        updateDescription((TableItem) event.item);
+                    }
+                    break;
+                    
+                default:
+                    return;
+                }
+
+            }
+        };
+        
+        table.addListener(SWT.Dispose, listener);
+        table.addListener(SWT.KeyDown, listener);
+        table.addListener(SWT.MouseMove, listener);
+        table.addListener(SWT.MouseHover, listener);
+    }
+
+    /**
+     * Updates the description label with the path of the item's VM, if any.
+     */
+    private void updateDescription(TableItem item) {
+        if (item != null) {
+            Object data = item.getData();
+            if (data instanceof VmInfo) {
+                String newTooltip = ((VmInfo) data).getPath();
+                mDescription.setText(newTooltip == null ? "" : newTooltip);  //$NON-NLS-1$
+            }
+        }
+    }
+}