cleanup the plugins to fit the new namespace
[enigma2.git] / lib / dvb_ci / dvbci_ui.h
1 #ifndef __dvbci_ui_h
2 #define __dvbci_ui_h
3
4 #include <string>
5                 /* avoid warnigs :) */
6 #undef _POSIX_C_SOURCE
7 #define _POSIX_C_SOURCE 200112L
8 #include <Python.h>
9
10 #define MAX_SLOTS       2       
11
12 class eDVBCI_UI
13 {
14         int state[MAX_SLOTS];
15         static eDVBCI_UI *instance;
16         std::string appName;
17         PyObject *mmiScreen;
18         int mmiTuplePos;
19         int mmiScreenReady;
20 #ifdef SWIG
21         eDVBCI_UI();
22         ~eDVBCI_UI();
23 #endif
24 public:
25 #ifndef SWIG
26         eDVBCI_UI();
27         ~eDVBCI_UI();
28 #endif
29         static eDVBCI_UI *getInstance();
30         
31         int getState(int slot);
32         void setState(int slot, int state);
33         std::string getAppName(int slot);
34         void setAppName(int slot, const char *name);
35         void setInit(int slot);
36         void setReset(int slot);
37         int initialize(int slot);
38         int startMMI(int slot);
39         int stopMMI(int slot);
40         int availableMMI(int slot);
41         int getMMIState(int slot);
42
43         int answerMenu(int slot, int answer);
44         int answerEnq(int slot, char *val);
45         int cancelEnq(int slot);
46
47         PyObject *eDVBCI_UI::getMMIScreen(int slot);
48
49         int mmiScreenEnq(int slot, int blind, int answerLen, char *text);
50         int mmiScreenBegin(int slot, int listmenu);
51         int mmiScreenAddText(int slot, int type, char *value);
52         int mmiScreenFinish(int slot);
53 };
54
55 #endif