ReactOS 0.4.16-dev-297-gc569aee
manager.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "netfw.h"
#include "wine/debug.h"
#include "hnetcfg_private.h"
Include dependency graph for manager.c:

Go to the source code of this file.

Classes

struct  fw_manager
 

Macros

#define COBJMACROS
 

Typedefs

typedef struct fw_manager fw_manager
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (hnetcfg)
 
static fw_managerimpl_from_INetFwMgr (INetFwMgr *iface)
 
static ULONG WINAPI fw_manager_AddRef (INetFwMgr *iface)
 
static ULONG WINAPI fw_manager_Release (INetFwMgr *iface)
 
static HRESULT WINAPI fw_manager_QueryInterface (INetFwMgr *iface, REFIID riid, void **ppvObject)
 
static HRESULT WINAPI fw_manager_GetTypeInfoCount (INetFwMgr *iface, UINT *pctinfo)
 
static HRESULT WINAPI fw_manager_GetTypeInfo (INetFwMgr *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI fw_manager_GetIDsOfNames (INetFwMgr *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI fw_manager_Invoke (INetFwMgr *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI fw_manager_get_LocalPolicy (INetFwMgr *iface, INetFwPolicy **localPolicy)
 
static HRESULT WINAPI fw_manager_get_CurrentProfileType (INetFwMgr *iface, NET_FW_PROFILE_TYPE *profileType)
 
static HRESULT WINAPI fw_manager_RestoreDefaults (INetFwMgr *iface)
 
static HRESULT WINAPI fw_manager_IsPortAllowed (INetFwMgr *iface, BSTR imageFileName, NET_FW_IP_VERSION ipVersion, LONG portNumber, BSTR localAddress, NET_FW_IP_PROTOCOL ipProtocol, VARIANT *allowed, VARIANT *restricted)
 
static HRESULT WINAPI fw_manager_IsIcmpTypeAllowed (INetFwMgr *iface, NET_FW_IP_VERSION ipVersion, BSTR localAddress, BYTE type, VARIANT *allowed, VARIANT *restricted)
 
HRESULT NetFwMgr_create (IUnknown *pUnkOuter, LPVOID *ppObj)
 

Variables

static const struct INetFwMgrVtbl fw_manager_vtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file manager.c.

Typedef Documentation

◆ fw_manager

Function Documentation

◆ fw_manager_AddRef()

static ULONG WINAPI fw_manager_AddRef ( INetFwMgr iface)
static

Definition at line 46 of file manager.c.

48{
51}
#define InterlockedIncrement
Definition: armddk.h:53
static fw_manager * impl_from_INetFwMgr(INetFwMgr *iface)
Definition: manager.c:41
LONG refs
Definition: manager.c:38

◆ fw_manager_get_CurrentProfileType()

static HRESULT WINAPI fw_manager_get_CurrentProfileType ( INetFwMgr iface,
NET_FW_PROFILE_TYPE profileType 
)
static

Definition at line 174 of file manager.c.

177{
179
180 FIXME("%p, %p\n", This, profileType);
181 return E_NOTIMPL;
182}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ fw_manager_get_LocalPolicy()

static HRESULT WINAPI fw_manager_get_LocalPolicy ( INetFwMgr iface,
INetFwPolicy **  localPolicy 
)
static

Definition at line 164 of file manager.c.

167{
169
170 TRACE("%p, %p\n", This, localPolicy);
171 return NetFwPolicy_create( NULL, (void **)localPolicy );
172}
#define NULL
Definition: types.h:112
HRESULT NetFwPolicy_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN
Definition: policy.c:436
#define TRACE(s)
Definition: solgame.cpp:4

◆ fw_manager_GetIDsOfNames()

static HRESULT WINAPI fw_manager_GetIDsOfNames ( INetFwMgr iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 113 of file manager.c.

120{
123 HRESULT hr;
124
125 TRACE("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
126
128 if (SUCCEEDED(hr))
129 {
130 hr = ITypeInfo_GetIDsOfNames( typeinfo, rgszNames, cNames, rgDispId );
131 ITypeInfo_Release( typeinfo );
132 }
133 return hr;
134}
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
@ INetFwMgr_tid
REFIID riid
Definition: atlbase.h:39
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define debugstr_guid
Definition: kernel32.h:35
HRESULT hr
Definition: shlfolder.c:183

◆ fw_manager_GetTypeInfo()

static HRESULT WINAPI fw_manager_GetTypeInfo ( INetFwMgr iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 101 of file manager.c.

106{
108
109 TRACE("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo);
110 return get_typeinfo( INetFwMgr_tid, ppTInfo );
111}

◆ fw_manager_GetTypeInfoCount()

static HRESULT WINAPI fw_manager_GetTypeInfoCount ( INetFwMgr iface,
UINT pctinfo 
)
static

Definition at line 90 of file manager.c.

93{
95
96 TRACE("%p %p\n", This, pctinfo);
97 *pctinfo = 1;
98 return S_OK;
99}
#define S_OK
Definition: intsafe.h:52

◆ fw_manager_Invoke()

static HRESULT WINAPI fw_manager_Invoke ( INetFwMgr iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 136 of file manager.c.

146{
149 HRESULT hr;
150
151 TRACE("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
152 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
153
155 if (SUCCEEDED(hr))
156 {
157 hr = ITypeInfo_Invoke( typeinfo, &This->INetFwMgr_iface, dispIdMember,
158 wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr );
159 ITypeInfo_Release( typeinfo );
160 }
161 return hr;
162}
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531

◆ fw_manager_IsIcmpTypeAllowed()

static HRESULT WINAPI fw_manager_IsIcmpTypeAllowed ( INetFwMgr iface,
NET_FW_IP_VERSION  ipVersion,
BSTR  localAddress,
BYTE  type,
VARIANT allowed,
VARIANT restricted 
)
static

Definition at line 210 of file manager.c.

217{
219
220 FIXME("%p, %u, %s, %u, %p, %p\n", This, ipVersion, debugstr_w(localAddress),
221 type, allowed, restricted);
222 return E_NOTIMPL;
223}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define debugstr_w
Definition: kernel32.h:32

◆ fw_manager_IsPortAllowed()

static HRESULT WINAPI fw_manager_IsPortAllowed ( INetFwMgr iface,
BSTR  imageFileName,
NET_FW_IP_VERSION  ipVersion,
LONG  portNumber,
BSTR  localAddress,
NET_FW_IP_PROTOCOL  ipProtocol,
VARIANT allowed,
VARIANT restricted 
)
static

Definition at line 193 of file manager.c.

202{
204
205 FIXME("%p, %s, %u, %d, %s, %u, %p, %p\n", This, debugstr_w(imageFileName),
206 ipVersion, portNumber, debugstr_w(localAddress), ipProtocol, allowed, restricted);
207 return E_NOTIMPL;
208}

◆ fw_manager_QueryInterface()

static HRESULT WINAPI fw_manager_QueryInterface ( INetFwMgr iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 66 of file manager.c.

70{
72
73 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
74
75 if ( IsEqualGUID( riid, &IID_INetFwMgr ) ||
78 {
79 *ppvObject = iface;
80 }
81 else
82 {
83 FIXME("interface %s not implemented\n", debugstr_guid(riid));
84 return E_NOINTERFACE;
85 }
86 INetFwMgr_AddRef( iface );
87 return S_OK;
88}
const GUID IID_IUnknown
const GUID IID_IDispatch
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ fw_manager_Release()

static ULONG WINAPI fw_manager_Release ( INetFwMgr iface)
static

Definition at line 53 of file manager.c.

55{
58 if (!refs)
59 {
60 TRACE("destroying %p\n", fw_manager);
62 }
63 return refs;
64}
#define InterlockedDecrement
Definition: armddk.h:52
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
long LONG
Definition: pedump.c:60

◆ fw_manager_RestoreDefaults()

static HRESULT WINAPI fw_manager_RestoreDefaults ( INetFwMgr iface)
static

Definition at line 184 of file manager.c.

186{
188
189 FIXME("%p\n", This);
190 return E_NOTIMPL;
191}

◆ impl_from_INetFwMgr()

◆ NetFwMgr_create()

HRESULT NetFwMgr_create ( IUnknown pUnkOuter,
LPVOID ppObj 
)

Definition at line 241 of file manager.c.

242{
243 fw_manager *fm;
244
245 TRACE("(%p,%p)\n", pUnkOuter, ppObj);
246
247 fm = HeapAlloc( GetProcessHeap(), 0, sizeof(*fm) );
248 if (!fm) return E_OUTOFMEMORY;
249
250 fm->INetFwMgr_iface.lpVtbl = &fw_manager_vtbl;
251 fm->refs = 1;
252
253 *ppObj = &fm->INetFwMgr_iface;
254
255 TRACE("returning iface %p\n", *ppObj);
256 return S_OK;
257}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define HeapAlloc
Definition: compat.h:733
static const struct INetFwMgrVtbl fw_manager_vtbl
Definition: manager.c:225
INetFwMgr INetFwMgr_iface
Definition: manager.c:37

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( hnetcfg  )

Variable Documentation

◆ fw_manager_vtbl

const struct INetFwMgrVtbl fw_manager_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI fw_manager_QueryInterface(INetFwMgr *iface, REFIID riid, void **ppvObject)
Definition: manager.c:66
static HRESULT WINAPI fw_manager_Invoke(INetFwMgr *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: manager.c:136
static HRESULT WINAPI fw_manager_RestoreDefaults(INetFwMgr *iface)
Definition: manager.c:184
static HRESULT WINAPI fw_manager_GetIDsOfNames(INetFwMgr *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: manager.c:113
static ULONG WINAPI fw_manager_AddRef(INetFwMgr *iface)
Definition: manager.c:46
static HRESULT WINAPI fw_manager_GetTypeInfoCount(INetFwMgr *iface, UINT *pctinfo)
Definition: manager.c:90
static HRESULT WINAPI fw_manager_get_CurrentProfileType(INetFwMgr *iface, NET_FW_PROFILE_TYPE *profileType)
Definition: manager.c:174
static HRESULT WINAPI fw_manager_GetTypeInfo(INetFwMgr *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: manager.c:101
static HRESULT WINAPI fw_manager_IsIcmpTypeAllowed(INetFwMgr *iface, NET_FW_IP_VERSION ipVersion, BSTR localAddress, BYTE type, VARIANT *allowed, VARIANT *restricted)
Definition: manager.c:210
static HRESULT WINAPI fw_manager_IsPortAllowed(INetFwMgr *iface, BSTR imageFileName, NET_FW_IP_VERSION ipVersion, LONG portNumber, BSTR localAddress, NET_FW_IP_PROTOCOL ipProtocol, VARIANT *allowed, VARIANT *restricted)
Definition: manager.c:193
static ULONG WINAPI fw_manager_Release(INetFwMgr *iface)
Definition: manager.c:53
static HRESULT WINAPI fw_manager_get_LocalPolicy(INetFwMgr *iface, INetFwPolicy **localPolicy)
Definition: manager.c:164

Definition at line 225 of file manager.c.

Referenced by NetFwMgr_create().