X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/e09309bd7f69dbc98f471e28e01e2ad21ab7a757..7f6790f2afe0fb6f65746fdc1c00935ed1567146:/lib/python/enigma_python.i diff --git a/lib/python/enigma_python.i b/lib/python/enigma_python.i index 103889b9..bdf1b144 100644 --- a/lib/python/enigma_python.i +++ b/lib/python/enigma_python.i @@ -39,15 +39,17 @@ is usually caused by not marking PSignals as immutable. #include #include #include -#include #include +#include #include +#include #include #include -#include +#include #include #include #include +#include #include #include #include @@ -63,45 +65,42 @@ is usually caused by not marking PSignals as immutable. #include #include #include +#include #include #include #include #include -#include -#include #include #include #include #include #include -#include +#include #include +#include #include #include #include #include -#include #include +#include +#include +#include #include #include +#include #include #include +#include +#include #include #include - -extern void runMainloop(); -extern void quitMainloop(int exit_code); -extern eApplication *getApplication(); -extern int getPrevAsciiCode(); -extern int isUTF8(const std::string &); -extern std::string convertUTF8DVB(const std::string &, int); -extern std::string convertDVBUTF8(const unsigned char *data, int len, int table, int tsidonid); +#include %} %feature("ref") iObject "$this->AddRef(); /* eDebug(\"AddRef (%s:%d)!\", __FILE__, __LINE__); */ " %feature("unref") iObject "$this->Release(); /* eDebug(\"Release! %s:%d\", __FILE__, __LINE__); */ " - /* this magic allows smartpointer to be used as OUTPUT arguments, i.e. call-by-reference-styled return value. */ %define %typemap_output_simple(Type) @@ -129,50 +128,50 @@ extern std::string convertDVBUTF8(const unsigned char *data, int len, int table, #define DEBUG typedef long time_t; %include "typemaps.i" -%include "stl.i" +%include "std_string.i" %include %include %include -%immutable eTimer::timeout; %immutable eSocketNotifier::activated; %include %include +%include %include %include -%template(eServiceCenterPtr) ePtr; -%include - // TODO: embed these... -%immutable eConsoleAppContainer::appClosed; -%immutable eConsoleAppContainer::dataAvail; -%immutable eConsoleAppContainer::dataSent; +%immutable ePicLoad::PictureData; %immutable eButton::selected; %immutable eInput::changed; %immutable eComponentScan::statusChanged; %immutable eComponentScan::newService; %immutable pNavigation::m_event; +%immutable pNavigation::m_record_event; %immutable eListbox::selectionChanged; %immutable eDVBCI_UI::ciStateChanged; +%immutable eSocket_UI::socketStateChanged; %immutable eDVBResourceManager::frontendUseMaskChanged; - -%include +%immutable eAVSwitch::vcr_sb_notifier; +%immutable ePythonMessagePump::recv_msg; +%immutable eDVBLocalTimeHandler::m_timeUpdated; +%include %include %include %include %include %include +%include %include %include %include -%include %include %include %include %include %include %include +%include %include %include %include @@ -185,8 +184,6 @@ typedef long time_t; %include %include %include -%include -%include %include %include %include @@ -196,20 +193,25 @@ typedef long time_t; %include %include %include -%include %include +%include %include +%include +%include +%include %include %include +%include %include %include +%include +%include %include %include %include +%include /************** eptr **************/ -%template(eActionMapPtr) ePtr; - /************** signals **************/ template class PSignal0 @@ -247,20 +249,12 @@ public: PyObject *get(); }; -/************** temp *****************/ - - /* need a better place for this, i agree. */ -%{ -void addFont(const char *filename, const char *alias, int scale_factor, int is_replacement); -%} -void addFont(const char *filename, const char *alias, int scale_factor, int is_replacement); +%template(PSignal2VoidIRecordableServiceInt) PSignal2&,int>; -/************** debug **************/ +%typemap(out) PSignal2VoidIRecordableServiceInt { + $1 = $input->get(); +} -int getPrevAsciiCode(); -void runMainloop(); -void quitMainloop(int exit_code); -eApplication *getApplication(); %{ RESULT SwigFromPython(ePtr &result, PyObject *obj) { @@ -275,14 +269,57 @@ RESULT SwigFromPython(ePtr &result, PyObject *obj) result = *res; return 0; } -PyObject *New_TestObj() -{ - TestObj *result = (TestObj *)new TestObj(); - return SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_TestObj, 1); -} PyObject *New_eServiceReference(const eServiceReference &ref) { eServiceReference *result = new eServiceReference(ref); return SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_eServiceReference, 1); } +PyObject *New_iRecordableServicePtr(const ePtr &ptr) +{ + ePtr *result = new ePtr(ptr); + return SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_ePtrTiRecordableService_t, 1); +} +%} + +/* needed for service groups */ + +PyObject *getBestPlayableServiceReference(const eServiceReference &bouquet_ref, const eServiceReference &ignore, bool simulate=false); +%{ +PyObject *getBestPlayableServiceReference(const eServiceReference &bouquet_ref, const eServiceReference &ignore, bool simulate=false) +{ + eStaticServiceDVBBouquetInformation info; + if (info.isPlayable(bouquet_ref, ignore, simulate)) + return New_eServiceReference(info.getPlayableService()); + Py_INCREF(Py_None); + return Py_None; +} +%} + +void setTunerTypePriorityOrder(int); +%{ +void setTunerTypePriorityOrder(int order) +{ + eDVBFrontend::setTypePriorityOrder(order); +} +%} + +/************** temp *****************/ + + /* need a better place for this, i agree. */ +%{ +extern void runMainloop(); +extern void quitMainloop(int exit_code); +extern eApplication *getApplication(); +extern int getPrevAsciiCode(); +extern void addFont(const char *filename, const char *alias, int scale_factor, int is_replacement); +extern const char *getEnigmaVersionString(); +extern void dump_malloc_stats(void); %} + +extern void addFont(const char *filename, const char *alias, int scale_factor, int is_replacement); +extern int getPrevAsciiCode(); +extern void runMainloop(); +extern void quitMainloop(int exit_code); +extern eApplication *getApplication(); +extern const char *getEnigmaVersionString(); +extern void dump_malloc_stats(void);