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.

59 lines
1.0 KiB

  1. #ifndef _RESPONSE_HEADERHASH_HXX_
  2. #define _RESPONSE_HEADERHASH_HXX_
  3. class RESPONSE_HEADER_HASH
  4. {
  5. public:
  6. static
  7. HRESULT
  8. Initialize(
  9. VOID
  10. );
  11. static
  12. VOID
  13. Terminate(
  14. VOID
  15. );
  16. static
  17. ULONG
  18. GetIndex(
  19. CHAR * pszName
  20. );
  21. static
  22. CHAR *
  23. GetString(
  24. ULONG ulIndex,
  25. DWORD * pcchLength
  26. )
  27. {
  28. if ( ulIndex < HttpHeaderResponseMaximum )
  29. {
  30. *pcchLength = sm_rgHeaders[ ulIndex ]._cchName;
  31. return sm_rgHeaders[ ulIndex ]._pszName;
  32. }
  33. return NULL;
  34. }
  35. private:
  36. static RESPONSE_HEADER_HASH *sm_pResponseHash;
  37. static HEADER_RECORD sm_rgHeaders[];
  38. //
  39. // total number of headers
  40. //
  41. static DWORD sm_cResponseHeaders;
  42. //
  43. // sorted headers used for header index lookup (for bsearch)
  44. //
  45. static HEADER_RECORD * * sm_ppSortedResponseHeaders;
  46. };
  47. #endif