Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cHttpProtocolStream.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_cHttpProtocolStream_H
7 #define _INC_cHttpProtocolStream_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "cHttpHeader.h"
13 #include "../Net/cProtocol.h"
14 #include "GrayCore/include/cMime.h"
15 
16 namespace GrayLib
17 {
18  class cHttpFactory;
19  class cHttpController;
20 
22  {
26 
27  protected:
29  public:
30  cHttpProtocolStreamBase(cHttpFactory* pFactory, IUnkObject* pServerConnection, cStreamInput* pStreamInp, cStreamOutput* pStreamOut);
31  virtual ~cHttpProtocolStreamBase();
32 
33  HRESULT ServePageError(cStringA sURLFailed, HTTPRET_TYPE eRetCode);
34  HRESULT ServePageGenericNoChange(const FILECHAR_t* pszSrcFile);
35 
36  HRESULT ServePageStream(cHttpHeaderServer& Head, cStreamInput* pInp);
37  HRESULT ServePageQueue(const ATOMCHAR_t* pszURL, MIME_TYPE eMimeType, cStream& src);
38  HRESULT ServePageFile(const FILECHAR_t* pszSrcFile, MIME_TYPE eMimeType = MIME_UNKNOWN, cTimeInt* pdateIfModifiedSince = nullptr, bool bHeaderOnly = false);
39 
40  virtual HRESULT ProcessStreamPacket() override;
41  };
42 
44  {
50 
51  public:
52  cHttpProtocolStream(cHttpFactory* pFactory, IUnkObject* pServerConnection, cStreamInput* pStreamInp, cStreamOutput* pStreamOut)
53  : cHttpProtocolStreamBase(pFactory, pServerConnection, pStreamInp, pStreamOut)
54  {
55  }
56  HASHCODE_t get_HashCode() const noexcept
57  {
59  }
61  };
62 }
63 
64 #endif
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
Definition: cHttpFactory.h:27
Definition: cHttpHeader.h:160
Definition: cHttpProtocolStream.h:22
cHttpFactory *const m_pFactory
my parent HTTP server. it created me for cNetServer.
Definition: cHttpProtocolStream.h:28
Definition: cHttpProtocolStream.h:44
cHttpProtocolStream(cHttpFactory *pFactory, IUnkObject *pServerConnection, cStreamInput *pStreamInp, cStreamOutput *pStreamOut)
Definition: cHttpProtocolStream.h:52
HASHCODE_t get_HashCode() const noexcept
Definition: cHttpProtocolStream.h:56
Definition: cProtocol.h:24
HASHCODE_t get_HashCode() const noexcept
Definition: cProtocol.h:48
Definition: cRefPtr.h:22
Definition: cStream.h:306
Definition: cStream.h:126
Definition: cStream.h:456
< similar to the MFC CTime and cTimeSpan, not as accurate or large ranged as COleDateTime
Definition: cTimeInt.h:101
Definition: cMesh.h:22
HTTPRET_TYPE
Definition: cHttpCommon.h:24
MIME_TYPE
Definition: cMime.h:79
char FILECHAR_t
a UTF8 char in a file name. like TCHAR
Definition: FileName.h:22
UINT_PTR HASHCODE_t
could hold a pointer converted to a number? maybe 64 or 32 bit ? same as size_t.
Definition: GrayCore.h:116
char ATOMCHAR_t
the char form (UNICODE or not) for an atom. (for symbolic names)
Definition: StrConst.h:15
Definition: cHttpCommon.h:46
Definition: cDebugAssert.h:29