• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2018 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.1 (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.1
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 #ifndef ANDROID_HARDWARE_RADIO_V1_2_SAP_H
17 #define ANDROID_HARDWARE_RADIO_V1_2_SAP_H
18 
19 #include <android/hardware/radio/1.2/ISap.h>
20 #include <hidl/MQDescriptor.h>
21 #include <hidl/Status.h>
22 
23 namespace android {
24 namespace hardware {
25 namespace radio {
26 namespace V1_2 {
27 namespace implementation {
28 
29 using ::android::hardware::hidl_array;
30 using ::android::hardware::hidl_memory;
31 using ::android::hardware::hidl_string;
32 using ::android::hardware::hidl_vec;
33 using ::android::hardware::Return;
34 using ::android::hardware::Void;
35 using ::android::sp;
36 
37 struct Sap : public ISap {
38     sp<::android::hardware::radio::V1_0::ISapCallback> mSapCallback;
39     // Methods from ::android::hardware::radio::V1_0::ISap follow.
40     Return<void> setCallback(
41         const sp<::android::hardware::radio::V1_0::ISapCallback>& sapCallback) override;
42     Return<void> connectReq(int32_t token, int32_t maxMsgSize) override;
43     Return<void> disconnectReq(int32_t token) override;
44     Return<void> apduReq(int32_t token, ::android::hardware::radio::V1_0::SapApduType type,
45                          const hidl_vec<uint8_t>& command) override;
46     Return<void> transferAtrReq(int32_t token) override;
47     Return<void> powerReq(int32_t token, bool state) override;
48     Return<void> resetSimReq(int32_t token) override;
49     Return<void> transferCardReaderStatusReq(int32_t token) override;
50     Return<void> setTransferProtocolReq(
51         int32_t token,
52         ::android::hardware::radio::V1_0::SapTransferProtocol transferProtocol) override;
53 };
54 
55 }  // namespace implementation
56 }  // namespace V1_2
57 }  // namespace radio
58 }  // namespace hardware
59 }  // namespace android
60 
61 #endif  // ANDROID_HARDWARE_RADIO_V1_2_SAP_H
62