blob: 4dbb06f37cc3bd26bbeaffe68850a1cc0bdf4f00 [file] [log] [blame]
Sebastiano Barezzi19058bd2024-07-22 01:45:20 +02001<?xml version="1.0" encoding="utf-8"?>
2<!--
3 SPDX-FileCopyrightText: 2024 The LineageOS Project
4 SPDX-License-Identifier: Apache-2.0
5-->
6<xs:schema version="2.0"
7 elementFormDefault="qualified"
8 attributeFormDefault="unqualified"
9 xmlns:xs="http://www.w3.org/2001/XMLSchema">
10
11 <xs:simpleType name="mcc">
12 <xs:restriction base="xs:integer">
13 <xs:pattern value="\d{3}"/>
14 </xs:restriction>
15 </xs:simpleType>
16
17 <xs:simpleType name="mnc">
18 <xs:union>
19 <xs:simpleType>
20 <xs:restriction base='xs:token'>
21 <xs:pattern value=""/>
22 </xs:restriction>
23 </xs:simpleType>
24 <xs:simpleType>
25 <xs:restriction base="xs:integer">
26 <xs:pattern value="\d{2,3}"/>
27 </xs:restriction>
28 </xs:simpleType>
29 </xs:union>
30 </xs:simpleType>
31
32 <!--
33 frameworks/base/telephony/java/android/telephony/data/ApnSetting.java,
34 TYPE_*_STRING
35 -->
36 <xs:simpleType name="apnType">
37 <xs:restriction base="xs:token">
38 <xs:pattern value="(\*|default|mms|supl|dun|hipri|fota|ims|cbs|ia|emergency|mcx|xcap|vsim|bip|enterprise|rcs)(,(\*|default|mms|supl|dun|hipri|fota|ims|cbs|ia|emergency|mcx|xcap|vsim|bip|enterprise|rcs))*"/>
39 </xs:restriction>
40 </xs:simpleType>
41
42 <!--
43 frameworks/base/telephony/java/android/telephony/data/ApnSetting.java,
44 PROTOCOL_INT_MAP
45 -->
46 <xs:simpleType name="protocol">
47 <xs:restriction base="xs:string">
48 <xs:enumeration value="IP" />
49 <xs:enumeration value="IPV6" />
50 <xs:enumeration value="IPV4V6" />
51 <xs:enumeration value="PPP" />
52 <xs:enumeration value="NON-IP" />
53 <xs:enumeration value="UNSTRUCTURED" />
54 </xs:restriction>
55 </xs:simpleType>
56
57 <!--
58 frameworks/base/telephony/java/android/telephony/data/ApnSetting.java,
59 AUTH_TYPE_*
60 -->
61 <xs:simpleType name="authtype">
62 <xs:restriction base="xs:integer">
63 <xs:minInclusive value="0" />
64 <xs:maxInclusive value="3" />
65 </xs:restriction>
66 </xs:simpleType>
67
68 <!--
69 frameworks/base/core/java/android/provider/Telephony.java,
70 SKIP_464XLAT_*
71 -->
72 <xs:simpleType name="skip_464xlat">
73 <xs:restriction base="xs:integer">
74 <xs:minInclusive value="0" />
75 <xs:maxInclusive value="1" />
76 </xs:restriction>
77 </xs:simpleType>
78
79 <!--
80 frameworks/base/telephony/java/android/telephony/data/ApnSetting.java,
81 MVNO_TYPE_STRING
82 -->
83 <xs:simpleType name="mvnoType">
84 <xs:restriction base="xs:string">
85 <xs:enumeration value="spn" />
86 <xs:enumeration value="imsi" />
87 <xs:enumeration value="gid" />
88 <xs:enumeration value="iccid" />
89 </xs:restriction>
90 </xs:simpleType>
91
92 <!--
93 packages/providers/TelephonyProvider/src/com/android/providers/telephony/TelephonyProvider.java,
94 TelephonyProvider::getInfrastructureListFromString
95 -->
96 <xs:simpleType name="infrastructure_bitmask">
97 <xs:restriction base="xs:token">
98 <xs:pattern value="(cellular|satellite)(\|(cellular|satellite))*" />
99 </xs:restriction>
100 </xs:simpleType>
101
102 <xs:simpleType name="bitmask">
103 <xs:restriction base="xs:token">
104 <xs:pattern value="\d+(\|\d+)*" />
105 </xs:restriction>
106 </xs:simpleType>
107
108 <xs:complexType name="apn">
109 <xs:attribute name="mcc" type="mcc" />
110 <xs:attribute name="mnc" type="mnc" />
111 <xs:attribute name="carrier" type="xs:string" />
112 <xs:attribute name="apn" type="xs:string" />
113 <xs:attribute name="user" type="xs:string" />
114 <xs:attribute name="server" type="xs:anyURI" />
115 <xs:attribute name="password" type="xs:string" />
116 <xs:attribute name="proxy" type="xs:anyURI" />
117 <xs:attribute name="port" type="xs:string" />
118 <xs:attribute name="mmsproxy" type="xs:anyURI" />
119 <xs:attribute name="mmsport" type="xs:string" />
120 <xs:attribute name="mmsc" type="xs:anyURI" />
121 <xs:attribute name="type" type="apnType" />
122 <xs:attribute name="protocol" type="protocol" />
123 <xs:attribute name="roaming_protocol" type="protocol" />
124 <xs:attribute name="authtype" type="authtype" />
125 <xs:attribute name="bearer" type="xs:integer" />
126 <xs:attribute name="profile_id" type="xs:integer" />
127 <xs:attribute name="max_conns" type="xs:integer" />
128 <xs:attribute name="wait_time" type="xs:integer" />
129 <xs:attribute name="max_conns_time" type="xs:integer" />
130 <xs:attribute name="mtu" type="xs:integer" />
131 <xs:attribute name="mtu_v4" type="xs:integer" />
132 <xs:attribute name="mtu_v6" type="xs:integer" />
133 <xs:attribute name="apn_set_id" type="xs:integer" />
134 <xs:attribute name="carrier_id" type="xs:integer" />
135 <xs:attribute name="skip_464xlat" type="skip_464xlat" />
136 <xs:attribute name="carrier_enabled" type="xs:boolean" />
137 <xs:attribute name="modem_cognitive" type="xs:boolean" />
138 <xs:attribute name="user_visible" type="xs:boolean" />
139 <xs:attribute name="user_editable" type="xs:boolean" />
140 <xs:attribute name="always_on" type="xs:boolean" />
141 <xs:attribute name="esim_bootstrap_provisioning" type="xs:boolean" />
142 <xs:attribute name="infrastructure_bitmask" type="infrastructure_bitmask" />
143 <xs:attribute name="network_type_bitmask" type="bitmask" />
144 <xs:attribute name="lingering_network_type_bitmask" type="bitmask" />
145 <xs:attribute name="bearer_bitmask" type="bitmask" />
146 <xs:attribute name="mvno_type" type="mvnoType" />
147 <xs:attribute name="mvno_match_data" type="xs:string" />
148 </xs:complexType>
149
150 <xs:element name="apns">
151 <xs:complexType>
152 <xs:sequence>
153 <xs:element name="apn" type="apn" maxOccurs="unbounded" />
154 </xs:sequence>
155 <xs:attribute name="version" type="xs:integer" use="required" />
156 </xs:complexType>
157 </xs:element>
158
159</xs:schema>