blob: 16e66844c641cebbcfa34d7d226fdfc494e31e23 [file] [log] [blame]
Jack Yu15c42992018-08-10 17:13:03 -07001/*
2 * Copyright (C) 2018 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.3;
18
19import @1.0::DataProfileInfo;
20import @1.2::DataRequestReason;
21import @1.2::IRadio;
22import @1.3::AccessNetwork;
23
24/**
25 * This interface is used by telephony and telecom to talk to cellular radio.
26 * All the functions have minimum one parameter:
27 * serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
28 * duration of a method call. If clients provide colliding serials (including passing the same
29 * serial to different methods), multiple responses (one for each method call) must still be served.
30 * setResponseFunctions must work with @1.1::IRadioResponse and @1.1::IRadioIndication.
31 */
32interface IRadio extends @1.2::IRadio {
33 /**
34 * Setup a packet data connection. If DataCallResponse.status returns DataCallFailCause:NONE,
35 * the data connection must be added to data calls and a unsolDataCallListChanged() must be
36 * sent. The call remains until removed by subsequent unsolDataCallIstChanged(). It may be
37 * lost due to many factors, including deactivateDataCall() being issued, the radio powered
38 * off, reception lost or even transient factors like congestion. This data call list is
39 * returned by getDataCallList() and dataCallListChanged().
40 *
41 * The Radio is expected to:
42 * - Create one data call context.
43 * - Create and configure a dedicated interface for the context.
44 * - The interface must be point to point.
45 * - The interface is configured with one or more addresses and is capable of sending and
46 * receiving packets. The prefix length of the addresses must be /32 for IPv4 and /128
47 * for IPv6.
48 * - Must not modify routing configuration related to this interface; routing management is
49 * exclusively within the purview of the Android OS.
50 * - Support simultaneous data call contexts up to DataRegStateResult.maxDataCalls specified
51 * in the response of getDataRegistrationState.
52 *
53 * @param serial Serial number of request.
54 * @param accessNetwork The access network to setup the data call. If the data connection cannot
55 * be established on the specified access network, the setup request must be failed.
56 * @param dataProfileInfo Data profile info.
57 * @param modemCognitive Indicates that the requested profile has previously been provided via
58 * setDataProfile().
59 * @param roamingAllowed Indicates whether or not data roaming is allowed by the user.
60 * @param isRoaming Indicates whether or not the framework has requested this setupDataCall for
61 * a roaming network. The 'protocol' parameter in the old RIL API must be filled
62 * accordingly based on the roaming condition. Note this is for backward compatibility with
63 * the old radio modem. The modem must not use this param for any other reason.
64 * @param reason The request reason. Must be DataRequestReason.NORMAL or
65 * DataRequestReason.HANDOVER.
66 * @param addresses If the reason is DataRequestReason.HANDOVER, this indicates the list of link
67 * addresses of the existing data connection. The format is IP address with optional "/"
68 * prefix length (The format is defined in RFC-4291 section 2.3). For example, "192.0.1.3",
69 * "192.0.1.11/16", or "2001:db8::1/64". Typically one IPv4 or one IPv6 or one of each. If
70 * the prefix length is absent, then the addresses are assumed to be point to point with
71 * IPv4 with prefix length 32 or IPv6 with prefix length 128. This parameter must be ignored
72 * unless reason is DataRequestReason.HANDOVER.
73 * @param dnses If the reason is DataRequestReason.HANDOVER, this indicates the list of DNS
74 * addresses of the existing data connection. The format is defined in RFC-4291 section
75 * 2.2. For example, "192.0.1.3" or "2001:db8::1". This parameter must be ignored unless
76 * reason is DataRequestReason.HANDOVER.
77 *
78 * Response function is IRadioResponse.setupDataCallResponse()
79 *
80 * Note this API is same as 1.2 version except using the 1.3 AccessNetwork as the input param.
81 */
82 oneway setupDataCall_1_3(int32_t serial, AccessNetwork accessNetwork,
83 DataProfileInfo dataProfileInfo, bool modemCognitive, bool roamingAllowed,
84 bool isRoaming, DataRequestReason reason, vec<string> addresses, vec<string> dnses);
85};