netprofm: Create a connection point object for INetworkEvents.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50054 Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
feb4236e31
commit
08d815346c
|
@ -84,6 +84,7 @@ struct list_manager
|
||||||
struct connection_point list_mgr_cp;
|
struct connection_point list_mgr_cp;
|
||||||
struct connection_point cost_mgr_cp;
|
struct connection_point cost_mgr_cp;
|
||||||
struct connection_point conn_mgr_cp;
|
struct connection_point conn_mgr_cp;
|
||||||
|
struct connection_point events_cp;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sink_entry
|
struct sink_entry
|
||||||
|
@ -1110,6 +1111,7 @@ static ULONG WINAPI list_manager_Release(
|
||||||
|
|
||||||
TRACE( "destroying %p\n", mgr );
|
TRACE( "destroying %p\n", mgr );
|
||||||
|
|
||||||
|
connection_point_release( &mgr->events_cp );
|
||||||
connection_point_release( &mgr->conn_mgr_cp );
|
connection_point_release( &mgr->conn_mgr_cp );
|
||||||
connection_point_release( &mgr->cost_mgr_cp );
|
connection_point_release( &mgr->cost_mgr_cp );
|
||||||
connection_point_release( &mgr->list_mgr_cp );
|
connection_point_release( &mgr->list_mgr_cp );
|
||||||
|
@ -1394,6 +1396,8 @@ static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPo
|
||||||
ret = &This->cost_mgr_cp;
|
ret = &This->cost_mgr_cp;
|
||||||
else if (IsEqualGUID( riid, &IID_INetworkConnectionEvents ))
|
else if (IsEqualGUID( riid, &IID_INetworkConnectionEvents ))
|
||||||
ret = &This->conn_mgr_cp;
|
ret = &This->conn_mgr_cp;
|
||||||
|
else if (IsEqualGUID( riid, &IID_INetworkEvents))
|
||||||
|
ret = &This->events_cp;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
|
FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
|
||||||
|
@ -1784,6 +1788,8 @@ HRESULT list_manager_create( void **obj )
|
||||||
&mgr->IConnectionPointContainer_iface);
|
&mgr->IConnectionPointContainer_iface);
|
||||||
connection_point_init( &mgr->conn_mgr_cp, &IID_INetworkConnectionEvents,
|
connection_point_init( &mgr->conn_mgr_cp, &IID_INetworkConnectionEvents,
|
||||||
&mgr->IConnectionPointContainer_iface );
|
&mgr->IConnectionPointContainer_iface );
|
||||||
|
connection_point_init( &mgr->events_cp, &IID_INetworkEvents,
|
||||||
|
&mgr->IConnectionPointContainer_iface );
|
||||||
|
|
||||||
*obj = &mgr->INetworkListManager_iface;
|
*obj = &mgr->INetworkListManager_iface;
|
||||||
TRACE( "returning iface %p\n", *obj );
|
TRACE( "returning iface %p\n", *obj );
|
||||||
|
|
|
@ -331,6 +331,10 @@ static void test_INetworkListManager( void )
|
||||||
hr = IConnectionPointContainer_FindConnectionPoint( cpc, &IID_INetworkConnectionEvents, &pt );
|
hr = IConnectionPointContainer_FindConnectionPoint( cpc, &IID_INetworkConnectionEvents, &pt );
|
||||||
ok( hr == S_OK || hr == CO_E_FAILEDTOIMPERSONATE, "got %08x\n", hr );
|
ok( hr == S_OK || hr == CO_E_FAILEDTOIMPERSONATE, "got %08x\n", hr );
|
||||||
if (hr == S_OK) IConnectionPoint_Release( pt );
|
if (hr == S_OK) IConnectionPoint_Release( pt );
|
||||||
|
|
||||||
|
hr = IConnectionPointContainer_FindConnectionPoint( cpc, &IID_INetworkEvents, &pt );
|
||||||
|
ok( hr == S_OK, "got %08x\n", hr );
|
||||||
|
IConnectionPoint_Release( pt );
|
||||||
IConnectionPointContainer_Release( cpc );
|
IConnectionPointContainer_Release( cpc );
|
||||||
|
|
||||||
network_iter = NULL;
|
network_iter = NULL;
|
||||||
|
|
Loading…
Reference in New Issue