From: <ps...@us...> - 2009-02-04 16:29:10
|
Revision: 1372 http://znc.svn.sourceforge.net/znc/?rev=1372&view=rev Author: psychon Date: 2009-02-04 16:29:06 +0000 (Wed, 04 Feb 2009) Log Message: ----------- Make some functions in CHTTPSock pure virtual where it makes sense Or do you seriously expect anyone to set up a http which always replies with 404 File not found errors? Modified Paths: -------------- trunk/HTTPSock.cpp trunk/HTTPSock.h Modified: trunk/HTTPSock.cpp =================================================================== --- trunk/HTTPSock.cpp 2009-02-04 15:47:36 UTC (rev 1371) +++ trunk/HTTPSock.cpp 2009-02-04 16:29:06 UTC (rev 1372) @@ -283,10 +283,6 @@ return m_msvsParams; } -bool CHTTPSock::OnPageRequest(const CString& sURI, CString& sPageRet) { - return false; -} - bool CHTTPSock::PrintNotFound() { return PrintErrorPage(404, "Not Found", "The requested URL was not found on this server."); } @@ -416,12 +412,4 @@ Close(); } -Csock* CHTTPSock::GetSockObj(const CString& sHost, unsigned short uPort) { - CHTTPSock* pSock = new CHTTPSock(m_pModule); - pSock->SetSockName("HTTP::CLIENT"); - pSock->SetTimeout(120); - - return pSock; -} - #endif // _MODULES Modified: trunk/HTTPSock.h =================================================================== --- trunk/HTTPSock.h 2009-02-04 15:47:36 UTC (rev 1371) +++ trunk/HTTPSock.h 2009-02-04 16:29:06 UTC (rev 1372) @@ -27,11 +27,11 @@ virtual void Timeout(); virtual void Connected(); virtual void Disconnected(); - virtual Csock* GetSockObj(const CString& sHost, unsigned short uPort); + virtual Csock* GetSockObj(const CString& sHost, unsigned short uPort) = 0; // !Csocket derived members // Hooks - virtual bool OnPageRequest(const CString& sURI, CString& sPageRet); + virtual bool OnPageRequest(const CString& sURI, CString& sPageRet) = 0; virtual bool OnLogin(const CString& sUser, const CString& sPass); // !Hooks This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |