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.

88 lines
4.1 KiB

  1. #ifndef _AUGISF_H
  2. #define _AUGISF_H
  3. // Augmented IShellFolder Object. This takes two IShellFolder interfaces
  4. // and wraps them so an object can enumerate as if they were in a single
  5. // IShellFolder implementation.
  6. class CAugmentedISF : public IAugmentedShellFolder2,
  7. public IShellService,
  8. public ITranslateShellChangeNotify
  9. {
  10. public:
  11. // *** IUnknown methods ***
  12. virtual STDMETHODIMP QueryInterface(REFIID,void **);
  13. virtual STDMETHODIMP_(ULONG) AddRef(void);
  14. virtual STDMETHODIMP_(ULONG) Release(void);
  15. // *** IShellFolder methods ***
  16. virtual STDMETHODIMP ParseDisplayName(HWND hwndOwner,
  17. LPBC pbcReserved, LPOLESTR lpszDisplayName,
  18. ULONG * pchEaten, LPITEMIDLIST * ppidl, ULONG *pdwAttributes);
  19. virtual STDMETHODIMP EnumObjects( THIS_ HWND hwndOwner, DWORD grfFlags, LPENUMIDLIST * ppenumIDList);
  20. virtual STDMETHODIMP BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved,
  21. REFIID riid, LPVOID * ppvOut);
  22. virtual STDMETHODIMP BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved,
  23. REFIID riid, LPVOID * ppvObj);
  24. virtual STDMETHODIMP CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
  25. virtual STDMETHODIMP CreateViewObject (HWND hwndOwner, REFIID riid, LPVOID * ppvOut);
  26. virtual STDMETHODIMP GetAttributesOf(UINT cidl, LPCITEMIDLIST * apidl,
  27. ULONG * rgfInOut);
  28. virtual STDMETHODIMP GetUIObjectOf(HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl,
  29. REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
  30. virtual STDMETHODIMP GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD uFlags, LPSTRRET lpName);
  31. virtual STDMETHODIMP SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl,
  32. LPCOLESTR lpszName, DWORD uFlags,
  33. LPITEMIDLIST * ppidlOut);
  34. // *** IAugmentedShellFolder methods ***
  35. virtual STDMETHODIMP AddNameSpace(const GUID * pguidObject, IShellFolder * psf, LPCITEMIDLIST pidl, DWORD dwFlags);
  36. virtual STDMETHODIMP GetNameSpaceID(LPCITEMIDLIST pidl, GUID * pguidOut);
  37. virtual STDMETHODIMP QueryNameSpace(DWORD dwID, GUID * pguidOut, IShellFolder ** ppsf);
  38. virtual STDMETHODIMP EnumNameSpace(DWORD uNameSpace, DWORD * pdwID);
  39. // *** IAugmentedShellFolder2 methods ***
  40. //not used
  41. //virtual STDMETHODIMP GetNameSpaceCount( OUT LONG* pcNamespaces ) ;
  42. //virtual STDMETHODIMP GetIDListWrapCount( LPCITEMIDLIST pidlWrap, OUT LONG * pcPidls) ;
  43. virtual STDMETHODIMP UnWrapIDList( LPCITEMIDLIST pidlWrap, LONG cPidls, IShellFolder** apsf, LPITEMIDLIST * apidlFolder, LPITEMIDLIST * apidlItems, LONG * pcFetched ) ;
  44. // *** IShellService methods ***
  45. virtual STDMETHODIMP SetOwner(IUnknown * punkOwner);
  46. // *** ITranslateShellChangeNotify methods ***
  47. virtual STDMETHODIMP TranslateIDs(LONG *plEvent, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, LPITEMIDLIST * ppidlOut1, LPITEMIDLIST * ppidlOut2,
  48. LONG *plEvent2, LPITEMIDLIST * ppidlOut1Event2, LPITEMIDLIST * ppidlOut2Event2);
  49. virtual STDMETHODIMP IsChildID(LPCITEMIDLIST pidlKid, BOOL fImmediate);
  50. virtual STDMETHODIMP IsEqualID(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
  51. virtual STDMETHODIMP Register(HWND hwnd, UINT uMsg, long lEvents);
  52. virtual STDMETHODIMP Unregister();
  53. protected:
  54. CAugmentedISF();
  55. ~CAugmentedISF();
  56. friend HRESULT CAugmentedISF_CreateInstance(IUnknown* pUnkOuter, IUnknown** ppunk, LPCOBJECTINFO poi);
  57. IShellFolder * _GetObjectPSF(int nID);
  58. BOOL _IsCommonPidl(LPCITEMIDLIST pidl);
  59. STDMETHOD_( LPITEMIDLIST, TranslatePidl )( LPCITEMIDLIST pidlNS, LPCITEMIDLIST pidl, LPARAM lParam /*int nID*/) ;
  60. STDMETHOD_( LPITEMIDLIST, GetNativePidl )( LPCITEMIDLIST pidl, LPARAM lParam /*int nID*/) ;
  61. int _cRef;
  62. HDPA _hdpa;
  63. IUnknown * _punkOwner;
  64. };
  65. #endif // _AUGISF_H_