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 #ifndef ANDROID_AUTOMOTIVE_COMPUTEPIPE_ROUTER_V1_0_PIPEQUERY 18 #define ANDROID_AUTOMOTIVE_COMPUTEPIPE_ROUTER_V1_0_PIPEQUERY 19 20 #include <aidl/android/automotive/computepipe/registry/BnPipeQuery.h> 21 22 #include <memory> 23 24 #include "PipeRunner.h" 25 #include "Registry.h" 26 27 namespace android { 28 namespace automotive { 29 namespace computepipe { 30 namespace router { 31 namespace V1_0 { 32 namespace implementation { 33 34 class PipeQuery : public aidl::android::automotive::computepipe::registry::BnPipeQuery { 35 public: PipeQuery(std::shared_ptr<PipeRegistry<PipeRunner>> r)36 explicit PipeQuery(std::shared_ptr<PipeRegistry<PipeRunner>> r) : mRegistry(r) { 37 } 38 ndk::ScopedAStatus getGraphList(::std::vector<std::string>* outNames) override; 39 ndk::ScopedAStatus getPipeRunner( 40 const std::string& graphName, 41 const std::shared_ptr<aidl::android::automotive::computepipe::registry::IClientInfo>& info, 42 std::shared_ptr<aidl::android::automotive::computepipe::runner::IPipeRunner>* outRunner) 43 override; 44 const char* getIfaceName(); 45 46 private: 47 std::shared_ptr<PipeRegistry<PipeRunner>> mRegistry; 48 }; 49 50 } // namespace implementation 51 } // namespace V1_0 52 } // namespace router 53 } // namespace computepipe 54 } // namespace automotive 55 } // namespace android 56 #endif 57