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
8e999722
Commit
8e999722
authored
Mar 25, 2015
by
Michael Müller
Committed by
Alexandre Julliard
Mar 25, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netprofm: Add stubbed IConnectionPoint interface.
parent
c66f9bef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
181 additions
and
2 deletions
+181
-2
list.c
dlls/netprofm/list.c
+168
-2
netlistmgr.idl
include/netlistmgr.idl
+13
-0
No files found.
dlls/netprofm/list.c
View file @
8e999722
/*
/*
* Copyright 2014 Hans Leidekker for CodeWeavers
* Copyright 2014 Hans Leidekker for CodeWeavers
* Copyright 2015 Michael Müller
*
*
* This library is free software; you can redistribute it and/or
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* modify it under the terms of the GNU Lesser General Public
...
@@ -26,6 +27,7 @@
...
@@ -26,6 +27,7 @@
#include "objbase.h"
#include "objbase.h"
#include "ocidl.h"
#include "ocidl.h"
#include "netlistmgr.h"
#include "netlistmgr.h"
#include "olectl.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "netprofm_private.h"
#include "netprofm_private.h"
...
@@ -40,6 +42,14 @@ struct list_manager
...
@@ -40,6 +42,14 @@ struct list_manager
LONG
refs
;
LONG
refs
;
};
};
struct
connection_point
{
IConnectionPoint
IConnectionPoint_iface
;
IConnectionPointContainer
*
container
;
LONG
refs
;
IID
iid
;
};
static
inline
struct
list_manager
*
impl_from_IConnectionPointContainer
(
IConnectionPointContainer
*
iface
)
static
inline
struct
list_manager
*
impl_from_IConnectionPointContainer
(
IConnectionPointContainer
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
struct
list_manager
,
IConnectionPointContainer_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
list_manager
,
IConnectionPointContainer_iface
);
...
@@ -51,6 +61,151 @@ static inline struct list_manager *impl_from_INetworkCostManager(
...
@@ -51,6 +61,151 @@ static inline struct list_manager *impl_from_INetworkCostManager(
return
CONTAINING_RECORD
(
iface
,
struct
list_manager
,
INetworkCostManager_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
list_manager
,
INetworkCostManager_iface
);
}
}
static
inline
struct
connection_point
*
impl_from_IConnectionPoint
(
IConnectionPoint
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
connection_point
,
IConnectionPoint_iface
);
}
static
HRESULT
WINAPI
connection_point_QueryInterface
(
IConnectionPoint
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
connection_point
*
cp
=
impl_from_IConnectionPoint
(
iface
);
TRACE
(
"%p, %s, %p
\n
"
,
cp
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualGUID
(
riid
,
&
IID_IConnectionPoint
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
*
obj
=
iface
;
}
else
{
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
)
);
return
E_NOINTERFACE
;
}
IConnectionPoint_AddRef
(
iface
);
return
S_OK
;
}
static
ULONG
WINAPI
connection_point_AddRef
(
IConnectionPoint
*
iface
)
{
struct
connection_point
*
cp
=
impl_from_IConnectionPoint
(
iface
);
return
InterlockedIncrement
(
&
cp
->
refs
);
}
static
ULONG
WINAPI
connection_point_Release
(
IConnectionPoint
*
iface
)
{
struct
connection_point
*
cp
=
impl_from_IConnectionPoint
(
iface
);
LONG
refs
=
InterlockedDecrement
(
&
cp
->
refs
);
if
(
!
refs
)
{
TRACE
(
"destroying %p
\n
"
,
cp
);
IConnectionPointContainer_Release
(
cp
->
container
);
HeapFree
(
GetProcessHeap
(),
0
,
cp
);
}
return
refs
;
}
static
HRESULT
WINAPI
connection_point_GetConnectionInterface
(
IConnectionPoint
*
iface
,
IID
*
iid
)
{
struct
connection_point
*
cp
=
impl_from_IConnectionPoint
(
iface
);
TRACE
(
"%p, %p
\n
"
,
cp
,
iid
);
if
(
!
iid
)
return
E_POINTER
;
memcpy
(
iid
,
&
cp
->
iid
,
sizeof
(
*
iid
)
);
return
S_OK
;
}
static
HRESULT
WINAPI
connection_point_GetConnectionPointContainer
(
IConnectionPoint
*
iface
,
IConnectionPointContainer
**
container
)
{
struct
connection_point
*
cp
=
impl_from_IConnectionPoint
(
iface
);
TRACE
(
"%p, %p
\n
"
,
cp
,
container
);
if
(
!
container
)
return
E_POINTER
;
IConnectionPointContainer_AddRef
(
cp
->
container
);
*
container
=
cp
->
container
;
return
S_OK
;
}
static
HRESULT
WINAPI
connection_point_Advise
(
IConnectionPoint
*
iface
,
IUnknown
*
sink
,
DWORD
*
cookie
)
{
struct
connection_point
*
cp
=
impl_from_IConnectionPoint
(
iface
);
FIXME
(
"%p, %p, %p - stub
\n
"
,
cp
,
sink
,
cookie
);
if
(
!
sink
||
!
cookie
)
return
E_POINTER
;
return
CONNECT_E_CANNOTCONNECT
;
}
static
HRESULT
WINAPI
connection_point_Unadvise
(
IConnectionPoint
*
iface
,
DWORD
cookie
)
{
struct
connection_point
*
cp
=
impl_from_IConnectionPoint
(
iface
);
FIXME
(
"%p, %d - stub
\n
"
,
cp
,
cookie
);
return
E_POINTER
;
}
static
HRESULT
WINAPI
connection_point_EnumConnections
(
IConnectionPoint
*
iface
,
IEnumConnections
**
connections
)
{
struct
connection_point
*
cp
=
impl_from_IConnectionPoint
(
iface
);
FIXME
(
"%p, %p - stub
\n
"
,
cp
,
connections
);
return
E_NOTIMPL
;
}
static
const
IConnectionPointVtbl
connection_point_vtbl
=
{
connection_point_QueryInterface
,
connection_point_AddRef
,
connection_point_Release
,
connection_point_GetConnectionInterface
,
connection_point_GetConnectionPointContainer
,
connection_point_Advise
,
connection_point_Unadvise
,
connection_point_EnumConnections
};
static
HRESULT
connection_point_create
(
IConnectionPoint
**
obj
,
REFIID
riid
,
IConnectionPointContainer
*
container
)
{
struct
connection_point
*
cp
;
TRACE
(
"%p, %s, %p
\n
"
,
obj
,
debugstr_guid
(
riid
),
container
);
if
(
!
(
cp
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
cp
)
)))
return
E_OUTOFMEMORY
;
cp
->
IConnectionPoint_iface
.
lpVtbl
=
&
connection_point_vtbl
;
cp
->
container
=
container
;
cp
->
refs
=
1
;
memcpy
(
&
cp
->
iid
,
riid
,
sizeof
(
*
riid
)
);
IConnectionPointContainer_AddRef
(
container
);
*
obj
=
&
cp
->
IConnectionPoint_iface
;
TRACE
(
"returning iface %p
\n
"
,
*
obj
);
return
S_OK
;
}
static
HRESULT
WINAPI
cost_manager_QueryInterface
(
static
HRESULT
WINAPI
cost_manager_QueryInterface
(
INetworkCostManager
*
iface
,
INetworkCostManager
*
iface
,
REFIID
riid
,
REFIID
riid
,
...
@@ -328,8 +483,19 @@ static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPo
...
@@ -328,8 +483,19 @@ static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPo
REFIID
riid
,
IConnectionPoint
**
cp
)
REFIID
riid
,
IConnectionPoint
**
cp
)
{
{
struct
list_manager
*
This
=
impl_from_IConnectionPointContainer
(
iface
);
struct
list_manager
*
This
=
impl_from_IConnectionPointContainer
(
iface
);
FIXME
(
"(%p)->(%s %p): stub
\n
"
,
This
,
debugstr_guid
(
riid
),
cp
);
return
E_NOTIMPL
;
TRACE
(
"%p, %s, %p
\n
"
,
This
,
debugstr_guid
(
riid
),
cp
);
if
(
!
riid
||
!
cp
)
return
E_POINTER
;
if
(
IsEqualGUID
(
riid
,
&
IID_INetworkListManagerEvents
))
return
connection_point_create
(
cp
,
riid
,
iface
);
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
)
);
*
cp
=
NULL
;
return
E_NOINTERFACE
;
}
}
static
const
struct
IConnectionPointContainerVtbl
cpc_vtbl
=
static
const
struct
IConnectionPointContainerVtbl
cpc_vtbl
=
...
...
include/netlistmgr.idl
View file @
8e999722
...
@@ -29,6 +29,7 @@ interface INetwork;
...
@@ -29,6 +29,7 @@ interface INetwork;
interface
INetworkConnection
;
interface
INetworkConnection
;
interface
INetworkCostManager
;
interface
INetworkCostManager
;
interface
INetworkListManager
;
interface
INetworkListManager
;
interface
INetworkListManagerEvents
;
typedef
[
v1_enum
]
enum
NLM_CONNECTIVITY
typedef
[
v1_enum
]
enum
NLM_CONNECTIVITY
{
{
...
@@ -145,3 +146,15 @@ interface INetworkListManager : IDispatch
...
@@ -145,3 +146,15 @@ interface INetworkListManager : IDispatch
uuid
(
dcb00c01
-
570
f
-
4
a9b
-
8
d69
-
199
fdba5723b
)
uuid
(
dcb00c01
-
570
f
-
4
a9b
-
8
d69
-
199
fdba5723b
)
]
]
coclass
NetworkListManager
{
interface
INetworkListManager
; }
coclass
NetworkListManager
{
interface
INetworkListManager
; }
[
object
,
oleautomation
,
pointer_default
(
unique
),
uuid
(
DCB00001
-
570
F
-
4
A9B
-
8
D69
-
199
FDBA5723B
)
]
interface
INetworkListManagerEvents
:
IUnknown
{
HRESULT
ConnectivityChanged
(
[
in
]
NLM_CONNECTIVITY
newConnectivity
)
;
}
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