blob: 8d51760295d66bc2e0b6470c81ff9c57de2cc9ec [file] [log] [blame]
Sarah Chind2a41192021-12-21 11:34:00 -08001/*
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_data_utils.h"
18
Sarah Chin91997ac2021-12-29 00:35:12 -080019RadioDataResponse::RadioDataResponse(RadioServiceTest& parent) : parent_data(parent) {}
Sarah Chind2a41192021-12-21 11:34:00 -080020
21ndk::ScopedAStatus RadioDataResponse::acknowledgeRequest(int32_t /*serial*/) {
22 return ndk::ScopedAStatus::ok();
23}
24
25ndk::ScopedAStatus RadioDataResponse::allocatePduSessionIdResponse(const RadioResponseInfo& info,
26 int32_t id) {
27 rspInfo = info;
28 allocatedPduSessionId = id;
29 parent_data.notify(info.serial);
30 return ndk::ScopedAStatus::ok();
31}
32
33ndk::ScopedAStatus RadioDataResponse::cancelHandoverResponse(const RadioResponseInfo& info) {
34 rspInfo = info;
35 parent_data.notify(info.serial);
36 return ndk::ScopedAStatus::ok();
37}
38
Sarah Chin52de0ad2022-01-28 01:02:16 -080039ndk::ScopedAStatus RadioDataResponse::deactivateDataCallResponse(const RadioResponseInfo& info) {
40 rspInfo = info;
41 parent_data.notify(info.serial);
Sarah Chind2a41192021-12-21 11:34:00 -080042 return ndk::ScopedAStatus::ok();
43}
44
45ndk::ScopedAStatus RadioDataResponse::getDataCallListResponse(
46 const RadioResponseInfo& info, const std::vector<SetupDataCallResult>& /*dcResponse*/) {
47 rspInfo = info;
48 parent_data.notify(info.serial);
49 return ndk::ScopedAStatus::ok();
50}
51
52ndk::ScopedAStatus RadioDataResponse::getSlicingConfigResponse(
53 const RadioResponseInfo& info, const SlicingConfig& /*slicingConfig*/) {
54 rspInfo = info;
55 parent_data.notify(info.serial);
56 return ndk::ScopedAStatus::ok();
57}
58
59ndk::ScopedAStatus RadioDataResponse::releasePduSessionIdResponse(const RadioResponseInfo& info) {
60 rspInfo = info;
61 parent_data.notify(info.serial);
62 return ndk::ScopedAStatus::ok();
63}
64
Sarah Chin52de0ad2022-01-28 01:02:16 -080065ndk::ScopedAStatus RadioDataResponse::setDataAllowedResponse(const RadioResponseInfo& info) {
66 rspInfo = info;
67 parent_data.notify(info.serial);
Sarah Chind2a41192021-12-21 11:34:00 -080068 return ndk::ScopedAStatus::ok();
69}
70
Sarah Chin52de0ad2022-01-28 01:02:16 -080071ndk::ScopedAStatus RadioDataResponse::setDataProfileResponse(const RadioResponseInfo& info) {
72 rspInfo = info;
73 parent_data.notify(info.serial);
Sarah Chind2a41192021-12-21 11:34:00 -080074 return ndk::ScopedAStatus::ok();
75}
76
77ndk::ScopedAStatus RadioDataResponse::setDataThrottlingResponse(const RadioResponseInfo& info) {
78 rspInfo = info;
79 parent_data.notify(info.serial);
80 return ndk::ScopedAStatus::ok();
81}
82
Sarah Chin52de0ad2022-01-28 01:02:16 -080083ndk::ScopedAStatus RadioDataResponse::setInitialAttachApnResponse(const RadioResponseInfo& info) {
84 rspInfo = info;
85 parent_data.notify(info.serial);
Sarah Chind2a41192021-12-21 11:34:00 -080086 return ndk::ScopedAStatus::ok();
87}
88
89ndk::ScopedAStatus RadioDataResponse::setupDataCallResponse(const RadioResponseInfo& info,
90 const SetupDataCallResult& dcResponse) {
91 rspInfo = info;
92 setupDataCallResult = dcResponse;
93 parent_data.notify(info.serial);
94 return ndk::ScopedAStatus::ok();
95}
96
97ndk::ScopedAStatus RadioDataResponse::startHandoverResponse(const RadioResponseInfo& info) {
98 rspInfo = info;
99 parent_data.notify(info.serial);
100 return ndk::ScopedAStatus::ok();
101}
102
Sarah Chin52de0ad2022-01-28 01:02:16 -0800103ndk::ScopedAStatus RadioDataResponse::startKeepaliveResponse(const RadioResponseInfo& info,
Sarah Chind2a41192021-12-21 11:34:00 -0800104 const KeepaliveStatus& /*status*/) {
Sarah Chin52de0ad2022-01-28 01:02:16 -0800105 rspInfo = info;
106 parent_data.notify(info.serial);
Sarah Chind2a41192021-12-21 11:34:00 -0800107 return ndk::ScopedAStatus::ok();
108}
109
Sarah Chin52de0ad2022-01-28 01:02:16 -0800110ndk::ScopedAStatus RadioDataResponse::stopKeepaliveResponse(const RadioResponseInfo& info) {
111 rspInfo = info;
112 parent_data.notify(info.serial);
Sarah Chind2a41192021-12-21 11:34:00 -0800113 return ndk::ScopedAStatus::ok();
114}