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.

46 lines
1.8 KiB

  1. #ifndef _DATAPRV_H_
  2. #define _DATAPRV_H_
  3. #include "simpdata.h"
  4. // This is the data source object that works from any IShellFolder.
  5. class CSimpleData : public OLEDBSimpleProvider
  6. {
  7. public:
  8. CSimpleData(OLEDBSimpleProviderListener **pplisener) : _ppListener(pplisener) { }
  9. ~CSimpleData();
  10. // IUnknown
  11. STDMETHOD(QueryInterface)(REFIID, LPVOID FAR*) PURE;
  12. STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  13. STDMETHOD_(ULONG,Release)(THIS) PURE;
  14. // OLEDBSimpleProvider
  15. STDMETHOD(getRowCount)(DBROWCOUNT *pcRows);
  16. STDMETHOD(getColumnCount)(DB_LORDINAL *pcColumns);
  17. STDMETHOD(getRWStatus)(DBROWCOUNT iRow, DB_LORDINAL iCol, OSPRW *prwStatus);
  18. STDMETHOD(getVariant)(DBROWCOUNT iRow, DB_LORDINAL iCol, OSPFORMAT fmt, VARIANT *pVar);
  19. STDMETHOD(setVariant)(DBROWCOUNT iRow, DB_LORDINAL iCol, OSPFORMAT fmt, VARIANT Var);
  20. STDMETHOD(getLocale)(BSTR *pbstrLocale);
  21. STDMETHOD(deleteRows)(DBROWCOUNT iRow, DBROWCOUNT cRows, DBROWCOUNT *pcRowsDeleted);
  22. STDMETHOD(insertRows)(DBROWCOUNT iRow, DBROWCOUNT cRows, DBROWCOUNT *pcRowsInserted);
  23. STDMETHOD(find)(DBROWCOUNT iRowStart, DB_LORDINAL iColumn, VARIANT val, OSPFIND findFlags, OSPCOMP compType, DBROWCOUNT *piRowFound);
  24. STDMETHOD(addOLEDBSimpleProviderListener)(OLEDBSimpleProviderListener *pospIListener);
  25. STDMETHOD(removeOLEDBSimpleProviderListener)(OLEDBSimpleProviderListener *pospIListener);
  26. STDMETHOD(getEstimatedRows)(DBROWCOUNT *pcRows);
  27. STDMETHOD(isAsync)(BOOL *pbAsync);
  28. STDMETHOD(stopTransfer)();
  29. public:
  30. HRESULT SetShellFolder(IShellFolder *psf);
  31. private:
  32. HRESULT _DoEnum();
  33. OLEDBSimpleProviderListener **_ppListener;
  34. IShellFolder *_psf;
  35. HDPA _hdpa;
  36. };
  37. #endif _DATAPRV_H_