X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2690830ea0c100902aa85eb98a56506a5a98ce0d..71fe5c01eb5072bfbaf940f6675acbabc6d8913b:/src/msw/dialup.cpp diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index 409b762930..c23defa839 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -34,19 +34,28 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/intl.h" + #include "wx/event.h" +#endif + +#include "wx/msw/private.h" // must be before #include "dynlib.h" + +#if !wxUSE_DYNLIB_CLASS + #error You need wxUSE_DYNLIB_CLASS to be 1 to compile dialup.cpp. #endif #include "wx/dynlib.h" #include "wx/dialup.h" +// Doesn't yet compile under BC++, mingw, Watcom C++: no wininet.h +#if !defined(__BORLANDC__) && !defined(__GNUWIN32_OLD__) && !defined(__GNUWIN32__) && !defined(__WATCOMC__) + #include #include #include -#include "wx/msw/private.h" - // ---------------------------------------------------------------------------- // constants // ---------------------------------------------------------------------------- @@ -704,11 +713,11 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP, bool async) { // check preconditions - wxCHECK_MSG( IsOk(), FALSE, T("using uninitialized wxDialUpManager") ); + wxCHECK_MSG( IsOk(), FALSE, wxT("using uninitialized wxDialUpManager") ); if ( ms_hRasConnection ) { - wxFAIL_MSG(T("there is already an active connection")); + wxFAIL_MSG(wxT("there is already an active connection")); return TRUE; } @@ -875,7 +884,7 @@ bool wxDialUpManagerMSW::CancelDialing() return FALSE; } - wxASSERT_MSG( ms_hRasConnection, T("dialing but no connection?") ); + wxASSERT_MSG( ms_hRasConnection, wxT("dialing but no connection?") ); ms_dialer = NULL; @@ -884,7 +893,7 @@ bool wxDialUpManagerMSW::CancelDialing() bool wxDialUpManagerMSW::HangUp() { - wxCHECK_MSG( IsOk(), FALSE, T("using uninitialized wxDialUpManager") ); + wxCHECK_MSG( IsOk(), FALSE, wxT("using uninitialized wxDialUpManager") ); // we may terminate either the connection we initiated or another one which // is active now @@ -982,14 +991,14 @@ bool wxDialUpManagerMSW::IsAlwaysOnline() const } } - wxASSERT_MSG( ms_isAlwaysOnline != -1, T("logic error") ); + wxASSERT_MSG( ms_isAlwaysOnline != -1, wxT("logic error") ); return ms_isAlwaysOnline != 0; } bool wxDialUpManagerMSW::IsOnline() const { - wxCHECK_MSG( IsOk(), FALSE, T("using uninitialized wxDialUpManager") ); + wxCHECK_MSG( IsOk(), FALSE, wxT("using uninitialized wxDialUpManager") ); if ( ms_userSpecifiedOnlineStatus != -1 ) { @@ -1005,14 +1014,14 @@ bool wxDialUpManagerMSW::IsOnline() const void wxDialUpManagerMSW::SetOnlineStatus(bool isOnline) { - wxCHECK_RET( IsOk(), T("using uninitialized wxDialUpManager") ); + wxCHECK_RET( IsOk(), wxT("using uninitialized wxDialUpManager") ); ms_userSpecifiedOnlineStatus = isOnline; } bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) { - wxCHECK_MSG( IsOk(), FALSE, T("using uninitialized wxDialUpManager") ); + wxCHECK_MSG( IsOk(), FALSE, wxT("using uninitialized wxDialUpManager") ); bool ok = ms_pfnRasConnectionNotification != 0; @@ -1082,7 +1091,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) { // create a hidden window to receive notification about connections // status change - extern wxChar wxPanelClassName[]; + extern const wxChar *wxPanelClassName; ms_hwndRas = ::CreateWindow(wxPanelClassName, NULL, 0, 0, 0, 0, 0, NULL, @@ -1144,7 +1153,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) if ( dwRet != 0 ) { - wxLogDebug(T("RasConnectionNotification() failed: %s"), + wxLogDebug(wxT("RasConnectionNotification() failed: %s"), GetErrorString(dwRet)); CleanUpThreadData(); @@ -1170,7 +1179,7 @@ bool wxDialUpManagerMSW::EnableAutoCheckOnlineStatus(size_t nSeconds) void wxDialUpManagerMSW::DisableAutoCheckOnlineStatus() { - wxCHECK_RET( IsOk(), T("using uninitialized wxDialUpManager") ); + wxCHECK_RET( IsOk(), wxT("using uninitialized wxDialUpManager") ); if ( m_hThread ) { @@ -1194,7 +1203,7 @@ void wxDialUpManagerMSW::DisableAutoCheckOnlineStatus() void wxDialUpManagerMSW::SetWellKnownHost(const wxString& WXUNUSED(hostname), int WXUNUSED(port)) { - wxCHECK_RET( IsOk(), T("using uninitialized wxDialUpManager") ); + wxCHECK_RET( IsOk(), wxT("using uninitialized wxDialUpManager") ); // nothing to do - we don't use this } @@ -1202,7 +1211,7 @@ void wxDialUpManagerMSW::SetWellKnownHost(const wxString& WXUNUSED(hostname), void wxDialUpManagerMSW::SetConnectCommand(const wxString& WXUNUSED(dial), const wxString& WXUNUSED(hangup)) { - wxCHECK_RET( IsOk(), T("using uninitialized wxDialUpManager") ); + wxCHECK_RET( IsOk(), wxT("using uninitialized wxDialUpManager") ); // nothing to do - we don't use this } @@ -1267,10 +1276,12 @@ static void WINAPI wxRasDialFunc(UINT unMsg, { wxDialUpManagerMSW *dialUpManager = wxDialUpManagerMSW::GetDialer(); - wxCHECK_RET( dialUpManager, T("who started to dial then?") ); + wxCHECK_RET( dialUpManager, wxT("who started to dial then?") ); SendMessage(dialUpManager->GetRasWindow(), wxWM_RAS_DIALING_PROGRESS, rasconnstate, dwError); } +#endif + // __BORLANDC__ #endif // wxUSE_DIALUP_MANAGER