Leaked source code of windows server 2003
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.

232 lines
10 KiB

  1. /******************************************************************************
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. UploadManager.idl
  5. Abstract:
  6. This file contains the declaration of the set of coclasses and interfaces
  7. implemented by the UploadManager.
  8. Revision History:
  9. Davide Massarenti (Dmassare) 06/13/99
  10. created
  11. ******************************************************************************/
  12. #include <UploadManagerDID.h>
  13. import "oaidl.idl";
  14. ///////////////////////////////////////////////////////////////////////////////
  15. ///////////////////////////////////////////////////////////////////////////////
  16. ///////////////////////////////////////////////////////////////////////////////
  17. typedef [v1_enum] enum tagUL_STATUS {
  18. UL_NOTACTIVE = 0x00000000, // Status before first Activate() call.
  19. UL_ACTIVE = 0x00000001, // Status after Activate() call.
  20. UL_SUSPENDED = 0x00000002, // Status after Suspend() call.
  21. UL_TRANSMITTING = 0x00000003, // Status while actually transmitted.
  22. UL_ABORTED = 0x00000004, // Status after a temporary failure (no connection, etc.)
  23. UL_FAILED = 0x00000005, // Status after a permanent failure (server deny, ect.)
  24. UL_COMPLETED = 0x00000006, // Status after successful transmission.
  25. UL_DELETED = 0x00000007, // status after deletion.
  26. } UL_STATUS;
  27. typedef [v1_enum] enum tagUL_MODE {
  28. UL_BACKGROUND = 0x00000000,
  29. UL_FOREGROUND = 0x00000001,
  30. } UL_MODE;
  31. typedef [v1_enum] enum tagUL_HISTORY {
  32. UL_HISTORY_NONE = 0x00000000,
  33. UL_HISTORY_LOG = 0x00000001,
  34. UL_HISTORY_LOG_AND_DATA = 0x00000002,
  35. } UL_HISTORY;
  36. [
  37. object,
  38. uuid(8E82AD10-D1A3-11D2-9374-00C04F72DAF7),
  39. dual,
  40. helpstring("IMPCUploadJob Interface"),
  41. pointer_default(unique)
  42. ]
  43. interface IMPCUploadJob : IDispatch
  44. {
  45. [propget, id(DISPID_UL_UPLOADJOB_SIG )] HRESULT Sig ( [out, retval] BSTR *pVal );
  46. [propput, id(DISPID_UL_UPLOADJOB_SIG )] HRESULT Sig ( [in] BSTR newVal );
  47. [propget, id(DISPID_UL_UPLOADJOB_SERVER )] HRESULT Server ( [out, retval] BSTR *pVal );
  48. [propput, id(DISPID_UL_UPLOADJOB_SERVER )] HRESULT Server ( [in] BSTR newVal );
  49. [propget, id(DISPID_UL_UPLOADJOB_JOBID )] HRESULT JobID ( [out, retval] BSTR *pVal );
  50. [propput, id(DISPID_UL_UPLOADJOB_JOBID )] HRESULT JobID ( [in] BSTR newVal );
  51. [propget, id(DISPID_UL_UPLOADJOB_PROVIDERID )] HRESULT ProviderID ( [out, retval] BSTR *pVal );
  52. [propput, id(DISPID_UL_UPLOADJOB_PROVIDERID )] HRESULT ProviderID ( [in] BSTR newVal );
  53. [propget, id(DISPID_UL_UPLOADJOB_CREATOR )] HRESULT Creator ( [out, retval] BSTR *pVal ); // Whistler
  54. [propget, id(DISPID_UL_UPLOADJOB_USERNAME )] HRESULT Username ( [out, retval] BSTR *pVal );
  55. [propput, id(DISPID_UL_UPLOADJOB_USERNAME )] HRESULT Username ( [in] BSTR newVal );
  56. [propget, id(DISPID_UL_UPLOADJOB_PASSWORD )] HRESULT Password ( [out, retval] BSTR *pVal );
  57. [propput, id(DISPID_UL_UPLOADJOB_PASSWORD )] HRESULT Password ( [in] BSTR newVal );
  58. [propget, id(DISPID_UL_UPLOADJOB_ORIGINALSIZE )] HRESULT OriginalSize ( [out, retval] long *pVal );
  59. [propget, id(DISPID_UL_UPLOADJOB_TOTALSIZE )] HRESULT TotalSize ( [out, retval] long *pVal );
  60. [propget, id(DISPID_UL_UPLOADJOB_SENTSIZE )] HRESULT SentSize ( [out, retval] long *pVal );
  61. [propget, id(DISPID_UL_UPLOADJOB_HISTORY )] HRESULT History ( [out, retval] UL_HISTORY *pVal );
  62. [propput, id(DISPID_UL_UPLOADJOB_HISTORY )] HRESULT History ( [in] UL_HISTORY newVal );
  63. [propget, id(DISPID_UL_UPLOADJOB_STATUS )] HRESULT Status ( [out, retval] UL_STATUS *pVal );
  64. [propget, id(DISPID_UL_UPLOADJOB_ERRORCODE )] HRESULT ErrorCode ( [out, retval] long *pVal );
  65. [propget, id(DISPID_UL_UPLOADJOB_MODE )] HRESULT Mode ( [out, retval] UL_MODE *pVal );
  66. [propput, id(DISPID_UL_UPLOADJOB_MODE )] HRESULT Mode ( [in] UL_MODE newVal );
  67. [propget, id(DISPID_UL_UPLOADJOB_PERSISTTODISK )] HRESULT PersistToDisk ( [out, retval] VARIANT_BOOL *pVal );
  68. [propput, id(DISPID_UL_UPLOADJOB_PERSISTTODISK )] HRESULT PersistToDisk ( [in] VARIANT_BOOL newVal );
  69. [propget, id(DISPID_UL_UPLOADJOB_COMPRESSED )] HRESULT Compressed ( [out, retval] VARIANT_BOOL *pVal );
  70. [propput, id(DISPID_UL_UPLOADJOB_COMPRESSED )] HRESULT Compressed ( [in] VARIANT_BOOL newVal );
  71. [propget, id(DISPID_UL_UPLOADJOB_PRIORITY )] HRESULT Priority ( [out, retval] long *pVal );
  72. [propput, id(DISPID_UL_UPLOADJOB_PRIORITY )] HRESULT Priority ( [in] long newVal );
  73. [propget, id(DISPID_UL_UPLOADJOB_CREATIONTIME )] HRESULT CreationTime ( [out, retval] DATE *pVal );
  74. [propget, id(DISPID_UL_UPLOADJOB_COMPLETETIME )] HRESULT CompleteTime ( [out, retval] DATE *pVal );
  75. [propget, id(DISPID_UL_UPLOADJOB_EXPIRATIONTIME)] HRESULT ExpirationTime( [out, retval] DATE *pVal ); // Whistler
  76. [propput, id(DISPID_UL_UPLOADJOB_EXPIRATIONTIME)] HRESULT ExpirationTime( [in] DATE newVal ); // Whistler
  77. [propput, id(DISPID_UL_UPLOADJOB_ONSTATUSCHANGE )] HRESULT onStatusChange ( [in] IDispatch* function );
  78. [propput, id(DISPID_UL_UPLOADJOB_ONPROGRESSCHANGE)] HRESULT onProgressChange( [in] IDispatch* function );
  79. [id(DISPID_UL_UPLOADJOB_ACTIVATESYNC )] HRESULT ActivateSync ();
  80. [id(DISPID_UL_UPLOADJOB_ACTIVATEASYNC)] HRESULT ActivateAsync();
  81. [id(DISPID_UL_UPLOADJOB_SUSPEND )] HRESULT Suspend ();
  82. [id(DISPID_UL_UPLOADJOB_DELETE )] HRESULT Delete ();
  83. [id(DISPID_UL_UPLOADJOB_GETDATAFROMFILE )] HRESULT GetDataFromFile ( [in ] BSTR bstrFilename );
  84. [id(DISPID_UL_UPLOADJOB_PUTDATAINTOFILE )] HRESULT PutDataIntoFile ( [in ] BSTR bstrFilename );
  85. [id(DISPID_UL_UPLOADJOB_GETDATAFROMSTREAM )] HRESULT GetDataFromStream ( [in ] IUnknown* stream );
  86. [id(DISPID_UL_UPLOADJOB_PUTDATAINTOSTREAM )] HRESULT PutDataIntoStream ( [out, retval] IUnknown* *pstream );
  87. [id(DISPID_UL_UPLOADJOB_GETRESPONSEASSTREAM)] HRESULT GetResponseAsStream( [out, retval] IUnknown* *pstream ); // Whistler
  88. };
  89. [
  90. uuid(8E82AD12-D1A3-11D2-9374-00C04F72DAF7),
  91. helpstring("DMPCUploadEvents Interface")
  92. ]
  93. dispinterface DMPCUploadEvents
  94. {
  95. properties:
  96. methods:
  97. [id(DISPID_UL_UPLOADEVENTS_ONSTATUSCHANGE )] HRESULT onStatusChange ( [in] IMPCUploadJob* mpcujJob, [in] UL_STATUS usStatus );
  98. [id(DISPID_UL_UPLOADEVENTS_ONPROGRESSCHANGE)] HRESULT onProgressChange( [in] IMPCUploadJob* mpcujJob, [in] long lCurrentSize, [in] long lTotalSize );
  99. };
  100. ///////////////////////////////////////////////////////////////////////////////
  101. ///////////////////////////////////////////////////////////////////////////////
  102. ///////////////////////////////////////////////////////////////////////////////
  103. [
  104. object,
  105. uuid(8E82AD13-D1A3-11D2-9374-00C04F72DAF7),
  106. dual,
  107. helpstring("IMPCUpload Interface"),
  108. pointer_default(unique)
  109. ]
  110. interface IMPCUpload : IDispatch
  111. {
  112. [propget, id(DISPID_NEWENUM), ] HRESULT _NewEnum( [out, retval] IUnknown* *pVal );
  113. [ id(DISPID_VALUE), ] HRESULT Item ( [in] long index, [out, retval] IMPCUploadJob* *pVal );
  114. [propget, id(DISPID_UL_UPLOAD_COUNT)] HRESULT Count ( [out, retval] long *pVal );
  115. [id(DISPID_UL_UPLOAD_CREATEJOB)] HRESULT CreateJob( [out, retval ] IMPCUploadJob* *pVal );
  116. };
  117. [
  118. object,
  119. uuid(8E82AD14-D1A3-11D2-9374-00C04F72DAF7),
  120. dual,
  121. helpstring("IMPCConnection Interface"),
  122. pointer_default(unique)
  123. ]
  124. interface IMPCConnection : IDispatch
  125. {
  126. [propget, id(DISPID_UL_CONNECTION_AVAILABLE)] HRESULT Available( [out, retval] VARIANT_BOOL *pfOnline );
  127. [propget, id(DISPID_UL_CONNECTION_ISAMODEM )] HRESULT IsAModem ( [out, retval] VARIANT_BOOL *pfModem );
  128. [propget, id(DISPID_UL_CONNECTION_BANDWIDTH)] HRESULT Bandwidth( [out, retval] long *pdwBandwidth );
  129. };
  130. ///////////////////////////////////////////////////////////////////////////////
  131. ///////////////////////////////////////////////////////////////////////////////
  132. ///////////////////////////////////////////////////////////////////////////////
  133. [
  134. uuid(8E82AD00-D1A3-11D2-9374-00C04F72DAF7),
  135. version(1.0),
  136. helpstring("UploadManager 1.0 Type Library")
  137. ]
  138. library UPLOADMANAGERLib
  139. {
  140. importlib("stdole32.tlb");
  141. importlib("stdole2.tlb");
  142. dispinterface DMPCUploadEvents;
  143. interface IMPCUploadJob;
  144. interface IConnectionPointContainer;
  145. interface IConnectionPoint;
  146. [
  147. uuid(8E82AD02-D1A3-11D2-9374-00C04F72DAF7),
  148. helpstring("MPCUpload Class")
  149. ]
  150. coclass MPCUpload
  151. {
  152. [default] interface IMPCUpload;
  153. };
  154. [
  155. uuid(8E82AD03-D1A3-11D2-9374-00C04F72DAF7),
  156. helpstring("MPCConnection Class")
  157. ]
  158. coclass MPCConnection
  159. {
  160. [default] interface IMPCConnection;
  161. };
  162. [
  163. uuid(8E82AD04-D1A3-11D2-9374-00C04F72DAF7),
  164. helpstring("MPCUploadJob Class"),
  165. noncreatable
  166. ]
  167. coclass MPCUploadJob
  168. {
  169. [default] interface IMPCUploadJob;
  170. [default, source] dispinterface DMPCUploadEvents;
  171. }
  172. ////////////////////////////////////////////////////////////////////////////////
  173. [
  174. uuid(8E82AD05-D1A3-11D2-9374-00C04F72DAF7),
  175. helpstring("MPCUploadReal Class")
  176. ]
  177. coclass MPCUploadReal
  178. {
  179. [default] interface IMPCUpload;
  180. };
  181. [
  182. uuid(8E82AD06-D1A3-11D2-9374-00C04F72DAF7),
  183. helpstring("MPCConnectionReal Class")
  184. ]
  185. coclass MPCConnectionReal
  186. {
  187. [default] interface IMPCConnection;
  188. };
  189. };