Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
984663ff
Commit
984663ff
authored
Apr 07, 2014
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netprofm: Add a stub implementation of INetworkListManager.
parent
cb0c5f53
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
336 additions
and
0 deletions
+336
-0
Makefile.in
dlls/netprofm/Makefile.in
+1
-0
list.c
dlls/netprofm/list.c
+230
-0
netprofm_private.h
dlls/netprofm/netprofm_private.h
+19
-0
Makefile.in
include/Makefile.in
+1
-0
netlistmgr.idl
include/netlistmgr.idl
+85
-0
No files found.
dlls/netprofm/Makefile.in
View file @
984663ff
MODULE
=
netprofm.dll
C_SRCS
=
\
list.c
\
main.c
dlls/netprofm/list.c
0 → 100644
View file @
984663ff
/*
* Copyright 2014 Hans Leidekker for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#define COBJMACROS
#include "initguid.h"
#include "objbase.h"
#include "netlistmgr.h"
#include "wine/debug.h"
#include "netprofm_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
netprofm
);
struct
list_manager
{
const
INetworkListManagerVtbl
*
vtbl
;
LONG
refs
;
};
static
inline
struct
list_manager
*
impl_from_INetworkListManager
(
INetworkListManager
*
iface
)
{
return
(
struct
list_manager
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
struct
list_manager
,
vtbl
));
}
static
ULONG
WINAPI
list_manager_AddRef
(
INetworkListManager
*
iface
)
{
struct
list_manager
*
mgr
=
impl_from_INetworkListManager
(
iface
);
return
InterlockedIncrement
(
&
mgr
->
refs
);
}
static
ULONG
WINAPI
list_manager_Release
(
INetworkListManager
*
iface
)
{
struct
list_manager
*
mgr
=
impl_from_INetworkListManager
(
iface
);
LONG
refs
=
InterlockedDecrement
(
&
mgr
->
refs
);
if
(
!
refs
)
{
TRACE
(
"destroying %p
\n
"
,
mgr
);
HeapFree
(
GetProcessHeap
(),
0
,
mgr
);
}
return
refs
;
}
static
HRESULT
WINAPI
list_manager_QueryInterface
(
INetworkListManager
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
list_manager
*
mgr
=
impl_from_INetworkListManager
(
iface
);
TRACE
(
"%p, %s, %p
\n
"
,
mgr
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualGUID
(
riid
,
&
IID_INetworkListManager
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
*
obj
=
iface
;
}
else
{
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
)
);
return
E_NOINTERFACE
;
}
INetworkListManager_AddRef
(
iface
);
return
S_OK
;
}
static
HRESULT
WINAPI
list_manager_GetTypeInfoCount
(
INetworkListManager
*
iface
,
UINT
*
count
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
list_manager_GetTypeInfo
(
INetworkListManager
*
iface
,
UINT
index
,
LCID
lcid
,
ITypeInfo
**
info
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
list_manager_GetIDsOfNames
(
INetworkListManager
*
iface
,
REFIID
riid
,
LPOLESTR
*
names
,
UINT
count
,
LCID
lcid
,
DISPID
*
dispid
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
list_manager_Invoke
(
INetworkListManager
*
iface
,
DISPID
member
,
REFIID
riid
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
params
,
VARIANT
*
result
,
EXCEPINFO
*
excep_info
,
UINT
*
arg_err
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
list_manager_GetNetworks
(
INetworkListManager
*
iface
,
NLM_ENUM_NETWORK
Flags
,
IEnumNetworks
**
ppEnumNetwork
)
{
FIXME
(
"%p, %x, %p
\n
"
,
iface
,
Flags
,
ppEnumNetwork
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
list_manager_GetNetwork
(
INetworkListManager
*
iface
,
GUID
gdNetworkId
,
INetwork
**
ppNetwork
)
{
FIXME
(
"%p, %s, %p
\n
"
,
iface
,
debugstr_guid
(
&
gdNetworkId
),
ppNetwork
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
list_manager_GetNetworkConnections
(
INetworkListManager
*
iface
,
IEnumNetworkConnections
**
ppEnum
)
{
FIXME
(
"%p, %p
\n
"
,
iface
,
ppEnum
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
list_manager_GetNetworkConnection
(
INetworkListManager
*
iface
,
GUID
gdNetworkConnectionId
,
INetworkConnection
**
ppNetworkConnection
)
{
FIXME
(
"%p, %s, %p
\n
"
,
iface
,
debugstr_guid
(
&
gdNetworkConnectionId
),
ppNetworkConnection
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
list_manager_IsConnectedToInternet
(
INetworkListManager
*
iface
,
VARIANT_BOOL
*
pbIsConnected
)
{
FIXME
(
"%p, %p
\n
"
,
iface
,
pbIsConnected
);
*
pbIsConnected
=
VARIANT_TRUE
;
return
S_OK
;
}
static
HRESULT
WINAPI
list_manager_IsConnected
(
INetworkListManager
*
iface
,
VARIANT_BOOL
*
pbIsConnected
)
{
FIXME
(
"%p, %p
\n
"
,
iface
,
pbIsConnected
);
*
pbIsConnected
=
VARIANT_TRUE
;
return
S_OK
;
}
static
HRESULT
WINAPI
list_manager_GetConnectivity
(
INetworkListManager
*
iface
,
NLM_CONNECTIVITY
*
pConnectivity
)
{
FIXME
(
"%p, %p
\n
"
,
iface
,
pConnectivity
);
*
pConnectivity
=
NLM_CONNECTIVITY_IPV4_INTERNET
;
return
S_OK
;
}
static
const
INetworkListManagerVtbl
list_manager_vtbl
=
{
list_manager_QueryInterface
,
list_manager_AddRef
,
list_manager_Release
,
list_manager_GetTypeInfoCount
,
list_manager_GetTypeInfo
,
list_manager_GetIDsOfNames
,
list_manager_Invoke
,
list_manager_GetNetworks
,
list_manager_GetNetwork
,
list_manager_GetNetworkConnections
,
list_manager_GetNetworkConnection
,
list_manager_IsConnectedToInternet
,
list_manager_IsConnected
,
list_manager_GetConnectivity
};
HRESULT
list_manager_create
(
void
**
obj
)
{
struct
list_manager
*
mgr
;
TRACE
(
"%p
\n
"
,
obj
);
if
(
!
(
mgr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
mgr
)
)))
return
E_OUTOFMEMORY
;
mgr
->
vtbl
=
&
list_manager_vtbl
;
mgr
->
refs
=
1
;
*
obj
=
&
mgr
->
vtbl
;
TRACE
(
"returning iface %p
\n
"
,
*
obj
);
return
S_OK
;
}
dlls/netprofm/netprofm_private.h
0 → 100644
View file @
984663ff
/*
* Copyright 2014 Hans Leidekker for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
HRESULT
list_manager_create
(
void
**
)
DECLSPEC_HIDDEN
;
include/Makefile.in
View file @
984663ff
...
...
@@ -80,6 +80,7 @@ PUBLIC_IDL_H_SRCS = \
netcfgx.idl
\
netcon.idl
\
netfw.idl
\
netlistmgr.idl
\
oaidl.idl
\
objectarray.idl
\
objidl.idl
\
...
...
include/netlistmgr.idl
0 → 100644
View file @
984663ff
/*
*
Copyright
2014
Hans
Leidekker
for
CodeWeavers
*
*
This
library
is
free
software
; you can redistribute it and/or
*
modify
it
under
the
terms
of
the
GNU
Lesser
General
Public
*
License
as
published
by
the
Free
Software
Foundation
; either
*
version
2.1
of
the
License
,
or
(
at
your
option
)
any
later
version
.
*
*
This
library
is
distributed
in
the
hope
that
it
will
be
useful
,
*
but
WITHOUT
ANY
WARRANTY
; without even the implied warranty of
*
MERCHANTABILITY
or
FITNESS
FOR
A
PARTICULAR
PURPOSE
.
See
the
GNU
*
Lesser
General
Public
License
for
more
details
.
*
*
You
should
have
received
a
copy
of
the
GNU
Lesser
General
Public
*
License
along
with
this
library
; if not, write to the Free Software
*
Foundation
,
Inc
.
,
51
Franklin
St
,
Fifth
Floor
,
Boston
,
MA
02110
-
1301
,
USA
*/
import
"oaidl.idl"
;
import
"objidl.idl"
;
interface
IEnumNetworks
;
interface
IEnumNetworkConnections
;
interface
INetwork
;
interface
INetworkConnection
;
interface
INetworkListManager
;
typedef
[
v1_enum
]
enum
NLM_CONNECTIVITY
{
NLM_CONNECTIVITY_DISCONNECTED
=
0
x0000
,
NLM_CONNECTIVITY_IPV4_NOTRAFFIC
=
0
x0001
,
NLM_CONNECTIVITY_IPV6_NOTRAFFIC
=
0
x0002
,
NLM_CONNECTIVITY_IPV4_SUBNET
=
0
x0010
,
NLM_CONNECTIVITY_IPV4_LOCALNETWORK
=
0
x0020
,
NLM_CONNECTIVITY_IPV4_INTERNET
=
0
x0040
,
NLM_CONNECTIVITY_IPV6_SUBNET
=
0
x0100
,
NLM_CONNECTIVITY_IPV6_LOCALNETWORK
=
0
x0200
,
NLM_CONNECTIVITY_IPV6_INTERNET
=
0
x0400
}
NLM_CONNECTIVITY
;
typedef
[
v1_enum
]
enum
NLM_ENUM_NETWORK
{
NLM_ENUM_NETWORK_CONNECTED
=
0
x01
,
NLM_ENUM_NETWORK_DISCONNECTED
=
0
x02
,
NLM_ENUM_NETWORK_ALL
=
0
x03
}
NLM_ENUM_NETWORK
;
[
dual
,
object
,
oleautomation
,
pointer_default
(
unique
),
uuid
(
dcb00000
-
570
f
-
4
a9b
-
8
d69
-
199
fdba5723b
)
]
interface
INetworkListManager
:
IDispatch
{
HRESULT
GetNetworks
(
[
in
]
NLM_ENUM_NETWORK
Flags
,
[
out
,
retval
]
IEnumNetworks
**
ppEnumNetwork
)
;
HRESULT
GetNetwork
(
[
in
]
GUID
gdNetworkId
,
[
out
,
retval
]
INetwork
**
ppNetwork
)
;
HRESULT
GetNetworkConnections
(
[
out
,
retval
]
IEnumNetworkConnections
**
ppEnum
)
;
HRESULT
GetNetworkConnection
(
[
in
]
GUID
gdNetworkConnectionId
,
[
out
,
retval
]
INetworkConnection
**
ppNetworkConnection
)
;
HRESULT
IsConnectedToInternet
(
[
out
,
retval
]
VARIANT_BOOL
*
pbIsConnected
)
;
HRESULT
IsConnected
(
[
out
,
retval
]
VARIANT_BOOL
*
pbIsConnected
)
;
HRESULT
GetConnectivity
(
[
out
,
retval
]
NLM_CONNECTIVITY
*
pConnectivity
)
;
}
[
uuid
(
dcb00c01
-
570
f
-
4
a9b
-
8
d69
-
199
fdba5723b
)
]
coclass
NetworkListManager
{
interface
INetworkListManager
; }
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