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.

199 lines
7.3 KiB

  1. // iface.h : Definition of private interfaces
  2. // {139D4EBC-DF7D-11d1-8661-00C04FD91972}
  3. DEFINE_GUID(IID_IWorkerEvent, 0x139d4ebc, 0xdf7d, 0x11d1, 0x86, 0x61, 0x0, 0xc0, 0x4f, 0xd9, 0x19, 0x72);
  4. // {EF4F9629-FC00-11d1-8677-00C04FD91972}
  5. DEFINE_GUID(IID_IARPEvent, 0xef4f9629, 0xfc00, 0x11d1, 0x86, 0x77, 0x0, 0xc0, 0x4f, 0xd9, 0x19, 0x72);
  6. // {C3E05A89-FBDB-11d1-8677-00C04FD91972}
  7. DEFINE_GUID(IID_IARPSimpleProvider, 0xc3e05a89, 0xfbdb, 0x11d1, 0x86, 0x77, 0x0, 0xc0, 0x4f, 0xd9, 0x19, 0x72);
  8. // {DB89BD6D-FCCD-11d1-8677-00C04FD91972}
  9. DEFINE_GUID(IID_IAppData, 0xdb89bd6d, 0xfccd, 0x11d1, 0x86, 0x77, 0x0, 0xc0, 0x4f, 0xd9, 0x19, 0x72);
  10. // {C2D3A971-FC11-11d1-8677-00C04FD91972}
  11. DEFINE_GUID(IID_IMtxArray, 0xc2d3a971, 0xfc11, 0x11d1, 0x86, 0x77, 0x0, 0xc0, 0x4f, 0xd9, 0x19, 0x72);
  12. // {AAEC4A45-FCCD-11d1-8677-00C04FD91972}
  13. DEFINE_GUID(IID_IARPWorker, 0xaaec4a45, 0xfccd, 0x11d1, 0x86, 0x77, 0x0, 0xc0, 0x4f, 0xd9, 0x19, 0x72);
  14. #ifndef __IFACE_H_
  15. #define __IFACE_H_
  16. #include "simpdata.h" // for OLEDBSimpleProviderListener and DBROWCOUNT et al
  17. // IWorkerEvent
  18. // This interface is used by CWorkerThread. /CWorkerThread calls
  19. // IWorkerEvent methods to fire events.
  20. #undef INTERFACE
  21. #define INTERFACE IWorkerEvent
  22. DECLARE_INTERFACE_(IWorkerEvent, IUnknown)
  23. {
  24. // *** IUnknown methods ***
  25. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  26. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  27. STDMETHOD_(ULONG,Release) (THIS) PURE;
  28. // *** IWorkerEvent methods ***
  29. STDMETHOD(FireOnDataReady) (THIS_ DBROWCOUNT iRow) PURE;
  30. STDMETHOD(FireOnFinished) (THIS) PURE;
  31. STDMETHOD(FireOnDatasetChanged) (THIS) PURE;
  32. };
  33. // IARPEvent
  34. // This interface is implemented by CEventBroker, and called
  35. // by anyone who wants to fire events to the databinding listeners.
  36. #include "msdatsrc.h"
  37. #undef INTERFACE
  38. #define INTERFACE IARPEvent
  39. DECLARE_INTERFACE_(IARPEvent, IUnknown)
  40. {
  41. // *** IUnknown methods ***
  42. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  43. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  44. STDMETHOD_(ULONG,Release) (THIS) PURE;
  45. // *** IARPEvent methods ***
  46. STDMETHOD(SetDataSourceListener)(THIS_ DataSourceListener *) PURE;
  47. STDMETHOD(IsOSPListener) (THIS_ OLEDBSimpleProviderListener * posp) PURE;
  48. STDMETHOD(SetOSPListener) (THIS_ OLEDBSimpleProviderListener * posp) PURE;
  49. STDMETHOD(AboutToDeleteRows) (THIS_ DBROWCOUNT iRowStart, DBROWCOUNT cRows) PURE;
  50. STDMETHOD(DeletedRows) (THIS_ DBROWCOUNT iRowStart, DBROWCOUNT cRows) PURE;
  51. STDMETHOD(RowsAvailable) (THIS_ DBROWCOUNT iRowStart, DBROWCOUNT cRows) PURE;
  52. STDMETHOD(RowChanged) (THIS_ DBROWCOUNT iRow) PURE;
  53. STDMETHOD(LoadCompleted) (THIS) PURE;
  54. STDMETHOD(LoadAborted) (THIS) PURE;
  55. STDMETHOD(DataSetChanged) (THIS) PURE;
  56. };
  57. interface IMtxArray; // forward reference
  58. // IAppData
  59. // This provides an interface to an appdata object.
  60. // commands for DoCommand()
  61. typedef enum tagAPPCMD
  62. {
  63. APPCMD_UNKNOWN = 0,
  64. APPCMD_INSTALL = 1, // "install"
  65. APPCMD_UNINSTALL = 2, // "uninstall"
  66. APPCMD_MODIFY = 3, // "modify"
  67. APPCMD_REPAIR = 4, // "repair"
  68. APPCMD_UPGRADE = 5, // "upgrade"
  69. APPCMD_GENERICINSTALL = 6, // "generic install" (install from floppy or CD)
  70. APPCMD_NTOPTIONS = 7, // "nt options"
  71. APPCMD_WINUPDATE = 8, // "update windows"
  72. APPCMD_ADDLATER = 9, // "add later"
  73. } APPCMD;
  74. #undef INTERFACE
  75. #define INTERFACE IAppData
  76. DECLARE_INTERFACE_(IAppData, IUnknown)
  77. {
  78. // *** IUnknown methods ***
  79. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  80. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  81. STDMETHOD_(ULONG,Release) (THIS) PURE;
  82. // *** IAppData ***
  83. STDMETHOD(DoCommand) (THIS_ HWND hwndParent, APPCMD appcmd) PURE;
  84. STDMETHOD(ReadSlowData) (THIS) PURE;
  85. STDMETHOD(GetVariant) (THIS_ DB_LORDINAL iField, VARIANT * pvar) PURE;
  86. STDMETHOD(SetMtxParent) (THIS_ IMtxArray * pmtxParent) PURE;
  87. STDMETHOD_(APPINFODATA *, GetDataPtr)(THIS) PURE;
  88. STDMETHOD_(SLOWAPPINFO *, GetSlowDataPtr)(THIS) PURE;
  89. STDMETHOD(GetFrequencyOfUse)(THIS_ LPWSTR pszBuf, int cchBuf) PURE;
  90. STDMETHOD(SetNameDupe) (THIS_ BOOL bDupe) PURE;
  91. };
  92. // IMtxArray
  93. // This provides an interface to the matrix array, which the
  94. // handles the data for the data source object.
  95. #undef INTERFACE
  96. #define INTERFACE IMtxArray
  97. DECLARE_INTERFACE_(IMtxArray, IUnknown)
  98. {
  99. // *** IUnknown methods ***
  100. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  101. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  102. STDMETHOD_(ULONG,Release) (THIS) PURE;
  103. // *** IMtxArray methods ***
  104. STDMETHOD(Initialize) (THIS_ DWORD dwEnum) PURE;
  105. STDMETHOD(AddItem) (THIS_ IAppData * pappdata, DBROWCOUNT * piRow) PURE;
  106. STDMETHOD(DeleteItems) (THIS_ DBROWCOUNT iRow, DBROWCOUNT cRows) PURE;
  107. STDMETHOD(GetAppData) (THIS_ DBROWCOUNT iRow, IAppData ** ppappdata) PURE;
  108. STDMETHOD(GetItemCount) (THIS_ DBROWCOUNT * pcItems) PURE;
  109. STDMETHOD(GetFieldCount) (THIS_ DB_LORDINAL * pcFields) PURE;
  110. STDMETHOD(GetFieldName) (THIS_ DB_LORDINAL iField, VARIANT * pvar) PURE;
  111. STDMETHOD(GetSortIndex) (THIS_ DWORD * pdwSort) PURE;
  112. STDMETHOD(SetSortCriteria) (THIS_ LPCWSTR pszSortField) PURE;
  113. STDMETHOD(SortItems) (THIS) PURE;
  114. STDMETHOD_(int,CompareItems)(THIS_ IAppData * pappdata1, IAppData * pappdata2) PURE;
  115. STDMETHOD(MarkDupEntries) (void) PURE;
  116. };
  117. // IARPWorker
  118. // This provides an interface to the matrix array's worker thread.
  119. #undef INTERFACE
  120. #define INTERFACE IARPWorker
  121. DECLARE_INTERFACE_(IARPWorker, IUnknown)
  122. {
  123. // *** IUnknown methods ***
  124. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  125. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  126. STDMETHOD_(ULONG,Release) (THIS) PURE;
  127. // *** IARPWorker methods ***
  128. STDMETHOD(KillWT) (THIS) PURE;
  129. STDMETHOD(StartWT) (THIS_ int iPriority) PURE;
  130. STDMETHOD(SetListenerWT) (THIS_ IWorkerEvent * pwe) PURE;
  131. };
  132. // IARPSimpleProvider
  133. // This provides an interface between ARP's OSP object and its
  134. // main control.
  135. #undef INTERFACE
  136. #define INTERFACE IARPSimpleProvider
  137. DECLARE_INTERFACE_(IARPSimpleProvider, IUnknown)
  138. {
  139. // *** IUnknown methods ***
  140. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  141. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  142. STDMETHOD_(ULONG,Release) (THIS) PURE;
  143. // *** IARPSimpleProvider methods ***
  144. STDMETHOD(Initialize) (THIS_ IShellAppManager * psam, IARPEvent * parpevt, DWORD dwEnum) PURE;
  145. STDMETHOD(EnumerateItemsAsync) (THIS) PURE;
  146. STDMETHOD(Recalculate) (THIS) PURE;
  147. STDMETHOD(SetSortCriteria) (THIS_ BSTR bstrSortExpr) PURE;
  148. STDMETHOD(SetFilter) (THIS_ BSTR bstrFilter) PURE;
  149. STDMETHOD(Sort) (THIS) PURE;
  150. STDMETHOD(DoCommand) (THIS_ HWND hwndParent, APPCMD appcmd, DBROWCOUNT iRow) PURE;
  151. STDMETHOD(TransferData) (THIS_ IARPSimpleProvider * parposp) PURE;
  152. };
  153. #endif //__IFACE_H_