update es, da language
[enigma2.git] / lib / dvb_ci / dvbci_ui.h
index b49a675bec5fb2c27d3e6972e50e6394f66a66d1..8018e8947a2b375d187bd9e399cb42a8de7f3da1 100644 (file)
@@ -1,20 +1,66 @@
 #ifndef __dvbci_ui_h
 #define __dvbci_ui_h
 
-#define MAX_SLOTS      2       
+#include <string>
+                /* avoid warnigs :) */
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200112L
+#include <lib/python/python.h>
+#include <lib/python/connections.h>
+
+#define MAX_SLOTS 4
+
+#ifndef SWIG
+struct slot_ui_data
+{
+       std::string appName;
+       int state;
+       ePyObject mmiScreen;
+       int mmiTuplePos;
+       int mmiScreenReady;
+};
+#endif
 
 class eDVBCI_UI
 {
-       int state[MAX_SLOTS];
        static eDVBCI_UI *instance;
-protected:
+#ifndef SWIG
+       slot_ui_data slotdata[MAX_SLOTS];
+#else
+       eDVBCI_UI();
+       ~eDVBCI_UI();
+#endif
 public:
+       PSignal1<void,int> ciStateChanged;
+#ifndef SWIG
        eDVBCI_UI();
        ~eDVBCI_UI();
-
+#endif
        static eDVBCI_UI *getInstance();
-       
-       int eDVBCI_UI::getState(int slot);
+
+       int getState(int slot);
+       void setState(int slot, int state);
+       std::string getAppName(int slot);
+       void setAppName(int slot, const char *name);
+       void setInit(int slot);
+       void setReset(int slot);
+       int startMMI(int slot);
+       int stopMMI(int slot);
+       int availableMMI(int slot);
+       int getMMIState(int slot);
+       int answerMenu(int slot, int answer);
+       int answerEnq(int slot, char *val);
+       int cancelEnq(int slot);
+
+       PyObject *getMMIScreen(int slot);
+#ifndef SWIG
+       int mmiScreenClose(int slot, int timeout);
+       int mmiScreenEnq(int slot, int blind, int answerLen, char *text);
+       int mmiScreenBegin(int slot, int listmenu);
+       int mmiScreenAddText(int slot, int type, char *value);
+       int mmiScreenFinish(int slot);
+       void mmiSessionDestroyed(int slot);
+#endif
 };
 
 #endif