blob: 7a90ebd76dafcc5370bcda2259e59627142ba7b9 [file] [log] [blame]
Hunsuk Choi9d4f38c2021-12-16 21:50:04 +00001/*
2 * Copyright (C) 2021 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 "radio_ims_utils.h"
18
19RadioImsResponse::RadioImsResponse(RadioServiceTest& parent) : parent_ims(parent) {}
20
21ndk::ScopedAStatus RadioImsResponse::setSrvccCallInfoResponse(const RadioResponseInfo& info) {
22 rspInfo = info;
23 parent_ims.notify(info.serial);
24 return ndk::ScopedAStatus::ok();
25}
26
27ndk::ScopedAStatus RadioImsResponse::updateImsRegistrationInfoResponse(
28 const RadioResponseInfo& info) {
29 rspInfo = info;
30 parent_ims.notify(info.serial);
31 return ndk::ScopedAStatus::ok();
32}
33
Hunsuk Choif3ef4ff2022-03-29 03:10:35 +000034ndk::ScopedAStatus RadioImsResponse::startImsTrafficResponse(const RadioResponseInfo& info,
35 const std::optional<ConnectionFailureInfo>& response) {
Hunsuk Choi9d4f38c2021-12-16 21:50:04 +000036 rspInfo = info;
Hunsuk Choif3ef4ff2022-03-29 03:10:35 +000037 startImsTrafficResp = response;
Hunsuk Choi9d4f38c2021-12-16 21:50:04 +000038 parent_ims.notify(info.serial);
39 return ndk::ScopedAStatus::ok();
40}
41
Hunsuk Choif3ef4ff2022-03-29 03:10:35 +000042ndk::ScopedAStatus RadioImsResponse::stopImsTrafficResponse(const RadioResponseInfo& info) {
Hunsuk Choi9d4f38c2021-12-16 21:50:04 +000043 rspInfo = info;
44 parent_ims.notify(info.serial);
45 return ndk::ScopedAStatus::ok();
46}
Hwayoung539e1f42021-12-22 08:23:46 +000047
Hwayoung539e1f42021-12-22 08:23:46 +000048ndk::ScopedAStatus RadioImsResponse::sendAnbrQueryResponse(const RadioResponseInfo& info) {
49 rspInfo = info;
50 parent_ims.notify(info.serial);
51 return ndk::ScopedAStatus::ok();
Hunsuk Choif3ef4ff2022-03-29 03:10:35 +000052}