2 * Copyright 2009 Hans Leidekker for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
31 #include "wine/debug.h"
32 #include "wine/unicode.h"
33 #include "hnetcfg_private.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg);
39 const INetFwAuthorizedApplicationVtbl *vtbl;
43 static inline fw_app *impl_from_INetFwAuthorizedApplication( INetFwAuthorizedApplication *iface )
45 return (fw_app *)((char *)iface - FIELD_OFFSET( fw_app, vtbl ));
48 static ULONG WINAPI fw_app_AddRef(
49 INetFwAuthorizedApplication *iface )
51 fw_app *fw_app = impl_from_INetFwAuthorizedApplication( iface );
52 return InterlockedIncrement( &fw_app->refs );
55 static ULONG WINAPI fw_app_Release(
56 INetFwAuthorizedApplication *iface )
58 fw_app *fw_app = impl_from_INetFwAuthorizedApplication( iface );
59 LONG refs = InterlockedDecrement( &fw_app->refs );
62 TRACE("destroying %p\n", fw_app);
63 HeapFree( GetProcessHeap(), 0, fw_app );
68 static HRESULT WINAPI fw_app_QueryInterface(
69 INetFwAuthorizedApplication *iface,
73 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
75 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
77 if ( IsEqualGUID( riid, &IID_INetFwAuthorizedApplication ) ||
78 IsEqualGUID( riid, &IID_IDispatch ) ||
79 IsEqualGUID( riid, &IID_IUnknown ) )
85 FIXME("interface %s not implemented\n", debugstr_guid(riid));
88 INetFwAuthorizedApplication_AddRef( iface );
92 static HRESULT WINAPI fw_app_GetTypeInfoCount(
93 INetFwAuthorizedApplication *iface,
96 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
98 FIXME("%p %p\n", This, pctinfo);
102 static HRESULT WINAPI fw_app_GetTypeInfo(
103 INetFwAuthorizedApplication *iface,
106 ITypeInfo **ppTInfo )
108 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
110 FIXME("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo);
114 static HRESULT WINAPI fw_app_GetIDsOfNames(
115 INetFwAuthorizedApplication *iface,
122 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
124 FIXME("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
128 static HRESULT WINAPI fw_app_Invoke(
129 INetFwAuthorizedApplication *iface,
134 DISPPARAMS *pDispParams,
136 EXCEPINFO *pExcepInfo,
139 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
141 FIXME("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
142 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
146 static HRESULT WINAPI fw_app_get_Name(
147 INetFwAuthorizedApplication *iface,
150 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
152 FIXME("%p, %p\n", This, name);
156 static HRESULT WINAPI fw_app_put_Name(
157 INetFwAuthorizedApplication *iface,
160 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
162 FIXME("%p, %s\n", This, debugstr_w(name));
166 static HRESULT WINAPI fw_app_get_ProcessImageFileName(
167 INetFwAuthorizedApplication *iface,
168 BSTR *imageFileName )
170 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
172 FIXME("%p, %p\n", This, imageFileName);
176 static HRESULT WINAPI fw_app_put_ProcessImageFileName(
177 INetFwAuthorizedApplication *iface,
180 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
182 FIXME("%p, %s\n", This, debugstr_w(imageFileName));
186 static HRESULT WINAPI fw_app_get_IpVersion(
187 INetFwAuthorizedApplication *iface,
188 NET_FW_IP_VERSION *ipVersion )
190 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
192 FIXME("%p, %p\n", This, ipVersion);
196 static HRESULT WINAPI fw_app_put_IpVersion(
197 INetFwAuthorizedApplication *iface,
198 NET_FW_IP_VERSION ipVersion )
200 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
202 FIXME("%p, %u\n", This, ipVersion);
206 static HRESULT WINAPI fw_app_get_Scope(
207 INetFwAuthorizedApplication *iface,
208 NET_FW_SCOPE *scope )
210 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
212 FIXME("%p, %p\n", This, scope);
216 static HRESULT WINAPI fw_app_put_Scope(
217 INetFwAuthorizedApplication *iface,
220 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
222 FIXME("%p, %u\n", This, scope);
226 static HRESULT WINAPI fw_app_get_RemoteAddresses(
227 INetFwAuthorizedApplication *iface,
230 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
232 FIXME("%p, %p\n", This, remoteAddrs);
236 static HRESULT WINAPI fw_app_put_RemoteAddresses(
237 INetFwAuthorizedApplication *iface,
240 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
242 FIXME("%p, %s\n", This, debugstr_w(remoteAddrs));
246 static HRESULT WINAPI fw_app_get_Enabled(
247 INetFwAuthorizedApplication *iface,
248 VARIANT_BOOL *enabled )
250 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
252 FIXME("%p, %p\n", This, enabled);
254 *enabled = VARIANT_FALSE;
258 static HRESULT WINAPI fw_app_put_Enabled(
259 INetFwAuthorizedApplication *iface,
260 VARIANT_BOOL enabled )
262 fw_app *This = impl_from_INetFwAuthorizedApplication( iface );
264 FIXME("%p, %d\n", This, enabled);
268 static const struct INetFwAuthorizedApplicationVtbl fw_app_vtbl =
270 fw_app_QueryInterface,
273 fw_app_GetTypeInfoCount,
275 fw_app_GetIDsOfNames,
279 fw_app_get_ProcessImageFileName,
280 fw_app_put_ProcessImageFileName,
281 fw_app_get_IpVersion,
282 fw_app_put_IpVersion,
285 fw_app_get_RemoteAddresses,
286 fw_app_put_RemoteAddresses,
291 HRESULT NetFwAuthorizedApplication_create( IUnknown *pUnkOuter, LPVOID *ppObj )
295 TRACE("(%p,%p)\n", pUnkOuter, ppObj);
297 fa = HeapAlloc( GetProcessHeap(), 0, sizeof(*fa) );
298 if (!fa) return E_OUTOFMEMORY;
300 fa->vtbl = &fw_app_vtbl;
305 TRACE("returning iface %p\n", *ppObj);
308 typedef struct fw_apps
310 const INetFwAuthorizedApplicationsVtbl *vtbl;
314 static inline fw_apps *impl_from_INetFwAuthorizedApplications( INetFwAuthorizedApplications *iface )
316 return (fw_apps *)((char *)iface - FIELD_OFFSET( fw_apps, vtbl ));
319 static ULONG WINAPI fw_apps_AddRef(
320 INetFwAuthorizedApplications *iface )
322 fw_apps *fw_apps = impl_from_INetFwAuthorizedApplications( iface );
323 return InterlockedIncrement( &fw_apps->refs );
326 static ULONG WINAPI fw_apps_Release(
327 INetFwAuthorizedApplications *iface )
329 fw_apps *fw_apps = impl_from_INetFwAuthorizedApplications( iface );
330 LONG refs = InterlockedDecrement( &fw_apps->refs );
333 TRACE("destroying %p\n", fw_apps);
334 HeapFree( GetProcessHeap(), 0, fw_apps );
339 static HRESULT WINAPI fw_apps_QueryInterface(
340 INetFwAuthorizedApplications *iface,
344 fw_apps *This = impl_from_INetFwAuthorizedApplications( iface );
346 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject );
348 if ( IsEqualGUID( riid, &IID_INetFwAuthorizedApplications ) ||
349 IsEqualGUID( riid, &IID_IDispatch ) ||
350 IsEqualGUID( riid, &IID_IUnknown ) )
356 FIXME("interface %s not implemented\n", debugstr_guid(riid));
357 return E_NOINTERFACE;
359 INetFwAuthorizedApplications_AddRef( iface );
363 static HRESULT WINAPI fw_apps_GetTypeInfoCount(
364 INetFwAuthorizedApplications *iface,
367 fw_apps *This = impl_from_INetFwAuthorizedApplications( iface );
369 FIXME("%p %p\n", This, pctinfo);
373 static HRESULT WINAPI fw_apps_GetTypeInfo(
374 INetFwAuthorizedApplications *iface,
377 ITypeInfo **ppTInfo )
379 fw_apps *This = impl_from_INetFwAuthorizedApplications( iface );
381 FIXME("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo);
385 static HRESULT WINAPI fw_apps_GetIDsOfNames(
386 INetFwAuthorizedApplications *iface,
393 fw_apps *This = impl_from_INetFwAuthorizedApplications( iface );
395 FIXME("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
399 static HRESULT WINAPI fw_apps_Invoke(
400 INetFwAuthorizedApplications *iface,
405 DISPPARAMS *pDispParams,
407 EXCEPINFO *pExcepInfo,
410 fw_apps *This = impl_from_INetFwAuthorizedApplications( iface );
412 FIXME("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid),
413 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
417 static HRESULT WINAPI fw_apps_get_Count(
418 INetFwAuthorizedApplications *iface,
421 fw_apps *This = impl_from_INetFwAuthorizedApplications( iface );
423 FIXME("%p, %p\n", This, count);
427 static HRESULT WINAPI fw_apps_Add(
428 INetFwAuthorizedApplications *iface,
429 INetFwAuthorizedApplication *app )
431 fw_apps *This = impl_from_INetFwAuthorizedApplications( iface );
433 FIXME("%p, %p\n", This, app);
437 static HRESULT WINAPI fw_apps_Remove(
438 INetFwAuthorizedApplications *iface,
441 fw_apps *This = impl_from_INetFwAuthorizedApplications( iface );
443 FIXME("%p, %s\n", This, debugstr_w(imageFileName));
447 static HRESULT WINAPI fw_apps_Item(
448 INetFwAuthorizedApplications *iface,
450 INetFwAuthorizedApplication **app )
452 fw_apps *This = impl_from_INetFwAuthorizedApplications( iface );
454 TRACE("%p, %s, %p\n", This, debugstr_w(imageFileName), app);
455 return NetFwAuthorizedApplication_create( NULL, (void **)app );
458 static HRESULT WINAPI fw_apps_get__NewEnum(
459 INetFwAuthorizedApplications *iface,
462 fw_apps *This = impl_from_INetFwAuthorizedApplications( iface );
464 FIXME("%p, %p\n", This, newEnum);
468 static const struct INetFwAuthorizedApplicationsVtbl fw_apps_vtbl =
470 fw_apps_QueryInterface,
473 fw_apps_GetTypeInfoCount,
475 fw_apps_GetIDsOfNames,
484 HRESULT NetFwAuthorizedApplications_create( IUnknown *pUnkOuter, LPVOID *ppObj )
488 TRACE("(%p,%p)\n", pUnkOuter, ppObj);
490 fa = HeapAlloc( GetProcessHeap(), 0, sizeof(*fa) );
491 if (!fa) return E_OUTOFMEMORY;
493 fa->vtbl = &fw_apps_vtbl;
498 TRACE("returning iface %p\n", *ppObj);