functiondiscoveryapi.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef _INC_FUNCTIONDISCOVERYAPI
  7. #define _INC_FUNCTIONDISCOVERYAPI
  8. #include <propsys.h>
  9. #include <functiondiscoveryconstraints.h>
  10. #if (_WIN32_WINNT >= 0x0600)
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. typedef DWORDLONG FDQUERYCONTEXT;
  15. typedef struct IFunctionInstance IFunctionInstance;
  16. typedef enum tagQueryUpdateAction {
  17. QUA_ADD = 0,
  18. QUA_REMOVE = 1,
  19. QUA_CHANGE = 2
  20. } QueryUpdateAction;
  21. typedef enum tagSystemVisibilityFlags {
  22. SVF_SYSTEM = 0,
  23. SVF_USER = 1
  24. } SystemVisibilityFlags;
  25. #ifdef __cplusplus
  26. }
  27. #endif
  28. #include <functiondiscoverynotification.h>
  29. #define FD_EVENTID_SEARCHCOMPLETE 1000
  30. #define FD_EVENTID_ASYNCTHREADEXIT 1001
  31. #define FD_EVENTID_SEARCHSTART 1002
  32. #define FD_EVENTID_IPADDRESSCHANGE 1003
  33. #undef INTERFACE
  34. #define INTERFACE IFunctionInstance
  35. #ifdef __GNUC__
  36. #warning COM interfaces layout in this header has not been verified.
  37. #warning COM interfaces with incorrect layout may not work at all.
  38. __MINGW_BROKEN_INTERFACE(INTERFACE)
  39. #endif
  40. DECLARE_INTERFACE_(IFunctionInstance,IUnknown)
  41. {
  42. BEGIN_INTERFACE
  43. /* IUnknown methods */
  44. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
  45. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  46. STDMETHOD_(ULONG, Release)(THIS) PURE;
  47. /* IFunctionInstance methods */
  48. STDMETHOD_(HRESULT,GetID)(THIS_ WCHAR **ppszCoMemIdentity) PURE;
  49. STDMETHOD_(HRESULT,GetProviderInstanceID)(THIS_ WCHAR **ppszCoMemProviderInstanceID) PURE;
  50. STDMETHOD_(HRESULT,OpenPropertyStore)(THIS_ DWORD dwStgAccess,IPropertyStore **ppIPropertyStore) PURE;
  51. STDMETHOD_(HRESULT,GetCategory)(THIS_ WCHAR **ppszCoMemCategory,WCHAR **ppszCoMemSubCategory) PURE;
  52. STDMETHOD_(HRESULT,QueryService)(THIS_ REFGUID guidService,REFGUID riid,void **ppv) PURE;
  53. /* FIXME: genidl doesn't show QueryService */
  54. END_INTERFACE
  55. };
  56. #ifdef COBJMACROS
  57. #define IFunctionInstance_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  58. #define IFunctionInstance_AddRef(This) (This)->lpVtbl->AddRef(This)
  59. #define IFunctionInstance_Release(This) (This)->lpVtbl->Release(This)
  60. #define IFunctionInstance_GetID(This,ppszCoMemIdentity) (This)->lpVtbl->GetID(This,ppszCoMemIdentity)
  61. #define IFunctionInstance_GetProviderInstanceID(This,ppszCoMemProviderInstanceID) (This)->lpVtbl->GetProviderInstanceID(This,ppszCoMemProviderInstanceID)
  62. #define IFunctionInstance_OpenPropertyStore(This,dwStgAccess,ppIPropertyStore) (This)->lpVtbl->OpenPropertyStore(This,dwStgAccess,ppIPropertyStore)
  63. #define IFunctionInstance_GetCategory(This,ppszCoMemCategory,ppszCoMemSubCategory) (This)->lpVtbl->GetCategory(This,ppszCoMemCategory,ppszCoMemSubCategory)
  64. #define IFunctionInstance_QueryService(This,guidService,riid,ppv) (This)->lpVtbl->QueryService(This,guidService,riid,ppv)
  65. #endif /*COBJMACROS*/
  66. #undef INTERFACE
  67. #define INTERFACE IFunctionInstanceQuery
  68. DECLARE_INTERFACE_(IFunctionInstanceQuery,IUnknown)
  69. {
  70. BEGIN_INTERFACE
  71. /* IUnknown methods */
  72. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
  73. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  74. STDMETHOD_(ULONG, Release)(THIS) PURE;
  75. /* IFunctionInstanceQuery methods */
  76. STDMETHOD_(HRESULT,Execute)(THIS_ IFunctionInstance **ppIFunctionInstance) PURE;
  77. END_INTERFACE
  78. };
  79. #ifdef COBJMACROS
  80. #define IFunctionInstanceQuery_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  81. #define IFunctionInstanceQuery_AddRef(This) (This)->lpVtbl->AddRef(This)
  82. #define IFunctionInstanceQuery_Release(This) (This)->lpVtbl->Release(This)
  83. #define IFunctionInstanceQuery_Execute(This,ppIFunctionInstance) (This)->lpVtbl->Execute(This,ppIFunctionInstance)
  84. #endif /*COBJMACROS*/
  85. #undef INTERFACE
  86. #define INTERFACE IFunctionInstanceCollection
  87. #ifdef __GNUC__
  88. #warning COM interfaces layout in this header has not been verified.
  89. #warning COM interfaces with incorrect layout may not work at all.
  90. __MINGW_BROKEN_INTERFACE(INTERFACE)
  91. #endif
  92. DECLARE_INTERFACE_(IFunctionInstanceCollection,IUnknown)
  93. {
  94. BEGIN_INTERFACE
  95. /* IUnknown methods */
  96. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
  97. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  98. STDMETHOD_(ULONG, Release)(THIS) PURE;
  99. /* IFunctionInstanceCollection methods */
  100. STDMETHOD_(HRESULT,GetCount)(THIS_ DWORD *pdwCount) PURE;
  101. STDMETHOD_(HRESULT,Get)(THIS_ const WCHAR *pszInstanceIdentity,DWORD *pdwIndex,IFunctionInstance **ppIFunctionInstance) PURE;
  102. STDMETHOD_(HRESULT,Item)(THIS_ DWORD dwIndex,IFunctionInstance **ppFunctionInstance) PURE;
  103. STDMETHOD_(HRESULT,Add)(THIS_ IFunctionInstance *pIFunctionInstance) PURE;
  104. STDMETHOD_(HRESULT,Remove)(THIS_ DWORD dwIndex,IFunctionInstance **ppIFunctionInstance) PURE;
  105. STDMETHOD_(HRESULT,Delete)(THIS_ DWORD dwIndex) PURE;
  106. STDMETHOD_(HRESULT,DeleteAll)(THIS) PURE;
  107. END_INTERFACE
  108. };
  109. #ifdef COBJMACROS
  110. #define IFunctionInstanceCollection_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  111. #define IFunctionInstanceCollection_AddRef(This) (This)->lpVtbl->AddRef(This)
  112. #define IFunctionInstanceCollection_Release(This) (This)->lpVtbl->Release(This)
  113. #define IFunctionInstanceCollection_GetCount(This,pdwCount) (This)->lpVtbl->GetCount(This,pdwCount)
  114. #define IFunctionInstanceCollection_Get(This,pszInstanceIdentity,pdwIndex,ppIFunctionInstance) (This)->lpVtbl->Get(This,pszInstanceIdentity,pdwIndex,ppIFunctionInstance)
  115. #define IFunctionInstanceCollection_Item(This,dwIndex,ppFunctionInstance) (This)->lpVtbl->Item(This,dwIndex,ppFunctionInstance)
  116. #define IFunctionInstanceCollection_Add(This,pIFunctionInstance) (This)->lpVtbl->Add(This,pIFunctionInstance)
  117. #define IFunctionInstanceCollection_Remove(This,dwIndex,ppIFunctionInstance) (This)->lpVtbl->Remove(This,dwIndex,ppIFunctionInstance)
  118. #define IFunctionInstanceCollection_Delete(This,dwIndex) (This)->lpVtbl->Delete(This,dwIndex)
  119. #define IFunctionInstanceCollection_DeleteAll() (This)->lpVtbl->DeleteAll(This)
  120. #endif /*COBJMACROS*/
  121. #undef INTERFACE
  122. #define INTERFACE IFunctionInstanceCollectionQuery
  123. #ifdef __GNUC__
  124. #warning COM interfaces layout in this header has not been verified.
  125. #warning COM interfaces with incorrect layout may not work at all.
  126. __MINGW_BROKEN_INTERFACE(INTERFACE)
  127. #endif
  128. DECLARE_INTERFACE_(IFunctionInstanceCollectionQuery,IUnknown)
  129. {
  130. BEGIN_INTERFACE
  131. /* IUnknown methods */
  132. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
  133. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  134. STDMETHOD_(ULONG, Release)(THIS) PURE;
  135. /* IFunctionInstanceCollectionQuery methods */
  136. STDMETHOD_(HRESULT,AddQueryConstraint)(THIS_ const WCHAR *pszConstraintName,const WCHAR *pszConstraintValue) PURE;
  137. STDMETHOD_(HRESULT,AddPropertyConstraint)(THIS_ REFPROPERTYKEY Key,const PROPVARIANT *pv,PropertyConstraint enumPropertyConstraint) PURE;
  138. STDMETHOD_(HRESULT,Execute)(THIS_ IFunctionInstanceCollection **ppIFunctionInstanceCollection) PURE;
  139. END_INTERFACE
  140. };
  141. #ifdef COBJMACROS
  142. #define IFunctionInstanceCollectionQuery_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  143. #define IFunctionInstanceCollectionQuery_AddRef(This) (This)->lpVtbl->AddRef(This)
  144. #define IFunctionInstanceCollectionQuery_Release(This) (This)->lpVtbl->Release(This)
  145. #define IFunctionInstanceCollectionQuery_AddQueryConstraint(This,pszConstraintName,pszConstraintValue) (This)->lpVtbl->AddQueryConstraint(This,pszConstraintName,pszConstraintValue)
  146. #define IFunctionInstanceCollectionQuery_AddPropertyConstraint(This,Key,pv,enumPropertyConstraint) (This)->lpVtbl->AddPropertyConstraint(This,Key,pv,enumPropertyConstraint)
  147. #define IFunctionInstanceCollectionQuery_Execute(This,ppIFunctionInstanceCollection) (This)->lpVtbl->Execute(This,ppIFunctionInstanceCollection)
  148. #endif /*COBJMACROS*/
  149. #undef INTERFACE
  150. #define INTERFACE IFunctionDiscovery
  151. #ifdef __GNUC__
  152. #warning COM interfaces layout in this header has not been verified.
  153. #warning COM interfaces with incorrect layout may not work at all.
  154. __MINGW_BROKEN_INTERFACE(INTERFACE)
  155. #endif
  156. DECLARE_INTERFACE_(IFunctionDiscovery,IUnknown)
  157. {
  158. BEGIN_INTERFACE
  159. /* IUnknown methods */
  160. STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
  161. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  162. STDMETHOD_(ULONG, Release)(THIS) PURE;
  163. /* IFunctionDiscovery methods */
  164. STDMETHOD_(HRESULT,GetInstanceCollection)(THIS_ const WCHAR *pszCategory,const WCHAR *pszSubCategory,WINBOOL fIncludeAllSubCategories,IFunctionInstanceCollection **ppIFunctionInstanceCollection) PURE;
  165. STDMETHOD_(HRESULT,GetInstance)(THIS_ const WCHAR *pszFunctionInstanceIdentity,IFunctionInstance **ppIFunctionInstance) PURE;
  166. STDMETHOD_(HRESULT,CreateInstanceCollectionQuery)(THIS_ const WCHAR *pszCategory,const WCHAR *pszSubCategory,WINBOOL fIncludeAllSubCategories,IFunctionDiscoveryNotification *pIFunctionDiscoveryNotification,FDQUERYCONTEXT *pfdqcQueryContext,IFunctionInstanceCollectionQuery **ppIFunctionInstanceCollectionQuery) PURE;
  167. STDMETHOD_(HRESULT,CreateInstanceQuery)(THIS_ const WCHAR *pszFunctionInstanceIdentity,IFunctionDiscoveryNotification *pIFunctionDiscoveryNotification,FDQUERYCONTEXT *pfdqcQueryContext,IFunctionInstanceQuery **ppIFunctionInstanceQuery) PURE;
  168. STDMETHOD_(HRESULT,AddInstance)(THIS_ SystemVisibilityFlags enumSystemVisibility,const WCHAR *pszCategory,const WCHAR *pszSubCategory,const WCHAR *pszCategoryIdentity,IFunctionInstance **ppIFunctionInstance) PURE;
  169. STDMETHOD_(HRESULT,RemoveInstance)(THIS_ SystemVisibilityFlags enumSystemVisibility,const WCHAR *pszCategory,const WCHAR *pszSubCategory,const WCHAR *pszCategoryIdentity) PURE;
  170. END_INTERFACE
  171. };
  172. #ifdef COBJMACROS
  173. #define IFunctionDiscovery_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
  174. #define IFunctionDiscovery_AddRef(This) (This)->lpVtbl->AddRef(This)
  175. #define IFunctionDiscovery_Release(This) (This)->lpVtbl->Release(This)
  176. #define IFunctionDiscovery_GetInstanceCollection(This,pszCategory,pszSubCategory,fIncludeAllSubCategories,ppIFunctionInstanceCollection) (This)->lpVtbl->GetInstanceCollection(This,pszCategory,pszSubCategory,fIncludeAllSubCategories,ppIFunctionInstanceCollection)
  177. #define IFunctionDiscovery_GetInstance(This,pszFunctionInstanceIdentity,ppIFunctionInstance) (This)->lpVtbl->GetInstance(This,pszFunctionInstanceIdentity,ppIFunctionInstance)
  178. #define IFunctionDiscovery_CreateInstanceCollectionQuery(This,pszCategory,pszSubCategory,fIncludeAllSubCategories,pIFunctionDiscoveryNotification,pfdqcQueryContext,ppIFunctionInstanceCollectionQuery) (This)->lpVtbl->CreateInstanceCollectionQuery(This,pszCategory,pszSubCategory,fIncludeAllSubCategories,pIFunctionDiscoveryNotification,pfdqcQueryContext,ppIFunctionInstanceCollectionQuery)
  179. #define IFunctionDiscovery_CreateInstanceQuery(This,pszFunctionInstanceIdentity,pIFunctionDiscoveryNotification,pfdqcQueryContext,ppIFunctionInstanceQuery) (This)->lpVtbl->CreateInstanceQuery(This,pszFunctionInstanceIdentity,pIFunctionDiscoveryNotification,pfdqcQueryContext,ppIFunctionInstanceQuery)
  180. #define IFunctionDiscovery_AddInstance(This,enumSystemVisibility,pszCategory,pszSubCategory,pszCategoryIdentity,ppIFunctionInstance) (This)->lpVtbl->AddInstance(This,enumSystemVisibility,pszCategory,pszSubCategory,pszCategoryIdentity,ppIFunctionInstance)
  181. #define IFunctionDiscovery_RemoveInstance(This,enumSystemVisibility,pszCategory,pszSubCategory,pszCategoryIdentity) (This)->lpVtbl->RemoveInstance(This,enumSystemVisibility,pszCategory,pszSubCategory,pszCategoryIdentity)
  182. #endif /*COBJMACROS*/
  183. #endif /*(_WIN32_WINNT >= 0x0600)*/
  184. #endif /*_INC_FUNCTIONDISCOVERYAPI*/