xref: /aosp_15_r20/system/libvintf/include/vintf/ExclusiveTo.h (revision 70a7ec852fcefd15a4fb57f8f183a8b1c3aacb08)
1 /*
2  * Copyright (C) 2024 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 #pragma once
18 
19 #include <stdint.h>
20 #include <array>
21 #include <string>
22 
23 namespace android {
24 namespace vintf {
25 
26 enum class ExclusiveTo : size_t {
27     // Not exclusive to any particular execution environment and
28     // is available to host processes on the device (given they have
29     // the correct access permissions like sepolicy).
30     EMPTY = 0,
31     // Exclusive to processes inside virtual machines on devices (given
32     // they have the correct access permissions).
33     // Host processes do not have access to these services.
34     VM,
35 };
36 
37 static constexpr std::array<const char*, 2> gExclusiveToStrings = {{
38     "",
39     "virtual-machine",
40 }};
41 
42 }  // namespace vintf
43 }  // namespace android
44