home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / MS_VC.50 / VC / MFC / INCLUDE / AFXISAPI.INL < prev    next >
Encoding:
Text File  |  1996-12-03  |  4.1 KB  |  123 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1995-1997 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. // Inlines for AFXISAPI.H
  12.  
  13. #ifdef _AFXISAPI_INLINE
  14.  
  15. _AFXISAPI_INLINE CHttpServerContext::CHttpServerContext(EXTENSION_CONTROL_BLOCK* pECB)
  16. #ifdef _DEBUG
  17.     : m_bSendHeaders(TRUE), m_pECB(pECB), m_pStream(NULL),
  18.       m_dwEndOfHeaders(0), m_dwOldEndOfHeaders(0)
  19. #else
  20.     : m_bSendHeaders(TRUE), m_pECB(pECB), m_pStream(NULL),
  21.       m_dwEndOfHeaders(0)
  22. #endif
  23.     { }
  24.  
  25. _AFXISAPI_INLINE CHttpServerContext::~CHttpServerContext()
  26.     { if (m_pStream != NULL) delete m_pStream; }
  27.  
  28. _AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(double d)
  29.     { ISAPIASSERT(m_pStream != NULL);
  30.         if (m_pStream != NULL) *m_pStream << d;
  31.         return *this; }
  32.  
  33. _AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(float f)
  34.     { ISAPIASSERT(m_pStream != NULL);
  35.         if (m_pStream != NULL) *m_pStream << f;
  36.         return *this; }
  37.  
  38. _AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(long int dw)
  39.     { ISAPIASSERT(m_pStream != NULL);
  40.         if (m_pStream != NULL) *m_pStream << dw;
  41.         return *this; }
  42.  
  43. _AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(short int w)
  44.     { ISAPIASSERT(m_pStream != NULL);
  45.         if (m_pStream != NULL) *m_pStream << w;
  46.         return *this; }
  47.  
  48. _AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(const CHtmlStream& stream)
  49.     { ISAPIASSERT(m_pStream != NULL);
  50.         if (m_pStream != NULL) *m_pStream << stream;
  51.         return *this; }
  52.  
  53. _AFXISAPI_INLINE CHttpServerContext& CHttpServerContext::operator<<(LPCTSTR psz)
  54.     { ISAPIASSERT(m_pStream != NULL && psz != NULL);
  55.         if (m_pStream != NULL && psz != NULL) *m_pStream << psz;
  56.         return *this; }
  57.  
  58. _AFXISAPI_INLINE BOOL CHttpServerContext::GetServerVariable(LPTSTR lpszVariableName,
  59.         LPVOID lpvBuffer, LPDWORD lpdwSize)
  60.     {
  61.         return m_pECB->GetServerVariable(m_pECB->ConnID,
  62.             lpszVariableName, lpvBuffer, lpdwSize);
  63.     }
  64.  
  65. _AFXISAPI_INLINE BOOL CHttpServerContext::WriteClient(LPVOID pBuffer, LPDWORD lpdwBytes,
  66.     DWORD dwReserved /* = 0 */)
  67.     {
  68.         return m_pECB->WriteClient(m_pECB->ConnID, pBuffer,
  69.             lpdwBytes, dwReserved);
  70.     }
  71.  
  72. _AFXISAPI_INLINE BOOL CHttpServerContext::ReadClient(LPVOID lpvBuffer, LPDWORD lpdwSize)
  73.     {
  74.         return m_pECB->ReadClient(m_pECB->ConnID, lpvBuffer, lpdwSize);
  75.     }
  76.  
  77. _AFXISAPI_INLINE BOOL CHttpServerContext::ServerSupportFunction(DWORD dwHSERRequest,
  78.         LPVOID lpvBuffer, LPDWORD lpdwSize, LPDWORD lpdwDataType)
  79.     {
  80.         return m_pECB->ServerSupportFunction(m_pECB->ConnID, dwHSERRequest,
  81.             lpvBuffer, lpdwSize, lpdwDataType);
  82.     }
  83.  
  84.  
  85. _AFXISAPI_INLINE DWORD CHtmlStream::GetStreamSize() const
  86.     { return m_nStreamSize; }
  87.  
  88.  
  89. _AFXISAPI_INLINE CHttpFilterContext::CHttpFilterContext(PHTTP_FILTER_CONTEXT pCtx)
  90.     : m_pFC(pCtx)
  91.     { }
  92.  
  93. _AFXISAPI_INLINE BOOL CHttpFilterContext::GetServerVariable(LPTSTR lpszVariableName,
  94.         LPVOID lpvBuffer, LPDWORD lpdwSize)
  95.     {
  96.         return m_pFC->GetServerVariable(m_pFC, lpszVariableName, lpvBuffer, lpdwSize);
  97.     }
  98. _AFXISAPI_INLINE BOOL CHttpFilterContext::AddResponseHeaders(LPTSTR lpszHeaders,
  99.         DWORD dwReserved /* = 0 */)
  100.     {
  101.         return m_pFC->AddResponseHeaders(m_pFC, lpszHeaders, dwReserved);
  102.     }
  103. _AFXISAPI_INLINE BOOL CHttpFilterContext::WriteClient(LPVOID lpvBuffer,
  104.         LPDWORD lpdwBytes, DWORD dwReserved /* = 0 */)
  105.     {
  106.         return m_pFC->WriteClient(m_pFC, lpvBuffer, lpdwBytes, dwReserved);
  107.     }
  108. _AFXISAPI_INLINE LPVOID CHttpFilterContext::AllocMem(DWORD cbSize,
  109.         DWORD dwReserved /* = 0 */)
  110.     {
  111.         return m_pFC->AllocMem(m_pFC, cbSize, dwReserved);
  112.     }
  113. _AFXISAPI_INLINE BOOL CHttpFilterContext::ServerSupportFunction(enum SF_REQ_TYPE sfReq,
  114.         LPVOID lpvBuffer, LPDWORD lpdwSize, LPDWORD lpdwDataType)
  115.     {
  116. //WINBUG: HTTPFLT.H has the last two params as type DWORD
  117.         return m_pFC->ServerSupportFunction(m_pFC, sfReq, lpvBuffer,
  118.             (DWORD) lpdwSize, (DWORD) lpdwDataType);
  119.     }
  120.  
  121.  
  122. #endif // _AFXISAPI_INLINE
  123.