blob: a14830d77af5d8e9b7ab5ffbdaf695733c649fda [file] [log] [blame]
Tomasz Wasilczyk48377552017-06-22 10:45:33 -07001/*
2 * Copyright (C) 2017 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#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_1_VIRTUALPROGRAM_H
17#define ANDROID_HARDWARE_BROADCASTRADIO_V1_1_VIRTUALPROGRAM_H
18
Tomasz Wasilczyk100f2ed2017-06-29 16:04:05 -070019#include <android/hardware/broadcastradio/1.1/types.h>
Tomasz Wasilczyk5be4c2b2017-07-27 13:17:07 -070020#include <broadcastradio-utils/Utils.h>
Tomasz Wasilczyk48377552017-06-22 10:45:33 -070021
22namespace android {
23namespace hardware {
24namespace broadcastradio {
25namespace V1_1 {
26namespace implementation {
27
Tomasz Wasilczykefadc192017-07-28 10:08:46 -070028/**
29 * A radio program mock.
30 *
31 * This represents broadcast waves flying over the air,
32 * not an entry for a captured station in the radio tuner memory.
33 */
Tomasz Wasilczyk48377552017-06-22 10:45:33 -070034struct VirtualProgram {
Tomasz Wasilczyka02b6ef2017-07-05 11:23:30 -070035 ProgramSelector selector;
Tomasz Wasilczyk48377552017-06-22 10:45:33 -070036
Tomasz Wasilczyk100f2ed2017-06-29 16:04:05 -070037 std::string programName = "";
38 std::string songArtist = "";
39 std::string songTitle = "";
40
Tomasz Wasilczyk5be4c2b2017-07-27 13:17:07 -070041 ProgramInfo getProgramInfo(utils::HalRevision halRev) const;
42
Tomasz Wasilczyk48377552017-06-22 10:45:33 -070043 friend bool operator<(const VirtualProgram& lhs, const VirtualProgram& rhs);
44};
45
Tomasz Wasilczyk5be4c2b2017-07-27 13:17:07 -070046std::vector<ProgramInfo> getProgramInfoVector(const std::vector<VirtualProgram>& vec,
47 utils::HalRevision halRev);
48
Tomasz Wasilczyk48377552017-06-22 10:45:33 -070049} // namespace implementation
50} // namespace V1_1
51} // namespace broadcastradio
52} // namespace hardware
53} // namespace android
54
55#endif // ANDROID_HARDWARE_BROADCASTRADIO_V1_1_VIRTUALPROGRAM_H