1 /*
2  * Copyright (C) 2018 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 
18 #pragma once
19 
20 #include <system/audio.h>
21 #include <system/audio_policy.h>
22 #include <binder/Parcelable.h>
23 
24 namespace android {
25 
26 enum product_strategy_t : uint32_t;
27 const product_strategy_t PRODUCT_STRATEGY_NONE = static_cast<product_strategy_t>(-1);
28 
29 using AttributesVector = std::vector<audio_attributes_t>;
30 using StreamTypeVector = std::vector<audio_stream_type_t>;
31 
32 constexpr bool operator==(const audio_attributes_t &lhs, const audio_attributes_t &rhs)
33 {
34     return lhs.usage == rhs.usage && lhs.content_type == rhs.content_type &&
35             lhs.flags == rhs.flags && (std::strcmp(lhs.tags, rhs.tags) == 0);
36 }
37 constexpr bool operator!=(const audio_attributes_t &lhs, const audio_attributes_t &rhs)
38 {
39     return !(lhs==rhs);
40 }
41 
42 enum volume_group_t : uint32_t;
43 static const volume_group_t VOLUME_GROUP_NONE = static_cast<volume_group_t>(-1);
44 
45 } // namespace android
46 
47