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