• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_CLIENT_HANDLE
18 #define ANDROID_AUTOMOTIVE_COMPUTEPIPE_ROUTER_CLIENT_HANDLE
19 
20 #include <cstdint>
21 #include <string>
22 
23 namespace android {
24 namespace automotive {
25 namespace computepipe {
26 namespace router {
27 
28 /**
29  * ClientHandle: Represents client state.
30  *
31  * Allows for querrying client state to determine assignment
32  * of pipe handles. This should be instantiated with the client IPC
33  * capabilities to query clients.
34  */
35 class ClientHandle {
36   public:
37     /* Get client identifier as defined by the graph */
38     virtual std::string getClientName() = 0;
39     /* Is client alive */
40     virtual bool isAlive() = 0;
41     /* start client monitor */
42     virtual bool startClientMonitor() = 0;
~ClientHandle()43     virtual ~ClientHandle() {
44     }
45 };
46 
47 }  // namespace router
48 }  // namespace computepipe
49 }  // namespace automotive
50 }  // namespace android
51 
52 #endif
53