Loading radio/aidl/compat/libradiocompat/Android.bp +4 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ cc_library { "android.hardware.radio.config@1.2", "android.hardware.radio.config@1.3", "android.hardware.radio.data-V1-ndk", "android.hardware.radio.ims-V1-ndk", "android.hardware.radio.messaging-V1-ndk", "android.hardware.radio.modem-V1-ndk", "android.hardware.radio.network-V2-ndk", Loading Loading @@ -69,6 +70,9 @@ cc_library { "data/RadioResponse-data.cpp", "data/RadioData.cpp", "data/structs.cpp", "ims/RadioIndication-ims.cpp", "ims/RadioResponse-ims.cpp", "ims/RadioIms.cpp", "messaging/RadioIndication-messaging.cpp", "messaging/RadioMessaging.cpp", "messaging/RadioResponse-messaging.cpp", Loading radio/aidl/compat/libradiocompat/ims/RadioIms.cpp 0 → 100644 +88 −0 Original line number Diff line number Diff line /* * Copyright (C) 2022 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. */ #include <libradiocompat/RadioIms.h> #include "commonStructs.h" #include "debug.h" #include "collections.h" #define RADIO_MODULE "Ims" namespace android::hardware::radio::compat { using ::ndk::ScopedAStatus; namespace aidl = ::aidl::android::hardware::radio::ims; constexpr auto ok = &ScopedAStatus::ok; std::shared_ptr<aidl::IRadioImsResponse> RadioIms::respond() { return mCallbackManager->response().imsCb(); } ScopedAStatus RadioIms::setSrvccCallInfo( int32_t serial, const std::vector<aidl::SrvccCall>& /*srvccCalls*/) { LOG_CALL << serial; LOG(ERROR) << " setSrvccCallInfo is unsupported by HIDL HALs"; return ok(); } ScopedAStatus RadioIms::updateImsRegistrationInfo( int32_t serial, const aidl::ImsRegistration& /*imsRegistration*/) { LOG_CALL << serial; LOG(ERROR) << " updateImsRegistrationInfo is unsupported by HIDL HALs"; return ok(); } ScopedAStatus RadioIms::startImsTraffic( int32_t serial, int32_t /*token*/, aidl::ImsTrafficType /*imsTrafficType*/, ::aidl::android::hardware::radio::AccessNetwork /*accessNetworkType*/, ::aidl::android::hardware::radio::ims::ImsCall::Direction /*trafficDirection*/) { LOG_CALL << serial; LOG(ERROR) << " startImsTraffic is unsupported by HIDL HALs"; return ok(); } ScopedAStatus RadioIms::stopImsTraffic(int32_t serial, int32_t /*token*/) { LOG_CALL << serial; LOG(ERROR) << " stopImsTraffic is unsupported by HIDL HALs"; return ok(); } ScopedAStatus RadioIms::triggerEpsFallback(int32_t serial, aidl::EpsFallbackReason /*reason*/) { LOG_CALL << serial; LOG(ERROR) << " triggerEpsFallback is unsupported by HIDL HALs"; return ok(); } ScopedAStatus RadioIms::sendAnbrQuery( int32_t serial, aidl::ImsStreamType /*mediaType*/, aidl::ImsStreamDirection /*direction*/, int32_t /*bitsPerSecond*/) { LOG_CALL << serial; LOG(ERROR) << " sendAnbrQuery is unsupported by HIDL HALs"; return ok(); } ScopedAStatus RadioIms::updateImsCallStatus( int32_t serial, const std::vector<aidl::ImsCall>& /*imsCalls*/) { LOG_CALL << serial; LOG(ERROR) << " updateImsCallStatus is unsupported by HIDL HALs"; return ok(); } ScopedAStatus RadioIms::setResponseFunctions( const std::shared_ptr<aidl::IRadioImsResponse>& response, const std::shared_ptr<aidl::IRadioImsIndication>& indication) { LOG_CALL << response << ' ' << indication; mCallbackManager->setResponseFunctions(response, indication); return ok(); } } // namespace android::hardware::radio::compat radio/aidl/compat/libradiocompat/ims/RadioIndication-ims.cpp 0 → 100644 +39 −0 Original line number Diff line number Diff line /* * Copyright (C) 2022 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. */ #include <libradiocompat/RadioIndication.h> #include "commonStructs.h" #include "debug.h" #include "collections.h" #define RADIO_MODULE "ImsIndication" namespace android::hardware::radio::compat { using ::aidl::android::hardware::radio::RadioTechnology; namespace aidl = ::aidl::android::hardware::radio::ims; void RadioIndication::setResponseFunction(std::shared_ptr<aidl::IRadioImsIndication> imsCb) { mImsCb = imsCb; } std::shared_ptr<aidl::IRadioImsIndication> RadioIndication::imsCb() { return mImsCb.get(); } } // namespace android::hardware::radio::compat radio/aidl/compat/libradiocompat/ims/RadioResponse-ims.cpp 0 → 100644 +38 −0 Original line number Diff line number Diff line /* * Copyright (C) 2022 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. */ #include <libradiocompat/RadioResponse.h> #include "commonStructs.h" #include "debug.h" #include "collections.h" #define RADIO_MODULE "ImsResponse" namespace android::hardware::radio::compat { namespace aidl = ::aidl::android::hardware::radio::ims; void RadioResponse::setResponseFunction(std::shared_ptr<aidl::IRadioImsResponse> imsCb) { mImsCb = imsCb; } std::shared_ptr<aidl::IRadioImsResponse> RadioResponse::imsCb() { return mImsCb.get(); } } // namespace android::hardware::radio::compat radio/aidl/compat/libradiocompat/include/libradiocompat/RadioIms.h 0 → 100644 +62 −0 Original line number Diff line number Diff line /* * Copyright (C) 2022 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. */ #pragma once #include "RadioCompatBase.h" #include <aidl/android/hardware/radio/ims/BnRadioIms.h> namespace android::hardware::radio::compat { class RadioIms : public RadioCompatBase, public aidl::android::hardware::radio::ims::BnRadioIms { ::ndk::ScopedAStatus setSrvccCallInfo( int32_t serial, const std::vector<::aidl::android::hardware::radio::ims::SrvccCall>& srvccCalls) override; ::ndk::ScopedAStatus updateImsRegistrationInfo( int32_t serial, const ::aidl::android::hardware::radio::ims::ImsRegistration& imsRegistration) override; ::ndk::ScopedAStatus startImsTraffic( int32_t serial, int32_t token, ::aidl::android::hardware::radio::ims::ImsTrafficType imsTrafficType, ::aidl::android::hardware::radio::AccessNetwork accessNetworkType, ::aidl::android::hardware::radio::ims::ImsCall::Direction trafficDirection) override; ::ndk::ScopedAStatus stopImsTraffic(int32_t serial, int32_t token) override; ::ndk::ScopedAStatus triggerEpsFallback( int32_t serial, ::aidl::android::hardware::radio::ims::EpsFallbackReason reason) override; ::ndk::ScopedAStatus sendAnbrQuery( int32_t serial, ::aidl::android::hardware::radio::ims::ImsStreamType mediaType, ::aidl::android::hardware::radio::ims::ImsStreamDirection direction, int32_t bitsPerSecond) override; ::ndk::ScopedAStatus updateImsCallStatus( int32_t serial, const std::vector<::aidl::android::hardware::radio::ims::ImsCall>& imsCalls) override; ::ndk::ScopedAStatus setResponseFunctions( const std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsResponse>& radioImsResponse, const std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsIndication>& radioImsIndication) override; protected: std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsResponse> respond(); public: using RadioCompatBase::RadioCompatBase; }; } // namespace android::hardware::radio::compat Loading
radio/aidl/compat/libradiocompat/Android.bp +4 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ cc_library { "android.hardware.radio.config@1.2", "android.hardware.radio.config@1.3", "android.hardware.radio.data-V1-ndk", "android.hardware.radio.ims-V1-ndk", "android.hardware.radio.messaging-V1-ndk", "android.hardware.radio.modem-V1-ndk", "android.hardware.radio.network-V2-ndk", Loading Loading @@ -69,6 +70,9 @@ cc_library { "data/RadioResponse-data.cpp", "data/RadioData.cpp", "data/structs.cpp", "ims/RadioIndication-ims.cpp", "ims/RadioResponse-ims.cpp", "ims/RadioIms.cpp", "messaging/RadioIndication-messaging.cpp", "messaging/RadioMessaging.cpp", "messaging/RadioResponse-messaging.cpp", Loading
radio/aidl/compat/libradiocompat/ims/RadioIms.cpp 0 → 100644 +88 −0 Original line number Diff line number Diff line /* * Copyright (C) 2022 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. */ #include <libradiocompat/RadioIms.h> #include "commonStructs.h" #include "debug.h" #include "collections.h" #define RADIO_MODULE "Ims" namespace android::hardware::radio::compat { using ::ndk::ScopedAStatus; namespace aidl = ::aidl::android::hardware::radio::ims; constexpr auto ok = &ScopedAStatus::ok; std::shared_ptr<aidl::IRadioImsResponse> RadioIms::respond() { return mCallbackManager->response().imsCb(); } ScopedAStatus RadioIms::setSrvccCallInfo( int32_t serial, const std::vector<aidl::SrvccCall>& /*srvccCalls*/) { LOG_CALL << serial; LOG(ERROR) << " setSrvccCallInfo is unsupported by HIDL HALs"; return ok(); } ScopedAStatus RadioIms::updateImsRegistrationInfo( int32_t serial, const aidl::ImsRegistration& /*imsRegistration*/) { LOG_CALL << serial; LOG(ERROR) << " updateImsRegistrationInfo is unsupported by HIDL HALs"; return ok(); } ScopedAStatus RadioIms::startImsTraffic( int32_t serial, int32_t /*token*/, aidl::ImsTrafficType /*imsTrafficType*/, ::aidl::android::hardware::radio::AccessNetwork /*accessNetworkType*/, ::aidl::android::hardware::radio::ims::ImsCall::Direction /*trafficDirection*/) { LOG_CALL << serial; LOG(ERROR) << " startImsTraffic is unsupported by HIDL HALs"; return ok(); } ScopedAStatus RadioIms::stopImsTraffic(int32_t serial, int32_t /*token*/) { LOG_CALL << serial; LOG(ERROR) << " stopImsTraffic is unsupported by HIDL HALs"; return ok(); } ScopedAStatus RadioIms::triggerEpsFallback(int32_t serial, aidl::EpsFallbackReason /*reason*/) { LOG_CALL << serial; LOG(ERROR) << " triggerEpsFallback is unsupported by HIDL HALs"; return ok(); } ScopedAStatus RadioIms::sendAnbrQuery( int32_t serial, aidl::ImsStreamType /*mediaType*/, aidl::ImsStreamDirection /*direction*/, int32_t /*bitsPerSecond*/) { LOG_CALL << serial; LOG(ERROR) << " sendAnbrQuery is unsupported by HIDL HALs"; return ok(); } ScopedAStatus RadioIms::updateImsCallStatus( int32_t serial, const std::vector<aidl::ImsCall>& /*imsCalls*/) { LOG_CALL << serial; LOG(ERROR) << " updateImsCallStatus is unsupported by HIDL HALs"; return ok(); } ScopedAStatus RadioIms::setResponseFunctions( const std::shared_ptr<aidl::IRadioImsResponse>& response, const std::shared_ptr<aidl::IRadioImsIndication>& indication) { LOG_CALL << response << ' ' << indication; mCallbackManager->setResponseFunctions(response, indication); return ok(); } } // namespace android::hardware::radio::compat
radio/aidl/compat/libradiocompat/ims/RadioIndication-ims.cpp 0 → 100644 +39 −0 Original line number Diff line number Diff line /* * Copyright (C) 2022 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. */ #include <libradiocompat/RadioIndication.h> #include "commonStructs.h" #include "debug.h" #include "collections.h" #define RADIO_MODULE "ImsIndication" namespace android::hardware::radio::compat { using ::aidl::android::hardware::radio::RadioTechnology; namespace aidl = ::aidl::android::hardware::radio::ims; void RadioIndication::setResponseFunction(std::shared_ptr<aidl::IRadioImsIndication> imsCb) { mImsCb = imsCb; } std::shared_ptr<aidl::IRadioImsIndication> RadioIndication::imsCb() { return mImsCb.get(); } } // namespace android::hardware::radio::compat
radio/aidl/compat/libradiocompat/ims/RadioResponse-ims.cpp 0 → 100644 +38 −0 Original line number Diff line number Diff line /* * Copyright (C) 2022 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. */ #include <libradiocompat/RadioResponse.h> #include "commonStructs.h" #include "debug.h" #include "collections.h" #define RADIO_MODULE "ImsResponse" namespace android::hardware::radio::compat { namespace aidl = ::aidl::android::hardware::radio::ims; void RadioResponse::setResponseFunction(std::shared_ptr<aidl::IRadioImsResponse> imsCb) { mImsCb = imsCb; } std::shared_ptr<aidl::IRadioImsResponse> RadioResponse::imsCb() { return mImsCb.get(); } } // namespace android::hardware::radio::compat
radio/aidl/compat/libradiocompat/include/libradiocompat/RadioIms.h 0 → 100644 +62 −0 Original line number Diff line number Diff line /* * Copyright (C) 2022 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. */ #pragma once #include "RadioCompatBase.h" #include <aidl/android/hardware/radio/ims/BnRadioIms.h> namespace android::hardware::radio::compat { class RadioIms : public RadioCompatBase, public aidl::android::hardware::radio::ims::BnRadioIms { ::ndk::ScopedAStatus setSrvccCallInfo( int32_t serial, const std::vector<::aidl::android::hardware::radio::ims::SrvccCall>& srvccCalls) override; ::ndk::ScopedAStatus updateImsRegistrationInfo( int32_t serial, const ::aidl::android::hardware::radio::ims::ImsRegistration& imsRegistration) override; ::ndk::ScopedAStatus startImsTraffic( int32_t serial, int32_t token, ::aidl::android::hardware::radio::ims::ImsTrafficType imsTrafficType, ::aidl::android::hardware::radio::AccessNetwork accessNetworkType, ::aidl::android::hardware::radio::ims::ImsCall::Direction trafficDirection) override; ::ndk::ScopedAStatus stopImsTraffic(int32_t serial, int32_t token) override; ::ndk::ScopedAStatus triggerEpsFallback( int32_t serial, ::aidl::android::hardware::radio::ims::EpsFallbackReason reason) override; ::ndk::ScopedAStatus sendAnbrQuery( int32_t serial, ::aidl::android::hardware::radio::ims::ImsStreamType mediaType, ::aidl::android::hardware::radio::ims::ImsStreamDirection direction, int32_t bitsPerSecond) override; ::ndk::ScopedAStatus updateImsCallStatus( int32_t serial, const std::vector<::aidl::android::hardware::radio::ims::ImsCall>& imsCalls) override; ::ndk::ScopedAStatus setResponseFunctions( const std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsResponse>& radioImsResponse, const std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsIndication>& radioImsIndication) override; protected: std::shared_ptr<::aidl::android::hardware::radio::ims::IRadioImsResponse> respond(); public: using RadioCompatBase::RadioCompatBase; }; } // namespace android::hardware::radio::compat