Amy | 00e6671 | 2020-02-07 19:28:10 -0800 | [diff] [blame] | 1 | <?xml version="1.0"?> |
| 2 | <!-- Copyright 2020 The Android Open Source Project |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | --> |
| 16 | <xs:schema version="1.0" |
| 17 | xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
| 18 | <!-- List of the Tuner Resource Manager client use case priority hint. --> |
| 19 | <xs:simpleType name="version"> |
| 20 | <xs:restriction base="xs:decimal"> |
| 21 | <xs:enumeration value="1.0"/> |
| 22 | </xs:restriction> |
| 23 | </xs:simpleType> |
| 24 | <xs:complexType name="config"> |
| 25 | <xs:sequence> |
| 26 | <xs:element name="useCaseDefault" type="useCaseDefault" minOccurs="1" maxOccurs="1"/> |
| 27 | <xs:element name="useCasePreDefined" type="useCasePreDefined" minOccurs="0" maxOccurs="5"/> |
| 28 | <xs:element name="useCaseVendor" type="useCaseVendor" minOccurs="0" maxOccurs="unbounded"/> |
| 29 | </xs:sequence> |
| 30 | <xs:attribute name="version" type="version"/> |
| 31 | </xs:complexType> |
| 32 | |
| 33 | <xs:complexType name="useCaseDefault"> |
| 34 | <xs:annotation> |
| 35 | <xs:documentation xml:lang="en"> |
| 36 | useCaseDefault section: |
| 37 | Default value for predefined use cases priority hint. |
| 38 | "fgPriority": priority when the use case is in foreground. |
| 39 | "bgPriority": priority when the use case is in background. |
| 40 | </xs:documentation> |
| 41 | </xs:annotation> |
| 42 | <xs:attribute name="fgPriority" type="priority"/> |
| 43 | <xs:attribute name="bgPriority" type="priority"/> |
| 44 | </xs:complexType> |
| 45 | |
| 46 | <xs:complexType name="useCasePreDefined"> |
| 47 | <xs:annotation> |
| 48 | <xs:documentation xml:lang="en"> |
| 49 | useCasePreDefined section: |
| 50 | A list of predefined use cases and their foreground/background priority hint. |
| 51 | Each use case has the following attributes: |
| 52 | "type": type of the use case. Pre-defined use cases start with "USE_CASE_" |
| 53 | and have been predefined in "predefinedUseCaseType". |
| 54 | "fgPriority": priority when the use case is in foreground. |
| 55 | "bgPriority": priority when the use case is in background. |
| 56 | </xs:documentation> |
| 57 | </xs:annotation> |
| 58 | <xs:attribute name="type" type="predefinedUseCaseType"/> |
| 59 | <xs:attribute name="fgPriority" type="priority"/> |
| 60 | <xs:attribute name="bgPriority" type="priority"/> |
| 61 | </xs:complexType> |
| 62 | |
| 63 | <xs:complexType name="useCaseVendor"> |
| 64 | <xs:annotation> |
| 65 | <xs:documentation xml:lang="en"> |
| 66 | useCaseVendor section: |
| 67 | A list of vendor defined use cases and their foreground/background priority hint. |
| 68 | Each use case has the following attributes: |
| 69 | "type": type of the use case. Vendor defined use cases start with "VENDOR_USE_CASE_". |
| 70 | "fgPriority": priority when the use case is in foreground. |
| 71 | "bgPriority": priority when the use case is in background. |
| 72 | "id": Vendor defined use case must have an id greater than 1000 to be associated with. |
| 73 | </xs:documentation> |
| 74 | </xs:annotation> |
| 75 | <xs:attribute name="type" type="vendorUseCaseType"/> |
| 76 | <xs:attribute name="id" type="id"/> |
| 77 | <xs:attribute name="fgPriority" type="priority"/> |
| 78 | <xs:attribute name="bgPriority" type="priority"/> |
| 79 | </xs:complexType> |
| 80 | |
| 81 | <xs:simpleType name="predefinedUseCaseType"> |
| 82 | <xs:restriction base="xs:string"> |
| 83 | <xs:enumeration value="USE_CASE_RECORD"/> |
| 84 | <xs:enumeration value="USE_CASE_LIVE"/> |
| 85 | <xs:enumeration value="USE_CASE_PLAYBACK"/> |
| 86 | <xs:enumeration value="USE_CASE_SCAN"/> |
| 87 | <xs:enumeration value="USE_CASE_BACKGROUND"/> |
| 88 | </xs:restriction> |
| 89 | </xs:simpleType> |
| 90 | |
| 91 | <xs:simpleType name="vendorUseCaseType"> |
| 92 | <xs:restriction base="xs:string"> |
| 93 | <xs:pattern value="VENDOR_USE_CASE_[_A-Z0-9]+"/> |
| 94 | </xs:restriction> |
| 95 | </xs:simpleType> |
| 96 | |
| 97 | <xs:simpleType name="priority"> |
| 98 | <xs:restriction base="xs:integer"> |
| 99 | <xs:minInclusive value="0"/> |
| 100 | <xs:maxInclusive value="1000"/> |
| 101 | </xs:restriction> |
| 102 | </xs:simpleType> |
| 103 | |
| 104 | <xs:simpleType name="id"> |
| 105 | <xs:restriction base="xs:integer"> |
| 106 | <xs:minInclusive value="1001"/> |
| 107 | </xs:restriction> |
| 108 | </xs:simpleType> |
| 109 | |
| 110 | <xs:element name="config" type="config"/> |
| 111 | </xs:schema> |