1 /* 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_V2_0_VIRTUALPROGRAM_H 17 #define ANDROID_HARDWARE_BROADCASTRADIO_V2_0_VIRTUALPROGRAM_H 18 19 #include <android/hardware/broadcastradio/2.0/types.h> 20 21 namespace android { 22 namespace hardware { 23 namespace broadcastradio { 24 namespace V2_0 { 25 namespace implementation { 26 27 /** 28 * A radio program mock. 29 * 30 * This represents broadcast waves flying over the air, 31 * not an entry for a captured station in the radio tuner memory. 32 */ 33 struct VirtualProgram { 34 ProgramSelector selector; 35 36 std::string programName = ""; 37 std::string songArtist = ""; 38 std::string songTitle = ""; 39 40 operator ProgramInfo() const; 41 42 /** 43 * Defines order in which virtual programs appear on the "air" with 44 * ITunerSession::scan(). 45 * 46 * It's for default implementation purposes, may not be complete or correct. 47 */ 48 friend bool operator<(const VirtualProgram& lhs, const VirtualProgram& rhs); 49 }; 50 51 } // namespace implementation 52 } // namespace V2_0 53 } // namespace broadcastradio 54 } // namespace hardware 55 } // namespace android 56 57 #endif // ANDROID_HARDWARE_BROADCASTRADIO_V2_0_VIRTUALPROGRAM_H 58