blob: b06eb4546e4ea257d3641403f89eaa0ac6098bcd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
#ifndef __dvbci_ui_h
#define __dvbci_ui_h
#include <string>
/* avoid warnigs :) */
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200112L
#include <Python.h>
#include <lib/python/connections.h>
#define MAX_SLOTS 4
#ifndef SWIG
struct slot_ui_data
{
std::string appName;
int state;
PyObject *mmiScreen;
int mmiTuplePos;
int mmiScreenReady;
};
#endif
class eDVBCI_UI
{
static eDVBCI_UI *instance;
#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 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
|