Roshan Pius | 80c3cc6 | 2021-08-27 12:55:02 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 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 "uwb.h" |
| 18 | |
| 19 | namespace android { |
| 20 | namespace hardware { |
| 21 | namespace uwb { |
| 22 | namespace impl { |
| 23 | using namespace ::aidl::android::hardware::uwb; |
| 24 | |
| 25 | UwbChip::UwbChip(const std::string& name) : name_(name) {} |
| 26 | UwbChip::~UwbChip() {} |
| 27 | |
| 28 | ::ndk::ScopedAStatus UwbChip::getName(std::string* name) { |
| 29 | *name = name_; |
| 30 | return ndk::ScopedAStatus::ok(); |
| 31 | } |
| 32 | |
| 33 | ::ndk::ScopedAStatus UwbChip::open( |
| 34 | const std::shared_ptr<IUwbClientCallback>& /* clientCallback */) { |
| 35 | return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); |
| 36 | } |
| 37 | |
| 38 | ::ndk::ScopedAStatus UwbChip::close() { |
| 39 | return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); |
| 40 | } |
| 41 | |
| 42 | ::ndk::ScopedAStatus UwbChip::coreInit() { |
| 43 | return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); |
| 44 | } |
| 45 | |
| 46 | ::ndk::ScopedAStatus UwbChip::getSupportedVendorUciVersion(int32_t* /* version */) { |
| 47 | return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); |
| 48 | } |
| 49 | |
| 50 | ::ndk::ScopedAStatus UwbChip::sendUciMessage(const std::vector<uint8_t>& /* data */, |
| 51 | int32_t* /* bytes_written */) { |
| 52 | return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); |
| 53 | } |
| 54 | } // namespace impl |
| 55 | } // namespace uwb |
| 56 | } // namespace hardware |
| 57 | } // namespace android |