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.

82 lines
3.2 KiB

  1. /* Copyright 1996 Microsoft */
  2. #ifndef _ACLISF_H_
  3. #define _ACLISF_H_
  4. #include "shellurl.h"
  5. class CACLIShellFolder
  6. : public IEnumString
  7. , public IACList2
  8. , public ICurrentWorkingDirectory
  9. , public IShellService
  10. , public IPersistFolder
  11. {
  12. public:
  13. //////////////////////////////////////////////////////
  14. // Public Interfaces
  15. //////////////////////////////////////////////////////
  16. // *** IUnknown ***
  17. virtual STDMETHODIMP_(ULONG) AddRef(void);
  18. virtual STDMETHODIMP_(ULONG) Release(void);
  19. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  20. // *** IEnumString ***
  21. virtual STDMETHODIMP Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched);
  22. virtual STDMETHODIMP Skip(ULONG celt) {return E_NOTIMPL;}
  23. virtual STDMETHODIMP Reset(void);
  24. virtual STDMETHODIMP Clone(IEnumString **ppenum) {return E_NOTIMPL;}
  25. // *** IACList ***
  26. virtual STDMETHODIMP Expand(LPCOLESTR pszExpand);
  27. // *** IACList2 ***
  28. virtual STDMETHODIMP SetOptions(DWORD dwFlag);
  29. virtual STDMETHODIMP GetOptions(DWORD* pdwFlag);
  30. // *** ICurrentWorkingDirectory ***
  31. virtual STDMETHODIMP GetDirectory(LPWSTR pwzPath, DWORD cchSize) {return E_NOTIMPL;};
  32. virtual STDMETHODIMP SetDirectory(LPCWSTR pwzPath);
  33. // *** IPersistFolder ***
  34. virtual STDMETHODIMP Initialize(LPCITEMIDLIST pidl); // Save as SetDirectory() but for pidls
  35. virtual STDMETHODIMP GetClassID(CLSID *pclsid);
  36. // *** IShellService ***
  37. virtual STDMETHODIMP SetOwner(IUnknown* punkOwner);
  38. private:
  39. // Constructor / Destructor (protected so we can't create on stack)
  40. CACLIShellFolder();
  41. ~CACLIShellFolder(void);
  42. HRESULT _SetLocation(LPCITEMIDLIST pidl);
  43. HRESULT _TryNextPath(void);
  44. HRESULT _Init(void);
  45. BOOL _SkipForPerf(LPCWSTR pwzExpand);
  46. HRESULT _PassesFilter(LPCITEMIDLIST pidl, LPWSTR pszName, DWORD cchSize);
  47. HRESULT _GetNextWrapper(LPWSTR pszName, DWORD cchSize);
  48. HRESULT _GetPidlName(LPCITEMIDLIST pidl, BOOL fUsingCachePidl, LPWSTR pszName, DWORD cchSize);
  49. // Instance creator
  50. friend HRESULT CACLIShellFolder_CreateInstance(IUnknown *punkOuter, IUnknown **ppunk, LPCOBJECTINFO poi);
  51. // Private variables
  52. DWORD _cRef; // COM reference count
  53. IEnumIDList* _peidl; // PIDL enumerator
  54. IShellFolder* _psf; // Shell folder
  55. IBrowserService* _pbs; // Browser Service to find Current Location in Shell Name Space.
  56. LPITEMIDLIST _pidl; // PIDL of current directory.
  57. LPITEMIDLIST _pidlCWD; // PIDL of current working directory.
  58. LPITEMIDLIST _pidlInFolder; // Sometimes the user string matches SHGDN_INFOLDER, but not (SHGDN_INFOLDER | SHGDN_FORPARSING). My Computer for example.
  59. BOOL _fExpand; // Are we expanding?
  60. LPTSTR _szExpandStr; // String we are expanding
  61. CShellUrl * _pshuLocation;
  62. int _nPathIndex;
  63. DWORD _dwOptions; // ACLO_* flags
  64. BOOL _fShowHidden; // Enumerate hidden files?
  65. // BOOL _fShowSysFiles; // Enumerate system files?
  66. };
  67. #endif // _ACLISF_H_