return *this;
}
+void eDVBService::genSortName()
+{
+ m_service_name_sort = removeDVBChars(m_service_name);
+ makeUpper(m_service_name_sort);
+ while ((!m_service_name_sort.empty()) && m_service_name_sort[0] == ' ')
+ m_service_name_sort.erase(0, 1);
+
+ /* put unnamed services at the end, not at the beginning. */
+ if (m_service_name_sort.empty())
+ m_service_name_sort = "\xFF";
+}
+
RESULT eDVBService::getName(const eServiceReference &ref, std::string &name)
{
if (!ref.name.empty())
line[strlen(line)-1]=0;
s->m_service_name = line;
- s->m_service_name_sort = removeDVBChars(line);
- makeUpper(s->m_service_name_sort);
- while ((!s->m_service_name_sort.empty()) && s->m_service_name_sort[0] == ' ')
- s->m_service_name_sort.erase(0, 1);
-
- /* put unnamed services at the end, not at the beginning. */
- if (s->m_service_name_sort.empty())
- s->m_service_name_sort = "\xFF";
-
+ s->genSortName();
+
fgets(line, 256, f);
if (strlen(line))
line[strlen(line)-1]=0;
RESULT moveService(const eServiceReference &, unsigned int);
};
- // bitte KEINE operator int() definieren, sonst bringt das ganze nix!
+ /* these structures have by intention no operator int() defined.
+ the reason of these structures is to avoid mixing for example
+ a onid and a tsid (as there's no general order for them).
+
+ defining an operator int() would implicitely convert values
+ between them over the constructor with the int argument.
+
+ 'explicit' doesn't here - eTransportStreamID(eOriginalNetworkID(n))
+ would still work. */
+
struct eTransportStreamID
{
private:
std::string m_service_name, m_service_name_sort;
std::string m_provider_name;
+ void genSortName();
+
int m_flags;
std::set<int> m_ca;
std::map<int,int> m_cache;