72bb2ce629
git-svn-id: svn://10.65.10.50/trunk@599 c028cbd2-c16b-5b4b-a496-9718f37d4682
56 lines
1.1 KiB
C++
Executable File
56 lines
1.1 KiB
C++
Executable File
#include <applicat.h>
|
|
#include <mask.h>
|
|
#include <mailbox.h>
|
|
#include <urldefid.h>
|
|
#include "ba2100a.h"
|
|
|
|
class TestMessages : public TApplication
|
|
{
|
|
virtual bool menu(MENU_TAG);
|
|
virtual bool create();
|
|
public:
|
|
TestMessages() : TApplication() {}
|
|
virtual ~TestMessages() {}
|
|
};
|
|
|
|
|
|
bool TestMessages::create()
|
|
{
|
|
TApplication::create();
|
|
dispatch_e_menu(BAR_ITEM(1));
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
|
|
bool TestMessages::menu(MENU_TAG)
|
|
{
|
|
TMask m("ba2100a");
|
|
TMailbox mb;
|
|
|
|
while (m.run() != K_ESC)
|
|
{
|
|
TString from(12);
|
|
TString to(12);
|
|
TString body(60);
|
|
TString subj(12);
|
|
|
|
from = m.get(FLD_FROM);
|
|
to = m.get(FLD_TO);
|
|
body = m.get(FLD_BODY);
|
|
subj = m.get(FLD_SUBJ);
|
|
|
|
TMessage msg(to, subj, body, from);
|
|
mb.send(msg);
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
int test_messages(int argc, char** argv)
|
|
{
|
|
TestMessages app;
|
|
app.run(argc, argv, "Prova invio messaggi");
|
|
return 0;
|
|
}
|
|
|