add lockState and syncState to getFrontendInfo call
[enigma2.git] / lib / dvb / db.cpp
index ad2996f913fa7f1ca984c29494119b260d5eccdc..193394705c06ee1a34c2fb9d047a3f20c84a017f 100644 (file)
@@ -107,6 +107,12 @@ err:
        return -1;
 }
 
+RESULT eBouquet::setListName(const std::string &name)
+{
+       m_bouquet_name = name;
+       return 0;
+}
+
 eDVBService::eDVBService()
 {
 }
@@ -308,13 +314,21 @@ void eDVBDB::reloadServicelist()
                                ter.guard_interval = guard_interval;
                                ter.hierarchy = hierarchy;
                                ter.inversion = inversion;
-
                                feparm->setDVBT(ter);
                        } else if (line[1]=='c')
                        {
-                               int frequency, symbol_rate, inversion=0, modulation=3;
-                               sscanf(line+2, "%d:%d:%d:%d", &frequency, &symbol_rate, &inversion, &modulation);
-//                             t.setCable(frequency, symbol_rate, inversion, modulation);
+                               eDVBFrontendParametersCable cab;
+                               int frequency, symbol_rate,
+                                       inversion=eDVBFrontendParametersCable::Inversion::Unknown,
+                                       modulation=eDVBFrontendParametersCable::Modulation::Auto,
+                                       fec_inner=eDVBFrontendParametersCable::FEC::fAuto;
+                               sscanf(line+2, "%d:%d:%d:%d:%d", &frequency, &symbol_rate, &inversion, &modulation, &fec_inner);
+                               cab.frequency = frequency;
+                               cab.fec_inner = fec_inner;
+                               cab.inversion = inversion;
+                               cab.symbol_rate = symbol_rate;
+                               cab.modulation = modulation;
+                               feparm->setDVBC(cab);
                        }
                }
                addChannelToList(channelid, feparm);
@@ -425,6 +439,7 @@ void eDVBDB::saveServicelist()
                                chid.transport_stream_id.get(), chid.original_network_id.get());
                eDVBFrontendParametersSatellite sat;
                eDVBFrontendParametersTerrestrial ter;
+               eDVBFrontendParametersCable cab;
                if (!ch.m_frontendParameters->getDVBS(sat))
                {
                        fprintf(f, "\ts %d:%d:%d:%d:%d:%d\n",
@@ -440,6 +455,11 @@ void eDVBDB::saveServicelist()
                                ter.code_rate_LP, ter.modulation, ter.transmission_mode,
                                ter.guard_interval, ter.hierarchy, ter.inversion);
                }
+               if (!ch.m_frontendParameters->getDVBC(cab))
+               {
+                       fprintf(f, "\tc %d:%d:%d:%d:%d\n",
+                               cab.frequency, cab.symbol_rate, cab.inversion, cab.modulation, cab.fec_inner);
+               }
                fprintf(f, "/\n");
                channels++;
        }
@@ -615,7 +635,7 @@ void eDVBDB::reloadBouquets()
                memset(ref.data, 0, sizeof(ref.data));
                ref.type=1;
                ref.flags=7;
-               ref.data[0]=1;
+               ref.data[0]=2;
                ref.path="(type == 2) FROM BOUQUET \"userbouquet.favourites.radio\" ORDER BY bouquet";
                eBouquet &parent = m_bouquets["bouquets.radio"];
                parent.m_services.push_back(ref);