• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2025 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 
17 #define FAILURE_DEBUG_PREFIX "RadioIms"
18 
19 #include "RadioIms.h"
20 #include "debug.h"
21 #include "makeRadioResponseInfo.h"
22 
23 namespace aidl {
24 namespace android {
25 namespace hardware {
26 namespace radio {
27 namespace implementation {
28 
RadioIms(std::shared_ptr<AtChannel> atChannel)29 RadioIms::RadioIms(std::shared_ptr<AtChannel> atChannel) {
30 }
31 
setSrvccCallInfo(const int32_t serial,const std::vector<ims::SrvccCall> &)32 ScopedAStatus RadioIms::setSrvccCallInfo(
33         const int32_t serial, const std::vector<ims::SrvccCall>& /*srvccCalls*/) {
34     NOT_NULL(mRadioImsResponse)->setSrvccCallInfoResponse(
35         makeRadioResponseInfoNOP(serial));
36     return ScopedAStatus::ok();
37 }
38 
updateImsRegistrationInfo(const int32_t serial,const ims::ImsRegistration &)39 ScopedAStatus RadioIms::updateImsRegistrationInfo(
40         const int32_t serial, const ims::ImsRegistration& /*imsRegistration*/) {
41     NOT_NULL(mRadioImsResponse)->updateImsRegistrationInfoResponse(
42         makeRadioResponseInfoNOP(serial));
43     return ScopedAStatus::ok();
44 }
45 
startImsTraffic(const int32_t serial,int32_t,ims::ImsTrafficType,AccessNetwork,ims::ImsCall::Direction)46 ScopedAStatus RadioIms::startImsTraffic(
47         const int32_t serial, int32_t /*token*/, ims::ImsTrafficType /*imsTrafficType*/,
48         AccessNetwork /*accessNetworkType*/, ims::ImsCall::Direction /*trafficDirection*/) {
49     NOT_NULL(mRadioImsResponse)->startImsTrafficResponse(
50         makeRadioResponseInfoNOP(serial), {});
51     return ScopedAStatus::ok();
52 }
53 
stopImsTraffic(const int32_t serial,int32_t)54 ScopedAStatus RadioIms::stopImsTraffic(const int32_t serial, int32_t /*token*/) {
55     NOT_NULL(mRadioImsResponse)->stopImsTrafficResponse(
56             makeRadioResponseInfo(serial));
57     return ScopedAStatus::ok();
58 }
59 
triggerEpsFallback(const int32_t serial,ims::EpsFallbackReason)60 ScopedAStatus RadioIms::triggerEpsFallback(
61         const int32_t serial, ims::EpsFallbackReason /*reason*/) {
62     NOT_NULL(mRadioImsResponse)->triggerEpsFallbackResponse(
63             makeRadioResponseInfoNOP(serial));
64     return ScopedAStatus::ok();
65 }
66 
sendAnbrQuery(const int32_t serial,ims::ImsStreamType,ims::ImsStreamDirection,int32_t)67 ScopedAStatus RadioIms::sendAnbrQuery(
68         const int32_t serial, ims::ImsStreamType /*mediaType*/,
69         ims::ImsStreamDirection /*direction*/, int32_t /*bitsPerSecond*/) {
70     NOT_NULL(mRadioImsResponse)->sendAnbrQueryResponse(
71         makeRadioResponseInfoNOP(serial));
72     return ScopedAStatus::ok();
73 }
74 
updateImsCallStatus(const int32_t serial,const std::vector<ims::ImsCall> &)75 ScopedAStatus RadioIms::updateImsCallStatus(
76         const int32_t serial, const std::vector<ims::ImsCall>& /*imsCalls*/) {
77     NOT_NULL(mRadioImsResponse)->updateImsCallStatusResponse(
78         makeRadioResponseInfoNOP(serial));
79     return ScopedAStatus::ok();
80 }
81 
atResponseSink(const AtResponsePtr & response)82 void RadioIms::atResponseSink(const AtResponsePtr& response) {}
83 
setResponseFunctions(const std::shared_ptr<ims::IRadioImsResponse> & radioImsResponse,const std::shared_ptr<ims::IRadioImsIndication> & radioImsIndication)84 ScopedAStatus RadioIms::setResponseFunctions(
85         const std::shared_ptr<ims::IRadioImsResponse>& radioImsResponse,
86         const std::shared_ptr<ims::IRadioImsIndication>& radioImsIndication) {
87     mRadioImsResponse = NOT_NULL(radioImsResponse);
88     mRadioImsIndication = NOT_NULL(radioImsIndication);
89     return ScopedAStatus::ok();
90 }
91 
92 }  // namespace implementation
93 }  // namespace radio
94 }  // namespace hardware
95 }  // namespace android
96 }  // namespace aidl
97