Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

328 lines
7.7 KiB

  1. /******************************************************************************
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. MPCWrapper.cpp
  5. Abstract:
  6. This file contains the implementation of the COM wrappers, to export to clients
  7. the internal objects.
  8. Revision History:
  9. Davide Massarenti (Dmassare) 04/15/2000
  10. created
  11. ******************************************************************************/
  12. #include "stdafx.h"
  13. ////////////////////////////////////////////////////////////////////////////////
  14. CMPCUploadWrapper::CMPCUploadWrapper()
  15. {
  16. m_Object = NULL; // CMPCUpload* m_Object;
  17. }
  18. HRESULT CMPCUploadWrapper::FinalConstruct()
  19. {
  20. m_Object = &g_Root; g_Root.AddRef();
  21. return S_OK;
  22. }
  23. void CMPCUploadWrapper::FinalRelease()
  24. {
  25. if(m_Object)
  26. {
  27. m_Object->Release();
  28. m_Object = NULL;
  29. }
  30. }
  31. ////////////////////////////////////////
  32. STDMETHODIMP CMPCUploadWrapper::get__NewEnum( /*[out]*/ IUnknown* *pVal )
  33. {
  34. MPC_FORWARD_CALL_1(m_Object,get__NewEnum, pVal);
  35. }
  36. STDMETHODIMP CMPCUploadWrapper::Item( /*[in]*/ long index, /*[out]*/ IMPCUploadJob* *pVal )
  37. {
  38. MPC_FORWARD_CALL_2(m_Object,Item, index, pVal);
  39. }
  40. STDMETHODIMP CMPCUploadWrapper::get_Count( /*[out]*/ long *pVal )
  41. {
  42. MPC_FORWARD_CALL_1(m_Object,get_Count, pVal);
  43. }
  44. STDMETHODIMP CMPCUploadWrapper::CreateJob( /*[out]*/ IMPCUploadJob* *pVal )
  45. {
  46. MPC_FORWARD_CALL_1(m_Object,CreateJob, pVal);
  47. }
  48. ////////////////////////////////////////////////////////////////////////////////
  49. ////////////////////////////////////////////////////////////////////////////////
  50. CMPCUploadJobWrapper::CMPCUploadJobWrapper()
  51. {
  52. m_Object = NULL; // CMPCUploadJob* m_Object;
  53. }
  54. HRESULT CMPCUploadJobWrapper::Init( CMPCUploadJob* obj )
  55. {
  56. m_Object = obj; obj->AddRef();
  57. return S_OK;
  58. }
  59. void CMPCUploadJobWrapper::FinalRelease()
  60. {
  61. if(m_Object)
  62. {
  63. m_Object->Release();
  64. m_Object = NULL;
  65. }
  66. }
  67. ////////////////////////////////////////
  68. STDMETHODIMP CMPCUploadJobWrapper::get_Sig( /*[out]*/ BSTR *pVal )
  69. {
  70. MPC_FORWARD_CALL_1(m_Object,get_Sig,pVal);
  71. }
  72. STDMETHODIMP CMPCUploadJobWrapper::put_Sig( /*[in]*/ BSTR newVal )
  73. {
  74. MPC_FORWARD_CALL_1(m_Object,put_Sig,newVal);
  75. }
  76. STDMETHODIMP CMPCUploadJobWrapper::get_Server( /*[out]*/ BSTR *pVal )
  77. {
  78. MPC_FORWARD_CALL_1(m_Object,get_Server,pVal);
  79. }
  80. STDMETHODIMP CMPCUploadJobWrapper::put_Server( /*[in]*/ BSTR newVal )
  81. {
  82. MPC_FORWARD_CALL_1(m_Object,put_Server,newVal);
  83. }
  84. STDMETHODIMP CMPCUploadJobWrapper::get_JobID( /*[out]*/ BSTR *pVal )
  85. {
  86. MPC_FORWARD_CALL_1(m_Object,get_JobID,pVal);
  87. }
  88. STDMETHODIMP CMPCUploadJobWrapper::put_JobID( /*[in] */ BSTR newVal )
  89. {
  90. MPC_FORWARD_CALL_1(m_Object,put_JobID,newVal);
  91. }
  92. STDMETHODIMP CMPCUploadJobWrapper::get_ProviderID( /*[out]*/ BSTR *pVal )
  93. {
  94. MPC_FORWARD_CALL_1(m_Object,get_ProviderID,pVal);
  95. }
  96. STDMETHODIMP CMPCUploadJobWrapper::put_ProviderID( /*[in] */ BSTR newVal )
  97. {
  98. MPC_FORWARD_CALL_1(m_Object,put_ProviderID,newVal);
  99. }
  100. STDMETHODIMP CMPCUploadJobWrapper::get_Creator( /*[out]*/ BSTR *pVal )
  101. {
  102. MPC_FORWARD_CALL_1(m_Object,get_Creator,pVal);
  103. }
  104. STDMETHODIMP CMPCUploadJobWrapper::get_Username( /*[out]*/ BSTR *pVal )
  105. {
  106. MPC_FORWARD_CALL_1(m_Object,get_Username,pVal);
  107. }
  108. STDMETHODIMP CMPCUploadJobWrapper::put_Username( /*[in] */ BSTR newVal )
  109. {
  110. MPC_FORWARD_CALL_1(m_Object,put_Username,newVal);
  111. }
  112. STDMETHODIMP CMPCUploadJobWrapper::get_Password( /*[out]*/ BSTR *pVal )
  113. {
  114. MPC_FORWARD_CALL_1(m_Object,get_Password,pVal);
  115. }
  116. STDMETHODIMP CMPCUploadJobWrapper::put_Password( /*[in] */ BSTR newVal )
  117. {
  118. MPC_FORWARD_CALL_1(m_Object,put_Password,newVal);
  119. }
  120. STDMETHODIMP CMPCUploadJobWrapper::get_OriginalSize( /*[out]*/ long *pVal )
  121. {
  122. MPC_FORWARD_CALL_1(m_Object,get_OriginalSize,pVal);
  123. }
  124. STDMETHODIMP CMPCUploadJobWrapper::get_TotalSize( /*[out]*/ long *pVal )
  125. {
  126. MPC_FORWARD_CALL_1(m_Object,get_TotalSize,pVal);
  127. }
  128. STDMETHODIMP CMPCUploadJobWrapper::get_SentSize( /*[out]*/ long *pVal )
  129. {
  130. MPC_FORWARD_CALL_1(m_Object,get_SentSize,pVal);
  131. }
  132. STDMETHODIMP CMPCUploadJobWrapper::get_History( /*[out]*/ UL_HISTORY *pVal )
  133. {
  134. MPC_FORWARD_CALL_1(m_Object,get_History,pVal);
  135. }
  136. STDMETHODIMP CMPCUploadJobWrapper::put_History( /*[in] */ UL_HISTORY newVal )
  137. {
  138. MPC_FORWARD_CALL_1(m_Object,put_History,newVal);
  139. }
  140. STDMETHODIMP CMPCUploadJobWrapper::get_Status( /*[out]*/ UL_STATUS *pVal )
  141. {
  142. MPC_FORWARD_CALL_1(m_Object,get_Status,pVal);
  143. }
  144. STDMETHODIMP CMPCUploadJobWrapper::get_ErrorCode( /*[out]*/ long *pVal )
  145. {
  146. MPC_FORWARD_CALL_1(m_Object,get_ErrorCode,pVal);
  147. }
  148. STDMETHODIMP CMPCUploadJobWrapper::get_Mode( /*[out]*/ UL_MODE *pVal )
  149. {
  150. MPC_FORWARD_CALL_1(m_Object,get_Mode,pVal);
  151. }
  152. STDMETHODIMP CMPCUploadJobWrapper::put_Mode( /*[in] */ UL_MODE newVal )
  153. {
  154. MPC_FORWARD_CALL_1(m_Object,put_Mode,newVal);
  155. }
  156. STDMETHODIMP CMPCUploadJobWrapper::get_PersistToDisk( /*[out]*/ VARIANT_BOOL *pVal )
  157. {
  158. MPC_FORWARD_CALL_1(m_Object,get_PersistToDisk,pVal);
  159. }
  160. STDMETHODIMP CMPCUploadJobWrapper::put_PersistToDisk( /*[in] */ VARIANT_BOOL newVal )
  161. {
  162. MPC_FORWARD_CALL_1(m_Object,put_PersistToDisk,newVal);
  163. }
  164. STDMETHODIMP CMPCUploadJobWrapper::get_Compressed( /*[out]*/ VARIANT_BOOL *pVal )
  165. {
  166. MPC_FORWARD_CALL_1(m_Object,get_Compressed,pVal);
  167. }
  168. STDMETHODIMP CMPCUploadJobWrapper::put_Compressed( /*[in] */ VARIANT_BOOL newVal )
  169. {
  170. MPC_FORWARD_CALL_1(m_Object,put_Compressed,newVal);
  171. }
  172. STDMETHODIMP CMPCUploadJobWrapper::get_Priority( /*[out]*/ long *pVal )
  173. {
  174. MPC_FORWARD_CALL_1(m_Object,get_Priority,pVal);
  175. }
  176. STDMETHODIMP CMPCUploadJobWrapper::put_Priority( /*[in] */ long newVal )
  177. {
  178. MPC_FORWARD_CALL_1(m_Object,put_Priority,newVal);
  179. }
  180. STDMETHODIMP CMPCUploadJobWrapper::get_CreationTime( /*[out]*/ DATE *pVal )
  181. {
  182. MPC_FORWARD_CALL_1(m_Object,get_CreationTime,pVal);
  183. }
  184. STDMETHODIMP CMPCUploadJobWrapper::get_CompleteTime( /*[out]*/ DATE *pVal )
  185. {
  186. MPC_FORWARD_CALL_1(m_Object,get_CompleteTime,pVal);
  187. }
  188. STDMETHODIMP CMPCUploadJobWrapper::get_ExpirationTime( /*[out]*/ DATE *pVal )
  189. {
  190. MPC_FORWARD_CALL_1(m_Object,get_ExpirationTime,pVal);
  191. }
  192. STDMETHODIMP CMPCUploadJobWrapper::put_ExpirationTime( /*[in] */ DATE newVal )
  193. {
  194. MPC_FORWARD_CALL_1(m_Object,put_ExpirationTime,newVal);
  195. }
  196. STDMETHODIMP CMPCUploadJobWrapper::ActivateSync()
  197. {
  198. MPC_FORWARD_CALL_0(m_Object,ActivateSync);
  199. }
  200. STDMETHODIMP CMPCUploadJobWrapper::ActivateAsync()
  201. {
  202. MPC_FORWARD_CALL_0(m_Object,ActivateAsync);
  203. }
  204. STDMETHODIMP CMPCUploadJobWrapper::Suspend()
  205. {
  206. MPC_FORWARD_CALL_0(m_Object,Suspend);
  207. }
  208. STDMETHODIMP CMPCUploadJobWrapper::Delete()
  209. {
  210. MPC_FORWARD_CALL_0(m_Object,Delete);
  211. }
  212. STDMETHODIMP CMPCUploadJobWrapper::GetDataFromFile( /*[in]*/ BSTR bstrFileName )
  213. {
  214. MPC_FORWARD_CALL_1(m_Object,GetDataFromFile,bstrFileName);
  215. }
  216. STDMETHODIMP CMPCUploadJobWrapper::PutDataIntoFile( /*[in]*/ BSTR bstrFileName )
  217. {
  218. MPC_FORWARD_CALL_1(m_Object,PutDataIntoFile,bstrFileName);
  219. }
  220. STDMETHODIMP CMPCUploadJobWrapper::GetDataFromStream( /*[in] */ IUnknown* stream )
  221. {
  222. MPC_FORWARD_CALL_1(m_Object,GetDataFromStream,stream);
  223. }
  224. STDMETHODIMP CMPCUploadJobWrapper::PutDataIntoStream( /*[in] */ IUnknown* *pstream )
  225. {
  226. MPC_FORWARD_CALL_1(m_Object,PutDataIntoStream,pstream);
  227. }
  228. STDMETHODIMP CMPCUploadJobWrapper::GetResponseAsStream( /*[out]*/ IUnknown* *ppstream )
  229. {
  230. MPC_FORWARD_CALL_1(m_Object,GetResponseAsStream,ppstream);
  231. }
  232. STDMETHODIMP CMPCUploadJobWrapper::put_onStatusChange( /*[in]*/ IDispatch* function )
  233. {
  234. MPC_FORWARD_CALL_1(m_Object,put_onStatusChange,function);
  235. }
  236. STDMETHODIMP CMPCUploadJobWrapper::put_onProgressChange( /*[in]*/ IDispatch* function )
  237. {
  238. MPC_FORWARD_CALL_1(m_Object,put_onProgressChange,function);
  239. }
  240. // IConnectionPointContainer
  241. STDMETHODIMP CMPCUploadJobWrapper::EnumConnectionPoints( /*[out]*/ IEnumConnectionPoints* *ppEnum )
  242. {
  243. MPC_FORWARD_CALL_1(m_Object,EnumConnectionPoints,ppEnum);
  244. }
  245. STDMETHODIMP CMPCUploadJobWrapper::FindConnectionPoint( /*[in] */ REFIID riid, /*[out]*/ IConnectionPoint* *ppCP )
  246. {
  247. MPC_FORWARD_CALL_2(m_Object,FindConnectionPoint, riid, ppCP);
  248. }