mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 12:30:58 +00:00
windows.devices.enumeration: Implement IDeviceInformationStatics::CreateWatcherAqsFilter().
Needed by Lenovo Ready For Assistant.
This commit is contained in:
parent
cf7048d63c
commit
586cc5ee35
|
@ -31,6 +31,7 @@ struct device_watcher
|
||||||
LONG ref;
|
LONG ref;
|
||||||
|
|
||||||
struct list stopped_handlers;
|
struct list stopped_handlers;
|
||||||
|
HSTRING filter;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline struct device_watcher *impl_from_IDeviceWatcher( IDeviceWatcher *iface )
|
static inline struct device_watcher *impl_from_IDeviceWatcher( IDeviceWatcher *iface )
|
||||||
|
@ -75,6 +76,7 @@ static ULONG WINAPI device_watcher_Release( IDeviceWatcher *iface )
|
||||||
if (!ref)
|
if (!ref)
|
||||||
{
|
{
|
||||||
typed_event_handlers_clear( &impl->stopped_handlers );
|
typed_event_handlers_clear( &impl->stopped_handlers );
|
||||||
|
WindowsDeleteString( impl->filter );
|
||||||
free( impl );
|
free( impl );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -374,8 +376,20 @@ static HRESULT WINAPI device_statics_CreateWatcherDeviceClass( IDeviceInformatio
|
||||||
|
|
||||||
static HRESULT WINAPI device_statics_CreateWatcherAqsFilter( IDeviceInformationStatics *iface, HSTRING filter, IDeviceWatcher **watcher )
|
static HRESULT WINAPI device_statics_CreateWatcherAqsFilter( IDeviceInformationStatics *iface, HSTRING filter, IDeviceWatcher **watcher )
|
||||||
{
|
{
|
||||||
FIXME( "iface %p, filter %s, watcher %p stub!\n", iface, debugstr_hstring(filter), watcher );
|
struct device_watcher *this;
|
||||||
return E_NOTIMPL;
|
|
||||||
|
TRACE( "iface %p, filter %s, watcher %p\n", iface, debugstr_hstring(filter), watcher );
|
||||||
|
|
||||||
|
if (!(this = calloc( 1, sizeof(*this) ))) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
this->IDeviceWatcher_iface.lpVtbl = &device_watcher_vtbl;
|
||||||
|
this->ref = 1;
|
||||||
|
WindowsDuplicateString( filter, &this->filter );
|
||||||
|
|
||||||
|
list_init( &this->stopped_handlers );
|
||||||
|
|
||||||
|
*watcher = &this->IDeviceWatcher_iface;
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI device_statics_CreateWatcherAqsFilterAndAdditionalProperties( IDeviceInformationStatics *iface, HSTRING filter,
|
static HRESULT WINAPI device_statics_CreateWatcherAqsFilterAndAdditionalProperties( IDeviceInformationStatics *iface, HSTRING filter,
|
||||||
|
@ -448,6 +462,7 @@ static HRESULT WINAPI device_statics2_CreateWatcher( IDeviceInformationStatics2
|
||||||
|
|
||||||
this->IDeviceWatcher_iface.lpVtbl = &device_watcher_vtbl;
|
this->IDeviceWatcher_iface.lpVtbl = &device_watcher_vtbl;
|
||||||
this->ref = 1;
|
this->ref = 1;
|
||||||
|
WindowsDuplicateString( filter, &this->filter );
|
||||||
|
|
||||||
list_init( &this->stopped_handlers );
|
list_init( &this->stopped_handlers );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue