Hunsuk Choi | 9d4f38c | 2021-12-16 21:50:04 +0000 | [diff] [blame] | 1 | /* |
Hunsuk Choi | d12c2f0 | 2022-10-06 01:00:53 +0000 | [diff] [blame] | 2 | * Copyright (C) 2022 The Android Open Source Project |
Hunsuk Choi | 9d4f38c | 2021-12-16 21:50:04 +0000 | [diff] [blame] | 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 "radio_ims_utils.h" |
| 18 | |
| 19 | RadioImsResponse::RadioImsResponse(RadioServiceTest& parent) : parent_ims(parent) {} |
| 20 | |
| 21 | ndk::ScopedAStatus RadioImsResponse::setSrvccCallInfoResponse(const RadioResponseInfo& info) { |
| 22 | rspInfo = info; |
| 23 | parent_ims.notify(info.serial); |
| 24 | return ndk::ScopedAStatus::ok(); |
| 25 | } |
| 26 | |
| 27 | ndk::ScopedAStatus RadioImsResponse::updateImsRegistrationInfoResponse( |
| 28 | const RadioResponseInfo& info) { |
| 29 | rspInfo = info; |
| 30 | parent_ims.notify(info.serial); |
| 31 | return ndk::ScopedAStatus::ok(); |
| 32 | } |
| 33 | |
Hunsuk Choi | f3ef4ff | 2022-03-29 03:10:35 +0000 | [diff] [blame] | 34 | ndk::ScopedAStatus RadioImsResponse::startImsTrafficResponse(const RadioResponseInfo& info, |
| 35 | const std::optional<ConnectionFailureInfo>& response) { |
Hunsuk Choi | 9d4f38c | 2021-12-16 21:50:04 +0000 | [diff] [blame] | 36 | rspInfo = info; |
Hunsuk Choi | f3ef4ff | 2022-03-29 03:10:35 +0000 | [diff] [blame] | 37 | startImsTrafficResp = response; |
Hunsuk Choi | 9d4f38c | 2021-12-16 21:50:04 +0000 | [diff] [blame] | 38 | parent_ims.notify(info.serial); |
| 39 | return ndk::ScopedAStatus::ok(); |
| 40 | } |
| 41 | |
Hunsuk Choi | f3ef4ff | 2022-03-29 03:10:35 +0000 | [diff] [blame] | 42 | ndk::ScopedAStatus RadioImsResponse::stopImsTrafficResponse(const RadioResponseInfo& info) { |
Hunsuk Choi | 9d4f38c | 2021-12-16 21:50:04 +0000 | [diff] [blame] | 43 | rspInfo = info; |
| 44 | parent_ims.notify(info.serial); |
| 45 | return ndk::ScopedAStatus::ok(); |
| 46 | } |
Hwayoung | 539e1f4 | 2021-12-22 08:23:46 +0000 | [diff] [blame] | 47 | |
Hunsuk Choi | 539c998 | 2022-08-01 05:47:36 +0000 | [diff] [blame] | 48 | ndk::ScopedAStatus RadioImsResponse::triggerEpsFallbackResponse(const RadioResponseInfo& info) { |
| 49 | rspInfo = info; |
| 50 | parent_ims.notify(info.serial); |
| 51 | return ndk::ScopedAStatus::ok(); |
| 52 | } |
| 53 | |
Hwayoung | 539e1f4 | 2021-12-22 08:23:46 +0000 | [diff] [blame] | 54 | ndk::ScopedAStatus RadioImsResponse::sendAnbrQueryResponse(const RadioResponseInfo& info) { |
| 55 | rspInfo = info; |
| 56 | parent_ims.notify(info.serial); |
| 57 | return ndk::ScopedAStatus::ok(); |
Hunsuk Choi | f3ef4ff | 2022-03-29 03:10:35 +0000 | [diff] [blame] | 58 | } |