Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1996.
  5. //
  6. // File: HTTPNEG.HXX
  7. //
  8. // Contents: Definitions for code to handle multiplexing multiple
  9. // concurrent IHttpNegotiate interfaces.
  10. //
  11. // Classes: CHttpNegHolder
  12. //
  13. // Functions:
  14. //
  15. // History: 01-30-96 JoeS (Joe Souza) Created
  16. //
  17. //----------------------------------------------------------------------------
  18. #ifndef _HTTPNEG_HXX_
  19. #define _HTTPNEG_HXX_
  20. class CHttpNegNode;
  21. class CHttpNegNode
  22. {
  23. public:
  24. CHttpNegNode(IHttpNegotiate *pIHttpNeg)
  25. {
  26. _pIHttpNeg = pIHttpNeg;
  27. _pNext = NULL;
  28. }
  29. IHttpNegotiate *GetHttpNegotiate()
  30. {
  31. return _pIHttpNeg;
  32. }
  33. CHttpNegNode *GetNextNode()
  34. {
  35. return _pNext;
  36. }
  37. void SetNextNode(CHttpNegNode *pNext)
  38. {
  39. _pNext = pNext;
  40. }
  41. private:
  42. IHttpNegotiate * _pIHttpNeg; // Pointer to caller's IHttpNegotiate.
  43. CHttpNegNode * _pNext;
  44. };
  45. class CHttpNegHolder : public IHttpNegotiate
  46. {
  47. public:
  48. CHttpNegHolder(void);
  49. // *** IUnknown methods ***
  50. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj);
  51. STDMETHOD_(ULONG,AddRef) (THIS);
  52. STDMETHOD_(ULONG,Release) (THIS);
  53. // *** IHttpNegotiate methods ***
  54. STDMETHOD(BeginningTransaction) (
  55. LPCWSTR szURL,
  56. LPCWSTR szHeaders,
  57. DWORD dwReserved,
  58. LPWSTR *pszAdditionalHeaders);
  59. STDMETHOD(OnResponse) (
  60. DWORD dwResponseCode,
  61. LPCWSTR szResponseHeaders,
  62. LPCWSTR szRequestHeaders,
  63. LPWSTR *pszAdditionalRequestHeaders);
  64. // *** Helper functions ***
  65. STDMETHOD(AddNode) (IHttpNegotiate *IHttpNeg);
  66. private:
  67. STDMETHOD(RemoveAllNodes) (void);
  68. CRefCount _CRefs;
  69. // BUGBUG: have node of 5 elements or so!
  70. CHttpNegNode *_pCHttpNegNode;
  71. LONG _cElements;
  72. };
  73. #endif //_HTTPNEG_HXX_