mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Merge "Initial version of BT SAP hal."
This commit is contained in:
@@ -9,12 +9,16 @@ genrule {
|
||||
"IRadio.hal",
|
||||
"IRadioIndication.hal",
|
||||
"IRadioResponse.hal",
|
||||
"ISap.hal",
|
||||
"ISapCallback.hal",
|
||||
],
|
||||
out: [
|
||||
"android/hardware/radio/1.0/types.cpp",
|
||||
"android/hardware/radio/1.0/RadioAll.cpp",
|
||||
"android/hardware/radio/1.0/RadioIndicationAll.cpp",
|
||||
"android/hardware/radio/1.0/RadioResponseAll.cpp",
|
||||
"android/hardware/radio/1.0/SapAll.cpp",
|
||||
"android/hardware/radio/1.0/SapCallbackAll.cpp",
|
||||
],
|
||||
}
|
||||
|
||||
@@ -27,6 +31,8 @@ genrule {
|
||||
"IRadio.hal",
|
||||
"IRadioIndication.hal",
|
||||
"IRadioResponse.hal",
|
||||
"ISap.hal",
|
||||
"ISapCallback.hal",
|
||||
],
|
||||
out: [
|
||||
"android/hardware/radio/1.0/types.h",
|
||||
@@ -45,6 +51,16 @@ genrule {
|
||||
"android/hardware/radio/1.0/BnRadioResponse.h",
|
||||
"android/hardware/radio/1.0/BpRadioResponse.h",
|
||||
"android/hardware/radio/1.0/BsRadioResponse.h",
|
||||
"android/hardware/radio/1.0/ISap.h",
|
||||
"android/hardware/radio/1.0/IHwSap.h",
|
||||
"android/hardware/radio/1.0/BnSap.h",
|
||||
"android/hardware/radio/1.0/BpSap.h",
|
||||
"android/hardware/radio/1.0/BsSap.h",
|
||||
"android/hardware/radio/1.0/ISapCallback.h",
|
||||
"android/hardware/radio/1.0/IHwSapCallback.h",
|
||||
"android/hardware/radio/1.0/BnSapCallback.h",
|
||||
"android/hardware/radio/1.0/BpSapCallback.h",
|
||||
"android/hardware/radio/1.0/BsSapCallback.h",
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
@@ -641,6 +641,108 @@ $(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SapApduType)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/1.0/SapApduType.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.radio@1.0::types.SapApduType
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SapConnectRsp)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/1.0/SapConnectRsp.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.radio@1.0::types.SapConnectRsp
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SapDisconnectType)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/1.0/SapDisconnectType.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.radio@1.0::types.SapDisconnectType
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SapResultCode)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/1.0/SapResultCode.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.radio@1.0::types.SapResultCode
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SapStatus)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/1.0/SapStatus.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.radio@1.0::types.SapStatus
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SapTransferProtocol)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/1.0/SapTransferProtocol.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.radio@1.0::types.SapTransferProtocol
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SendSmsResult)
|
||||
#
|
||||
@@ -888,6 +990,46 @@ $(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(GEN): $(LOCAL_PATH)/IRadioResponse.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISap.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/1.0/ISap.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISap.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISapCallback.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISapCallback.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.radio@1.0::ISap
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISap.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISapCallback.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/1.0/ISapCallback.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISapCallback.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.radio@1.0::ISapCallback
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISapCallback.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
include $(BUILD_JAVA_LIBRARY)
|
||||
|
||||
|
||||
@@ -1530,6 +1672,108 @@ $(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SapApduType)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/1.0/SapApduType.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.radio@1.0::types.SapApduType
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SapConnectRsp)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/1.0/SapConnectRsp.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.radio@1.0::types.SapConnectRsp
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SapDisconnectType)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/1.0/SapDisconnectType.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.radio@1.0::types.SapDisconnectType
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SapResultCode)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/1.0/SapResultCode.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.radio@1.0::types.SapResultCode
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SapStatus)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/1.0/SapStatus.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.radio@1.0::types.SapStatus
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SapTransferProtocol)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/1.0/SapTransferProtocol.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.radio@1.0::types.SapTransferProtocol
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SendSmsResult)
|
||||
#
|
||||
@@ -1777,6 +2021,46 @@ $(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(GEN): $(LOCAL_PATH)/IRadioResponse.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISap.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/1.0/ISap.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISap.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISapCallback.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISapCallback.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.radio@1.0::ISap
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISap.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISapCallback.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/radio/1.0/ISapCallback.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISapCallback.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.radio@1.0::ISapCallback
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISapCallback.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
|
||||
|
||||
|
||||
89
radio/1.0/ISap.hal
Normal file
89
radio/1.0/ISap.hal
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright (C) 2016 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.0;
|
||||
|
||||
import ISapCallback;
|
||||
|
||||
interface ISap {
|
||||
/**
|
||||
* Set callback that has response and unsolicited indication functions
|
||||
*
|
||||
* @param sapCallback Object containing response and unosolicited indication callbacks
|
||||
*/
|
||||
setCallback(ISapCallback sapCallback);
|
||||
|
||||
/**
|
||||
* CONNECT_REQ from SAP 1.1 spec 5.1.1
|
||||
*
|
||||
* @param token Id to match req-resp. Resp must include same token.
|
||||
* @param maxMsgSize MaxMsgSize to be used for SIM Access Profile connection
|
||||
*/
|
||||
oneway connectReq(int32_t token, int32_t maxMsgSize);
|
||||
|
||||
/**
|
||||
* DISCONNECT_REQ from SAP 1.1 spec 5.1.3
|
||||
*
|
||||
* @param token Id to match req-resp. Resp must include same token.
|
||||
*/
|
||||
oneway disconnectReq(int32_t token);
|
||||
|
||||
/**
|
||||
* TRANSFER_APDU_REQ from SAP 1.1 spec 5.1.6
|
||||
*
|
||||
* @param token Id to match req-resp. Resp must include same token.
|
||||
* @param type APDU command type
|
||||
* @param command CommandAPDU/CommandAPDU7816 parameter depending on type
|
||||
*/
|
||||
oneway apduReq(int32_t token, SapApduType type, vec<uint8_t> command);
|
||||
|
||||
/**
|
||||
* TRANSFER_ATR_REQ from SAP 1.1 spec 5.1.8
|
||||
*
|
||||
* @param token Id to match req-resp. Resp must include same token.
|
||||
*/
|
||||
oneway transferAtrReq(int32_t token);
|
||||
|
||||
/**
|
||||
* POWER_SIM_OFF_REQ and POWER_SIM_ON_REQ from SAP 1.1 spec 5.1.10 + 5.1.12
|
||||
*
|
||||
* @param token Id to match req-resp. Resp must include same token.
|
||||
* @param state true for on, false for off
|
||||
*/
|
||||
oneway powerReq(int32_t token, bool state);
|
||||
|
||||
/**
|
||||
* RESET_SIM_REQ from SAP 1.1 spec 5.1.14
|
||||
*
|
||||
* @param token Id to match req-resp. Resp must include same token.
|
||||
*/
|
||||
oneway resetSimReq(int32_t token);
|
||||
|
||||
/**
|
||||
* TRANSFER_CARD_READER_STATUS_REQ from SAP 1.1 spec 5.1.17
|
||||
*
|
||||
* @param token Id to match req-resp. Resp must include same token.
|
||||
*/
|
||||
oneway transferCardReaderStatusReq(int32_t token);
|
||||
|
||||
/**
|
||||
* SET_TRANSPORT_PROTOCOL_REQ from SAP 1.1 spec 5.1.20
|
||||
*
|
||||
* @param token Id to match req-resp. Resp must include same token.
|
||||
* @param transferProtocol Transport Protocol
|
||||
*/
|
||||
oneway setTransferProtocolReq(int32_t token, SapTransferProtocol transferProtocol);
|
||||
};
|
||||
151
radio/1.0/ISapCallback.hal
Normal file
151
radio/1.0/ISapCallback.hal
Normal file
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* Copyright (C) 2016 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.0;
|
||||
|
||||
interface ISapCallback {
|
||||
/**
|
||||
* CONNECT_RESP from SAP 1.1 spec 5.1.2
|
||||
*
|
||||
* @param token Id to match req-resp. Value must match the one in req.
|
||||
* @param sapConnectRsp Connection Status
|
||||
* @param maxMsgSize MaxMsgSize supported by server if request cannot be fulfilled.
|
||||
* Valid only if connectResponse is SapConnectResponse:MSG_SIZE_TOO_LARGE.
|
||||
*/
|
||||
oneway connectResponse(int32_t token, SapConnectRsp sapConnectRsp, int32_t maxMsgSize);
|
||||
|
||||
/**
|
||||
* DISCONNECT_RESP from SAP 1.1 spec 5.1.4
|
||||
*
|
||||
* @param token Id to match req-resp. Value must match the one in req.
|
||||
*/
|
||||
oneway disconnectResponse(int32_t token);
|
||||
|
||||
/**
|
||||
* DISCONNECT_IND from SAP 1.1 spec 5.1.5
|
||||
*
|
||||
* @param token Id to match req-resp. Value must match the one in req.
|
||||
* @param disconnectType Disconnect Type to indicate if shutdown is graceful or immediate
|
||||
*/
|
||||
oneway disconnectIndication(int32_t token, SapDisconnectType disconnectType);
|
||||
|
||||
/**
|
||||
* TRANSFER_APDU_RESP from SAP 1.1 spec 5.1.7
|
||||
*
|
||||
* @param token Id to match req-resp. Value must match the one in req.
|
||||
* @param type APDU command type
|
||||
* @param resultCode ResultCode to indicate if command was processed correctly
|
||||
* Possible values:
|
||||
* SapResultCode:SUCCESS,
|
||||
* SapResultCode:GENERIC_FAILURE,
|
||||
* SapResultCode:CARD_NOT_ACCESSSIBLE,
|
||||
* SapResultCode:CARD_ALREADY_POWERED_OFF,
|
||||
* SapResultCode:CARD_REMOVED
|
||||
* @param apduRsp APDU Response. Valid only if command was processed correctly and no error
|
||||
* occurred.
|
||||
*/
|
||||
oneway apduResponse(int32_t token,
|
||||
SapApduType type,
|
||||
SapResultCode resultCode,
|
||||
vec<uint8_t> apduRsp);
|
||||
|
||||
/**
|
||||
* TRANSFER_ATR_RESP from SAP 1.1 spec 5.1.9
|
||||
*
|
||||
* @param token Id to match req-resp. Value must match the one in req.
|
||||
* @param resultCode ResultCode to indicate if command was processed correctly
|
||||
* Possible values:
|
||||
* SapResultCode:SUCCESS,
|
||||
* SapResultCode:GENERIC_FAILURE,
|
||||
* SapResultCode:CARD_ALREADY_POWERED_OFF,
|
||||
* SapResultCode:CARD_REMOVED,
|
||||
* SapResultCode:DATA_NOT_AVAILABLE
|
||||
* @param atr Answer to Reset from the subscription module. Included only if no error occurred,
|
||||
* otherwise empty.
|
||||
*/
|
||||
oneway transferAtrResponse(int32_t token, SapResultCode resultCode, vec<uint8_t> atr);
|
||||
|
||||
/**
|
||||
* POWER_SIM_OFF_RESP and POWER_SIM_ON_RESP from SAP 1.1 spec 5.1.11 + 5.1.13
|
||||
*
|
||||
* @param token Id to match req-resp. Value must match the one in req.
|
||||
* @param resultCode ResultCode to indicate if command was processed correctly
|
||||
* Possible values:
|
||||
* SapResultCode:SUCCESS,
|
||||
* SapResultCode:GENERIC_FAILURE,
|
||||
* SapResultCode:CARD_NOT_ACCESSSIBLE, (possible only for power on req)
|
||||
* SapResultCode:CARD_ALREADY_POWERED_OFF, (possible only for power off req)
|
||||
* SapResultCode:CARD_REMOVED,
|
||||
* SapResultCode:CARD_ALREADY_POWERED_ON (possible only for power on req)
|
||||
*/
|
||||
oneway powerResponse(int32_t token, SapResultCode resultCode);
|
||||
|
||||
/**
|
||||
* RESET_SIM_RESP from SAP 1.1 spec 5.1.15
|
||||
*
|
||||
* @param token Id to match req-resp. Value must match the one in req.
|
||||
* @param resultCode ResultCode to indicate if command was processed correctly
|
||||
* Possible values:
|
||||
* SapResultCode:SUCCESS,
|
||||
* SapResultCode:GENERIC_FAILURE,
|
||||
* SapResultCode:CARD_NOT_ACCESSSIBLE,
|
||||
* SapResultCode:CARD_ALREADY_POWERED_OFF,
|
||||
* SapResultCode:CARD_REMOVED
|
||||
*/
|
||||
oneway resetSimResponse(int32_t token, SapResultCode resultCode);
|
||||
|
||||
/**
|
||||
* STATUS_IND from SAP 1.1 spec 5.1.16
|
||||
*
|
||||
* @param token Id to match req-resp. Value must match the one in req.
|
||||
* @param status Parameter to indicate reason for the status change.
|
||||
*/
|
||||
oneway statusIndication(int32_t token, SapStatus status);
|
||||
|
||||
/**
|
||||
* TRANSFER_CARD_READER_STATUS_REQ from SAP 1.1 spec 5.1.18
|
||||
*
|
||||
* @param token Id to match req-resp. Value must match the one in req.
|
||||
* @param resultCode ResultCode to indicate if command was processed correctly
|
||||
* Possible values:
|
||||
* SapResultCode:SUCCESS,
|
||||
* SapResultCode:GENERIC_FAILURE
|
||||
* SapResultCode:CARD_ALREADY_POWERED_ON
|
||||
* @param cardReaderStatus Card Reader Status coded as described in 3GPP TS 11.14 Section 12.33
|
||||
* and TS 31.111 Section 8.33
|
||||
*/
|
||||
oneway transferCardReaderStatusResponse(int32_t token,
|
||||
SapResultCode resultCode,
|
||||
int32_t cardReaderStatus);
|
||||
|
||||
/**
|
||||
* ERROR_RESP from SAP 1.1 spec 5.1.19
|
||||
*
|
||||
* @param token Id to match req-resp. Value must match the one in req.
|
||||
*/
|
||||
oneway errorResponse(int32_t token);
|
||||
|
||||
/**
|
||||
* SET_TRANSPORT_PROTOCOL_RESP from SAP 1.1 spec 5.1.21
|
||||
*
|
||||
* @param token Id to match req-resp. Value must match the one in req.
|
||||
* @param resultCode ResultCode to indicate if command was processed correctly
|
||||
* Possible values:
|
||||
* SapResultCode:SUCCESS
|
||||
* SapResultCode:NOT_SUPPORTED
|
||||
*/
|
||||
oneway transferProtocolResponse(int32_t token, SapResultCode resultCode);
|
||||
};
|
||||
@@ -236,6 +236,49 @@ enum RadioState : int32_t {
|
||||
UNAVAILABLE, // Radio unavailable (eg, resetting or not booted)
|
||||
};
|
||||
|
||||
enum SapConnectRsp : int32_t {
|
||||
SUCCESS,
|
||||
CONNECT_FAILURE,
|
||||
MSG_SIZE_TOO_LARGE,
|
||||
MSG_SIZE_TOO_SMALL,
|
||||
CONNECT_OK_CALL_ONGOING
|
||||
};
|
||||
|
||||
enum SapDisconnectType : int32_t {
|
||||
GRACEFUL,
|
||||
IMMEDIATE
|
||||
};
|
||||
|
||||
enum SapApduType : int32_t {
|
||||
APDU,
|
||||
APDU7816
|
||||
};
|
||||
|
||||
enum SapResultCode : int32_t {
|
||||
SUCCESS,
|
||||
GENERIC_FAILURE,
|
||||
CARD_NOT_ACCESSSIBLE,
|
||||
CARD_ALREADY_POWERED_OFF,
|
||||
CARD_REMOVED,
|
||||
CARD_ALREADY_POWERED_ON,
|
||||
DATA_NOT_AVAILABLE,
|
||||
NOT_SUPPORTED
|
||||
};
|
||||
|
||||
enum SapStatus : int32_t {
|
||||
UNKNOWN_ERROR,
|
||||
CARD_RESET,
|
||||
CARD_NOT_ACCESSIBLE,
|
||||
CARD_REMOVED,
|
||||
CARD_INSERTED,
|
||||
RECOVERED
|
||||
};
|
||||
|
||||
enum SapTransferProtocol : int32_t {
|
||||
T0,
|
||||
T1
|
||||
};
|
||||
|
||||
enum CallState : int32_t {
|
||||
ACTIVE,
|
||||
HOLDING,
|
||||
|
||||
Reference in New Issue
Block a user