• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2019 The Android Open Source Project
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //      http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef COMPUTEPIPE_RUNNER_CLIENT_INTERFACE_INCLUDE_CLIENTENGINEINTERFACE_H_
16 #define COMPUTEPIPE_RUNNER_CLIENT_INTERFACE_INCLUDE_CLIENTENGINEINTERFACE_H_
17 
18 #include <memory>
19 #include <string>
20 
21 #include "ConfigurationCommand.pb.h"
22 #include "ControlCommand.pb.h"
23 #include "MemHandle.h"
24 #include "types/Status.h"
25 
26 namespace android {
27 namespace automotive {
28 namespace computepipe {
29 namespace runner {
30 namespace client_interface {
31 
32 /**
33  * Communications from client component to runner engine
34  */
35 class ClientEngineInterface {
36   public:
37     /**
38      * Used by client to provide the engine with incremental client configuration
39      * choices
40      */
41     virtual Status processClientConfigUpdate(const proto::ConfigurationCommand& command) = 0;
42     /**
43      * Used by client to provide the engine, the latest client command
44      */
45     virtual Status processClientCommand(const proto::ControlCommand& command) = 0;
46     /**
47      * Used by client to notify the engine of a consumed packet
48      */
49     virtual Status freePacket(int bufferId, int streamId) = 0;
50     virtual ~ClientEngineInterface() = default;
51 };
52 
53 }  // namespace client_interface
54 }  // namespace runner
55 }  // namespace computepipe
56 }  // namespace automotive
57 }  // namespace android
58 
59 #endif  // COMPUTEPIPE_RUNNER_CLIENT_INTERFACE_INCLUDE_CLIENTENGINEINTERFACE_H_
60