Add compatibility_matrix and hal_manifest
am: 6db88c61ea

Change-Id: I49a7736e2a2f6d0369d2b887911d49fd3aed6e72
diff --git a/xsd/compatibilityMatrix/Android.bp b/xsd/compatibilityMatrix/Android.bp
new file mode 100644
index 0000000..2df3460
--- /dev/null
+++ b/xsd/compatibilityMatrix/Android.bp
@@ -0,0 +1,21 @@
+//
+// Copyright (C) 2019 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.
+//
+
+xsd_config {
+    name: "compatibility_matrix",
+    srcs: ["compatibility_matrix.xsd"],
+    package_name: "compatibility.matrix",
+}
diff --git a/xsd/compatibilityMatrix/api/current.txt b/xsd/compatibilityMatrix/api/current.txt
new file mode 100644
index 0000000..0b683f6
--- /dev/null
+++ b/xsd/compatibilityMatrix/api/current.txt
@@ -0,0 +1,129 @@
+package compatibility.matrix {
+
+  public class Avb {
+    ctor public Avb();
+    method public java.lang.String getVbmetaversion();
+    method public void setVbmetaversion(java.lang.String);
+  }
+
+  public class Compatibilitymatrix {
+    ctor public Compatibilitymatrix();
+    method public compatibility.matrix.Avb getAvb();
+    method public java.util.List<compatibility.matrix.Hal> getHal();
+    method public java.util.List<compatibility.matrix.Kernel> getKernel();
+    method public java.lang.String getLevel();
+    method public compatibility.matrix.Sepolicy getSepolicy();
+    method public compatibility.matrix.Systemsdk getSystemsdk();
+    method public java.lang.String getType();
+    method public compatibility.matrix.Vendorndk getVendorndk();
+    method public java.lang.String getVersion();
+    method public compatibility.matrix.Vndk getVndk();
+    method public java.util.List<compatibility.matrix.Xmlfile> getXmlfile();
+    method public void setAvb(compatibility.matrix.Avb);
+    method public void setLevel(java.lang.String);
+    method public void setSepolicy(compatibility.matrix.Sepolicy);
+    method public void setSystemsdk(compatibility.matrix.Systemsdk);
+    method public void setType(java.lang.String);
+    method public void setVendorndk(compatibility.matrix.Vendorndk);
+    method public void setVersion(java.lang.String);
+    method public void setVndk(compatibility.matrix.Vndk);
+  }
+
+  public class Config {
+    ctor public Config();
+    method public java.lang.String getKey();
+    method public compatibility.matrix.Config.Value getValue();
+    method public void setKey(java.lang.String);
+    method public void setValue(compatibility.matrix.Config.Value);
+  }
+
+  public static class Config.Value {
+    ctor public Config.Value();
+    method public java.lang.String getType();
+    method public void setType(java.lang.String);
+  }
+
+  public class Hal {
+    ctor public Hal();
+    method public java.lang.String getFormat();
+    method public java.util.List<java.lang.String> getFqname();
+    method public java.lang.String getName();
+    method public java.lang.String getOptional();
+    method public java.util.List<java.lang.String> getVersion();
+    method public java.util.List<compatibility.matrix.Interface> get_interface();
+    method public void setFormat(java.lang.String);
+    method public void setName(java.lang.String);
+    method public void setOptional(java.lang.String);
+  }
+
+  public class Interface {
+    ctor public Interface();
+    method public java.util.List<java.lang.String> getInstance();
+    method public java.lang.String getName();
+    method public java.util.List<java.lang.String> getRegexinstance();
+    method public void setName(java.lang.String);
+  }
+
+  public class Kernel {
+    ctor public Kernel();
+    method public compatibility.matrix.Kernel.Conditions getConditions();
+    method public java.util.List<compatibility.matrix.Config> getConfig();
+    method public java.lang.String getVersion();
+    method public void setConditions(compatibility.matrix.Kernel.Conditions);
+    method public void setVersion(java.lang.String);
+  }
+
+  public static class Kernel.Conditions {
+    ctor public Kernel.Conditions();
+    method public java.util.List<compatibility.matrix.Config> getConfig();
+  }
+
+  public class Sepolicy {
+    ctor public Sepolicy();
+    method public java.lang.String getKernelsepolicyversion();
+    method public java.util.List<java.lang.String> getSepolicyversion();
+    method public void setKernelsepolicyversion(java.lang.String);
+  }
+
+  public class Systemsdk {
+    ctor public Systemsdk();
+    method public java.util.List<java.lang.String> getVersion();
+  }
+
+  public class Vendorndk {
+    ctor public Vendorndk();
+    method public java.util.List<java.lang.String> getLibrary();
+    method public java.lang.String getVersion();
+    method public void setVersion(java.lang.String);
+  }
+
+  public class Vndk {
+    ctor public Vndk();
+    method public java.util.List<java.lang.String> getLibrary();
+    method public java.lang.String getVersion();
+    method public void setVersion(java.lang.String);
+  }
+
+  public class XmlParser {
+    ctor public XmlParser();
+    method public static compatibility.matrix.Compatibilitymatrix read(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+    method public static java.lang.String readText(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+    method public static void skip(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+  }
+
+  public class Xmlfile {
+    ctor public Xmlfile();
+    method public java.lang.String getFormat();
+    method public java.lang.String getName();
+    method public java.lang.String getOptional();
+    method public java.lang.String getPath();
+    method public java.lang.String getVersion();
+    method public void setFormat(java.lang.String);
+    method public void setName(java.lang.String);
+    method public void setOptional(java.lang.String);
+    method public void setPath(java.lang.String);
+    method public void setVersion(java.lang.String);
+  }
+
+}
+
diff --git a/xsd/compatibilityMatrix/api/last_current.txt b/xsd/compatibilityMatrix/api/last_current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/xsd/compatibilityMatrix/api/last_current.txt
diff --git a/xsd/compatibilityMatrix/api/last_removed.txt b/xsd/compatibilityMatrix/api/last_removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/xsd/compatibilityMatrix/api/last_removed.txt
diff --git a/xsd/compatibilityMatrix/api/removed.txt b/xsd/compatibilityMatrix/api/removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/xsd/compatibilityMatrix/api/removed.txt
diff --git a/xsd/compatibilityMatrix/compatibility_matrix.xsd b/xsd/compatibilityMatrix/compatibility_matrix.xsd
new file mode 100644
index 0000000..7c2c8a0
--- /dev/null
+++ b/xsd/compatibilityMatrix/compatibility_matrix.xsd
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2019 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.
+-->
+<!-- TODO: define a targetNamespace. Note that it will break retrocompatibility -->
+<xs:schema version="2.0"
+           elementFormDefault="qualified"
+           attributeFormDefault="unqualified"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema">
+    <xs:element name="compatibility-matrix">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="hal" type="hal" maxOccurs="unbounded"/>
+                <xs:element name="kernel" type="kernel" maxOccurs="unbounded"/>
+                <xs:element name="sepolicy" type="sepolicy"/>
+                <xs:element name="avb" type="avb"/>
+                <xs:element name="vndk" type="vndk"/>
+                <xs:element name="vendor-ndk" type="vendor-ndk"/>
+                <xs:element name="system-sdk" type="system-sdk"/>
+                <xs:element name="xmlfile" type="xmlfile" maxOccurs="unbounded"/>
+            </xs:sequence>
+            <xs:attribute name="version" type="xs:string" use="required"/>
+            <xs:attribute name="type" type="xs:string" use="required"/>
+            <xs:attribute name="level" type="xs:string"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="hal">
+        <xs:sequence>
+            <xs:element name="name" type="xs:string"/>
+            <xs:element name="version" type="xs:string" maxOccurs="unbounded"/>
+            <xs:element name="interface" type="interface" maxOccurs="unbounded"/>
+            <xs:element name="fqname" type="xs:string" maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute name="format" type="xs:string"/>
+        <xs:attribute name="optional" type="xs:string"/>
+    </xs:complexType>
+    <xs:complexType name="interface">
+        <xs:sequence>
+            <xs:element name="name" type="xs:string"/>
+            <xs:element name="instance" type="xs:string" maxOccurs="unbounded"/>
+            <xs:element name="regex-instance" type="xs:string" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="kernel">
+        <xs:sequence>
+            <xs:element name="conditions">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="config" type="config" maxOccurs="unbounded"/>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="config" type="config" maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute name="version" type="xs:string"/>
+    </xs:complexType>
+    <xs:complexType name="config">
+        <xs:sequence>
+            <xs:element name="key" type="xs:string"/>
+            <xs:element name="value">
+                <xs:complexType>
+                    <xs:attribute name="type" type="xs:string"/>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="sepolicy">
+        <xs:sequence>
+            <xs:element name="kernel-sepolicy-version" type="xs:string"/>
+            <xs:element name="sepolicy-version" type="xs:string" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="avb">
+        <xs:sequence>
+            <xs:element name="vbmeta-version" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="vndk">
+        <xs:sequence>
+            <xs:element name="version" type="xs:string"/>
+            <xs:element name="library" type="xs:string" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="vendor-ndk">
+        <xs:sequence>
+            <xs:element name="version" type="xs:string"/>
+            <xs:element name="library" type="xs:string" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="system-sdk">
+        <xs:sequence>
+            <xs:element name="version" type="xs:string" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="xmlfile">
+        <xs:sequence>
+            <xs:element name="name" type="xs:string"/>
+            <xs:element name="version" type="xs:string"/>
+            <xs:element name="path" type="xs:string"/>
+        </xs:sequence>
+        <xs:attribute name="format" type="xs:string"/>
+        <xs:attribute name="optional" type="xs:string"/>
+    </xs:complexType>
+</xs:schema>
diff --git a/xsd/halManifest/Android.bp b/xsd/halManifest/Android.bp
new file mode 100644
index 0000000..82e1c10
--- /dev/null
+++ b/xsd/halManifest/Android.bp
@@ -0,0 +1,21 @@
+//
+// Copyright (C) 2019 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.
+//
+
+xsd_config {
+    name: "hal_manifest",
+    srcs: ["hal_manifest.xsd"],
+    package_name: "hal.manifest",
+}
diff --git a/xsd/halManifest/api/current.txt b/xsd/halManifest/api/current.txt
new file mode 100644
index 0000000..615257f
--- /dev/null
+++ b/xsd/halManifest/api/current.txt
@@ -0,0 +1,75 @@
+package hal.manifest {
+
+  public class Hal {
+    ctor public Hal();
+    method public java.lang.String getFormat();
+    method public java.util.List<java.lang.String> getFqname();
+    method public java.lang.String getName();
+    method public java.lang.String getOptional();
+    method public java.util.List<java.lang.String> getVersion();
+    method public java.util.List<hal.manifest.Interface> get_interface();
+    method public void setFormat(java.lang.String);
+    method public void setName(java.lang.String);
+    method public void setOptional(java.lang.String);
+  }
+
+  public class Interface {
+    ctor public Interface();
+    method public java.util.List<java.lang.String> getInstance();
+    method public java.lang.String getName();
+    method public java.util.List<java.lang.String> getRegexinstance();
+    method public void setName(java.lang.String);
+  }
+
+  public class Manifest {
+    ctor public Manifest();
+    method public java.util.List<hal.manifest.Hal> getHal();
+    method public hal.manifest.Sepolicy getSepolicy();
+    method public hal.manifest.Systemsdk getSystemsdk();
+    method public java.lang.String getTargetlevel();
+    method public java.lang.String getType();
+    method public java.util.List<hal.manifest.Vendorndk> getVendorndk();
+    method public java.lang.String getVersion();
+    method public java.util.List<hal.manifest.Vndk> getVndk();
+    method public void setSepolicy(hal.manifest.Sepolicy);
+    method public void setSystemsdk(hal.manifest.Systemsdk);
+    method public void setTargetlevel(java.lang.String);
+    method public void setType(java.lang.String);
+    method public void setVersion(java.lang.String);
+  }
+
+  public class Sepolicy {
+    ctor public Sepolicy();
+    method public java.lang.String getKernelsepolicyversion();
+    method public java.util.List<java.lang.String> getSepolicyversion();
+    method public void setKernelsepolicyversion(java.lang.String);
+  }
+
+  public class Systemsdk {
+    ctor public Systemsdk();
+    method public java.util.List<java.lang.String> getVersion();
+  }
+
+  public class Vendorndk {
+    ctor public Vendorndk();
+    method public java.util.List<java.lang.String> getLibrary();
+    method public java.lang.String getVersion();
+    method public void setVersion(java.lang.String);
+  }
+
+  public class Vndk {
+    ctor public Vndk();
+    method public java.util.List<java.lang.String> getLibrary();
+    method public java.lang.String getVersion();
+    method public void setVersion(java.lang.String);
+  }
+
+  public class XmlParser {
+    ctor public XmlParser();
+    method public static hal.manifest.Manifest read(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+    method public static java.lang.String readText(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+    method public static void skip(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+  }
+
+}
+
diff --git a/xsd/halManifest/api/last_current.txt b/xsd/halManifest/api/last_current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/xsd/halManifest/api/last_current.txt
diff --git a/xsd/halManifest/api/last_removed.txt b/xsd/halManifest/api/last_removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/xsd/halManifest/api/last_removed.txt
diff --git a/xsd/halManifest/api/removed.txt b/xsd/halManifest/api/removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/xsd/halManifest/api/removed.txt
diff --git a/xsd/halManifest/hal_manifest.xsd b/xsd/halManifest/hal_manifest.xsd
new file mode 100644
index 0000000..635d2c2
--- /dev/null
+++ b/xsd/halManifest/hal_manifest.xsd
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2019 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.
+-->
+<!-- TODO: define a targetNamespace. Note that it will break retrocompatibility -->
+<xs:schema version="2.0"
+           elementFormDefault="qualified"
+           attributeFormDefault="unqualified"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema">
+    <xs:element name="manifest">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="hal" type="hal" maxOccurs="unbounded"/>
+                <xs:element name="sepolicy" type="sepolicy"/>
+                <xs:element name="vndk" type="vndk" maxOccurs="unbounded"/>
+                <xs:element name="vendor-ndk" type="vendor-ndk" maxOccurs="unbounded"/>
+                <xs:element name="system-sdk" type="system-sdk"/>
+            </xs:sequence>
+            <xs:attribute name="version" type="xs:string" use="required"/>
+            <xs:attribute name="type" type="xs:string" use="required"/>
+            <xs:attribute name="target-level" type="xs:string" use="required"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="hal">
+        <xs:sequence>
+            <xs:element name="name" type="xs:string"/>
+            <xs:element name="version" type="xs:string" maxOccurs="unbounded"/>
+            <xs:element name="interface" type="interface" maxOccurs="unbounded"/>
+            <xs:element name="fqname" type="xs:string" maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute name="format" type="xs:string"/>
+        <xs:attribute name="optional" type="xs:string"/>
+    </xs:complexType>
+    <xs:complexType name="interface">
+        <xs:sequence>
+            <xs:element name="name" type="xs:string"/>
+            <xs:element name="instance" type="xs:string" maxOccurs="unbounded"/>
+            <xs:element name="regex-instance" type="xs:string" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="sepolicy">
+        <xs:sequence>
+            <xs:element name="kernel-sepolicy-version" type="xs:string"/>
+            <xs:element name="sepolicy-version" type="xs:string" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="vndk">
+        <xs:sequence>
+            <xs:element name="version" type="xs:string"/>
+            <xs:element name="library" type="xs:string" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="vendor-ndk">
+        <xs:sequence>
+            <xs:element name="version" type="xs:string"/>
+            <xs:element name="library" type="xs:string" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="system-sdk">
+        <xs:sequence>
+            <xs:element name="version" type="xs:string" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+</xs:schema>