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.

105 lines
2.5 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: CNet.hxx
  7. //
  8. // Contents:
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 12-04-95 JohannP (Johann Posch) Created
  15. //
  16. //----------------------------------------------------------------------------
  17. #ifndef _CURL_HXX_
  18. #define _CURL_HXX_
  19. #define URL_FIELD_SIZE INTERNET_MAX_HOST_NAME_LENGTH
  20. class CUrl;
  21. class CUrl
  22. {
  23. public:
  24. LPSTR GetBaseURL()
  25. {
  26. return _pszBaseURL;
  27. }
  28. LPSTR GetURL()
  29. {
  30. return _pszFullURL;
  31. }
  32. BOOL ParseUrl(BOOL fUTF8Required = FALSE,
  33. LPCWSTR pwzUrl = NULL,
  34. DWORD dwCodePage = 0);
  35. DWORD GetProtocol()
  36. {
  37. return _dwProto;
  38. }
  39. LPSTR GetServerName()
  40. {
  41. return _pszServerName;
  42. }
  43. LPSTR GetObjectName()
  44. {
  45. return _pszObject;
  46. }
  47. CUrl();
  48. ~CUrl();
  49. BOOL CUrlInitBasic(DWORD dwBaseURLSize);
  50. BOOL CUrlInitAll();
  51. private:
  52. DWORD ProtoFromString(LPSTR lpszProtocol);
  53. BOOL IsFileProtocol(LPSTR lpszProtocol);
  54. //private:
  55. public:
  56. char* _pszBaseURL;
  57. char* _pszPartURL;
  58. char* _pszFullURL;
  59. char* _pszProtocol;
  60. char* _pszServerName;
  61. char* _pszUserName;
  62. char* _pszPassword;
  63. char* _pszObject;
  64. char* _pBasicAllocUnit;
  65. INTERNET_PORT _ipPort;
  66. DWORD _dwProto;
  67. BOOL _fUTF8hack;
  68. /*
  69. If utf8hack enabled, then it stores the _pszUTF8ServerName that was originally cracked from
  70. the url.
  71. Not used now, but good probability that it will eventually be needed.
  72. */
  73. char* _pszUTF8ServerName;
  74. DWORD _dwServerCodePage;
  75. /*******
  76. char _szBaseURL[MAX_URL_SIZE + 1];
  77. char _szPartURL[MAX_URL_SIZE + 1];
  78. char _szFullURL[MAX_URL_SIZE + 1];
  79. char _szProtocol[12]; // BUGBUG: Hardcoded size.
  80. char _szServerName[URL_FIELD_SIZE];
  81. INTERNET_PORT _ipPort;
  82. char _szUserName[URL_FIELD_SIZE];
  83. char _szPassword[URL_FIELD_SIZE];
  84. char _szObject[MAX_URL_SIZE + 1];
  85. DWORD _dwProto;
  86. ****/
  87. };
  88. #endif // _CURL_HXX_