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.

295 lines
14 KiB

  1. //*********************************************************************
  2. //* Microsoft Windows **
  3. //* Copyright(c) Microsoft Corp., 1999 **
  4. //*********************************************************************
  5. //
  6. // OBCOMM_C.IDL -
  7. // Component description and Type Library for
  8. // ObCommunicationManager (MSOBCOMM)
  9. //
  10. // HISTORY:
  11. //
  12. // 1/27/99 a-jaswed Created.
  13. import "unknwn.idl";
  14. import "oaidl.idl";
  15. // Definitions of IConnectionPoint
  16. import "ocidl.idl" ;
  17. #include "dispids.h"
  18. ///////////////////////////////////////////////////////////
  19. //
  20. //
  21. // Component descriptions
  22. //
  23. ///////////////////////////////////////////////////////////
  24. // Interface IObCommunicationManager
  25. //
  26. [
  27. object,
  28. uuid(B9B3DB10-BD64-11D2-9D65-00C04F7F8935),
  29. helpstring("IObCommunicationManager Interface"),
  30. pointer_default(unique)
  31. ]
  32. interface IObCommunicationManager : IUnknown
  33. {
  34. HRESULT CheckDialReady ([out] DWORD* pdwRetVal);
  35. HRESULT ListenToCommunicationEvents ([in] IUnknown* pUnk);
  36. HRESULT SetupForDialing ([in] UINT nType,
  37. [in] BSTR bstrISPFile,
  38. [in] DWORD dwCountry,
  39. [in] BSTR bstrAreaCode,
  40. [in] DWORD dwFlag,
  41. [in] DWORD dwAppMode,
  42. [in] DWORD dwMigISPIdx);
  43. HRESULT DoConnect ([out] BOOL* pbRetVal);
  44. HRESULT DoHangup ();
  45. HRESULT GetDialPhoneNumber ([out] BSTR* pVal);
  46. HRESULT PutDialPhoneNumber ([in] BSTR newVal);
  47. HRESULT GetDialErrorMsg ([out] BSTR* pVal);
  48. HRESULT GetSupportNumber ([out] BSTR* pVal);
  49. HRESULT RemoveConnectoid ([out] BOOL* pbRetVal);
  50. HRESULT FetchPage ([in] BSTR szURL,
  51. [out] BSTR* szLocalFile);
  52. HRESULT DownloadFileBuffer ([out] BSTR* pVal);
  53. HRESULT ProcessINS ([in] BSTR bstrINSFilePath,
  54. [out] BOOL *pbRetVal);
  55. HRESULT SetRASCallbackHwnd ([in] HWND hwndCallback);
  56. HRESULT GetSignupURL ([out] BSTR *pVal);
  57. HRESULT GetReconnectURL ([out] BSTR *pVal);
  58. HRESULT GetFile ([in] BSTR szUTL, [in] BSTR );
  59. HRESULT CheckPhoneBook ([in] BSTR bstrISPFile,
  60. [in] DWORD dwCountry,
  61. [in] BSTR bstrAreaCode,
  62. [in] DWORD dwFlag,
  63. [out] BOOL *pbRetVal);
  64. HRESULT RestoreConnectoidInfo ();
  65. HRESULT SetPreloginMode ([in] BOOL bVal);
  66. HRESULT GetConnectionType ([out] DWORD *pdwVal);
  67. HRESULT CheckKbdMouse ([out] DWORD* pdwRetVal);
  68. HRESULT OnDownloadEvent ([in] UINT uMsg,
  69. [in] WPARAM wParam,
  70. [in] LPARAM lParam,
  71. [in] BOOL* bHandled);
  72. HRESULT GetISPList ([out] BSTR* pVal);
  73. HRESULT Set_SelectISP ([in] UINT nVal);
  74. HRESULT Set_ConnectionMode ([in] UINT nVal);
  75. HRESULT Get_ConnectionMode ([out] UINT *pnVal);
  76. HRESULT DownloadReferralOffer ([out] BOOL *pbVal);
  77. HRESULT DownloadISPOffer ([out] BOOL *pbVal, [out] BSTR *pVal);
  78. HRESULT Get_ISPName ([out] BSTR* pVal);
  79. HRESULT RemoveDownloadDir ();
  80. HRESULT PostRegData ([in] DWORD dwSrvType,
  81. [in] BSTR bstrRegUrl);
  82. HRESULT CheckOnlineStatus ([out] BOOL *pbVal);
  83. HRESULT Connect ([in] UINT nType,
  84. [in] BSTR bstrISPFile,
  85. [in] DWORD dwCountry,
  86. [in] BSTR bstrAreaCode,
  87. [in] DWORD dwFlag,
  88. [in] DWORD dwAppMode);
  89. HRESULT CheckStayConnected ([in] BSTR bstrISPFile,
  90. [out] BOOL *pbVal);
  91. HRESULT CreateIcsBot ([out] DWORD *pdwRetVal);
  92. HRESULT IsIcsAvailable ([out] BOOL *bRetVal);
  93. HRESULT IsCallbackUsed ([out] BOOL *bRetVal);
  94. HRESULT NotifyIcsMgr ([in] UINT msg,
  95. [in] WPARAM wParam,
  96. [in] LPARAM lParam);
  97. HRESULT NotifyIcsUsage ([in] BOOL bParam);
  98. HRESULT GetPhoneBookNumber ([out] BSTR* pVal);
  99. HRESULT TriggerIcsCallback ([in] BOOL bParam);
  100. HRESULT IsIcsHostReachable ([out] BOOL *bRetVal);
  101. };
  102. cpp_quote("// Connection type bitmasks")
  103. cpp_quote("//")
  104. cpp_quote("// No attempt has been made at detecting connections or an")
  105. cpp_quote("// attempt was made but failed. This is different from")
  106. cpp_quote("// CONNECTIONTYPE_NONE in that it indicates that another attempt")
  107. cpp_quote("// should be made to determine if connections exist.")
  108. cpp_quote("//")
  109. cpp_quote("#define CONNECTIONTYPE_INVALID 0x00000000")
  110. cpp_quote("")
  111. cpp_quote("// No connection devices exist")
  112. cpp_quote("//")
  113. cpp_quote("#define CONNECTIONTYPE_NONE 0x00000001")
  114. cpp_quote("")
  115. cpp_quote("// A modem is installed")
  116. cpp_quote("//")
  117. cpp_quote("#define CONNECTIONTYPE_MODEM 0x00000002")
  118. cpp_quote("")
  119. cpp_quote("// A network card is present and the ICS beacon was detected")
  120. cpp_quote("//")
  121. cpp_quote("#define CONNECTIONTYPE_LAN_ICS 0x00000004")
  122. cpp_quote("")
  123. cpp_quote("// A network card is present but ICS was not detected")
  124. cpp_quote("//")
  125. cpp_quote("#define CONNECTIONTYPE_LAN_BROADBAND 0x00000008")
  126. cpp_quote("")
  127. cpp_quote("// Multiple network cards were present and ICS was not detected. It is not")
  128. cpp_quote("// possible to determine which card to use.")
  129. cpp_quote("//")
  130. cpp_quote("#define CONNECTIONTYPE_LAN_INDETERMINATE 0x00000010")
  131. cpp_quote("")
  132. cpp_quote("// An ISDN, PPPoE connection is present")
  133. cpp_quote("//")
  134. cpp_quote("#define CONNECTIONTYPE_OTHER 0x00000020")
  135. cpp_quote("")
  136. ///////////////////////////////////////////////////////////
  137. // Interface IObCommunicationManager2
  138. //
  139. [
  140. object,
  141. uuid(B9B3DB14-BD64-11D2-9D65-00C04F7F8935),
  142. helpstring("IObCommunicationManager2 Interface"),
  143. pointer_default(unique)
  144. ]
  145. interface IObCommunicationManager2 : IObCommunicationManager
  146. {
  147. HRESULT CreateModemConnectoid ([in] BSTR bstrPhoneBook,
  148. [in] BSTR bstrConnectionName,
  149. [in] DWORD dwCountryID,
  150. [in] DWORD dwCountryCode,
  151. [in] BSTR bstrAreaCode,
  152. [in] BSTR bstrPhoneNumber,
  153. [in] BOOL fAutoIPAddress,
  154. [in] DWORD ipaddr_A,
  155. [in] DWORD ipaddr_B,
  156. [in] DWORD ipaddr_C,
  157. [in] DWORD ipaddr_D,
  158. [in] BOOL fAutoDNS,
  159. [in] DWORD ipaddrDns_A,
  160. [in] DWORD ipaddrDns_B,
  161. [in] DWORD ipaddrDns_C,
  162. [in] DWORD ipaddrDns_D,
  163. [in] DWORD ipaddrDnsAlt_A,
  164. [in] DWORD ipaddrDnsAlt_B,
  165. [in] DWORD ipaddrDnsAlt_C,
  166. [in] DWORD ipaddrDnsAlt_D,
  167. [in] BSTR bstrUserName,
  168. [in] BSTR bstrPassword);
  169. HRESULT CreatePppoeConnectoid ([in] BSTR bstrPhoneBook,
  170. [in] BSTR bstrConnectionName,
  171. [in] BSTR bstrBroadbandService,
  172. [in] BOOL fAutoIPAddress,
  173. [in] DWORD ipaddr_A,
  174. [in] DWORD ipaddr_B,
  175. [in] DWORD ipaddr_C,
  176. [in] DWORD ipaddr_D,
  177. [in] BOOL fAutoDNS,
  178. [in] DWORD ipaddrDns_A,
  179. [in] DWORD ipaddrDns_B,
  180. [in] DWORD ipaddrDns_C,
  181. [in] DWORD ipaddrDns_D,
  182. [in] DWORD ipaddrDnsAlt_A,
  183. [in] DWORD ipaddrDnsAlt_B,
  184. [in] DWORD ipaddrDnsAlt_C,
  185. [in] DWORD ipaddrDnsAlt_D,
  186. [in] BSTR bstrUserName,
  187. [in] BSTR bstrPassword);
  188. HRESULT SetPreferredConnectionTcpipProperties
  189. ([in] BOOL fAutoIPAddress,
  190. [in] DWORD StaticIp_A,
  191. [in] DWORD StaticIp_B,
  192. [in] DWORD StaticIp_C,
  193. [in] DWORD StaticIp_D,
  194. [in] DWORD SubnetMask_A,
  195. [in] DWORD SubnetMask_B,
  196. [in] DWORD SubnetMask_C,
  197. [in] DWORD SubnetMask_D,
  198. [in] DWORD DefGateway_A,
  199. [in] DWORD DefGateway_B,
  200. [in] DWORD DefGateway_C,
  201. [in] DWORD DefGateway_D,
  202. [in] BOOL fAutoDNS,
  203. [in] DWORD DnsPref_A,
  204. [in] DWORD DnsPref_B,
  205. [in] DWORD DnsPref_C,
  206. [in] DWORD DnsPref_D,
  207. [in] DWORD DnsAlt_A,
  208. [in] DWORD DnsAlt_B,
  209. [in] DWORD DnsAlt_C,
  210. [in] DWORD DnsAlt_D,
  211. [in] BOOL fFirewallRequired
  212. );
  213. HRESULT DoFinalTasks ([out] BOOL* pfRebootRequired);
  214. HRESULT GetConnectionCapabilities ([out] DWORD* pdwConnectionCapabilities);
  215. HRESULT GetPreferredConnection ([out] DWORD* pdwPreferredConnection
  216. );
  217. HRESULT SetPreferredConnection ([in] const DWORD dwPreferredConnection,
  218. [out, retval] BOOL* pfSupportedType);
  219. HRESULT SetDialAlternative ([in] BOOL fDialAlternative);
  220. HRESULT ConnectedToInternet ([out, retval] BOOL* pfConnected);
  221. HRESULT ConnectedToInternetEx ([out, retval] BOOL* pfConnected);
  222. HRESULT AsyncConnectedToInternetEx ([in] const HWND hwnd);
  223. HRESULT OobeAutodial ();
  224. HRESULT OobeAutodialHangup ();
  225. HRESULT FirewallPreferredConnection ([in] BOOL fFirewall);
  226. HRESULT UseWinntProxySettings ();
  227. HRESULT DisableWinntProxySettings ();
  228. HRESULT GetProxySettings ([out] BOOL* pbUseAuto,
  229. [out] BOOL* pbUseScript,
  230. [out] BSTR* pszScriptUrl,
  231. [out] BOOL* pbUseProxy,
  232. [out] BSTR* pszProxy
  233. );
  234. HRESULT SetProxySettings ([in] BOOL bUseAuto,
  235. [in] BOOL bUseScript,
  236. [in] BSTR szScriptUrl,
  237. [in] BOOL bUseProxy,
  238. [in] BSTR szProxy
  239. );
  240. HRESULT SetICWCompleted ([in] BOOL bMultiUser);
  241. HRESULT GetPublicLanCount ([out, retval] int* pcPublicLan);
  242. HRESULT SetExclude1394 ([in] BOOL bExclude);
  243. HRESULT GnsAutodial ([in] BOOL bEnabled,
  244. [in] BSTR bstrUserSection
  245. );
  246. };
  247. ///////////////////////////////////////////////////////////
  248. // ObCommunicationManager Type Library
  249. //
  250. [
  251. uuid(B9B3DB11-BD64-11D2-9D65-00C04F7F8935),
  252. version(1.0),
  253. helpstring("ObCommunicationManager 1.0 Type Library")
  254. ]
  255. library ObCommunicationManagerLib
  256. {
  257. importlib("stdole32.tlb");
  258. [
  259. uuid(B9B3DB13-BD64-11D2-9D65-00C04F7F8935),
  260. helpstring("Event interface for ObCommunicationManager")
  261. ]
  262. dispinterface DObCommunicationEvents
  263. {
  264. properties:
  265. methods:
  266. [id(DISPID_DIALING)] HRESULT Fire_Dialing ();
  267. [id(DISPID_CONNECTING)] HRESULT Fire_Connecting ();
  268. [id(DISPID_DIALINGERROR)] HRESULT Fire_DialError ([in] DWORD dwErrorCode);
  269. [id(DISPIP_CONNECTIONCOMPLETE)] HRESULT Fire_ConnectionComplete ();
  270. [id(DISPIP_DOWNLOADCOMPLETE)] HRESULT Fire_DownloadComplete ();
  271. };
  272. //
  273. // ObCommunicationManager
  274. //
  275. [
  276. uuid(B9B3DB12-BD64-11D2-9D65-00C04F7F8935),
  277. helpstring("ObCommunicationManager Class")
  278. ]
  279. coclass ObCommunicationManager
  280. {
  281. [default] interface IObCommunicationManager2;
  282. interface IConnectionPointContainer ;
  283. [default, source] dispinterface DObCommunicationEvents;
  284. };
  285. };