// tstmodem.cpp : Defines the class behaviors for the application. // #include "stdafx.h" #include "tstmodem.h" #include "tstmodemDlg.h" #include "debug.h" #include "serialPort.h" #include "kernelState.h" #include "rilState.h" #include "serialparams.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CTstmodemApp BEGIN_MESSAGE_MAP(CTstmodemApp, CWinApp) //{{AFX_MSG_MAP(CTstmodemApp) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CTstmodemApp construction CTstmodemApp::CTstmodemApp() : CWinApp() { DebugOutputDebugString(); DebugSetLogfile("\\tstmodem.log"); } ///////////////////////////////////////////////////////////////////////////// // The one and only CTstmodemApp object CTstmodemApp theApp; ///////////////////////////////////////////////////////////////////////////// // CTstmodemApp initialization BOOL CTstmodemApp::InitInstance() { CTstmodemDlg dlg_modem; SerialPort port; RILState ril; KernelState kernel; port.SetSpeed(SerialParams::GetDefaultSpeed()); port.SetBits(SerialParams::GetDefaultBits()); port.SetPort(SerialParams::GetDefaultPort()); dlg_modem.SetModels(port, kernel, ril); port.SetView(dlg_modem); ril.SetView(dlg_modem); kernel.SetView(dlg_modem); dlg_modem.DoModal(); return FALSE; }