Lines Matching refs:sel

48 IdentifierIterator::IdentifierIterator(const V2_0::ProgramSelector& sel)  in IdentifierIterator()  argument
49 : IdentifierIterator(sel, 0) {} in IdentifierIterator()
51 IdentifierIterator::IdentifierIterator(const V2_0::ProgramSelector& sel, size_t pos) in IdentifierIterator() argument
52 : mSel(sel), mPos(pos) {} in IdentifierIterator()
66 if (mPos == 0) return sel().primaryId; in operator *()
69 DCHECK(mPos <= sel().secondaryIds.size()); in operator *()
70 return sel().secondaryIds[mPos - 1]; in operator *()
75 if (reinterpret_cast<uintptr_t>(&sel()) != reinterpret_cast<uintptr_t>(&rhs.sel())) { in operator ==()
108 static int getHdSubchannel(const ProgramSelector& sel) { in getHdSubchannel() argument
109 auto hdsidext = getId(sel, IdentifierType::HD_STATION_ID_EXT, 0); in getHdSubchannel()
136 static bool maybeGetId(const ProgramSelector& sel, const IdentifierType type, uint64_t* val) { in maybeGetId() argument
139 if (sel.primaryId.type == itype) { in maybeGetId()
140 if (val) *val = sel.primaryId.value; in maybeGetId()
146 for (auto&& id : sel.secondaryIds) { in maybeGetId()
156 bool hasId(const ProgramSelector& sel, const IdentifierType type) { in hasId() argument
157 return maybeGetId(sel, type, nullptr); in hasId()
160 uint64_t getId(const ProgramSelector& sel, const IdentifierType type) { in getId() argument
163 if (maybeGetId(sel, type, &val)) { in getId()
171 uint64_t getId(const ProgramSelector& sel, const IdentifierType type, uint64_t defval) { in getId() argument
172 if (!hasId(sel, type)) return defval; in getId()
173 return getId(sel, type); in getId()
176 vector<uint64_t> getAllIds(const ProgramSelector& sel, const IdentifierType type) { in getAllIds() argument
180 if (sel.primaryId.type == itype) ret.push_back(sel.primaryId.value); in getAllIds()
183 for (auto&& id : sel.secondaryIds) { in getAllIds()
190 bool isSupported(const Properties& prop, const ProgramSelector& sel) { in isSupported() argument
194 if (hasId(sel, getType(idType))) return true; in isSupported()
283 bool isValid(const ProgramSelector& sel) { in isValid() argument
284 if (!isValid(sel.primaryId)) return false; in isValid()
286 for (auto&& id : sel.secondaryIds) { in isValid()
297 ProgramSelector sel = {}; in make_selector_amfm() local
298 sel.primaryId = make_identifier(IdentifierType::AMFM_FREQUENCY, frequency); in make_selector_amfm()
299 return sel; in make_selector_amfm()
303 ProgramSelector sel = {}; in make_selector_dab() local
306 sel.primaryId = make_identifier(IdentifierType::DAB_SID_EXT, sidExt); in make_selector_dab()
312 sel.secondaryIds = secondaryIds; in make_selector_dab()
313 return sel; in make_selector_dab()
330 bool satisfies(const ProgramFilter& filter, const ProgramSelector& sel) { in satisfies() argument
335 auto it = std::find_first_of(begin(sel), end(sel), filter.identifierTypes.begin(), in satisfies()
337 if (it == end(sel)) return false; in satisfies()
341 auto it = std::find_first_of(begin(sel), end(sel), filter.identifiers.begin(), in satisfies()
343 if (it == end(sel)) return false; in satisfies()
347 if (getType(sel.primaryId) == IdentifierType::DAB_ENSEMBLE) return false; in satisfies()
421 utils::IdentifierIterator begin(const ProgramSelector& sel) { in begin() argument
422 return utils::IdentifierIterator(sel); in begin()
425 utils::IdentifierIterator end(const ProgramSelector& sel) { in end() argument
426 return utils::IdentifierIterator(sel) + 1 /* primary id */ + sel.secondaryIds.size(); in end()