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.

76 lines
4.1 KiB

  1. /*****************************************************************************
  2. *
  3. * ftpurl.h - Creating, encoding, and decoding URLs
  4. *
  5. *****************************************************************************/
  6. #ifndef _FTPURL_H
  7. #define _FTPURL_H
  8. ///////////////////////////////////////////////////////////////////////
  9. // URL Path Functions (Obsolete?)
  10. ///////////////////////////////////////////////////////////////////////
  11. // URL Path Wacking
  12. HRESULT UrlPathRemoveSlashW(LPWSTR pszUrlPath);
  13. HRESULT UrlPathRemoveSlashA(LPSTR pszUrlPath);
  14. HRESULT UrlPathRemoveFrontSlashW(LPWSTR pszUrlPath);
  15. HRESULT UrlPathRemoveFrontSlashA(LPSTR pszUrlPath);
  16. HRESULT UrlPathToFilePathW(LPWSTR pszPath);
  17. HRESULT UrlPathToFilePathA(LPSTR pszPath);
  18. HRESULT FilePathToUrlPathW(LPWSTR pszPath);
  19. HRESULT FilePathToUrlPathA(LPSTR pszPath);
  20. #ifdef UNICODE
  21. #define UrlPathRemoveSlash UrlPathRemoveSlashW
  22. #define UrlPathRemoveFrontSlash UrlPathRemoveFrontSlashW
  23. #else // UNICODE
  24. #define UrlPathRemoveSlash UrlPathRemoveSlashA
  25. #define UrlPathRemoveFrontSlash UrlPathRemoveFrontSlashA
  26. #endif // UNICODE
  27. HRESULT UrlGetDifference(LPCTSTR pszBaseUrl, LPCTSTR pszSuperUrl, LPTSTR pszPathDiff, DWORD cchSize);
  28. HRESULT UrlPathAdd(LPTSTR pszUrl, DWORD cchUrlSize, LPCTSTR pszSegment);
  29. HRESULT UrlPathToFilePath(LPCTSTR pszSourceUrlPath, LPTSTR pszDestFilePath, DWORD cchSize);
  30. HRESULT UrlRemoveDownloadType(LPTSTR pszUrlPath, BOOL * pfTypeSpecified, BOOL * pfType);
  31. HRESULT UrlReplaceUserPassword(LPTSTR pszUrlPath, DWORD cchSize, LPCTSTR pszUserName, LPCTSTR pszPassword);
  32. HRESULT PidlReplaceUserPassword(LPCITEMIDLIST pidlIn, LPITEMIDLIST * ppidlOut, IMalloc * pm, LPCTSTR pszUserName, LPCTSTR pszPassword);
  33. //HRESULT UrlPathAppendSlash(LPTSTR pszUrlPath);
  34. //HRESULT UrlPathGetLastSegment(LPCTSTR pszUrl, LPTSTR pszSegment, DWORD cchSegSize);
  35. //HRESULT UrlPathRemoveLastSegment(LPTSTR pszUrl);
  36. //HRESULT UrlGetPath(LPCTSTR pszUrl, DWORD dwFlags, LPTSTR pszUrlPath, DWORD cchUrlPathSize);
  37. //HRESULT UrlPathAppend(LPTSTR pszUrl, DWORD cchUrlSize, LPCTSTR pszSegment);
  38. //HRESULT UrlReplaceUrlPath(LPTSTR pszUrl, DWORD cchSize, LPCTSTR pszUrlPath);
  39. //HRESULT PidlReplaceUrlPath(LPCITEMIDLIST pidlIn, LPITEMIDLIST * ppidlOut, IMalloc * pm, LPCTSTR pszUrlPath);
  40. ///////////////////////////////////////////////////////////////////////
  41. // Wire Path Functions (UTF-8 or DBCS/MBCS)
  42. ///////////////////////////////////////////////////////////////////////
  43. HRESULT WirePathAppend(LPWIRESTR pwWirePath, DWORD cchUrlSize, LPCWIRESTR pwWireSegment);
  44. HRESULT WirePathAppendSlash(LPWIRESTR pwWirePath, DWORD cchWirePathSize);
  45. HRESULT WirePathGetFirstSegment(LPCWIRESTR pwFtpWirePath, LPWIRESTR wFirstItem, DWORD cchFirstItemSize, BOOL * pfWasFragSeparator, LPWIRESTR wRemaining, DWORD cchRemainingSize, BOOL * pfIsDir);
  46. ///////////////////////////////////////////////////////////////////////
  47. // Display Path Functions (Unicode)
  48. ///////////////////////////////////////////////////////////////////////
  49. HRESULT DisplayPathAppend(LPWSTR pwzDisplayPath, DWORD cchUrlSize, LPCWSTR pwzDisplaySegment);
  50. HRESULT DisplayPathAppendSlash(LPWSTR pwzDisplayPath, DWORD cchSize);
  51. HRESULT DisplayPathGetFirstSegment(LPCWSTR pwzFullPath, LPWSTR pwzFirstItem, DWORD cchFirstItemSize, BOOL * pfWasFragSeparator, LPWSTR pwzRemaining, DWORD cchRemainingSize, BOOL * pfIsDir);
  52. // Other Functions
  53. //HRESULT UrlCreateFromFindData(LPCTSTR pszBaseUrl, const LPWIN32_FIND_DATA pwfd, LPTSTR pszFullUrl, DWORD cchFullUrlSize);
  54. HRESULT UrlCreate(LPCTSTR pszServer, LPCTSTR pszUser, LPCTSTR pszPassword, LPCTSTR pszUrlPath, LPCTSTR pszFragment, INTERNET_PORT ipPortNum, LPCTSTR pszDownloadType, LPTSTR pszUrl, DWORD cchSize);
  55. HRESULT UrlCreateEx(LPCTSTR pszServer, LPCTSTR pszUser, LPCTSTR pszPassword, LPCTSTR pszUrlPath, LPCTSTR pszFragment, INTERNET_PORT ipPortNum, LPCTSTR pszDownloadType, LPTSTR pszUrl, DWORD cchSize, DWORD dwFlags);
  56. HRESULT StrRetFromFtpPidl(LPSTRRET pStrRet, DWORD shgno, LPCITEMIDLIST pidl);
  57. HRESULT PidlGenerateSiteLookupStr(LPCITEMIDLIST pidl, LPTSTR pszLookupStr, DWORD cchSize);
  58. BOOL IsIPAddressStr(LPTSTR pszServer);
  59. BOOL IsEmptyUrlPath(LPCTSTR pszUrlPath);
  60. #endif // _FTPURL_H