blob: 002b183635fe2637cb7b199411379fdb4e930eb3 [file] [log] [blame]
/*
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.radio@1.6;
import @1.0::CdmaSmsMessage;
import @1.0::GsmSmsMessage;
import @1.2::DataRequestReason;
import @1.5::IRadio;
import @1.5::AccessNetwork;
import @1.5::DataProfileInfo;
import @1.5::LinkAddress;
/**
* This interface is used by telephony and telecom to talk to cellular radio.
* All the functions have minimum one parameter:
* serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
* duration of a method call. If clients provide colliding serials (including passing the same
* serial to different methods), multiple responses (one for each method call) must still be served.
* setResponseFunctions must work with @1.6::IRadioResponse and @1.6::IRadioIndication.
*/
interface IRadio extends @1.5::IRadio {
/**
* Returns the data call list. An entry is added when a setupDataCall() is issued and removed
* on a deactivateDataCall(). The list is emptied when setRadioPower() off/on issued or when
* the vendor HAL or modem crashes.
*
* @param serial Serial number of request.
*
* Response function is IRadioResponse.getDataCallListResponse_1_6()
*/
oneway getDataCallList_1_6(int32_t serial);
/**
* Setup a packet data connection. If DataCallResponse.status returns DataCallFailCause:NONE,
* the data connection must be added to data calls and a unsolDataCallListChanged() must be
* sent. The call remains until removed by subsequent unsolDataCallIstChanged(). It may be
* lost due to many factors, including deactivateDataCall() being issued, the radio powered
* off, reception lost or even transient factors like congestion. This data call list is
* returned by getDataCallList() and dataCallListChanged().
*
* The Radio is expected to:
* - Create one data call context.
* - Create and configure a dedicated interface for the context.
* - The interface must be point to point.
* - The interface is configured with one or more addresses and is capable of sending and
* receiving packets. The format is IP address with optional "/" prefix length
* (The format is defined in RFC-4291 section 2.3). For example, "192.0.1.3",
* "192.0.1.11/16", or "2001:db8::1/64". Typically one IPv4 or one IPv6 or one of each. If
* the prefix length is absent, then the addresses are assumed to be point to point with
* IPv4 with prefix length 32 or IPv6 with prefix length 128.
* - Must not modify routing configuration related to this interface; routing management is
* exclusively within the purview of the Android OS.
* - Support simultaneous data call contexts up to DataRegStateResult.maxDataCalls specified
* in the response of getDataRegistrationState.
*
* @param serial Serial number of request.
* @param accessNetwork The access network to setup the data call. If the data connection cannot
* be established on the specified access network then it should be responded with an error.
* @param dataProfileInfo Data profile info.
* @param roamingAllowed Indicates whether or not data roaming is allowed by the user.
* @param reason The request reason. Must be DataRequestReason:NORMAL or
* DataRequestReason:HANDOVER.
* @param addresses If the reason is DataRequestReason:HANDOVER, this indicates the list of link
* addresses of the existing data connection. This parameter must be ignored unless reason
* is DataRequestReason:HANDOVER.
* @param dnses If the reason is DataRequestReason:HANDOVER, this indicates the list of DNS
* addresses of the existing data connection. The format is defined in RFC-4291 section 2.2.
* For example, "192.0.1.3" or "2001:db8::1". This parameter must be ignored unless reason
* is DataRequestReason:HANDOVER.
*
* Response function is IRadioResponse.setupDataCallResponse_1_6()
*
* Note this API is the same as the 1.5
*/
oneway setupDataCall_1_6(int32_t serial, AccessNetwork accessNetwork,
DataProfileInfo dataProfileInfo, bool roamingAllowed,
DataRequestReason reason, vec<LinkAddress> addresses, vec<string> dnses);
/**
* Send an SMS message
*
* @param serial Serial number of request.
* @param message GsmSmsMessage as defined in types.hal
*
* Response function is IRadioResponse.sendSmsResponse_1_6()
*
* Note this API is the same as the 1.0
*
* Based on the return error, caller decides to resend if sending sms
* fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
* and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
*/
oneway sendSms_1_6(int32_t serial, GsmSmsMessage message);
/**
* Send an SMS message. Identical to sendSms_1_6,
* except that more messages are expected to be sent soon. If possible,
* keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
*
* @param serial Serial number of request.
* @param message GsmSmsMessage as defined in types.hal
*
* Response function is IRadioResponse.sendSMSExpectMoreResponse_1_6()
*
* Note this API is the same as the 1.0
*
* Based on the return error, caller decides to resend if sending sms
* fails. RadioError:SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
* and RadioError:GENERIC_FAILURE means no retry (i.e. error cause is 500)
*/
oneway sendSMSExpectMore_1_6(int32_t serial, GsmSmsMessage message);
/**
* Send a CDMA SMS message
*
* @param serial Serial number of request.
* @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal
*
* Response callback is IRadioResponse.sendCdmaSmsResponse_1_6()
*
* Note this API is the same as the 1.0
*
*/
oneway sendCdmaSms_1_6(int32_t serial, CdmaSmsMessage sms);
/**
* Send an SMS message. Identical to sendCdmaSms_1_6,
* except that more messages are expected to be sent soon.
*
* @param serial Serial number of request.
* @param sms Cdma Sms to be sent described by CdmaSmsMessage in types.hal
*
* Response callback is IRadioResponse.sendCdmaSMSExpectMoreResponse_1_6()
*
* Note this API is the same as the 1.5
*
*/
oneway sendCdmaSmsExpectMore_1_6(int32_t serial, CdmaSmsMessage sms);
};