ReactOS 0.4.15-dev-7958-gcd0bb1a
profile.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 profile.c:

Go to the source code of this file.

Classes

struct  fw_profile
 

Macros

#define COBJMACROS
 

Typedefs

typedef struct fw_profile fw_profile
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (hnetcfg)
 
static fw_profileimpl_from_INetFwProfile (INetFwProfile *iface)
 
static ULONG WINAPI fw_profile_AddRef (INetFwProfile *iface)
 
static ULONG WINAPI fw_profile_Release (INetFwProfile *iface)
 
static HRESULT WINAPI fw_profile_QueryInterface (INetFwProfile *iface, REFIID riid, void **ppvObject)
 
static HRESULT WINAPI fw_profile_GetTypeInfoCount (INetFwProfile *iface, UINT *pctinfo)
 
static HRESULT WINAPI fw_profile_GetTypeInfo (INetFwProfile *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI fw_profile_GetIDsOfNames (INetFwProfile *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI fw_profile_Invoke (INetFwProfile *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI fw_profile_get_Type (INetFwProfile *iface, NET_FW_PROFILE_TYPE *type)
 
static HRESULT WINAPI fw_profile_get_FirewallEnabled (INetFwProfile *iface, VARIANT_BOOL *enabled)
 
static HRESULT WINAPI fw_profile_put_FirewallEnabled (INetFwProfile *iface, VARIANT_BOOL enabled)
 
static HRESULT WINAPI fw_profile_get_ExceptionsNotAllowed (INetFwProfile *iface, VARIANT_BOOL *notAllowed)
 
static HRESULT WINAPI fw_profile_put_ExceptionsNotAllowed (INetFwProfile *iface, VARIANT_BOOL notAllowed)
 
static HRESULT WINAPI fw_profile_get_NotificationsDisabled (INetFwProfile *iface, VARIANT_BOOL *disabled)
 
static HRESULT WINAPI fw_profile_put_NotificationsDisabled (INetFwProfile *iface, VARIANT_BOOL disabled)
 
static HRESULT WINAPI fw_profile_get_UnicastResponsesToMulticastBroadcastDisabled (INetFwProfile *iface, VARIANT_BOOL *disabled)
 
static HRESULT WINAPI fw_profile_put_UnicastResponsesToMulticastBroadcastDisabled (INetFwProfile *iface, VARIANT_BOOL disabled)
 
static HRESULT WINAPI fw_profile_get_RemoteAdminSettings (INetFwProfile *iface, INetFwRemoteAdminSettings **remoteAdminSettings)
 
static HRESULT WINAPI fw_profile_get_IcmpSettings (INetFwProfile *iface, INetFwIcmpSettings **icmpSettings)
 
static HRESULT WINAPI fw_profile_get_GloballyOpenPorts (INetFwProfile *iface, INetFwOpenPorts **openPorts)
 
static HRESULT WINAPI fw_profile_get_Services (INetFwProfile *iface, INetFwServices **Services)
 
static HRESULT WINAPI fw_profile_get_AuthorizedApplications (INetFwProfile *iface, INetFwAuthorizedApplications **apps)
 
HRESULT NetFwProfile_create (IUnknown *pUnkOuter, LPVOID *ppObj)
 

Variables

static const struct INetFwProfileVtbl fw_profile_vtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file profile.c.

Typedef Documentation

◆ fw_profile

Function Documentation

◆ fw_profile_AddRef()

static ULONG WINAPI fw_profile_AddRef ( INetFwProfile iface)
static

Definition at line 46 of file profile.c.

48{
51}
#define InterlockedIncrement
Definition: armddk.h:53
static fw_profile * impl_from_INetFwProfile(INetFwProfile *iface)
Definition: profile.c:41
LONG refs
Definition: profile.c:38

◆ fw_profile_get_AuthorizedApplications()

static HRESULT WINAPI fw_profile_get_AuthorizedApplications ( INetFwProfile iface,
INetFwAuthorizedApplications **  apps 
)
static

Definition at line 296 of file profile.c.

299{
301
302 TRACE("%p, %p\n", This, apps);
303 return NetFwAuthorizedApplications_create( NULL, (void **)apps );
304}
HRESULT NetFwAuthorizedApplications_create(IUnknown *pUnkOuter, LPVOID *ppObj)
Definition: apps.c:645
#define NULL
Definition: types.h:112
#define TRACE(s)
Definition: solgame.cpp:4

◆ fw_profile_get_ExceptionsNotAllowed()

static HRESULT WINAPI fw_profile_get_ExceptionsNotAllowed ( INetFwProfile iface,
VARIANT_BOOL notAllowed 
)
static

Definition at line 196 of file profile.c.

199{
201
202 FIXME("%p, %p\n", This, notAllowed);
203 return E_NOTIMPL;
204}
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ fw_profile_get_FirewallEnabled()

static HRESULT WINAPI fw_profile_get_FirewallEnabled ( INetFwProfile iface,
VARIANT_BOOL enabled 
)
static

Definition at line 174 of file profile.c.

177{
179
180 FIXME("%p, %p\n", This, enabled);
181
182 *enabled = VARIANT_FALSE;
183 return S_OK;
184}
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:7750
#define S_OK
Definition: intsafe.h:52

◆ fw_profile_get_GloballyOpenPorts()

static HRESULT WINAPI fw_profile_get_GloballyOpenPorts ( INetFwProfile iface,
INetFwOpenPorts **  openPorts 
)
static

Definition at line 276 of file profile.c.

279{
281
282 TRACE("%p, %p\n", This, openPorts);
283 return NetFwOpenPorts_create( NULL, (void **)openPorts );
284}
HRESULT NetFwOpenPorts_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN
Definition: port.c:589

◆ fw_profile_get_IcmpSettings()

static HRESULT WINAPI fw_profile_get_IcmpSettings ( INetFwProfile iface,
INetFwIcmpSettings **  icmpSettings 
)
static

Definition at line 266 of file profile.c.

269{
271
272 FIXME("%p, %p\n", This, icmpSettings);
273 return E_NOTIMPL;
274}

◆ fw_profile_get_NotificationsDisabled()

static HRESULT WINAPI fw_profile_get_NotificationsDisabled ( INetFwProfile iface,
VARIANT_BOOL disabled 
)
static

Definition at line 216 of file profile.c.

219{
221
222 FIXME("%p, %p\n", This, disabled);
223 return E_NOTIMPL;
224}

◆ fw_profile_get_RemoteAdminSettings()

static HRESULT WINAPI fw_profile_get_RemoteAdminSettings ( INetFwProfile iface,
INetFwRemoteAdminSettings **  remoteAdminSettings 
)
static

Definition at line 256 of file profile.c.

259{
261
262 FIXME("%p, %p\n", This, remoteAdminSettings);
263 return E_NOTIMPL;
264}

◆ fw_profile_get_Services()

static HRESULT WINAPI fw_profile_get_Services ( INetFwProfile iface,
INetFwServices **  Services 
)
static

Definition at line 286 of file profile.c.

289{
291
292 TRACE("%p, %p\n", This, Services);
293 return NetFwServices_create( NULL, (void **)Services );
294}
HRESULT NetFwServices_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN
Definition: service.c:461
static SERVICES Services[NUM_SERVICES]
Definition: tcpsvcs.c:26

◆ fw_profile_get_Type()

static HRESULT WINAPI fw_profile_get_Type ( INetFwProfile iface,
NET_FW_PROFILE_TYPE type 
)
static

Definition at line 164 of file profile.c.

167{
169
170 FIXME("%p, %p\n", This, type);
171 return E_NOTIMPL;
172}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545

◆ fw_profile_get_UnicastResponsesToMulticastBroadcastDisabled()

static HRESULT WINAPI fw_profile_get_UnicastResponsesToMulticastBroadcastDisabled ( INetFwProfile iface,
VARIANT_BOOL disabled 
)
static

Definition at line 236 of file profile.c.

239{
241
242 FIXME("%p, %p\n", This, disabled);
243 return E_NOTIMPL;
244}

◆ fw_profile_GetIDsOfNames()

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

Definition at line 113 of file profile.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
@ INetFwProfile_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_profile_GetTypeInfo()

static HRESULT WINAPI fw_profile_GetTypeInfo ( INetFwProfile iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 101 of file profile.c.

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

◆ fw_profile_GetTypeInfoCount()

static HRESULT WINAPI fw_profile_GetTypeInfoCount ( INetFwProfile iface,
UINT pctinfo 
)
static

Definition at line 90 of file profile.c.

93{
95
96 TRACE("%p %p\n", This, pctinfo);
97 *pctinfo = 1;
98 return S_OK;
99}

◆ fw_profile_Invoke()

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

Definition at line 136 of file profile.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->INetFwProfile_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_profile_put_ExceptionsNotAllowed()

static HRESULT WINAPI fw_profile_put_ExceptionsNotAllowed ( INetFwProfile iface,
VARIANT_BOOL  notAllowed 
)
static

Definition at line 206 of file profile.c.

209{
211
212 FIXME("%p, %d\n", This, notAllowed);
213 return E_NOTIMPL;
214}

◆ fw_profile_put_FirewallEnabled()

static HRESULT WINAPI fw_profile_put_FirewallEnabled ( INetFwProfile iface,
VARIANT_BOOL  enabled 
)
static

Definition at line 186 of file profile.c.

189{
191
192 FIXME("%p, %d\n", This, enabled);
193 return E_NOTIMPL;
194}

◆ fw_profile_put_NotificationsDisabled()

static HRESULT WINAPI fw_profile_put_NotificationsDisabled ( INetFwProfile iface,
VARIANT_BOOL  disabled 
)
static

Definition at line 226 of file profile.c.

229{
231
232 FIXME("%p, %d\n", This, disabled);
233 return E_NOTIMPL;
234}

◆ fw_profile_put_UnicastResponsesToMulticastBroadcastDisabled()

static HRESULT WINAPI fw_profile_put_UnicastResponsesToMulticastBroadcastDisabled ( INetFwProfile iface,
VARIANT_BOOL  disabled 
)
static

Definition at line 246 of file profile.c.

249{
251
252 FIXME("%p, %d\n", This, disabled);
253 return E_NOTIMPL;
254}

◆ fw_profile_QueryInterface()

static HRESULT WINAPI fw_profile_QueryInterface ( INetFwProfile iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 66 of file profile.c.

70{
72
73 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
74
75 if ( IsEqualGUID( riid, &IID_INetFwProfile ) ||
78 {
79 *ppvObject = iface;
80 }
81 else
82 {
83 FIXME("interface %s not implemented\n", debugstr_guid(riid));
84 return E_NOINTERFACE;
85 }
86 INetFwProfile_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_profile_Release()

static ULONG WINAPI fw_profile_Release ( INetFwProfile iface)
static

Definition at line 53 of file profile.c.

55{
58 if (!refs)
59 {
60 TRACE("destroying %p\n", fw_profile);
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

◆ impl_from_INetFwProfile()

◆ NetFwProfile_create()

HRESULT NetFwProfile_create ( IUnknown pUnkOuter,
LPVOID ppObj 
)

Definition at line 331 of file profile.c.

332{
333 fw_profile *fp;
334
335 TRACE("(%p,%p)\n", pUnkOuter, ppObj);
336
337 fp = HeapAlloc( GetProcessHeap(), 0, sizeof(*fp) );
338 if (!fp) return E_OUTOFMEMORY;
339
341 fp->refs = 1;
342
343 *ppObj = &fp->INetFwProfile_iface;
344
345 TRACE("returning iface %p\n", *ppObj);
346 return S_OK;
347}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define HeapAlloc
Definition: compat.h:733
static const struct INetFwProfileVtbl fw_profile_vtbl
Definition: profile.c:306
INetFwProfile INetFwProfile_iface
Definition: profile.c:37

Referenced by fw_policy_get_CurrentProfile().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( hnetcfg  )

Variable Documentation

◆ fw_profile_vtbl

const struct INetFwProfileVtbl fw_profile_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI fw_profile_put_NotificationsDisabled(INetFwProfile *iface, VARIANT_BOOL disabled)
Definition: profile.c:226
static HRESULT WINAPI fw_profile_get_NotificationsDisabled(INetFwProfile *iface, VARIANT_BOOL *disabled)
Definition: profile.c:216
static HRESULT WINAPI fw_profile_get_Type(INetFwProfile *iface, NET_FW_PROFILE_TYPE *type)
Definition: profile.c:164
static ULONG WINAPI fw_profile_Release(INetFwProfile *iface)
Definition: profile.c:53
static HRESULT WINAPI fw_profile_GetIDsOfNames(INetFwProfile *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: profile.c:113
static HRESULT WINAPI fw_profile_put_FirewallEnabled(INetFwProfile *iface, VARIANT_BOOL enabled)
Definition: profile.c:186
static HRESULT WINAPI fw_profile_put_UnicastResponsesToMulticastBroadcastDisabled(INetFwProfile *iface, VARIANT_BOOL disabled)
Definition: profile.c:246
static HRESULT WINAPI fw_profile_get_GloballyOpenPorts(INetFwProfile *iface, INetFwOpenPorts **openPorts)
Definition: profile.c:276
static HRESULT WINAPI fw_profile_Invoke(INetFwProfile *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: profile.c:136
static HRESULT WINAPI fw_profile_QueryInterface(INetFwProfile *iface, REFIID riid, void **ppvObject)
Definition: profile.c:66
static HRESULT WINAPI fw_profile_get_Services(INetFwProfile *iface, INetFwServices **Services)
Definition: profile.c:286
static HRESULT WINAPI fw_profile_get_FirewallEnabled(INetFwProfile *iface, VARIANT_BOOL *enabled)
Definition: profile.c:174
static HRESULT WINAPI fw_profile_GetTypeInfoCount(INetFwProfile *iface, UINT *pctinfo)
Definition: profile.c:90
static HRESULT WINAPI fw_profile_get_RemoteAdminSettings(INetFwProfile *iface, INetFwRemoteAdminSettings **remoteAdminSettings)
Definition: profile.c:256
static HRESULT WINAPI fw_profile_GetTypeInfo(INetFwProfile *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: profile.c:101
static HRESULT WINAPI fw_profile_get_ExceptionsNotAllowed(INetFwProfile *iface, VARIANT_BOOL *notAllowed)
Definition: profile.c:196
static HRESULT WINAPI fw_profile_get_AuthorizedApplications(INetFwProfile *iface, INetFwAuthorizedApplications **apps)
Definition: profile.c:296
static HRESULT WINAPI fw_profile_put_ExceptionsNotAllowed(INetFwProfile *iface, VARIANT_BOOL notAllowed)
Definition: profile.c:206
static ULONG WINAPI fw_profile_AddRef(INetFwProfile *iface)
Definition: profile.c:46
static HRESULT WINAPI fw_profile_get_IcmpSettings(INetFwProfile *iface, INetFwIcmpSettings **icmpSettings)
Definition: profile.c:266
static HRESULT WINAPI fw_profile_get_UnicastResponsesToMulticastBroadcastDisabled(INetFwProfile *iface, VARIANT_BOOL *disabled)
Definition: profile.c:236

Definition at line 306 of file profile.c.

Referenced by NetFwProfile_create().