1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 
4 #ifndef FLATBUFFERS_GENERATED_AUDIOSETSCENARIOS_BLUETOOTH_FBS_LE_AUDIO_H_
5 #define FLATBUFFERS_GENERATED_AUDIOSETSCENARIOS_BLUETOOTH_FBS_LE_AUDIO_H_
6 
7 #include "flatbuffers/flatbuffers.h"
8 
9 // Ensure the included flatbuffers.h is the same version as when this file was
10 // generated, otherwise it may not be compatible.
11 static_assert(FLATBUFFERS_VERSION_MAJOR == 2 &&
12               FLATBUFFERS_VERSION_MINOR == 0 &&
13               FLATBUFFERS_VERSION_REVISION == 7,
14              "Non-compatible flatbuffers version included");
15 
16 namespace bluetooth {
17 namespace fbs {
18 namespace le_audio {
19 
20 struct AudioSetScenario;
21 struct AudioSetScenarioBuilder;
22 
23 struct AudioSetScenarios;
24 struct AudioSetScenariosBuilder;
25 
26 /// Scenario represents the use case such as "Media", "Conversation", etc.
27 /// Each scenario can list any number of codec configurations by their names in
28 /// the order of preference. That means if the first entry does not meet all
29 /// the current requirements (such as peer device capabilities etc.) next
30 /// configurations are being checked.
31 ///
32 /// The referenced codec configurations are defined by the
33 /// audio_set_configurations.fbs schema and loaded from a different source file.
34 /// Multiple scenarios can reference same codec configurations.
35 struct AudioSetScenario FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
36   typedef AudioSetScenarioBuilder Builder;
37   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
38     VT__COMMENTS_ = 4,
39     VT_NAME = 6,
40     VT_CONFIGURATIONS = 8
41   };
_comments_FLATBUFFERS_FINAL_CLASS42   const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *_comments_() const {
43     return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT__COMMENTS_);
44   }
nameFLATBUFFERS_FINAL_CLASS45   const flatbuffers::String *name() const {
46     return GetPointer<const flatbuffers::String *>(VT_NAME);
47   }
KeyCompareLessThanFLATBUFFERS_FINAL_CLASS48   bool KeyCompareLessThan(const AudioSetScenario *o) const {
49     return *name() < *o->name();
50   }
KeyCompareWithValueFLATBUFFERS_FINAL_CLASS51   int KeyCompareWithValue(const char *_name) const {
52     return strcmp(name()->c_str(), _name);
53   }
configurationsFLATBUFFERS_FINAL_CLASS54   const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *configurations() const {
55     return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT_CONFIGURATIONS);
56   }
VerifyFLATBUFFERS_FINAL_CLASS57   bool Verify(flatbuffers::Verifier &verifier) const {
58     return VerifyTableStart(verifier) &&
59            VerifyOffset(verifier, VT__COMMENTS_) &&
60            verifier.VerifyVector(_comments_()) &&
61            verifier.VerifyVectorOfStrings(_comments_()) &&
62            VerifyOffsetRequired(verifier, VT_NAME) &&
63            verifier.VerifyString(name()) &&
64            VerifyOffsetRequired(verifier, VT_CONFIGURATIONS) &&
65            verifier.VerifyVector(configurations()) &&
66            verifier.VerifyVectorOfStrings(configurations()) &&
67            verifier.EndTable();
68   }
69 };
70 
71 struct AudioSetScenarioBuilder {
72   typedef AudioSetScenario Table;
73   flatbuffers::FlatBufferBuilder &fbb_;
74   flatbuffers::uoffset_t start_;
add__comments_AudioSetScenarioBuilder75   void add__comments_(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> _comments_) {
76     fbb_.AddOffset(AudioSetScenario::VT__COMMENTS_, _comments_);
77   }
add_nameAudioSetScenarioBuilder78   void add_name(flatbuffers::Offset<flatbuffers::String> name) {
79     fbb_.AddOffset(AudioSetScenario::VT_NAME, name);
80   }
add_configurationsAudioSetScenarioBuilder81   void add_configurations(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> configurations) {
82     fbb_.AddOffset(AudioSetScenario::VT_CONFIGURATIONS, configurations);
83   }
AudioSetScenarioBuilderAudioSetScenarioBuilder84   explicit AudioSetScenarioBuilder(flatbuffers::FlatBufferBuilder &_fbb)
85         : fbb_(_fbb) {
86     start_ = fbb_.StartTable();
87   }
FinishAudioSetScenarioBuilder88   flatbuffers::Offset<AudioSetScenario> Finish() {
89     const auto end = fbb_.EndTable(start_);
90     auto o = flatbuffers::Offset<AudioSetScenario>(end);
91     fbb_.Required(o, AudioSetScenario::VT_NAME);
92     fbb_.Required(o, AudioSetScenario::VT_CONFIGURATIONS);
93     return o;
94   }
95 };
96 
97 inline flatbuffers::Offset<AudioSetScenario> CreateAudioSetScenario(
98     flatbuffers::FlatBufferBuilder &_fbb,
99     flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> _comments_ = 0,
100     flatbuffers::Offset<flatbuffers::String> name = 0,
101     flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> configurations = 0) {
102   AudioSetScenarioBuilder builder_(_fbb);
103   builder_.add_configurations(configurations);
104   builder_.add_name(name);
105   builder_.add__comments_(_comments_);
106   return builder_.Finish();
107 }
108 
109 inline flatbuffers::Offset<AudioSetScenario> CreateAudioSetScenarioDirect(
110     flatbuffers::FlatBufferBuilder &_fbb,
111     const std::vector<flatbuffers::Offset<flatbuffers::String>> *_comments_ = nullptr,
112     const char *name = nullptr,
113     const std::vector<flatbuffers::Offset<flatbuffers::String>> *configurations = nullptr) {
114   auto _comments___ = _comments_ ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*_comments_) : 0;
115   auto name__ = name ? _fbb.CreateString(name) : 0;
116   auto configurations__ = configurations ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*configurations) : 0;
117   return bluetooth::fbs::le_audio::CreateAudioSetScenario(
118       _fbb,
119       _comments___,
120       name__,
121       configurations__);
122 }
123 
124 struct AudioSetScenarios FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
125   typedef AudioSetScenariosBuilder Builder;
126   enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
127     VT__COMMENTS_ = 4,
128     VT_SCENARIOS = 6
129   };
_comments_FLATBUFFERS_FINAL_CLASS130   const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *_comments_() const {
131     return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>> *>(VT__COMMENTS_);
132   }
scenariosFLATBUFFERS_FINAL_CLASS133   const flatbuffers::Vector<flatbuffers::Offset<bluetooth::fbs::le_audio::AudioSetScenario>> *scenarios() const {
134     return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<bluetooth::fbs::le_audio::AudioSetScenario>> *>(VT_SCENARIOS);
135   }
VerifyFLATBUFFERS_FINAL_CLASS136   bool Verify(flatbuffers::Verifier &verifier) const {
137     return VerifyTableStart(verifier) &&
138            VerifyOffset(verifier, VT__COMMENTS_) &&
139            verifier.VerifyVector(_comments_()) &&
140            verifier.VerifyVectorOfStrings(_comments_()) &&
141            VerifyOffsetRequired(verifier, VT_SCENARIOS) &&
142            verifier.VerifyVector(scenarios()) &&
143            verifier.VerifyVectorOfTables(scenarios()) &&
144            verifier.EndTable();
145   }
146 };
147 
148 struct AudioSetScenariosBuilder {
149   typedef AudioSetScenarios Table;
150   flatbuffers::FlatBufferBuilder &fbb_;
151   flatbuffers::uoffset_t start_;
add__comments_AudioSetScenariosBuilder152   void add__comments_(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> _comments_) {
153     fbb_.AddOffset(AudioSetScenarios::VT__COMMENTS_, _comments_);
154   }
add_scenariosAudioSetScenariosBuilder155   void add_scenarios(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<bluetooth::fbs::le_audio::AudioSetScenario>>> scenarios) {
156     fbb_.AddOffset(AudioSetScenarios::VT_SCENARIOS, scenarios);
157   }
AudioSetScenariosBuilderAudioSetScenariosBuilder158   explicit AudioSetScenariosBuilder(flatbuffers::FlatBufferBuilder &_fbb)
159         : fbb_(_fbb) {
160     start_ = fbb_.StartTable();
161   }
FinishAudioSetScenariosBuilder162   flatbuffers::Offset<AudioSetScenarios> Finish() {
163     const auto end = fbb_.EndTable(start_);
164     auto o = flatbuffers::Offset<AudioSetScenarios>(end);
165     fbb_.Required(o, AudioSetScenarios::VT_SCENARIOS);
166     return o;
167   }
168 };
169 
170 inline flatbuffers::Offset<AudioSetScenarios> CreateAudioSetScenarios(
171     flatbuffers::FlatBufferBuilder &_fbb,
172     flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::String>>> _comments_ = 0,
173     flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<bluetooth::fbs::le_audio::AudioSetScenario>>> scenarios = 0) {
174   AudioSetScenariosBuilder builder_(_fbb);
175   builder_.add_scenarios(scenarios);
176   builder_.add__comments_(_comments_);
177   return builder_.Finish();
178 }
179 
180 inline flatbuffers::Offset<AudioSetScenarios> CreateAudioSetScenariosDirect(
181     flatbuffers::FlatBufferBuilder &_fbb,
182     const std::vector<flatbuffers::Offset<flatbuffers::String>> *_comments_ = nullptr,
183     std::vector<flatbuffers::Offset<bluetooth::fbs::le_audio::AudioSetScenario>> *scenarios = nullptr) {
184   auto _comments___ = _comments_ ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::String>>(*_comments_) : 0;
185   auto scenarios__ = scenarios ? _fbb.CreateVectorOfSortedTables<bluetooth::fbs::le_audio::AudioSetScenario>(scenarios) : 0;
186   return bluetooth::fbs::le_audio::CreateAudioSetScenarios(
187       _fbb,
188       _comments___,
189       scenarios__);
190 }
191 
GetAudioSetScenarios(const void * buf)192 inline const bluetooth::fbs::le_audio::AudioSetScenarios *GetAudioSetScenarios(const void *buf) {
193   return flatbuffers::GetRoot<bluetooth::fbs::le_audio::AudioSetScenarios>(buf);
194 }
195 
GetSizePrefixedAudioSetScenarios(const void * buf)196 inline const bluetooth::fbs::le_audio::AudioSetScenarios *GetSizePrefixedAudioSetScenarios(const void *buf) {
197   return flatbuffers::GetSizePrefixedRoot<bluetooth::fbs::le_audio::AudioSetScenarios>(buf);
198 }
199 
VerifyAudioSetScenariosBuffer(flatbuffers::Verifier & verifier)200 inline bool VerifyAudioSetScenariosBuffer(
201     flatbuffers::Verifier &verifier) {
202   return verifier.VerifyBuffer<bluetooth::fbs::le_audio::AudioSetScenarios>(nullptr);
203 }
204 
VerifySizePrefixedAudioSetScenariosBuffer(flatbuffers::Verifier & verifier)205 inline bool VerifySizePrefixedAudioSetScenariosBuffer(
206     flatbuffers::Verifier &verifier) {
207   return verifier.VerifySizePrefixedBuffer<bluetooth::fbs::le_audio::AudioSetScenarios>(nullptr);
208 }
209 
FinishAudioSetScenariosBuffer(flatbuffers::FlatBufferBuilder & fbb,flatbuffers::Offset<bluetooth::fbs::le_audio::AudioSetScenarios> root)210 inline void FinishAudioSetScenariosBuffer(
211     flatbuffers::FlatBufferBuilder &fbb,
212     flatbuffers::Offset<bluetooth::fbs::le_audio::AudioSetScenarios> root) {
213   fbb.Finish(root);
214 }
215 
FinishSizePrefixedAudioSetScenariosBuffer(flatbuffers::FlatBufferBuilder & fbb,flatbuffers::Offset<bluetooth::fbs::le_audio::AudioSetScenarios> root)216 inline void FinishSizePrefixedAudioSetScenariosBuffer(
217     flatbuffers::FlatBufferBuilder &fbb,
218     flatbuffers::Offset<bluetooth::fbs::le_audio::AudioSetScenarios> root) {
219   fbb.FinishSizePrefixed(root);
220 }
221 
222 }  // namespace le_audio
223 }  // namespace fbs
224 }  // namespace bluetooth
225 
226 #endif  // FLATBUFFERS_GENERATED_AUDIOSETSCENARIOS_BLUETOOTH_FBS_LE_AUDIO_H_
227