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.

77 lines
2.7 KiB

  1. /*****************************************************************************
  2. * ftpprop.h
  3. *****************************************************************************/
  4. #ifndef _FTPPROP_H
  5. #define _FTPPROP_H
  6. #include "ftpdhlp.h"
  7. #include "ftppl.h"
  8. HRESULT CFtpProp_DoProp(CFtpPidlList * pflHfpl, CFtpFolder * pff, HWND hwnd);
  9. /*****************************************************************************\
  10. CLASS: CFtpProp
  11. DESCRIPTION:
  12. NOTE! that we use the IShellFolder on the wrong thread!
  13. Take careful note that all the CFtpFolder methods we call are thread-safe.
  14. The Change UNIX Permissions feature works by sending the command
  15. "SITE CHMOD <permissions> <filename>" to the server.
  16. \*****************************************************************************/
  17. class CFtpProp : public IUnknown
  18. {
  19. public:
  20. //////////////////////////////////////////////////////
  21. // Public Interfaces
  22. //////////////////////////////////////////////////////
  23. // *** IUnknown ***
  24. virtual STDMETHODIMP_(ULONG) AddRef(void);
  25. virtual STDMETHODIMP_(ULONG) Release(void);
  26. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  27. public:
  28. CFtpProp();
  29. ~CFtpProp(void);
  30. // Friend Functions
  31. friend HRESULT CFtpProp_Create(CFtpPidlList * pflHfpl, CFtpFolder * pff, HWND hwnd, CFtpProp ** ppfp);
  32. static HRESULT _CommitCHMOD_CB(HINTERNET hint, HINTPROCINFO * phpi, LPVOID pv, BOOL * pfReleaseHint);
  33. static DWORD _PropertySheetThreadProc(LPVOID pvCFtpProp) {return ((CFtpProp *) pvCFtpProp)->_PropertySheetThread(); };
  34. protected:
  35. // Public Member Variables
  36. int m_cRef;
  37. CFtpFolder * m_pff; // Folder that owns the pidls
  38. CFtpPidlList * m_pflHfpl; //
  39. HWND m_hwnd; // browser window for UI and Legacy ChangeNotify
  40. CFtpDialogTemplate m_ftpDialogTemplate;
  41. BOOL m_fChangeModeSupported;
  42. DWORD m_dwNewPermissions;
  43. // Public Member Functions
  44. BOOL OnInitDialog(HWND hdlg);
  45. BOOL OnClose(HWND hDlg);
  46. BOOL OnDestroy(HWND hDlg);
  47. DWORD _PropertySheetThread(void);
  48. void _HideCHMOD_UI(HWND hDlg);
  49. HRESULT _SetCHMOD_UI(HWND hDlg);
  50. DWORD _GetCHMOD_UI(HWND hDlg);
  51. DWORD _GetUnixPermissions(void);
  52. HRESULT _CommitCHMOD(HINTERNET hint, HINTPROCINFO * phpi, BOOL * pfReleaseHint);
  53. INT_PTR _SetWhiteBGCtlColor(HWND hDlg, HDC hdc, HWND hwndCtl);
  54. static INT_PTR DlgProc(HWND hdlg, UINT wm, WPARAM wp, LPARAM lp);
  55. };
  56. DWORD DoProp_OnThread(LPVOID pv);
  57. #endif // _FTPPROP_H