Hanumant Singh | 4abaf5d | 2019-09-20 20:03:18 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2019 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 "FakeRunner.h" |
| 18 | |
| 19 | namespace android { |
| 20 | namespace automotive { |
| 21 | namespace computepipe { |
| 22 | namespace tests { |
| 23 | |
Hanumant Singh | 2d5d295 | 2019-12-17 14:34:15 -0800 | [diff] [blame] | 24 | using namespace aidl::android::automotive::computepipe::runner; |
Hanumant Singh | 9c481cf | 2019-11-08 22:18:52 -0800 | [diff] [blame] | 25 | |
Hanumant Singh | 4abaf5d | 2019-09-20 20:03:18 -0700 | [diff] [blame] | 26 | // Methods from ::android::automotive::computepipe::runner::V1_0::IFakeRunnerV1_0 follow. |
Hanumant Singh | 2d5d295 | 2019-12-17 14:34:15 -0800 | [diff] [blame] | 27 | |
| 28 | ::ndk::ScopedAStatus FakeRunner::init( |
| 29 | const std::shared_ptr< |
| 30 | ::aidl::android::automotive::computepipe::runner::IPipeStateCallback>& /* in_statecb */) { |
| 31 | return ndk::ScopedAStatus::ok(); |
Hanumant Singh | 229ce51 | 2019-12-09 12:35:09 -0800 | [diff] [blame] | 32 | } |
| 33 | |
Hanumant Singh | 2d5d295 | 2019-12-17 14:34:15 -0800 | [diff] [blame] | 34 | ::ndk::ScopedAStatus FakeRunner::getPipeDescriptor( |
| 35 | ::aidl::android::automotive::computepipe::runner::PipeDescriptor* desc) { |
| 36 | *desc = mDesc; |
| 37 | return ndk::ScopedAStatus::ok(); |
| 38 | } |
| 39 | ::ndk::ScopedAStatus FakeRunner::setPipeInputSource(int32_t /*in_configId*/) { |
| 40 | ::ndk::ScopedAStatus _aidl_status; |
| 41 | _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION)); |
| 42 | return _aidl_status; |
| 43 | } |
| 44 | ::ndk::ScopedAStatus FakeRunner::setPipeOffloadOptions(int32_t /*in_configId*/) { |
| 45 | ::ndk::ScopedAStatus _aidl_status; |
| 46 | _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION)); |
| 47 | return _aidl_status; |
| 48 | } |
| 49 | ::ndk::ScopedAStatus FakeRunner::setPipeTermination(int32_t /*in_configId*/) { |
| 50 | ::ndk::ScopedAStatus _aidl_status; |
| 51 | _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION)); |
| 52 | return _aidl_status; |
Hanumant Singh | 4abaf5d | 2019-09-20 20:03:18 -0700 | [diff] [blame] | 53 | } |
| 54 | |
Hanumant Singh | 2d5d295 | 2019-12-17 14:34:15 -0800 | [diff] [blame] | 55 | ::ndk::ScopedAStatus FakeRunner::setPipeOutputConfig( |
| 56 | int32_t /*in_configId*/, int32_t /*in_maxInFlightCount*/, |
| 57 | const std::shared_ptr< |
| 58 | ::aidl::android::automotive::computepipe::runner::IPipeStream>& /*in_handler*/) { |
| 59 | ::ndk::ScopedAStatus _aidl_status; |
| 60 | _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION)); |
| 61 | return _aidl_status; |
Hanumant Singh | 4abaf5d | 2019-09-20 20:03:18 -0700 | [diff] [blame] | 62 | } |
Hanumant Singh | 2d5d295 | 2019-12-17 14:34:15 -0800 | [diff] [blame] | 63 | ::ndk::ScopedAStatus FakeRunner::applyPipeConfigs() { |
| 64 | ::ndk::ScopedAStatus _aidl_status; |
| 65 | _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION)); |
| 66 | return _aidl_status; |
Hanumant Singh | 4abaf5d | 2019-09-20 20:03:18 -0700 | [diff] [blame] | 67 | } |
Kathan Shukla | 624a1b8 | 2020-01-13 12:53:21 -0800 | [diff] [blame] | 68 | |
| 69 | ::ndk::ScopedAStatus FakeRunner::resetPipeConfigs() { |
| 70 | ::ndk::ScopedAStatus _aidl_status; |
| 71 | _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION)); |
| 72 | return _aidl_status; |
| 73 | } |
| 74 | |
Hanumant Singh | 2d5d295 | 2019-12-17 14:34:15 -0800 | [diff] [blame] | 75 | ::ndk::ScopedAStatus FakeRunner::startPipe() { |
| 76 | ::ndk::ScopedAStatus _aidl_status; |
| 77 | _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION)); |
| 78 | return _aidl_status; |
Hanumant Singh | 4abaf5d | 2019-09-20 20:03:18 -0700 | [diff] [blame] | 79 | } |
Hanumant Singh | 2d5d295 | 2019-12-17 14:34:15 -0800 | [diff] [blame] | 80 | ::ndk::ScopedAStatus FakeRunner::stopPipe() { |
| 81 | ::ndk::ScopedAStatus _aidl_status; |
| 82 | _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION)); |
| 83 | return _aidl_status; |
Hanumant Singh | 4abaf5d | 2019-09-20 20:03:18 -0700 | [diff] [blame] | 84 | } |
Yogeshwar Nagaraj | 6205632 | 2020-01-27 10:27:33 -0800 | [diff] [blame] | 85 | ::ndk::ScopedAStatus FakeRunner::doneWithPacket(int32_t /*in_bufferId*/, int32_t /*in_streamId*/) { |
Hanumant Singh | 2d5d295 | 2019-12-17 14:34:15 -0800 | [diff] [blame] | 86 | ::ndk::ScopedAStatus _aidl_status; |
| 87 | _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION)); |
| 88 | return _aidl_status; |
Hanumant Singh | 4abaf5d | 2019-09-20 20:03:18 -0700 | [diff] [blame] | 89 | } |
Hanumant Singh | 2d5d295 | 2019-12-17 14:34:15 -0800 | [diff] [blame] | 90 | ::ndk::ScopedAStatus FakeRunner::getPipeDebugger( |
| 91 | std::shared_ptr<::aidl::android::automotive::computepipe::runner::IPipeDebugger>* /*_aidl_return*/) { |
| 92 | ::ndk::ScopedAStatus _aidl_status; |
| 93 | _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION)); |
| 94 | return _aidl_status; |
Hanumant Singh | 4abaf5d | 2019-09-20 20:03:18 -0700 | [diff] [blame] | 95 | } |
Hanumant Singh | 2d5d295 | 2019-12-17 14:34:15 -0800 | [diff] [blame] | 96 | ::ndk::ScopedAStatus FakeRunner::releaseRunner() { |
| 97 | ::ndk::ScopedAStatus _aidl_status; |
| 98 | _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION)); |
| 99 | return _aidl_status; |
Hanumant Singh | 4abaf5d | 2019-09-20 20:03:18 -0700 | [diff] [blame] | 100 | } |
Hanumant Singh | 4abaf5d | 2019-09-20 20:03:18 -0700 | [diff] [blame] | 101 | } // namespace tests |
| 102 | } // namespace computepipe |
| 103 | } // namespace automotive |
| 104 | } // namespace android |