Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d0923a2f
Commit
d0923a2f
authored
Nov 04, 2022
by
Sebastián Aedo
Committed by
Alexandre Julliard
Nov 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netprofm: Implement network_GetNetworkConnections.
Signed-off-by:
Sebastián Aedo
<
saedo@codeweavers.com
>
parent
ecbc5da9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
13 deletions
+43
-13
list.c
dlls/netprofm/list.c
+41
-11
list.c
dlls/netprofm/tests/list.c
+2
-2
No files found.
dlls/netprofm/list.c
View file @
d0923a2f
...
...
@@ -94,6 +94,9 @@ struct sink_entry
IUnknown
*
unk
;
};
static
HRESULT
create_connections_enum
(
struct
list_manager
*
,
IEnumNetworkConnections
**
);
static
inline
struct
list_manager
*
impl_from_IConnectionPointContainer
(
IConnectionPointContainer
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
list_manager
,
IConnectionPointContainer_iface
);
...
...
@@ -111,6 +114,12 @@ static inline struct connection_point *impl_from_IConnectionPoint(
return
CONTAINING_RECORD
(
iface
,
struct
connection_point
,
IConnectionPoint_iface
);
}
static
inline
struct
list_manager
*
impl_from_INetworkListManager
(
INetworkListManager
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
list_manager
,
INetworkListManager_iface
);
}
static
HRESULT
WINAPI
connection_point_QueryInterface
(
IConnectionPoint
*
iface
,
REFIID
riid
,
...
...
@@ -432,12 +441,42 @@ static HRESULT WINAPI network_GetDomainType(
return
S_OK
;
}
static
ULONG
WINAPI
connection_Release
(
INetworkConnection
*
iface
);
static
HRESULT
WINAPI
network_GetNetworkConnections
(
INetwork
*
iface
,
IEnumNetworkConnections
**
ppEnumNetworkConnection
)
{
FIXME
(
"%p, %p
\n
"
,
iface
,
ppEnumNetworkConnection
);
return
E_NOTIMPL
;
HRESULT
hr
;
INetworkListManager
*
network_list_mgr
=
NULL
;
struct
list_manager
*
mgr
=
NULL
;
struct
network
*
current_network
=
impl_from_INetwork
(
iface
);
struct
connection
*
connection
,
*
next
;
struct
network
*
network
;
if
(
FAILED
(
hr
=
list_manager_create
((
void
**
)
&
network_list_mgr
)))
return
hr
;
mgr
=
impl_from_INetworkListManager
(
network_list_mgr
);
if
(
FAILED
(
hr
=
create_connections_enum
(
mgr
,
ppEnumNetworkConnection
)))
return
hr
;
TRACE
(
"%p, %s
\n
"
,
iface
,
debugstr_guid
(
&
current_network
->
id
));
LIST_FOR_EACH_ENTRY_SAFE
(
connection
,
next
,
&
mgr
->
connections
,
struct
connection
,
entry
)
{
network
=
impl_from_INetwork
(
connection
->
network
);
if
(
!
IsEqualGUID
(
&
network
->
id
,
&
current_network
->
id
))
{
TRACE
(
"Filtering %s
\n
"
,
debugstr_guid
(
&
network
->
id
));
list_remove
(
&
connection
->
entry
);
}
}
return
S_OK
;
}
static
HRESULT
WINAPI
network_GetTimeCreatedAndConnected
(
...
...
@@ -881,12 +920,6 @@ static HRESULT create_networks_enum(
return
S_OK
;
}
static
inline
struct
list_manager
*
impl_from_INetworkListManager
(
INetworkListManager
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
list_manager
,
INetworkListManager_iface
);
}
struct
connections_enum
{
IEnumNetworkConnections
IEnumNetworkConnections_iface
;
...
...
@@ -1057,9 +1090,6 @@ static HRESULT WINAPI connections_enum_Reset(
return
S_OK
;
}
static
HRESULT
create_connections_enum
(
struct
list_manager
*
,
IEnumNetworkConnections
**
);
static
HRESULT
WINAPI
connections_enum_Clone
(
IEnumNetworkConnections
*
iface
,
IEnumNetworkConnections
**
ret
)
{
...
...
dlls/netprofm/tests/list.c
View file @
d0923a2f
...
...
@@ -98,7 +98,7 @@ static void test_INetwork( INetwork *network, INetworkConnection *conn )
conn_iter
=
NULL
;
hr
=
INetwork_GetNetworkConnections
(
network
,
&
conn_iter
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
is_connection_present
=
FALSE
;
if
(
conn_iter
)
...
...
@@ -120,7 +120,7 @@ static void test_INetwork( INetwork *network, INetworkConnection *conn )
IEnumNetworkConnections_Release
(
conn_iter
);
}
todo_wine
ok
(
is_connection_present
,
"connection was not present in network
\n
"
);
ok
(
is_connection_present
,
"connection was not present in network
\n
"
);
}
static
void
test_INetworkConnection
(
INetworkConnection
*
conn
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment