blob: 9b17bfb3809b34c1125b7ad819866c7890c20948 [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
39ndk::ScopedAStatus RadioDataResponse::deactivateDataCallResponse(
40 const RadioResponseInfo& /*info*/) {
41 return ndk::ScopedAStatus::ok();
42}
43
44ndk::ScopedAStatus RadioDataResponse::getDataCallListResponse(
45 const RadioResponseInfo& info, const std::vector<SetupDataCallResult>& /*dcResponse*/) {
46 rspInfo = info;
47 parent_data.notify(info.serial);
48 return ndk::ScopedAStatus::ok();
49}
50
51ndk::ScopedAStatus RadioDataResponse::getSlicingConfigResponse(
52 const RadioResponseInfo& info, const SlicingConfig& /*slicingConfig*/) {
53 rspInfo = info;
54 parent_data.notify(info.serial);
55 return ndk::ScopedAStatus::ok();
56}
57
58ndk::ScopedAStatus RadioDataResponse::releasePduSessionIdResponse(const RadioResponseInfo& info) {
59 rspInfo = info;
60 parent_data.notify(info.serial);
61 return ndk::ScopedAStatus::ok();
62}
63
64ndk::ScopedAStatus RadioDataResponse::setDataAllowedResponse(const RadioResponseInfo& /*info*/) {
65 return ndk::ScopedAStatus::ok();
66}
67
68ndk::ScopedAStatus RadioDataResponse::setDataProfileResponse(const RadioResponseInfo& /*info*/) {
69 return ndk::ScopedAStatus::ok();
70}
71
72ndk::ScopedAStatus RadioDataResponse::setDataThrottlingResponse(const RadioResponseInfo& info) {
73 rspInfo = info;
74 parent_data.notify(info.serial);
75 return ndk::ScopedAStatus::ok();
76}
77
78ndk::ScopedAStatus RadioDataResponse::setInitialAttachApnResponse(
79 const RadioResponseInfo& /*info*/) {
80 return ndk::ScopedAStatus::ok();
81}
82
83ndk::ScopedAStatus RadioDataResponse::setupDataCallResponse(const RadioResponseInfo& info,
84 const SetupDataCallResult& dcResponse) {
85 rspInfo = info;
86 setupDataCallResult = dcResponse;
87 parent_data.notify(info.serial);
88 return ndk::ScopedAStatus::ok();
89}
90
91ndk::ScopedAStatus RadioDataResponse::startHandoverResponse(const RadioResponseInfo& info) {
92 rspInfo = info;
93 parent_data.notify(info.serial);
94 return ndk::ScopedAStatus::ok();
95}
96
97ndk::ScopedAStatus RadioDataResponse::startKeepaliveResponse(const RadioResponseInfo& /*info*/,
98 const KeepaliveStatus& /*status*/) {
99 return ndk::ScopedAStatus::ok();
100}
101
102ndk::ScopedAStatus RadioDataResponse::stopKeepaliveResponse(const RadioResponseInfo& /*info*/) {
103 return ndk::ScopedAStatus::ok();
104}