Sarah Chin | d2a4119 | 2021-12-21 11:34:00 -0800 | [diff] [blame] | 1 | /* |
| 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 Chin | 91997ac | 2021-12-29 00:35:12 -0800 | [diff] [blame^] | 19 | RadioDataResponse::RadioDataResponse(RadioServiceTest& parent) : parent_data(parent) {} |
Sarah Chin | d2a4119 | 2021-12-21 11:34:00 -0800 | [diff] [blame] | 20 | |
| 21 | ndk::ScopedAStatus RadioDataResponse::acknowledgeRequest(int32_t /*serial*/) { |
| 22 | return ndk::ScopedAStatus::ok(); |
| 23 | } |
| 24 | |
| 25 | ndk::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 | |
| 33 | ndk::ScopedAStatus RadioDataResponse::cancelHandoverResponse(const RadioResponseInfo& info) { |
| 34 | rspInfo = info; |
| 35 | parent_data.notify(info.serial); |
| 36 | return ndk::ScopedAStatus::ok(); |
| 37 | } |
| 38 | |
| 39 | ndk::ScopedAStatus RadioDataResponse::deactivateDataCallResponse( |
| 40 | const RadioResponseInfo& /*info*/) { |
| 41 | return ndk::ScopedAStatus::ok(); |
| 42 | } |
| 43 | |
| 44 | ndk::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 | |
| 51 | ndk::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 | |
| 58 | ndk::ScopedAStatus RadioDataResponse::releasePduSessionIdResponse(const RadioResponseInfo& info) { |
| 59 | rspInfo = info; |
| 60 | parent_data.notify(info.serial); |
| 61 | return ndk::ScopedAStatus::ok(); |
| 62 | } |
| 63 | |
| 64 | ndk::ScopedAStatus RadioDataResponse::setDataAllowedResponse(const RadioResponseInfo& /*info*/) { |
| 65 | return ndk::ScopedAStatus::ok(); |
| 66 | } |
| 67 | |
| 68 | ndk::ScopedAStatus RadioDataResponse::setDataProfileResponse(const RadioResponseInfo& /*info*/) { |
| 69 | return ndk::ScopedAStatus::ok(); |
| 70 | } |
| 71 | |
| 72 | ndk::ScopedAStatus RadioDataResponse::setDataThrottlingResponse(const RadioResponseInfo& info) { |
| 73 | rspInfo = info; |
| 74 | parent_data.notify(info.serial); |
| 75 | return ndk::ScopedAStatus::ok(); |
| 76 | } |
| 77 | |
| 78 | ndk::ScopedAStatus RadioDataResponse::setInitialAttachApnResponse( |
| 79 | const RadioResponseInfo& /*info*/) { |
| 80 | return ndk::ScopedAStatus::ok(); |
| 81 | } |
| 82 | |
| 83 | ndk::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 | |
| 91 | ndk::ScopedAStatus RadioDataResponse::startHandoverResponse(const RadioResponseInfo& info) { |
| 92 | rspInfo = info; |
| 93 | parent_data.notify(info.serial); |
| 94 | return ndk::ScopedAStatus::ok(); |
| 95 | } |
| 96 | |
| 97 | ndk::ScopedAStatus RadioDataResponse::startKeepaliveResponse(const RadioResponseInfo& /*info*/, |
| 98 | const KeepaliveStatus& /*status*/) { |
| 99 | return ndk::ScopedAStatus::ok(); |
| 100 | } |
| 101 | |
| 102 | ndk::ScopedAStatus RadioDataResponse::stopKeepaliveResponse(const RadioResponseInfo& /*info*/) { |
| 103 | return ndk::ScopedAStatus::ok(); |
| 104 | } |