1 #ifndef __ENIGMA_MMI_H_
2 #define __ENIGMA_MMI_H_
4 #include <lib/gui/listbox.h>
5 #include <lib/base/message.h>
6 #include <lib/base/buffer.h>
10 class eTextInputField
;
21 eMMIMsg(char* data
, int len
)
22 : data(data
), len(len
)
27 class eMMIEnqWindow
: public eWindow
32 int eventHandler( const eWidgetEvent
&e
);
35 eMMIEnqWindow( const eString
& titleBarText
, const eString
&windowText
, int num
, bool blind
);
39 class eMMIListWindow
: public eListBoxWindow
<eListBoxEntryText
>
41 eLabel
*title
, *subtitle
, *bottomText
;
42 int eventHandler( const eWidgetEvent
&e
);
44 void entrySelected( eListBoxEntryText
* e
);
45 eMMIListWindow(const eString
&titleBarText
, const eString
&title
, const eString
&subtitle
, const eString
&bottomText
, std::list
< std::pair
< eString
, int> > &entrys
);
46 int getSelected() { return (int) list
.getCurrent()->getKey(); }
49 class enigmaMMI
: public eWindow
53 eFixedMessagePump
<eMMIMsg
> mmi_messages
;
57 eTimer responseTimer
, delayTimer
, closeTimer
;
58 const char *scheduledData
;
60 enum AnswerType
{ ENQAnswer
, MENUAnswer
, LISTAnswer
};
63 bool connected() { return conn
.connected(); }
64 int eventHandler( const eWidgetEvent
&e
);
65 virtual bool handleMMIMessage(const char *data
);
66 void gotMMIData(const char* data
, int);
67 void handleMessage( const eMMIMsg
&msg
);
68 void showWaitForAnswer(int ret
);
69 void hideWaitForAnswer();
70 virtual void beginExec() { }
71 virtual void endExec() { }
72 virtual void sendAnswer( AnswerType ans
, int param
, unsigned char *data
)=0;
73 void haveScheduledData();
76 #endif //__ENIGMA_MMI_H_