• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2016 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.0;
18
19import ISapCallback;
20
21interface ISap {
22    /**
23     * Set callback that has response and unsolicited indication functions
24     *
25     * @param sapCallback Object containing response and unosolicited indication callbacks
26     */
27    setCallback(ISapCallback sapCallback);
28
29    /**
30     * CONNECT_REQ from SAP 1.1 spec 5.1.1
31     *
32     * @param token Id to match req-resp. Resp must include same token.
33     * @param maxMsgSize MaxMsgSize to be used for SIM Access Profile connection
34     */
35    oneway connectReq(int32_t token, int32_t maxMsgSize);
36
37    /**
38     * DISCONNECT_REQ from SAP 1.1 spec 5.1.3
39     *
40     * @param token Id to match req-resp. Resp must include same token.
41     */
42    oneway disconnectReq(int32_t token);
43
44    /**
45     * TRANSFER_APDU_REQ from SAP 1.1 spec 5.1.6
46     *
47     * @param token Id to match req-resp. Resp must include same token.
48     * @param type APDU command type
49     * @param command CommandAPDU/CommandAPDU7816 parameter depending on type
50     */
51    oneway apduReq(int32_t token, SapApduType type, vec<uint8_t> command);
52
53    /**
54     * TRANSFER_ATR_REQ from SAP 1.1 spec 5.1.8
55     *
56     * @param token Id to match req-resp. Resp must include same token.
57     */
58    oneway transferAtrReq(int32_t token);
59
60    /**
61     * POWER_SIM_OFF_REQ and POWER_SIM_ON_REQ from SAP 1.1 spec 5.1.10 + 5.1.12
62     *
63     * @param token Id to match req-resp. Resp must include same token.
64     * @param state true for on, false for off
65     */
66    oneway powerReq(int32_t token, bool state);
67
68    /**
69     * RESET_SIM_REQ from SAP 1.1 spec 5.1.14
70     *
71     * @param token Id to match req-resp. Resp must include same token.
72     */
73    oneway resetSimReq(int32_t token);
74
75    /**
76     * TRANSFER_CARD_READER_STATUS_REQ from SAP 1.1 spec 5.1.17
77     *
78     * @param token Id to match req-resp. Resp must include same token.
79     */
80    oneway transferCardReaderStatusReq(int32_t token);
81
82    /**
83     * SET_TRANSPORT_PROTOCOL_REQ from SAP 1.1 spec 5.1.20
84     *
85     * @param token Id to match req-resp. Resp must include same token.
86     * @param transferProtocol Transport Protocol
87     */
88    oneway setTransferProtocolReq(int32_t token, SapTransferProtocol transferProtocol);
89};