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 #pragma once
17 
18 #include <hardware/bluetooth.h>
19 
20 namespace bluetooth {
21 namespace gmap {
22 
23 enum class RolesBitMask : uint8_t {
24   UGG = 1 << 0,  // Unicast Game Gateway (UGG)
25   UGT = 1 << 1,  // Unicast Game Terminal (UGT)
26   BGS = 1 << 2,  // Broadcast Game Sender (BGS)
27   BGR = 1 << 3,  // Broadcast Game Receiver (BGR)
28 };
29 
30 enum class UGTFeatureBitMask : uint8_t {
31   SourceFeatureSupport = 1 << 0,
32   EightyKbpsSourceSupport = 1 << 1,
33   SinkFeatureSupport = 1 << 2,
34   SixtyFourSinkFeatureSupport = 1 << 3,
35   MultiplexFeatureSupport = 1 << 4,
36   MultisinkFeatureSupport = 1 << 5,
37   MultisourceFeatureSupport = 1 << 6
38 };
39 enum class UGGFeatureBitMask : uint8_t {
40   MultiplexFeatureSupport = 1 << 0,
41   NinetySixKbpsSourceFeatureSupport = 1 << 1,
42   MultisinkFeatureSupport = 1 << 2,
43 };
44 }  // namespace gmap
45 }  // namespace bluetooth
46 
47 namespace std {
48 template <>
49 struct formatter<bluetooth::gmap::RolesBitMask> : enum_formatter<bluetooth::gmap::RolesBitMask> {};
50 template <>
51 struct formatter<bluetooth::gmap::UGTFeatureBitMask>
52     : enum_formatter<bluetooth::gmap::UGTFeatureBitMask> {};
53 template <>
54 struct formatter<bluetooth::gmap::UGGFeatureBitMask>
55     : enum_formatter<bluetooth::gmap::UGGFeatureBitMask> {};
56 }  // namespace std
57