1/*
2 * Copyright (C) 2007 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
17package com.android.internal.telephony;
18
19/**
20 * Interface used to retrieve various phone-related subscriber information.
21 *
22 */
23interface IPhoneSubInfo {
24
25    /**
26     * Retrieves the unique device ID, e.g., IMEI for GSM phones.
27     */
28    String getDeviceId(String callingPackage);
29
30     /**
31     * Retrieves the unique Network Access ID
32     */
33    String getNaiForSubscriber(int subId, String callingPackage);
34
35    /**
36     * Retrieves the unique device ID of a phone for the device, e.g., IMEI
37     * for GSM phones.
38     */
39    String getDeviceIdForPhone(int phoneId, String callingPackage);
40
41    /**
42     * Retrieves the IMEI.
43     */
44    String getImeiForSubscriber(int subId, String callingPackage);
45
46    /**
47     * Retrieves the software version number for the device, e.g., IMEI/SV
48     * for GSM phones.
49     */
50    String getDeviceSvn(String callingPackage);
51
52    /**
53     * Retrieves the software version number of a subId for the device, e.g., IMEI/SV
54     * for GSM phones.
55     */
56    String getDeviceSvnUsingSubId(int subId, String callingPackage);
57
58    /**
59     * Retrieves the unique sbuscriber ID, e.g., IMSI for GSM phones.
60     */
61    String getSubscriberId(String callingPackage);
62
63    /**
64     * Retrieves the unique subscriber ID of a given subId, e.g., IMSI for GSM phones.
65     */
66    String getSubscriberIdForSubscriber(int subId, String callingPackage);
67
68    /**
69     * Retrieves the Group Identifier Level1 for GSM phones.
70     */
71    String getGroupIdLevel1(String callingPackage);
72
73    /**
74     * Retrieves the Group Identifier Level1 for GSM phones of a subId.
75     */
76    String getGroupIdLevel1ForSubscriber(int subId, String callingPackage);
77
78    /**
79     * Retrieves the serial number of the ICC, if applicable.
80     */
81    String getIccSerialNumber(String callingPackage);
82
83    /**
84     * Retrieves the serial number of a given subId.
85     */
86    String getIccSerialNumberForSubscriber(int subId, String callingPackage);
87
88    /**
89     * Retrieves the phone number string for line 1.
90     */
91    String getLine1Number(String callingPackage);
92
93    /**
94     * Retrieves the phone number string for line 1 of a subcription.
95     */
96    String getLine1NumberForSubscriber(int subId, String callingPackage);
97
98
99    /**
100     * Retrieves the alpha identifier for line 1.
101     */
102    String getLine1AlphaTag(String callingPackage);
103
104    /**
105     * Retrieves the alpha identifier for line 1 of a subId.
106     */
107    String getLine1AlphaTagForSubscriber(int subId, String callingPackage);
108
109
110    /**
111     * Retrieves MSISDN Number.
112     */
113    String getMsisdn(String callingPackage);
114
115    /**
116     * Retrieves the Msisdn of a subId.
117     */
118    String getMsisdnForSubscriber(int subId, String callingPackage);
119
120    /**
121     * Retrieves the voice mail number.
122     */
123    String getVoiceMailNumber(String callingPackage);
124
125    /**
126     * Retrieves the voice mail number of a given subId.
127     */
128    String getVoiceMailNumberForSubscriber(int subId, String callingPackage);
129
130    /**
131     * Retrieves the complete voice mail number.
132     */
133    String getCompleteVoiceMailNumber();
134
135    /**
136     * Retrieves the complete voice mail number for particular subId
137     */
138    String getCompleteVoiceMailNumberForSubscriber(int subId);
139
140    /**
141     * Retrieves the alpha identifier associated with the voice mail number.
142     */
143    String getVoiceMailAlphaTag(String callingPackage);
144
145    /**
146     * Retrieves the alpha identifier associated with the voice mail number
147     * of a subId.
148     */
149    String getVoiceMailAlphaTagForSubscriber(int subId, String callingPackage);
150
151    /**
152     * Returns the IMS private user identity (IMPI) that was loaded from the ISIM.
153     * @return the IMPI, or null if not present or not loaded
154     */
155    String getIsimImpi();
156
157    /**
158     * Returns the IMS home network domain name that was loaded from the ISIM.
159     * @return the IMS domain name, or null if not present or not loaded
160     */
161    String getIsimDomain();
162
163    /**
164     * Returns the IMS public user identities (IMPU) that were loaded from the ISIM.
165     * @return an array of IMPU strings, with one IMPU per string, or null if
166     *      not present or not loaded
167     */
168    String[] getIsimImpu();
169
170    /**
171     * Returns the IMS Service Table (IST) that was loaded from the ISIM.
172     * @return IMS Service Table or null if not present or not loaded
173     */
174    String getIsimIst();
175
176    /**
177     * Returns the IMS Proxy Call Session Control Function(PCSCF) that were loaded from the ISIM.
178     * @return an array of PCSCF strings with one PCSCF per string, or null if
179     *      not present or not loaded
180     */
181    String[] getIsimPcscf();
182
183    /**
184     * TODO: Deprecate and remove this interface. Superceded by getIccsimChallengeResponse.
185     * Returns the response of ISIM Authetification through RIL.
186     * @return the response of ISIM Authetification, or null if
187     *     the Authentification hasn't been successed or isn't present iphonesubinfo.
188     */
189    String getIsimChallengeResponse(String nonce);
190
191    /**
192     * Returns the response of the SIM application on the UICC to authentication
193     * challenge/response algorithm. The data string and challenge response are
194     * Base64 encoded Strings.
195     * Can support EAP-SIM, EAP-AKA with results encoded per 3GPP TS 31.102.
196     *
197     * @param subId subscription ID to be queried
198     * @param appType ICC application type (@see com.android.internal.telephony.PhoneConstants#APPTYPE_xxx)
199     * @param authType Authentication type, see PhoneConstants#AUTHTYPE_xxx
200     * @param data authentication challenge data
201     * @return challenge response
202     */
203    String getIccSimChallengeResponse(int subId, int appType, int authType, String data);
204}
205