Source code of Windows XP (NT5)
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.

52 lines
1.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1999
  6. //
  7. // File: httptran.hxx
  8. //
  9. //--------------------------------------------------------------------------
  10. #include "wininet.h"
  11. #define ASCII_ENCODING 0x0
  12. #define TLV_ENCODING 0x1
  13. #define IDL_ENCODING 0x2
  14. #define OCTET_ENCODING 0x3
  15. #define ASN_ENCODING 0x30
  16. #define GTREAD 0x00000001
  17. #define GTWRITE 0x00000002
  18. class CHttpTran {
  19. private:
  20. DWORD fOpen;
  21. HINTERNET hIOpen;
  22. HINTERNET hIConnect;
  23. HINTERNET hIHttp;
  24. BYTE * pbRecBuf;
  25. TCHAR * tszPartURL;
  26. public:
  27. DWORD Open(const TCHAR * tszBinding, DWORD fOpen);
  28. DWORD Free(BYTE * pb);
  29. DWORD Send(DWORD dwEncodeType, DWORD cbSendBuff, const BYTE * pbSendBuff);
  30. DWORD Receive(DWORD * pdwEncodeType, DWORD * pcbReceiveBuff, BYTE ** ppbReceiveBuff);
  31. DWORD Close(void);
  32. CHttpTran(void) {
  33. fOpen = 0;
  34. hIOpen = NULL;
  35. hIConnect = NULL;
  36. hIHttp = NULL;
  37. pbRecBuf = NULL;
  38. tszPartURL = NULL;
  39. }
  40. virtual ~CHttpTran(void) {
  41. Close();
  42. }
  43. };