Change the return type of OnPageRequestInternal()

Instead of return a bool, this now returns an enum. This explains the meaning of
the returned value better and will be used in the next commit to fix a bug.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1833 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-03-15 15:58:15 +00:00
parent e54b0bda0a
commit 1d7fdc2954
2 changed files with 45 additions and 24 deletions
+8 -3
View File
@@ -112,6 +112,11 @@ class CWebSessionMap : public TCacheMap<CString, CSmartPtr<CWebSession> > {
class CWebSock : public CHTTPSock {
public:
enum EPageReqResult {
PAGE_NOTFOUND,
PAGE_PRINT
};
CWebSock(CModule* pModule);
CWebSock(CModule* pModule, const CString& sHostname, unsigned short uPort, int iTimeout = 60);
virtual ~CWebSock();
@@ -124,8 +129,8 @@ public:
CModule* ResolveModule();
//virtual bool PrintFile(const CString& sFileName, CString sContentType = "");
bool PrintTemplate(const CString& sPageName, CString& sPageRet, CModule* pModule = NULL);
bool PrintStaticFile(const CString& sPath, CString& sPageRet, CModule* pModule = NULL);
EPageReqResult PrintTemplate(const CString& sPageName, CString& sPageRet, CModule* pModule = NULL);
EPageReqResult PrintStaticFile(const CString& sPath, CString& sPageRet, CModule* pModule = NULL);
bool AddModLoop(const CString& sLoopName, CModule& Module);
void SetPaths(CModule* pModule, bool bIsTemplate = false);
@@ -158,7 +163,7 @@ public:
}
private:
bool OnPageRequestInternal(const CString& sURI, CString& sPageRet);
EPageReqResult OnPageRequestInternal(const CString& sURI, CString& sPageRet);
bool m_bPathsSet;
CTemplate m_Template;