1<?xml version="1.0" encoding="utf-8"?>
2<!--
3/**
4 * Copyright (c) 2011, The Android Open Source Project
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 *     http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18-->
19
20<ContactsAccountType
21    xmlns:android="http://schemas.android.com/apk/res/android"
22    >
23    <EditSchema
24        >
25        <!--
26            Name:
27            - maxOccurs must be 1
28            - No types.
29
30            - Currently all the supportsXxx attributes must be true, but here's the plan for the
31              future:
32              (There's some hardcoded assumptions in the contact editor, which is one reason
33              for the above restriction)
34
35                - "Family name" and "Given name" must be supported.
36                    - All sync adapters must support structured name. "display name only" is not
37                      supported.
38                      -> Supporting this would require relatively large changes to
39                         the contact editor.
40
41                - Fields are decided from the attributes:
42                    StructuredName.DISPLAY_NAME         if supportsDisplayName == true
43                    StructuredName.PREFIX               if supportsPrefix == true
44                    StructuredName.FAMILY_NAME          (always)
45                    StructuredName.MIDDLE_NAME          if supportsPrefix == true
46                    StructuredName.GIVEN_NAME           (always)
47                    StructuredName.SUFFIX               if supportsSuffix == true
48                    StructuredName.PHONETIC_FAMILY_NAME if supportsPhoneticFamilyName == true
49                    StructuredName.PHONETIC_MIDDLE_NAME if supportsPhoneticMiddleName == true
50                    StructuredName.PHONETIC_GIVEN_NAME  if supportsPhoneticGivenName == true
51
52                - DataKind.PSEUDO_MIME_TYPE_DISPLAY_NAME  is always added.
53                - DataKind.PSEUDO_MIME_TYPE_PHONETIC_NAME is added
54                  if any of supportsPhoneticXxx == true
55        -->
56        <!-- Fallback/Google definition.  Supports all. -->
57        <DataKind kind="name"
58            maxOccurs="1"
59            supportsDisplayName="true"
60            supportsPrefix="true"
61            supportsMiddleName="true"
62            supportsSuffix="true"
63            supportsPhoneticFamilyName="true"
64            supportsPhoneticMiddleName="true"
65            supportsPhoneticGivenName="true"
66            >
67        </DataKind>
68
69        <!-- Exchange definition.  No display-name, no phonetic-middle.
70        <DataKind kind="name"
71            supportsDisplayName="false"
72            supportsPrefix="true"
73            supportsMiddleName="true"
74            supportsSuffix="true"
75            supportsPhoneticFamilyName="true"
76            supportsPhoneticMiddleName="false"
77            supportsPhoneticGivenName ="true"
78            >
79        </DataKind>
80        -->
81
82        <!--
83            Photo:
84            - maxOccurs must be 1
85            - No types.
86        -->
87        <DataKind kind="photo" maxOccurs="1" />
88
89        <!--
90            Phone definition.
91            - "is secondary?" is inferred from type.
92        -->
93        <!-- Fallback, Google definition.  -->
94        <DataKind kind="phone" >
95            <!-- Note: Google type doesn't have obsolete ones -->
96            <Type type="mobile" />
97            <Type type="home" />
98            <Type type="work" />
99            <Type type="fax_work" />
100            <Type type="fax_home" />
101            <Type type="pager" />
102            <Type type="other" />
103            <Type type="custom"/>
104            <Type type="callback" />
105            <Type type="car" />
106            <Type type="company_main" />
107            <Type type="isdn" />
108            <Type type="main" />
109            <Type type="other_fax" />
110            <Type type="radio" />
111            <Type type="telex" />
112            <Type type="tty_tdd" />
113            <Type type="work_mobile"/>
114            <Type type="work_pager" />
115            <Type type="assistant" />
116            <Type type="mms" />
117        </DataKind>
118
119        <!-- Exchange definition.
120        <DataKind kind="phone" >
121            <Type type="home" maxOccurs="2" />
122            <Type type="mobile" maxOccurs="1" />
123            <Type type="work" maxOccurs="2" />
124            <Type type="fax_work" maxOccurs="1" />
125            <Type type="fax_home" maxOccurs="1" />
126            <Type type="pager" maxOccurs="1" />
127            <Type type="car" maxOccurs="1" />
128            <Type type="company_main" maxOccurs="1" />
129            <Type type="mms" maxOccurs="1" />
130            <Type type="radio" maxOccurs="1" />
131            <Type type="assistant" maxOccurs="1" />
132        </DataKind>
133        -->
134
135        <!--
136            Email
137        -->
138        <!-- Fallback/Google definition.  -->
139        <DataKind kind="email" >
140            <!-- Note: Google type doesn't have obsolete ones -->
141            <Type type="home" />
142            <Type type="work" />
143            <Type type="other" />
144            <Type type="mobile" />
145            <Type type="custom" />
146        </DataKind>
147
148        <!--
149            Exchange definition.
150            - Same definition as "fallback" except for maxOccurs=3
151        <DataKind kind="email" maxOccurs="3" >
152            <Type type="home" />
153            <Type type="work" />
154            <Type type="other" />
155            <Type type="mobile" />
156            <Type type="custom" />
157        </DataKind>
158        -->
159
160        <!--
161            Nickname
162            - maxOccurs must be 1
163            - No types.
164        -->
165        <DataKind kind="nickname" maxOccurs="1" />
166
167        <!--
168            Im:
169             - The TYPE column always stores Im.TYPE_OTHER (defaultValues is always set)
170             - The user-selected type is stored in Im.PROTOCOL
171        -->
172        <!-- Fallback, Google definition.  -->
173        <DataKind kind="im" >
174            <Type type="aim" />
175            <Type type="msn" />
176            <Type type="yahoo" />
177            <Type type="skype" />
178            <Type type="qq" />
179            <Type type="google_talk" />
180            <Type type="icq" />
181            <Type type="jabber" />
182            <Type type="custom" />
183        </DataKind>
184
185        <!-- Exchange definition.
186        <DataKind kind="im" maxOccurs="3" >
187            <Type type="aim" />
188            <Type type="msn" />
189            <Type type="yahoo" />
190            <Type type="skype" />
191            <Type type="qq" />
192            <Type type="google_talk" />
193            <Type type="icq" />
194            <Type type="jabber" />
195            <Type type="custom" />
196        </DataKind>
197        -->
198
199        <!--
200            Postal address.
201        -->
202        <!-- Fallback/Google definition.  Not structured. -->
203        <DataKind kind="postal" needsStructured="false" >
204            <Type type="home" />
205            <Type type="work" />
206            <Type type="other" />
207            <Type type="custom" />
208        </DataKind>
209
210        <!-- Exchange definition.  Structured.
211        <DataKind kind="postal" needsStructured="true" >
212            <Type type="work" />
213            <Type type="home" />
214            <Type type="other" />
215        </DataKind>
216        -->
217
218        <!--
219            Organization:
220            - Fields are fixed: COMPANY, TITLE
221            - maxOccurs must be 1
222            - No types.
223        -->
224        <DataKind kind="organization" maxOccurs="1" />
225
226        <!--
227            Website:
228            - No types.
229        -->
230        <DataKind kind="website" />
231
232        <!--
233            Below kinds have nothing configurable.
234            - No types are supported.
235            - maxOccurs must be 1
236        -->
237        <DataKind kind="sip_address" maxOccurs="1" />
238        <DataKind kind="note" maxOccurs="1" />
239
240        <!--
241            Google/Exchange supports it, but fallback doesn't.
242        <DataKind kind="group_membership" maxOccurs="1" />
243        -->
244
245        <!--
246            Event
247        -->
248        <DataKind kind="event" dateWithTime="false">
249            <Type type="birthday" maxOccurs="1" yearOptional="true" />
250            <Type type="anniversary" />
251            <Type type="other" />
252            <Type type="custom" />
253        </DataKind>
254
255        <!--
256            Exchange definition.  dateWithTime is needed only for Exchange.
257        <DataKind kind="event" dateWithTime="true">
258            <Type type="birthday" maxOccurs="1" />
259        </DataKind>
260        -->
261
262        <!--
263            Relationship
264        -->
265        <DataKind kind="relationship" >
266            <Type type="assistant" />
267            <Type type="brother" />
268            <Type type="child" />
269            <Type type="domestic_partner" />
270            <Type type="father" />
271            <Type type="friend" />
272            <Type type="manager" />
273            <Type type="mother" />
274            <Type type="parent" />
275            <Type type="partner" />
276            <Type type="referred_by" />
277            <Type type="relative" />
278            <Type type="sister" />
279            <Type type="spouse" />
280            <Type type="custom" />
281        </DataKind>
282    </EditSchema>
283</ContactsAccountType>
284