Willi Ye | daf0b73 | 2019-10-22 22:48:05 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2019, The LineageOS 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 | |
| 17 | #pragma once |
| 18 | |
| 19 | #include <hidl/MQDescriptor.h> |
| 20 | #include <hidl/Status.h> |
| 21 | #include <vendor/samsung/hardware/radio/1.2/IRadioIndication.h> |
| 22 | |
| 23 | namespace vendor { |
| 24 | namespace samsung { |
| 25 | namespace hardware { |
| 26 | namespace radio { |
| 27 | namespace V1_2 { |
| 28 | namespace implementation { |
| 29 | |
| 30 | using ::android::sp; |
| 31 | using ::android::hardware::hidl_array; |
| 32 | using ::android::hardware::hidl_memory; |
| 33 | using ::android::hardware::hidl_string; |
| 34 | using ::android::hardware::hidl_vec; |
| 35 | using ::android::hardware::Return; |
| 36 | using ::android::hardware::Void; |
| 37 | |
| 38 | struct SecRadioIndication : public IRadioIndication { |
| 39 | sp<::android::hardware::radio::V1_2::IRadioIndication> radioIndication; |
| 40 | |
| 41 | SecRadioIndication(const sp<::android::hardware::radio::V1_2::IRadioIndication>& radioIndication); |
| 42 | |
| 43 | // Methods from ::android::hardware::radio::V1_0::IRadioIndication follow. |
| 44 | Return<void> radioStateChanged(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 45 | ::android::hardware::radio::V1_0::RadioState radioState) override; |
| 46 | Return<void> callStateChanged( |
| 47 | ::android::hardware::radio::V1_0::RadioIndicationType type) override; |
| 48 | Return<void> networkStateChanged( |
| 49 | ::android::hardware::radio::V1_0::RadioIndicationType type) override; |
| 50 | Return<void> newSms(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 51 | const hidl_vec<uint8_t>& pdu) override; |
| 52 | Return<void> newSmsStatusReport(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 53 | const hidl_vec<uint8_t>& pdu) override; |
| 54 | Return<void> newSmsOnSim(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 55 | int32_t recordNumber) override; |
| 56 | Return<void> onUssd(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 57 | ::android::hardware::radio::V1_0::UssdModeType modeType, |
| 58 | const hidl_string& msg) override; |
| 59 | Return<void> nitzTimeReceived(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 60 | const hidl_string& nitzTime, uint64_t receivedTime) override; |
| 61 | Return<void> currentSignalStrength( |
| 62 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 63 | const ::android::hardware::radio::V1_0::SignalStrength& signalStrength) override; |
| 64 | Return<void> dataCallListChanged( |
| 65 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 66 | const hidl_vec<::android::hardware::radio::V1_0::SetupDataCallResult>& dcList) override; |
| 67 | Return<void> suppSvcNotify( |
| 68 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 69 | const ::android::hardware::radio::V1_0::SuppSvcNotification& suppSvc) override; |
| 70 | Return<void> stkSessionEnd(::android::hardware::radio::V1_0::RadioIndicationType type) override; |
| 71 | Return<void> stkProactiveCommand(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 72 | const hidl_string& cmd) override; |
| 73 | Return<void> stkEventNotify(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 74 | const hidl_string& cmd) override; |
| 75 | Return<void> stkCallSetup(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 76 | int64_t timeout) override; |
| 77 | Return<void> simSmsStorageFull( |
| 78 | ::android::hardware::radio::V1_0::RadioIndicationType type) override; |
| 79 | Return<void> simRefresh( |
| 80 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 81 | const ::android::hardware::radio::V1_0::SimRefreshResult& refreshResult) override; |
| 82 | Return<void> callRing( |
| 83 | ::android::hardware::radio::V1_0::RadioIndicationType type, bool isGsm, |
| 84 | const ::android::hardware::radio::V1_0::CdmaSignalInfoRecord& record) override; |
| 85 | Return<void> simStatusChanged( |
| 86 | ::android::hardware::radio::V1_0::RadioIndicationType type) override; |
| 87 | Return<void> cdmaNewSms(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 88 | const ::android::hardware::radio::V1_0::CdmaSmsMessage& msg) override; |
| 89 | Return<void> newBroadcastSms(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 90 | const hidl_vec<uint8_t>& data) override; |
| 91 | Return<void> cdmaRuimSmsStorageFull( |
| 92 | ::android::hardware::radio::V1_0::RadioIndicationType type) override; |
| 93 | Return<void> restrictedStateChanged( |
| 94 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 95 | ::android::hardware::radio::V1_0::PhoneRestrictedState state) override; |
| 96 | Return<void> enterEmergencyCallbackMode( |
| 97 | ::android::hardware::radio::V1_0::RadioIndicationType type) override; |
| 98 | Return<void> cdmaCallWaiting( |
| 99 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 100 | const ::android::hardware::radio::V1_0::CdmaCallWaiting& callWaitingRecord) override; |
| 101 | Return<void> cdmaOtaProvisionStatus( |
| 102 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 103 | ::android::hardware::radio::V1_0::CdmaOtaProvisionStatus status) override; |
| 104 | Return<void> cdmaInfoRec( |
| 105 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 106 | const ::android::hardware::radio::V1_0::CdmaInformationRecords& records) override; |
| 107 | Return<void> indicateRingbackTone(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 108 | bool start) override; |
| 109 | Return<void> resendIncallMute( |
| 110 | ::android::hardware::radio::V1_0::RadioIndicationType type) override; |
| 111 | Return<void> cdmaSubscriptionSourceChanged( |
| 112 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 113 | ::android::hardware::radio::V1_0::CdmaSubscriptionSource cdmaSource) override; |
| 114 | Return<void> cdmaPrlChanged(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 115 | int32_t version) override; |
| 116 | Return<void> exitEmergencyCallbackMode( |
| 117 | ::android::hardware::radio::V1_0::RadioIndicationType type) override; |
| 118 | Return<void> rilConnected(::android::hardware::radio::V1_0::RadioIndicationType type) override; |
| 119 | Return<void> voiceRadioTechChanged( |
| 120 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 121 | ::android::hardware::radio::V1_0::RadioTechnology rat) override; |
| 122 | Return<void> cellInfoList( |
| 123 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 124 | const hidl_vec<::android::hardware::radio::V1_0::CellInfo>& records) override; |
| 125 | Return<void> imsNetworkStateChanged( |
| 126 | ::android::hardware::radio::V1_0::RadioIndicationType type) override; |
| 127 | Return<void> subscriptionStatusChanged(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 128 | bool activate) override; |
| 129 | Return<void> srvccStateNotify(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 130 | ::android::hardware::radio::V1_0::SrvccState state) override; |
| 131 | Return<void> hardwareConfigChanged( |
| 132 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 133 | const hidl_vec<::android::hardware::radio::V1_0::HardwareConfig>& configs) override; |
| 134 | Return<void> radioCapabilityIndication( |
| 135 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 136 | const ::android::hardware::radio::V1_0::RadioCapability& rc) override; |
| 137 | Return<void> onSupplementaryServiceIndication( |
| 138 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 139 | const ::android::hardware::radio::V1_0::StkCcUnsolSsResult& ss) override; |
| 140 | Return<void> stkCallControlAlphaNotify(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 141 | const hidl_string& alpha) override; |
| 142 | Return<void> lceData(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 143 | const ::android::hardware::radio::V1_0::LceDataInfo& lce) override; |
| 144 | Return<void> pcoData(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 145 | const ::android::hardware::radio::V1_0::PcoDataInfo& pco) override; |
| 146 | Return<void> modemReset(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 147 | const hidl_string& reason) override; |
| 148 | |
| 149 | // Methods from ::android::hardware::radio::V1_1::IRadioIndication follow. |
| 150 | Return<void> carrierInfoForImsiEncryption( |
| 151 | ::android::hardware::radio::V1_0::RadioIndicationType info) override; |
| 152 | Return<void> networkScanResult( |
| 153 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 154 | const ::android::hardware::radio::V1_1::NetworkScanResult& result) override; |
| 155 | Return<void> keepaliveStatus( |
| 156 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 157 | const ::android::hardware::radio::V1_1::KeepaliveStatus& status) override; |
| 158 | |
| 159 | // Methods from ::android::hardware::radio::V1_2::IRadioIndication follow. |
| 160 | Return<void> networkScanResult_1_2( |
| 161 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 162 | const ::android::hardware::radio::V1_2::NetworkScanResult& result) override; |
| 163 | Return<void> cellInfoList_1_2( |
| 164 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 165 | const hidl_vec<::android::hardware::radio::V1_2::CellInfo>& records) override; |
| 166 | Return<void> currentLinkCapacityEstimate( |
| 167 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 168 | const ::android::hardware::radio::V1_2::LinkCapacityEstimate& lce) override; |
| 169 | Return<void> currentPhysicalChannelConfigs( |
| 170 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 171 | const hidl_vec<::android::hardware::radio::V1_2::PhysicalChannelConfig>& configs) override; |
| 172 | Return<void> currentSignalStrength_1_2( |
| 173 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 174 | const ::android::hardware::radio::V1_2::SignalStrength& signalStrength) override; |
| 175 | |
| 176 | // Methods from ::vendor::samsung::hardware::radio::V1_2::IRadioIndication follow. |
| 177 | Return<void> secCurrentSignalStrength( |
| 178 | ::android::hardware::radio::V1_0::RadioIndicationType type, |
| 179 | const ::vendor::samsung::hardware::radio::V1_2::SecSignalStrength& signalStrength) override; |
| 180 | Return<void> secImsNetworkStateChanged(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 181 | const hidl_vec<int32_t>& regState) override; |
| 182 | Return<void> oemAcbInfoChanged(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 183 | const hidl_vec<int32_t>& acbInfo) override; |
| 184 | Return<void> oemCsFallback(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 185 | int32_t state) override; |
| 186 | Return<void> oemImsPreferenceChangeInd(::android::hardware::radio::V1_0::RadioIndicationType type, |
| 187 | const hidl_vec<int32_t>& imsPref) override; |
| 188 | Return<void> oemVoiceRadioBearerHoStatusInd( |
| 189 | ::android::hardware::radio::V1_0::RadioIndicationType type, int32_t state) override; |
| 190 | Return<void> oemHysteresisDcnInd( |
| 191 | ::android::hardware::radio::V1_0::RadioIndicationType type) override; |
| 192 | Return<void> oemTimerStatusChangedInd(int32_t type, const hidl_vec<int32_t>& eventNoti) override; |
| 193 | Return<void> oemModemCapInd(int32_t type, const hidl_vec<int8_t>& data) override; |
| 194 | Return<void> oemAmInd(int32_t type, const hidl_string& intent) override; |
| 195 | Return<void> oemTrunRadioOnInd(int32_t type) override; |
| 196 | Return<void> oemSimPbReadyInd(int32_t type) override; |
| 197 | Return<void> oemPbInitCompleteInd(int32_t type) override; |
| 198 | Return<void> oemDeviceReadyNoti(int32_t type) override; |
| 199 | Return<void> oemStkSmsSendResultInd(int32_t type, int32_t result) override; |
| 200 | Return<void> oemStkCallControlResultInd(int32_t type, const hidl_string& cmd) override; |
| 201 | Return<void> oemSimSwapStateChangedInd(int32_t type, int32_t state) override; |
| 202 | Return<void> oemSimCountMismatchedInd(int32_t type, int32_t state) override; |
| 203 | Return<void> oemSimIccidNoti(int32_t type, const hidl_string& iccid) override; |
| 204 | Return<void> oemSimOnOffNoti(int32_t type, int32_t mode) override; |
| 205 | Return<void> oemReleaseCompleteMessageInd( |
| 206 | int32_t typer, |
| 207 | const ::vendor::samsung::hardware::radio::V1_2::OemSSReleaseComplete& result) override; |
| 208 | Return<void> oemSapNoti(int32_t type, const hidl_vec<int8_t>& data) override; |
| 209 | Return<void> oemNrBearerAllocationChangeInd(int32_t type, int32_t status) override; |
| 210 | Return<void> oem5gStatusChangeInd(int32_t type, int32_t status) override; |
| 211 | Return<void> oemNrDcParamChangeInd( |
| 212 | int32_t type, const ::vendor::samsung::hardware::radio::V1_2::DcParam& dcParam) override; |
| 213 | Return<void> oemNrSignalStrengthInd( |
| 214 | int32_t type, |
| 215 | const ::vendor::samsung::hardware::radio::V1_2::NrSignalStrength& nrSignalStrength) override; |
| 216 | Return<void> oemLoadApnProfile(const hidl_string& select, |
| 217 | oemLoadApnProfile_cb _hidl_cb) override; |
| 218 | Return<int32_t> oemGetSettingValue(const hidl_string& key, const hidl_string& table) override; |
| 219 | }; |
| 220 | |
| 221 | } // namespace implementation |
| 222 | } // namespace V1_2 |
| 223 | } // namespace radio |
| 224 | } // namespace hardware |
| 225 | } // namespace samsung |
| 226 | } // namespace vendor |