blob: 002b183635fe2637cb7b199411379fdb4e930eb3 [file] [log] [blame]
Jayachandran C262b6062020-07-22 15:53:58 -07001/*
2 * Copyright (C) 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
17package android.hardware.radio@1.6;
18
allenwtsu1c3dcd32020-09-25 17:58:01 +080019
20import @1.0::CdmaSmsMessage;
21import @1.0::GsmSmsMessage;
Jayachandran C9bc276b2020-07-24 00:46:58 -070022import @1.2::DataRequestReason;
Jayachandran C262b6062020-07-22 15:53:58 -070023import @1.5::IRadio;
Jayachandran C9bc276b2020-07-24 00:46:58 -070024import @1.5::AccessNetwork;
25import @1.5::DataProfileInfo;
26import @1.5::LinkAddress;
Jayachandran C262b6062020-07-22 15:53:58 -070027
28/**
29 * This interface is used by telephony and telecom to talk to cellular radio.
30 * All the functions have minimum one parameter:
31 * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
32 * duration of a method call. If clients provide colliding serials (including passing the same
33 * serial to different methods), multiple responses (one for each method call) must still be served.
Jayachandran C9bc276b2020-07-24 00:46:58 -070034 * setResponseFunctions must work with @1.6::IRadioResponse and @1.6::IRadioIndication.
Jayachandran C262b6062020-07-22 15:53:58 -070035 */
36interface IRadio extends @1.5::IRadio {
Jayachandran C9bc276b2020-07-24 00:46:58 -070037 /**
38 * Returns the data call list. An entry is added when a setupDataCall() is issued and removed
39 * on a deactivateDataCall(). The list is emptied when setRadioPower() off/on issued or when
40 * the vendor HAL or modem crashes.
41 *
42 * @param serial Serial number of request.
43 *
44 * Response function is IRadioResponse.getDataCallListResponse_1_6()
45 */
46 oneway getDataCallList_1_6(int32_t serial);
47
48 /**
49 * Setup a packet data connection. If DataCallResponse.status returns DataCallFailCause:NONE,
50 * the data connection must be added to data calls and a unsolDataCallListChanged() must be
51 * sent. The call remains until removed by subsequent unsolDataCallIstChanged(). It may be
52 * lost due to many factors, including deactivateDataCall() being issued, the radio powered
53 * off, reception lost or even transient factors like congestion. This data call list is
54 * returned by getDataCallList() and dataCallListChanged().
55 *
56 * The Radio is expected to:
57 * - Create one data call context.
58 * - Create and configure a dedicated interface for the context.
59 * - The interface must be point to point.
60 * - The interface is configured with one or more addresses and is capable of sending and
61 * receiving packets. The format is IP address with optional "/" prefix length
62 * (The format is defined in RFC-4291 section 2.3). For example, "192.0.1.3",
63 * "192.0.1.11/16", or "2001:db8::1/64". Typically one IPv4 or one IPv6 or one of each. If
64 * the prefix length is absent, then the addresses are assumed to be point to point with
65 * IPv4 with prefix length 32 or IPv6 with prefix length 128.
66 * - Must not modify routing configuration related to this interface; routing management is
67 * exclusively within the purview of the Android OS.
68 * - Support simultaneous data call contexts up to DataRegStateResult.maxDataCalls specified
69 * in the response of getDataRegistrationState.
70 *
71 * @param serial Serial number of request.
72 * @param accessNetwork The access network to setup the data call. If the data connection cannot
73 * be established on the specified access network then it should be responded with an error.
74 * @param dataProfileInfo Data profile info.
75 * @param roamingAllowed Indicates whether or not data roaming is allowed by the user.
76 * @param reason The request reason. Must be DataRequestReason:NORMAL or
77 * DataRequestReason:HANDOVER.
78 * @param addresses If the reason is DataRequestReason:HANDOVER, this indicates the list of link
79 * addresses of the existing data connection. This parameter must be ignored unless reason
80 * is DataRequestReason:HANDOVER.
81 * @param dnses If the reason is DataRequestReason:HANDOVER, this indicates the list of DNS
82 * addresses of the existing data connection. The format is defined in RFC-4291 section 2.2.
83 * For example, "192.0.1.3" or "2001:db8::1". This parameter must be ignored unless reason
84 * is DataRequestReason:HANDOVER.
85 *
86 * Response function is IRadioResponse.setupDataCallResponse_1_6()
87 *
88 * Note this API is the same as the 1.5
89 */
90 oneway setupDataCall_1_6(int32_t serial, AccessNetwork accessNetwork,
91 DataProfileInfo dataProfileInfo, bool roamingAllowed,
92 DataRequestReason reason, vec<LinkAddress> addresses, vec<string> dnses);
allenwtsu1c3dcd32020-09-25 17:58:01 +080093
94 /**
95 * Send an SMS message
96 *
97 * @param serial Serial number of request.
98 * @param message GsmSmsMessage as defined in types.hal
99 *
100 * Response function is IRadioResponse.sendSmsResponse_1_6()
101 *
102 * Note this API is the same as the 1.0
103 *
104 * Based on the return error, caller decides to resend if sending sms
105 * fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
106 * and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
107 */
108 oneway sendSms_1_6(int32_t serial, GsmSmsMessage message);
109
110 /**
111 * Send an SMS message. Identical to sendSms_1_6,
112 * except that more messages are expected to be sent soon. If possible,
113 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
114 *
115 * @param serial Serial number of request.
116 * @param message GsmSmsMessage as defined in types.hal
117 *
118 * Response function is IRadioResponse.sendSMSExpectMoreResponse_1_6()
119 *
120 * Note this API is the same as the 1.0
121 *
122 * Based on the return error, caller decides to resend if sending sms
123 * fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
124 * and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
125 */
126 oneway sendSMSExpectMore_1_6(int32_t serial, GsmSmsMessage message);
127
128 /**
129 * Send a CDMA SMS message
130 *
131 * @param serial Serial number of request.
132 * @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal
133 *
134 * Response callback is IRadioResponse.sendCdmaSmsResponse_1_6()
135 *
136 * Note this API is the same as the 1.0
137 *
138 */
139 oneway sendCdmaSms_1_6(int32_t serial, CdmaSmsMessage sms);
140
141 /**
142 * Send an SMS message. Identical to sendCdmaSms_1_6,
143 * except that more messages are expected to be sent soon.
144 *
145 * @param serial Serial number of request.
146 * @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal
147 *
148 * Response callback is IRadioResponse.sendCdmaSMSExpectMoreResponse_1_6()
149 *
150 * Note this API is the same as the 1.5
151 *
152 */
153 oneway sendCdmaSmsExpectMore_1_6(int32_t serial, CdmaSmsMessage sms);
Jayachandran C262b6062020-07-22 15:53:58 -0700154};