blob: 3a07f84f3592effa0c9bf7e9535068ebc875cbad [file] [log] [blame]
Hunsuk Choi9ea1ce12022-10-05 04:44:38 +00001/*
2 * Copyright (C) 2022 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#include <libradiocompat/RadioIms.h>
18
19#include "commonStructs.h"
20#include "debug.h"
21
22#include "collections.h"
23
24#define RADIO_MODULE "Ims"
25
26namespace android::hardware::radio::compat {
27
28using ::ndk::ScopedAStatus;
29namespace aidl = ::aidl::android::hardware::radio::ims;
30constexpr auto ok = &ScopedAStatus::ok;
31
32std::shared_ptr<aidl::IRadioImsResponse> RadioIms::respond() {
33 return mCallbackManager->response().imsCb();
34}
35
36ScopedAStatus RadioIms::setSrvccCallInfo(
37 int32_t serial, const std::vector<aidl::SrvccCall>& /*srvccCalls*/) {
38 LOG_CALL << serial;
39 LOG(ERROR) << " setSrvccCallInfo is unsupported by HIDL HALs";
40 return ok();
41}
42ScopedAStatus RadioIms::updateImsRegistrationInfo(
43 int32_t serial, const aidl::ImsRegistration& /*imsRegistration*/) {
44 LOG_CALL << serial;
45 LOG(ERROR) << " updateImsRegistrationInfo is unsupported by HIDL HALs";
46 return ok();
47}
48ScopedAStatus RadioIms::startImsTraffic(
49 int32_t serial, const std::string& /*token*/, aidl::ImsTrafficType /*imsTrafficType*/,
50 ::aidl::android::hardware::radio::AccessNetwork /*accessNetworkType*/) {
51 LOG_CALL << serial;
52 LOG(ERROR) << " startImsTraffic is unsupported by HIDL HALs";
53 return ok();
54}
55ScopedAStatus RadioIms::stopImsTraffic(int32_t serial, const std::string& /*token*/) {
56 LOG_CALL << serial;
57 LOG(ERROR) << " stopImsTraffic is unsupported by HIDL HALs";
58 return ok();
59}
60ScopedAStatus RadioIms::triggerEpsFallback(int32_t serial, aidl::EpsFallbackReason /*reason*/) {
61 LOG_CALL << serial;
62 LOG(ERROR) << " triggerEpsFallback is unsupported by HIDL HALs";
63 return ok();
64}
65ScopedAStatus RadioIms::sendAnbrQuery(
66 int32_t serial, aidl::ImsStreamType /*mediaType*/, aidl::ImsStreamDirection /*direction*/,
67 int32_t /*bitsPerSecond*/) {
68 LOG_CALL << serial;
69 LOG(ERROR) << " sendAnbrQuery is unsupported by HIDL HALs";
70 return ok();
71}
72
73ScopedAStatus RadioIms::setResponseFunctions(
74 const std::shared_ptr<aidl::IRadioImsResponse>& response,
75 const std::shared_ptr<aidl::IRadioImsIndication>& indication) {
76 LOG_CALL << response << ' ' << indication;
77 mCallbackManager->setResponseFunctions(response, indication);
78 return ok();
79}
80
81} // namespace android::hardware::radio::compat