Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenprofile.c
Go to the documentation of this file.
00001 /* 00002 * Copyright 2009 Hans Leidekker for CodeWeavers 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with this library; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00017 */ 00018 00019 #include "config.h" 00020 #include <stdarg.h> 00021 #include <stdio.h> 00022 00023 #define COBJMACROS 00024 00025 #include "windef.h" 00026 #include "winbase.h" 00027 #include "winuser.h" 00028 #include "ole2.h" 00029 #include "netfw.h" 00030 00031 #include "wine/debug.h" 00032 #include "wine/unicode.h" 00033 #include "hnetcfg_private.h" 00034 00035 WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg); 00036 00037 typedef struct fw_profile 00038 { 00039 INetFwProfile INetFwProfile_iface; 00040 LONG refs; 00041 } fw_profile; 00042 00043 static inline fw_profile *impl_from_INetFwProfile( INetFwProfile *iface ) 00044 { 00045 return CONTAINING_RECORD(iface, fw_profile, INetFwProfile_iface); 00046 } 00047 00048 static ULONG WINAPI fw_profile_AddRef( 00049 INetFwProfile *iface ) 00050 { 00051 fw_profile *fw_profile = impl_from_INetFwProfile( iface ); 00052 return InterlockedIncrement( &fw_profile->refs ); 00053 } 00054 00055 static ULONG WINAPI fw_profile_Release( 00056 INetFwProfile *iface ) 00057 { 00058 fw_profile *fw_profile = impl_from_INetFwProfile( iface ); 00059 LONG refs = InterlockedDecrement( &fw_profile->refs ); 00060 if (!refs) 00061 { 00062 TRACE("destroying %p\n", fw_profile); 00063 HeapFree( GetProcessHeap(), 0, fw_profile ); 00064 } 00065 return refs; 00066 } 00067 00068 static HRESULT WINAPI fw_profile_QueryInterface( 00069 INetFwProfile *iface, 00070 REFIID riid, 00071 void **ppvObject ) 00072 { 00073 fw_profile *This = impl_from_INetFwProfile( iface ); 00074 00075 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject ); 00076 00077 if ( IsEqualGUID( riid, &IID_INetFwProfile ) || 00078 IsEqualGUID( riid, &IID_IDispatch ) || 00079 IsEqualGUID( riid, &IID_IUnknown ) ) 00080 { 00081 *ppvObject = iface; 00082 } 00083 else 00084 { 00085 FIXME("interface %s not implemented\n", debugstr_guid(riid)); 00086 return E_NOINTERFACE; 00087 } 00088 INetFwProfile_AddRef( iface ); 00089 return S_OK; 00090 } 00091 00092 static HRESULT WINAPI fw_profile_GetTypeInfoCount( 00093 INetFwProfile *iface, 00094 UINT *pctinfo ) 00095 { 00096 fw_profile *This = impl_from_INetFwProfile( iface ); 00097 00098 FIXME("%p %p\n", This, pctinfo); 00099 return E_NOTIMPL; 00100 } 00101 00102 static HRESULT WINAPI fw_profile_GetTypeInfo( 00103 INetFwProfile *iface, 00104 UINT iTInfo, 00105 LCID lcid, 00106 ITypeInfo **ppTInfo ) 00107 { 00108 fw_profile *This = impl_from_INetFwProfile( iface ); 00109 00110 FIXME("%p %u %u %p\n", This, iTInfo, lcid, ppTInfo); 00111 return E_NOTIMPL; 00112 } 00113 00114 static HRESULT WINAPI fw_profile_GetIDsOfNames( 00115 INetFwProfile *iface, 00116 REFIID riid, 00117 LPOLESTR *rgszNames, 00118 UINT cNames, 00119 LCID lcid, 00120 DISPID *rgDispId ) 00121 { 00122 fw_profile *This = impl_from_INetFwProfile( iface ); 00123 00124 FIXME("%p %s %p %u %u %p\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); 00125 return E_NOTIMPL; 00126 } 00127 00128 static HRESULT WINAPI fw_profile_Invoke( 00129 INetFwProfile *iface, 00130 DISPID dispIdMember, 00131 REFIID riid, 00132 LCID lcid, 00133 WORD wFlags, 00134 DISPPARAMS *pDispParams, 00135 VARIANT *pVarResult, 00136 EXCEPINFO *pExcepInfo, 00137 UINT *puArgErr ) 00138 { 00139 fw_profile *This = impl_from_INetFwProfile( iface ); 00140 00141 FIXME("%p %d %s %d %d %p %p %p %p\n", This, dispIdMember, debugstr_guid(riid), 00142 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); 00143 return E_NOTIMPL; 00144 } 00145 00146 static HRESULT WINAPI fw_profile_get_Type( 00147 INetFwProfile *iface, 00148 NET_FW_PROFILE_TYPE *type ) 00149 { 00150 fw_profile *This = impl_from_INetFwProfile( iface ); 00151 00152 FIXME("%p, %p\n", This, type); 00153 return E_NOTIMPL; 00154 } 00155 00156 static HRESULT WINAPI fw_profile_get_FirewallEnabled( 00157 INetFwProfile *iface, 00158 VARIANT_BOOL *enabled ) 00159 { 00160 fw_profile *This = impl_from_INetFwProfile( iface ); 00161 00162 FIXME("%p, %p\n", This, enabled); 00163 00164 *enabled = VARIANT_FALSE; 00165 return S_OK; 00166 } 00167 00168 static HRESULT WINAPI fw_profile_put_FirewallEnabled( 00169 INetFwProfile *iface, 00170 VARIANT_BOOL enabled ) 00171 { 00172 fw_profile *This = impl_from_INetFwProfile( iface ); 00173 00174 FIXME("%p, %d\n", This, enabled); 00175 return E_NOTIMPL; 00176 } 00177 00178 static HRESULT WINAPI fw_profile_get_ExceptionsNotAllowed( 00179 INetFwProfile *iface, 00180 VARIANT_BOOL *notAllowed ) 00181 { 00182 fw_profile *This = impl_from_INetFwProfile( iface ); 00183 00184 FIXME("%p, %p\n", This, notAllowed); 00185 return E_NOTIMPL; 00186 } 00187 00188 static HRESULT WINAPI fw_profile_put_ExceptionsNotAllowed( 00189 INetFwProfile *iface, 00190 VARIANT_BOOL notAllowed ) 00191 { 00192 fw_profile *This = impl_from_INetFwProfile( iface ); 00193 00194 FIXME("%p, %d\n", This, notAllowed); 00195 return E_NOTIMPL; 00196 } 00197 00198 static HRESULT WINAPI fw_profile_get_NotificationsDisabled( 00199 INetFwProfile *iface, 00200 VARIANT_BOOL *disabled ) 00201 { 00202 fw_profile *This = impl_from_INetFwProfile( iface ); 00203 00204 FIXME("%p, %p\n", This, disabled); 00205 return E_NOTIMPL; 00206 } 00207 00208 static HRESULT WINAPI fw_profile_put_NotificationsDisabled( 00209 INetFwProfile *iface, 00210 VARIANT_BOOL disabled ) 00211 { 00212 fw_profile *This = impl_from_INetFwProfile( iface ); 00213 00214 FIXME("%p, %d\n", This, disabled); 00215 return E_NOTIMPL; 00216 } 00217 00218 static HRESULT WINAPI fw_profile_get_UnicastResponsesToMulticastBroadcastDisabled( 00219 INetFwProfile *iface, 00220 VARIANT_BOOL *disabled ) 00221 { 00222 fw_profile *This = impl_from_INetFwProfile( iface ); 00223 00224 FIXME("%p, %p\n", This, disabled); 00225 return E_NOTIMPL; 00226 } 00227 00228 static HRESULT WINAPI fw_profile_put_UnicastResponsesToMulticastBroadcastDisabled( 00229 INetFwProfile *iface, 00230 VARIANT_BOOL disabled ) 00231 { 00232 fw_profile *This = impl_from_INetFwProfile( iface ); 00233 00234 FIXME("%p, %d\n", This, disabled); 00235 return E_NOTIMPL; 00236 } 00237 00238 static HRESULT WINAPI fw_profile_get_RemoteAdminSettings( 00239 INetFwProfile *iface, 00240 INetFwRemoteAdminSettings **remoteAdminSettings ) 00241 { 00242 fw_profile *This = impl_from_INetFwProfile( iface ); 00243 00244 FIXME("%p, %p\n", This, remoteAdminSettings); 00245 return E_NOTIMPL; 00246 } 00247 00248 static HRESULT WINAPI fw_profile_get_IcmpSettings( 00249 INetFwProfile *iface, 00250 INetFwIcmpSettings **icmpSettings ) 00251 { 00252 fw_profile *This = impl_from_INetFwProfile( iface ); 00253 00254 FIXME("%p, %p\n", This, icmpSettings); 00255 return E_NOTIMPL; 00256 } 00257 00258 static HRESULT WINAPI fw_profile_get_GloballyOpenPorts( 00259 INetFwProfile *iface, 00260 INetFwOpenPorts **openPorts ) 00261 { 00262 fw_profile *This = impl_from_INetFwProfile( iface ); 00263 00264 TRACE("%p, %p\n", This, openPorts); 00265 return NetFwOpenPorts_create( NULL, (void **)openPorts ); 00266 } 00267 00268 static HRESULT WINAPI fw_profile_get_Services( 00269 INetFwProfile *iface, 00270 INetFwServices **Services ) 00271 { 00272 fw_profile *This = impl_from_INetFwProfile( iface ); 00273 00274 TRACE("%p, %p\n", This, Services); 00275 return NetFwServices_create( NULL, (void **)Services ); 00276 } 00277 00278 static HRESULT WINAPI fw_profile_get_AuthorizedApplications( 00279 INetFwProfile *iface, 00280 INetFwAuthorizedApplications **apps ) 00281 { 00282 fw_profile *This = impl_from_INetFwProfile( iface ); 00283 00284 TRACE("%p, %p\n", This, apps); 00285 return NetFwAuthorizedApplications_create( NULL, (void **)apps ); 00286 } 00287 00288 static const struct INetFwProfileVtbl fw_profile_vtbl = 00289 { 00290 fw_profile_QueryInterface, 00291 fw_profile_AddRef, 00292 fw_profile_Release, 00293 fw_profile_GetTypeInfoCount, 00294 fw_profile_GetTypeInfo, 00295 fw_profile_GetIDsOfNames, 00296 fw_profile_Invoke, 00297 fw_profile_get_Type, 00298 fw_profile_get_FirewallEnabled, 00299 fw_profile_put_FirewallEnabled, 00300 fw_profile_get_ExceptionsNotAllowed, 00301 fw_profile_put_ExceptionsNotAllowed, 00302 fw_profile_get_NotificationsDisabled, 00303 fw_profile_put_NotificationsDisabled, 00304 fw_profile_get_UnicastResponsesToMulticastBroadcastDisabled, 00305 fw_profile_put_UnicastResponsesToMulticastBroadcastDisabled, 00306 fw_profile_get_RemoteAdminSettings, 00307 fw_profile_get_IcmpSettings, 00308 fw_profile_get_GloballyOpenPorts, 00309 fw_profile_get_Services, 00310 fw_profile_get_AuthorizedApplications 00311 }; 00312 00313 HRESULT NetFwProfile_create( IUnknown *pUnkOuter, LPVOID *ppObj ) 00314 { 00315 fw_profile *fp; 00316 00317 TRACE("(%p,%p)\n", pUnkOuter, ppObj); 00318 00319 fp = HeapAlloc( GetProcessHeap(), 0, sizeof(*fp) ); 00320 if (!fp) return E_OUTOFMEMORY; 00321 00322 fp->INetFwProfile_iface.lpVtbl = &fw_profile_vtbl; 00323 fp->refs = 1; 00324 00325 *ppObj = &fp->INetFwProfile_iface; 00326 00327 TRACE("returning iface %p\n", *ppObj); 00328 return S_OK; 00329 } Generated on Sun May 27 2012 04:23:53 for ReactOS by
1.7.6.1
|