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 "RefImsMedia.h"
18 
19 namespace cf::ril {
20 
21 using ::ndk::ScopedAStatus;
22 using namespace ::aidl::android::hardware::radio::ims::media;
23 constexpr auto ok = &ScopedAStatus::ok;
24 std::shared_ptr<IImsMediaSessionListener> mediaSessionListener;
25 
setListener(const std::shared_ptr<::aidl::android::hardware::radio::ims::media::IImsMediaSessionListener> & in_sessionListener)26 ScopedAStatus RefImsMediaSession::setListener(
27         const std::shared_ptr<
28                 ::aidl::android::hardware::radio::ims::media::IImsMediaSessionListener>&
29                 in_sessionListener) {
30     mediaSessionListener = in_sessionListener;
31     return ok();
32 }
33 
modifySession(const::aidl::android::hardware::radio::ims::media::RtpConfig & in_config)34 ScopedAStatus RefImsMediaSession::modifySession(
35         const ::aidl::android::hardware::radio::ims::media::RtpConfig& in_config) {
36     mediaSessionListener->onModifySessionResponse(
37             in_config, ::aidl::android::hardware::radio::ims::media::RtpError::NONE);
38     return ok();
39 }
40 
sendDtmf(char16_t in_dtmfDigit,int32_t in_duration)41 ScopedAStatus RefImsMediaSession::sendDtmf(char16_t in_dtmfDigit, int32_t in_duration) {
42     return ok();
43 }
startDtmf(char16_t in_dtmfDigit)44 ScopedAStatus RefImsMediaSession::startDtmf(char16_t in_dtmfDigit) {
45     return ok();
46 }
stopDtmf()47 ScopedAStatus RefImsMediaSession::stopDtmf() {
48     return ok();
49 }
sendHeaderExtension(const std::vector<::aidl::android::hardware::radio::ims::media::RtpHeaderExtension> & in_extensions)50 ScopedAStatus RefImsMediaSession::sendHeaderExtension(
51         const std::vector<::aidl::android::hardware::radio::ims::media::RtpHeaderExtension>&
52                 in_extensions) {
53     return ok();
54 }
setMediaQualityThreshold(const::aidl::android::hardware::radio::ims::media::MediaQualityThreshold & in_threshold)55 ScopedAStatus RefImsMediaSession::setMediaQualityThreshold(
56         const ::aidl::android::hardware::radio::ims::media::MediaQualityThreshold& in_threshold) {
57     return ok();
58 }
59 
60 }  // namespace cf::ril
61