fix non working rotor turning pixmap
[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 <lib/python/python.h>
9 #include <lib/python/connections.h>
10
11 #define MAX_SLOTS 4
12
13 #ifndef SWIG
14 struct slot_ui_data
15 {
16         std::string appName;
17         int state;
18         ePyObject mmiScreen;
19         int mmiTuplePos;
20         int mmiScreenReady;
21 };
22 #endif
23
24 class eDVBCI_UI
25 {
26         static eDVBCI_UI *instance;
27 #ifndef SWIG
28         slot_ui_data slotdata[MAX_SLOTS];
29 #else
30         eDVBCI_UI();
31         ~eDVBCI_UI();
32 #endif
33 public:
34         PSignal1<void,int> ciStateChanged;
35 #ifndef SWIG
36         eDVBCI_UI();
37         ~eDVBCI_UI();
38 #endif
39         static eDVBCI_UI *getInstance();
40
41         int getState(int slot);
42         void setState(int slot, int state);
43         std::string getAppName(int slot);
44         void setAppName(int slot, const char *name);
45         void setInit(int slot);
46         void setReset(int slot);
47         int startMMI(int slot);
48         int stopMMI(int slot);
49         int availableMMI(int slot);
50         int getMMIState(int slot);
51         int answerMenu(int slot, int answer);
52         int answerEnq(int slot, char *val);
53         int cancelEnq(int slot);
54
55         PyObject *getMMIScreen(int slot);
56 #ifndef SWIG
57         int mmiScreenClose(int slot, int timeout);
58         int mmiScreenEnq(int slot, int blind, int answerLen, char *text);
59         int mmiScreenBegin(int slot, int listmenu);
60         int mmiScreenAddText(int slot, int type, char *value);
61         int mmiScreenFinish(int slot);
62         void mmiSessionDestroyed(int slot);
63 #endif
64 };
65
66 #endif