blob: c3f15f48aea3f6c956b1238921904d1e7832afa4 [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
Jayachandran C9bc276b2020-07-24 00:46:58 -070019import @1.2::DataRequestReason;
Jayachandran C262b6062020-07-22 15:53:58 -070020import @1.5::IRadio;
Jayachandran C9bc276b2020-07-24 00:46:58 -070021import @1.5::AccessNetwork;
22import @1.5::DataProfileInfo;
23import @1.5::LinkAddress;
Jayachandran C262b6062020-07-22 15:53:58 -070024
25/**
26 * This interface is used by telephony and telecom to talk to cellular radio.
27 * All the functions have minimum one parameter:
28 * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
29 * duration of a method call. If clients provide colliding serials (including passing the same
30 * serial to different methods), multiple responses (one for each method call) must still be served.
Jayachandran C9bc276b2020-07-24 00:46:58 -070031 * setResponseFunctions must work with @1.6::IRadioResponse and @1.6::IRadioIndication.
Jayachandran C262b6062020-07-22 15:53:58 -070032 */
33interface IRadio extends @1.5::IRadio {
Jayachandran C9bc276b2020-07-24 00:46:58 -070034 /**
35 * Returns the data call list. An entry is added when a setupDataCall() is issued and removed
36 * on a deactivateDataCall(). The list is emptied when setRadioPower() off/on issued or when
37 * the vendor HAL or modem crashes.
38 *
39 * @param serial Serial number of request.
40 *
41 * Response function is IRadioResponse.getDataCallListResponse_1_6()
42 */
43 oneway getDataCallList_1_6(int32_t serial);
44
45 /**
46 * Setup a packet data connection. If DataCallResponse.status returns DataCallFailCause:NONE,
47 * the data connection must be added to data calls and a unsolDataCallListChanged() must be
48 * sent. The call remains until removed by subsequent unsolDataCallIstChanged(). It may be
49 * lost due to many factors, including deactivateDataCall() being issued, the radio powered
50 * off, reception lost or even transient factors like congestion. This data call list is
51 * returned by getDataCallList() and dataCallListChanged().
52 *
53 * The Radio is expected to:
54 * - Create one data call context.
55 * - Create and configure a dedicated interface for the context.
56 * - The interface must be point to point.
57 * - The interface is configured with one or more addresses and is capable of sending and
58 * receiving packets. The format is IP address with optional "/" prefix length
59 * (The format is defined in RFC-4291 section 2.3). For example, "192.0.1.3",
60 * "192.0.1.11/16", or "2001:db8::1/64". Typically one IPv4 or one IPv6 or one of each. If
61 * the prefix length is absent, then the addresses are assumed to be point to point with
62 * IPv4 with prefix length 32 or IPv6 with prefix length 128.
63 * - Must not modify routing configuration related to this interface; routing management is
64 * exclusively within the purview of the Android OS.
65 * - Support simultaneous data call contexts up to DataRegStateResult.maxDataCalls specified
66 * in the response of getDataRegistrationState.
67 *
68 * @param serial Serial number of request.
69 * @param accessNetwork The access network to setup the data call. If the data connection cannot
70 * be established on the specified access network then it should be responded with an error.
71 * @param dataProfileInfo Data profile info.
72 * @param roamingAllowed Indicates whether or not data roaming is allowed by the user.
73 * @param reason The request reason. Must be DataRequestReason:NORMAL or
74 * DataRequestReason:HANDOVER.
75 * @param addresses If the reason is DataRequestReason:HANDOVER, this indicates the list of link
76 * addresses of the existing data connection. This parameter must be ignored unless reason
77 * is DataRequestReason:HANDOVER.
78 * @param dnses If the reason is DataRequestReason:HANDOVER, this indicates the list of DNS
79 * addresses of the existing data connection. The format is defined in RFC-4291 section 2.2.
80 * For example, "192.0.1.3" or "2001:db8::1". This parameter must be ignored unless reason
81 * is DataRequestReason:HANDOVER.
82 *
83 * Response function is IRadioResponse.setupDataCallResponse_1_6()
84 *
85 * Note this API is the same as the 1.5
86 */
87 oneway setupDataCall_1_6(int32_t serial, AccessNetwork accessNetwork,
88 DataProfileInfo dataProfileInfo, bool roamingAllowed,
89 DataRequestReason reason, vec<LinkAddress> addresses, vec<string> dnses);
Jayachandran C262b6062020-07-22 15:53:58 -070090};