Lines Matching refs:a
35 auto a = static_cast<ProgramType>(ia); in isCompatibleProgramType() local
38 if (a == b) return true; in isCompatibleProgramType()
39 if (a == ProgramType::AM && b == ProgramType::AM_HD) return true; in isCompatibleProgramType()
40 if (a == ProgramType::AM_HD && b == ProgramType::AM) return true; in isCompatibleProgramType()
41 if (a == ProgramType::FM && b == ProgramType::FM_HD) return true; in isCompatibleProgramType()
42 if (a == ProgramType::FM_HD && b == ProgramType::FM) return true; in isCompatibleProgramType()
46 static bool bothHaveId(const ProgramSelector& a, const ProgramSelector& b, in bothHaveId() argument
48 return hasId(a, type) && hasId(b, type); in bothHaveId()
51 static bool anyHaveId(const ProgramSelector& a, const ProgramSelector& b, in anyHaveId() argument
53 return hasId(a, type) || hasId(b, type); in anyHaveId()
56 static bool haveEqualIds(const ProgramSelector& a, const ProgramSelector& b, in haveEqualIds() argument
58 if (!bothHaveId(a, b, type)) return false; in haveEqualIds()
62 return getId(a, type) == getId(b, type); in haveEqualIds()
65 bool tunesTo(const ProgramSelector& a, const ProgramSelector& b) { in tunesTo() argument
66 if (!isCompatibleProgramType(a.programType, b.programType)) return false; in tunesTo()
68 auto type = getType(a); in tunesTo()
75 if (haveEqualIds(a, b, IdentifierType::HD_STATION_ID_EXT)) return true; in tunesTo()
78 if (anyHaveId(a, b, IdentifierType::HD_SUBCHANNEL)) { in tunesTo()
80 auto aCh = getId(a, IdentifierType::HD_SUBCHANNEL, 0); in tunesTo()
85 if (haveEqualIds(a, b, IdentifierType::RDS_PI)) return true; in tunesTo()
87 return haveEqualIds(a, b, IdentifierType::AMFM_FREQUENCY); in tunesTo()
89 return haveEqualIds(a, b, IdentifierType::DAB_SIDECC); in tunesTo()
91 return haveEqualIds(a, b, IdentifierType::DRMO_SERVICE_ID); in tunesTo()
93 if (anyHaveId(a, b, IdentifierType::SXM_SERVICE_ID)) { in tunesTo()
94 return haveEqualIds(a, b, IdentifierType::SXM_SERVICE_ID); in tunesTo()
96 return haveEqualIds(a, b, IdentifierType::SXM_CHANNEL); in tunesTo()