Yifan Hong | b0dde93 | 2017-02-10 17:49:58 -0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2016 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 FRAMEWORK_NATIVE_CMDS_LSHAL_TABLE_ENTRY_H_ |
| 18 | #define FRAMEWORK_NATIVE_CMDS_LSHAL_TABLE_ENTRY_H_ |
| 19 | |
| 20 | #include <stdint.h> |
| 21 | |
| 22 | #include <string> |
| 23 | #include <vector> |
| 24 | |
| 25 | namespace android { |
| 26 | namespace lshal { |
| 27 | |
| 28 | using Pids = std::vector<int32_t>; |
| 29 | |
| 30 | struct TableEntry { |
| 31 | std::string interfaceName; |
| 32 | std::string transport; |
| 33 | int32_t serverPid; |
| 34 | uint64_t serverObjectAddress; |
| 35 | Pids clientPids; |
| 36 | }; |
| 37 | |
| 38 | using Table = std::vector<TableEntry>; |
| 39 | |
| 40 | enum { |
| 41 | NO_PID = -1, |
| 42 | NO_PTR = 0 |
| 43 | }; |
| 44 | |
| 45 | } // namespace lshal |
| 46 | } // namespace android |
| 47 | |
| 48 | #endif // FRAMEWORK_NATIVE_CMDS_LSHAL_TABLE_ENTRY_H_ |