Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenupdates.c
Go to the documentation of this file.
00001 /* 00002 * IAutomaticUpdates implementation 00003 * 00004 * Copyright 2008 Hans Leidekker 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00019 */ 00020 00021 #define COBJMACROS 00022 00023 #include "config.h" 00024 #include <stdarg.h> 00025 00026 #include "windef.h" 00027 #include "winbase.h" 00028 #include "winuser.h" 00029 #include "ole2.h" 00030 #include "wuapi.h" 00031 00032 #include "wine/debug.h" 00033 00034 WINE_DEFAULT_DEBUG_CHANNEL(wuapi); 00035 00036 typedef struct _automatic_updates 00037 { 00038 const struct IAutomaticUpdatesVtbl *vtbl; 00039 LONG refs; 00040 } automatic_updates; 00041 00042 static inline automatic_updates *impl_from_IAutomaticUpdates( IAutomaticUpdates *iface ) 00043 { 00044 return (automatic_updates *)((char*)iface - FIELD_OFFSET( automatic_updates, vtbl )); 00045 } 00046 00047 static ULONG WINAPI automatic_updates_AddRef( 00048 IAutomaticUpdates *iface ) 00049 { 00050 automatic_updates *automatic_updates = impl_from_IAutomaticUpdates( iface ); 00051 return InterlockedIncrement( &automatic_updates->refs ); 00052 } 00053 00054 static ULONG WINAPI automatic_updates_Release( 00055 IAutomaticUpdates *iface ) 00056 { 00057 automatic_updates *automatic_updates = impl_from_IAutomaticUpdates( iface ); 00058 LONG refs = InterlockedDecrement( &automatic_updates->refs ); 00059 if (!refs) 00060 { 00061 TRACE("destroying %p\n", automatic_updates); 00062 HeapFree( GetProcessHeap(), 0, automatic_updates ); 00063 } 00064 return refs; 00065 } 00066 00067 static HRESULT WINAPI automatic_updates_QueryInterface( 00068 IAutomaticUpdates *iface, 00069 REFIID riid, 00070 void **ppvObject ) 00071 { 00072 automatic_updates *This = impl_from_IAutomaticUpdates( iface ); 00073 00074 TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppvObject ); 00075 00076 if ( IsEqualGUID( riid, &IID_IAutomaticUpdates ) || 00077 IsEqualGUID( riid, &IID_IDispatch ) || 00078 IsEqualGUID( riid, &IID_IUnknown ) ) 00079 { 00080 *ppvObject = iface; 00081 } 00082 else 00083 { 00084 FIXME("interface %s not implemented\n", debugstr_guid(riid)); 00085 return E_NOINTERFACE; 00086 } 00087 IAutomaticUpdates_AddRef( iface ); 00088 return S_OK; 00089 } 00090 00091 static HRESULT WINAPI automatic_updates_GetTypeInfoCount( 00092 IAutomaticUpdates *iface, 00093 UINT *pctinfo ) 00094 { 00095 FIXME("\n"); 00096 return E_NOTIMPL; 00097 } 00098 00099 static HRESULT WINAPI automatic_updates_GetTypeInfo( 00100 IAutomaticUpdates *iface, 00101 UINT iTInfo, 00102 LCID lcid, 00103 ITypeInfo **ppTInfo ) 00104 { 00105 FIXME("\n"); 00106 return E_NOTIMPL; 00107 } 00108 00109 static HRESULT WINAPI automatic_updates_GetIDsOfNames( 00110 IAutomaticUpdates *iface, 00111 REFIID riid, 00112 LPOLESTR *rgszNames, 00113 UINT cNames, 00114 LCID lcid, 00115 DISPID *rgDispId ) 00116 { 00117 FIXME("\n"); 00118 return E_NOTIMPL; 00119 } 00120 00121 static HRESULT WINAPI automatic_updates_Invoke( 00122 IAutomaticUpdates *iface, 00123 DISPID dispIdMember, 00124 REFIID riid, 00125 LCID lcid, 00126 WORD wFlags, 00127 DISPPARAMS *pDispParams, 00128 VARIANT *pVarResult, 00129 EXCEPINFO *pExcepInfo, 00130 UINT *puArgErr ) 00131 { 00132 FIXME("\n"); 00133 return E_NOTIMPL; 00134 } 00135 00136 static HRESULT WINAPI automatic_updates_DetectNow( 00137 IAutomaticUpdates *This ) 00138 { 00139 FIXME("\n"); 00140 return E_NOTIMPL; 00141 } 00142 00143 static HRESULT WINAPI automatic_updates_Pause( 00144 IAutomaticUpdates *This ) 00145 { 00146 FIXME("\n"); 00147 return S_OK; 00148 } 00149 00150 static HRESULT WINAPI automatic_updates_Resume( 00151 IAutomaticUpdates *This ) 00152 { 00153 FIXME("\n"); 00154 return E_NOTIMPL; 00155 } 00156 00157 static HRESULT WINAPI automatic_updates_ShowSettingsDialog( 00158 IAutomaticUpdates *This ) 00159 { 00160 FIXME("\n"); 00161 return E_NOTIMPL; 00162 } 00163 00164 static HRESULT WINAPI automatic_updates_EnableService( 00165 IAutomaticUpdates *This ) 00166 { 00167 FIXME("\n"); 00168 return E_NOTIMPL; 00169 } 00170 00171 static HRESULT WINAPI automatic_updates_get_ServiceEnabled( 00172 IAutomaticUpdates *This, 00173 VARIANT_BOOL *retval ) 00174 { 00175 FIXME("%p\n", retval); 00176 return E_NOTIMPL; 00177 } 00178 00179 static HRESULT WINAPI automatic_updates_get_Settings( 00180 IAutomaticUpdates *This, 00181 IAutomaticUpdatesSettings **retval ) 00182 { 00183 FIXME("%p\n", retval); 00184 return E_NOTIMPL; 00185 } 00186 00187 static const struct IAutomaticUpdatesVtbl automatic_updates_vtbl = 00188 { 00189 automatic_updates_QueryInterface, 00190 automatic_updates_AddRef, 00191 automatic_updates_Release, 00192 automatic_updates_GetTypeInfoCount, 00193 automatic_updates_GetTypeInfo, 00194 automatic_updates_GetIDsOfNames, 00195 automatic_updates_Invoke, 00196 automatic_updates_DetectNow, 00197 automatic_updates_Pause, 00198 automatic_updates_Resume, 00199 automatic_updates_ShowSettingsDialog, 00200 automatic_updates_get_Settings, 00201 automatic_updates_get_ServiceEnabled, 00202 automatic_updates_EnableService 00203 }; 00204 00205 HRESULT AutomaticUpdates_create( IUnknown *pUnkOuter, LPVOID *ppObj ) 00206 { 00207 automatic_updates *updates; 00208 00209 TRACE("(%p,%p)\n", pUnkOuter, ppObj); 00210 00211 updates = HeapAlloc( GetProcessHeap(), 0, sizeof(*updates) ); 00212 if (!updates) return E_OUTOFMEMORY; 00213 00214 updates->vtbl = &automatic_updates_vtbl; 00215 updates->refs = 1; 00216 00217 *ppObj = &updates->vtbl; 00218 00219 TRACE("returning iface %p\n", *ppObj); 00220 return S_OK; 00221 } Generated on Wed May 23 2012 04:25:02 for ReactOS by
1.7.6.1
|