[SEC] fix crash for motorized sat configuration.
[vuplus_dvbapp] / lib / dvb / sec.h
index b38671d..d176498 100644 (file)
@@ -4,6 +4,8 @@
 #include <lib/dvb/idvb.h>
 #include <list>
 
+#include <lib/dvb/fbc.h>
+
 #ifndef SWIG
 class eSecCommand
 {
@@ -106,8 +108,7 @@ public:
        }
        void push_back(eSecCommandList &list)
        {
-               ASSERT(*this != list);
-               secSequence.splice(end(), list.secSequence);
+               secSequence.insert(end(), list.begin(), list.end());
        }
        void clear()
        {
@@ -134,6 +135,12 @@ public:
        {
                return secSequence.size();
        }
+       eSecCommandList &operator=(const eSecCommandList &lst)
+       {
+               secSequence = lst.secSequence;
+               cur = begin();
+               return *this;
+       }
 };
 #endif
 
@@ -255,11 +262,12 @@ public:
 #define guard_offset_min -8000
 #define guard_offset_max 8000
 #define guard_offset_step 8000
-#define MAX_SATCR 8
-#define MAX_LNBNUM 32
+#define MAX_SATCR 32
+#define MAX_LNBNUM 64
 
        int SatCR_positions;
        int SatCR_idx;
+       int SatCR_format;
        unsigned int SatCRvco;
        unsigned int UnicableTuningWord;
        unsigned int UnicableConfigWord;
@@ -318,7 +326,7 @@ public:
 #ifndef SWIG
        eDVBSatelliteEquipmentControl(eSmartPtrList<eDVBRegisteredFrontend> &avail_frontends, eSmartPtrList<eDVBRegisteredFrontend> &avail_simulate_frontends);
        RESULT prepare(iDVBFrontend &frontend, FRONTENDPARAMETERS &parm, const eDVBFrontendParametersSatellite &sat, int frontend_id, unsigned int tunetimeout);
-       void prepareTurnOffSatCR(iDVBFrontend &frontend, int satcr); // used for unicable
+       void prepareTurnOffSatCR(iDVBFrontend &frontend); // used for unicable
        int canTune(const eDVBFrontendParametersSatellite &feparm, iDVBFrontend *, int frontend_id, int *highest_score_lnb=0);
        bool currentLNBValid() { return m_lnbidx > -1 && m_lnbidx < (int)(sizeof(m_lnbs) / sizeof(eDVBSatelliteLNBParameters)); }
 #endif
@@ -352,9 +360,11 @@ public:
        RESULT setInputpowerDelta(int delta);  // delta between running and stopped rotor
        RESULT setRotorTurningSpeed(int speed);  // set turning speed..
 /* Unicable Specific Parameters */
+       RESULT setLNBSatCRformat(int SatCR_format);     //DiSEqc or JESS (or ...)
        RESULT setLNBSatCR(int SatCR_idx);
        RESULT setLNBSatCRvco(int SatCRvco);
        RESULT setLNBSatCRpositions(int SatCR_positions);
+       RESULT getLNBSatCRformat();     //DiSEqc or JESS (or ...)
        RESULT getLNBSatCR();
        RESULT getLNBSatCRvco();
        RESULT getLNBSatCRpositions();
@@ -371,6 +381,8 @@ public:
        void setRotorMoving(int, bool); // called from the frontend's
        bool isRotorMoving();
        bool canMeasureInputPower() { return m_canMeasureInputPower; }
+
+       friend class eFBCTunerManager;
 };
 
 #endif