1 /* 2 * Copyright (C) 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 package android.automotive.computepipe.registry; 17 18 import android.automotive.computepipe.registry.IClientInfo; 19 import android.automotive.computepipe.runner.IPipeRunner; 20 21 /** 22 * Provides mechanism for pipe/graph runner discovery 23 */ 24 @VintfStability 25 interface IPipeQuery { 26 /** 27 * A client will lookup the registered graphs using this method 28 * The registry implementation will return all the graphs registered. 29 * The registration is a one time event. 30 * 31 * @param out get supported graphs by name 32 */ getGraphList()33 @utf8InCpp String[] getGraphList(); 34 35 /** 36 * Returns the graph runner for a specific graph 37 * 38 * Once the client has found the graph it is interested in using 39 * getGraphList(), it will use this to retrieve the runner for that graph. 40 * It is possible that between the GraphList retrieval and the invocation of 41 * this method the runner for this graph has gone down. In which case appropriate binder 42 * status will be used to report such an event. 43 * 44 * @param: graphId graph name for which corresponding runner is sought. 45 * @param: info retrieve client information for match purposes when needed 46 * @return handle to interact with specific graph 47 */ getPipeRunner(in @tf8InCpp String graphName, in IClientInfo info)48 IPipeRunner getPipeRunner(in @utf8InCpp String graphName, in IClientInfo info); 49 } 50