1 /* 2 * Copyright (C) 2022 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 "simple_device_cb.h" 18 notify(const std::vector<NotifyMsg> & msgs)19ScopedAStatus SimpleDeviceCb::notify(const std::vector<NotifyMsg>& msgs) { 20 std::unique_lock<std::mutex> l(mParent->mLock); 21 mParent->mNotifyMessages = msgs; 22 mParent->mResultCondition.notify_one(); 23 24 return ndk::ScopedAStatus::ok(); 25 } processCaptureResult(const std::vector<CaptureResult> &)26ScopedAStatus SimpleDeviceCb::processCaptureResult(const std::vector<CaptureResult>&) { 27 return ndk::ScopedAStatus::fromStatus(STATUS_UNKNOWN_TRANSACTION); 28 } requestStreamBuffers(const std::vector<BufferRequest> &,std::vector<StreamBufferRet> *,BufferRequestStatus *)29ScopedAStatus SimpleDeviceCb::requestStreamBuffers(const std::vector<BufferRequest>&, 30 std::vector<StreamBufferRet>*, 31 BufferRequestStatus*) { 32 return ndk::ScopedAStatus::fromStatus(STATUS_UNKNOWN_TRANSACTION); 33 } returnStreamBuffers(const std::vector<StreamBuffer> &)34ScopedAStatus SimpleDeviceCb::returnStreamBuffers(const std::vector<StreamBuffer>&) { 35 return ndk::ScopedAStatus::fromStatus(STATUS_UNKNOWN_TRANSACTION); 36 } 37