1 /*
2  * Copyright (C) 2023 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/RadioImsMediaSession.h>
18 
19 #include "commonStructs.h"
20 #include "debug.h"
21 
22 #include "collections.h"
23 
24 #define RADIO_MODULE "ImsMediaSession"
25 
26 namespace android::hardware::radio::compat {
27 
28 using ::ndk::ScopedAStatus;
29 namespace aidl = ::aidl::android::hardware::radio::ims::media;
30 constexpr auto ok = &ScopedAStatus::ok;
31 
setListener(const std::shared_ptr<aidl::IImsMediaSessionListener> &)32 ScopedAStatus RadioImsMediaSession::setListener(
33         const std::shared_ptr<aidl::IImsMediaSessionListener>& /*in_sessionListener*/) {
34     LOG(ERROR) << " setListener is unsupported by HIDL HALs";
35     return ok();
36 }
modifySession(const aidl::RtpConfig &)37 ScopedAStatus RadioImsMediaSession::modifySession(const aidl::RtpConfig& /*in_config*/) {
38     LOG(ERROR) << " modifySession is unsupported by HIDL HALs";
39     return ok();
40 }
sendDtmf(char16_t,int32_t)41 ScopedAStatus RadioImsMediaSession::sendDtmf(char16_t /*in_dtmfDigit*/, int32_t /*in_duration*/) {
42     LOG(ERROR) << " sendDtmf is unsupported by HIDL HALs";
43     return ok();
44 }
startDtmf(char16_t)45 ScopedAStatus RadioImsMediaSession::startDtmf(char16_t /*in_dtmfDigit*/) {
46     LOG(ERROR) << " startDtmf is unsupported by HIDL HALs";
47     return ok();
48 }
stopDtmf()49 ScopedAStatus RadioImsMediaSession::stopDtmf() {
50     LOG(ERROR) << " stopDtmf is unsupported by HIDL HALs";
51     return ok();
52 }
sendHeaderExtension(const std::vector<aidl::RtpHeaderExtension> &)53 ScopedAStatus RadioImsMediaSession::sendHeaderExtension(
54         const std::vector<aidl::RtpHeaderExtension>& /*in_extensions*/) {
55     LOG(ERROR) << " sendHeaderExtension is unsupported by HIDL HALs";
56     return ok();
57 }
setMediaQualityThreshold(const aidl::MediaQualityThreshold &)58 ScopedAStatus RadioImsMediaSession::setMediaQualityThreshold(
59         const aidl::MediaQualityThreshold& /*in_threshold*/) {
60     LOG(ERROR) << " setMediaQualityThreshold is unsupported by HIDL HALs";
61     return ok();
62 }
requestRtpReceptionStats(int32_t)63 ScopedAStatus RadioImsMediaSession::requestRtpReceptionStats(int32_t /*in_intervalMs*/) {
64     LOG(ERROR) << " requestRtpReceptionStats is unsupported by HIDL HALs";
65     return ok();
66 }
adjustDelay(int32_t)67 ScopedAStatus RadioImsMediaSession::adjustDelay(int32_t /*in_delayMs*/) {
68     LOG(ERROR) << " adjustDelay is unsupported by HIDL HALs";
69     return ok();
70 }
71 }  // namespace android::hardware::radio::compat
72