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.

362 lines
14 KiB

  1. /*++
  2. Copyright (c) 1999-2000 Microsoft Corporation
  3. Module Name:
  4. RDCHOST.IDL
  5. Abstract:
  6. Remote Desktopping Client-Side IDL for Core Remote Desktopping Interfaces
  7. and Classes
  8. Author:
  9. Tad Brockway 02/00
  10. Revision History:
  11. --*/
  12. import "oaidl.idl";
  13. import "ocidl.idl";
  14. import "rdschan.idl";
  15. import "rderror.idl";
  16. #include "olectl.h"
  17. /**
  18. ** IDataChannelIO
  19. **
  20. ** Non-Public Data Channel IO Interface
  21. **/
  22. [
  23. object,
  24. uuid(43A09182-0472-436E-9883-2D95C347C5F1),
  25. helpstring("IDataChannelIO Interface"),
  26. pointer_default(unique)
  27. ]
  28. interface IDataChannelIO : IUnknown
  29. {
  30. [helpstring("method SendData")] HRESULT SendData([in]BSTR data);
  31. [propput, helpstring("property ChannelMgr")] HRESULT ChannelMgr(
  32. [in] ISAFRemoteDesktopChannelMgr *newVal
  33. );
  34. };
  35. /**
  36. ** ISAFRemoteDesktopClient Interface
  37. **/
  38. cpp_quote("")
  39. cpp_quote("#define DISPID_RDSCLIENT_CHANNELMANAGER 1")
  40. cpp_quote("#define DISPID_RDSCLIENT_CONNECTPARMS 2")
  41. cpp_quote("#define DISPID_RDSCLIENT_CONNECTTOSERVER 3")
  42. cpp_quote("#define DISPID_RDSCLIENT_CONNECTREMOTEDESKTOP 4")
  43. cpp_quote("#define DISPID_RDSCLIENT_DISCONNECTREMOTEDESKTOP 5")
  44. cpp_quote("#define DISPID_RDSCLIENT_ISREMOTEDESKTOPCONNECTED 6")
  45. cpp_quote("#define DISPID_RDSCLIENT_ISSERVERCONNECTED 7")
  46. cpp_quote("#define DISPID_RDSCLIENT_DISCONNECTFROMSERVER 8")
  47. cpp_quote("#define DISPID_RDSCLIENT_ONCONNECTED 9")
  48. cpp_quote("#define DISPID_RDSCLIENT_ONDISCONNECTED 10")
  49. cpp_quote("#define DISPID_RDSCLIENT_ONCONNECTREMOTEDESKTOPCOMPLETE 11")
  50. cpp_quote("#define DISPID_RDSCLIENT_EXTENDEDERRORINFO 12")
  51. cpp_quote("#define DISPID_RDSCLIENT_ENABLESMARTSIZING 13")
  52. cpp_quote("#define DISPID_RDSCLIENT_CONNECTEDSERVER 14")
  53. cpp_quote("#define DISPID_RDSCLIENT_CONNECTEDPORT 15")
  54. cpp_quote("#define DISPID_RDSCLIENT_CREATELISTENENDPOINT 16")
  55. cpp_quote("#define DISPID_RDSCLIENT_STARTLISTEN 17")
  56. cpp_quote("#define DISPID_RDSCLIENT_ACCEPTCONNECTION 18")
  57. cpp_quote("#define DISPID_RDSCLIENT_STOPLISTEN 19")
  58. cpp_quote("#define DISPID_RDSCLIENT_ONLISTENCONNECT 20")
  59. cpp_quote("#define DISPID_RDSCLIENT_COLORDEPTH 21")
  60. cpp_quote("#define DISPID_RDSCLIENT_ONBEGINCONNECT 22")
  61. cpp_quote("")
  62. #define DISPID_RDSCLIENT_CHANNELMANAGER 1
  63. #define DISPID_RDSCLIENT_CONNECTPARMS 2
  64. #define DISPID_RDSCLIENT_CONNECTTOSERVER 3
  65. #define DISPID_RDSCLIENT_CONNECTREMOTEDESKTOP 4
  66. #define DISPID_RDSCLIENT_DISCONNECTREMOTEDESKTOP 5
  67. #define DISPID_RDSCLIENT_ISREMOTEDESKTOPCONNECTED 6
  68. #define DISPID_RDSCLIENT_ISSERVERCONNECTED 7
  69. #define DISPID_RDSCLIENT_DISCONNECTFROMSERVER 8
  70. #define DISPID_RDSCLIENT_ONCONNECTED 9
  71. #define DISPID_RDSCLIENT_ONDISCONNECTED 10
  72. #define DISPID_RDSCLIENT_ONCONNECTREMOTEDESKTOPCOMPLETE 11
  73. #define DISPID_RDSCLIENT_EXTENDEDERRORINFO 12
  74. #define DISPID_RDSCLIENT_ENABLESMARTSIZING 13
  75. #define DISPID_RDSCLIENT_CONNECTEDSERVER 14
  76. #define DISPID_RDSCLIENT_CONNECTEDPORT 15
  77. #define DISPID_RDSCLIENT_CREATELISTENENDPOINT 16
  78. #define DISPID_RDSCLIENT_STARTLISTEN 17
  79. #define DISPID_RDSCLIENT_ACCEPTCONNECTION 18
  80. #define DISPID_RDSCLIENT_STOPLISTEN 19
  81. #define DISPID_RDSCLIENT_ONLISTENCONNECT 20
  82. #define DISPID_RDSCLIENT_COLORDEPTH 21
  83. #define DISPID_RDSCLIENT_ONBEGINCONNECT 22
  84. [
  85. object,
  86. uuid(8AA5F108-2918-435C-88AA-DE0AFEE51440),
  87. dual,
  88. helpstring("ISAFRemoteDesktopClient Interface"),
  89. pointer_default(unique)
  90. ]
  91. interface ISAFRemoteDesktopClient : IDispatch
  92. {
  93. [propget, id(DISPID_RDSCLIENT_CHANNELMANAGER), helpstring("ChannelManager")]
  94. HRESULT ChannelManager([out, retval]ISAFRemoteDesktopChannelMgr **mgr);
  95. [propput, id(DISPID_RDSCLIENT_CONNECTPARMS), helpstring("ConnectParms")]
  96. HRESULT ConnectParms([in]BSTR parms);
  97. [propget, id(DISPID_RDSCLIENT_CONNECTPARMS), helpstring("ConnectParms")]
  98. HRESULT ConnectParms([out, retval]BSTR *parms);
  99. [id(DISPID_RDSCLIENT_CONNECTTOSERVER), helpstring("method ConnectToServer")]
  100. HRESULT ConnectToServer([in] BSTR expertBlob);
  101. [id(DISPID_RDSCLIENT_CONNECTREMOTEDESKTOP), helpstring("method ConnectRemoteDesktop")]
  102. HRESULT ConnectRemoteDesktop();
  103. [id(DISPID_RDSCLIENT_DISCONNECTREMOTEDESKTOP), helpstring("method DisconnectRemoteDesktop")]
  104. HRESULT DisconnectRemoteDesktop();
  105. [propget, id(DISPID_RDSCLIENT_ISREMOTEDESKTOPCONNECTED), helpstring("property IsRemoteDesktopConnected")]
  106. HRESULT IsRemoteDesktopConnected([out, retval] BOOL *pVal);
  107. [propget, id(DISPID_RDSCLIENT_ISSERVERCONNECTED), helpstring("property IsServerConnected")]
  108. HRESULT IsServerConnected([out, retval] BOOL *pVal);
  109. [id(DISPID_RDSCLIENT_DISCONNECTFROMSERVER), helpstring("method DisconnectFromServer")]
  110. HRESULT DisconnectFromServer();
  111. [propput, id(DISPID_RDSCLIENT_ONCONNECTED), helpstring("OnConnected")]
  112. HRESULT OnConnected([in] IDispatch *iDisp);
  113. [propput, id(DISPID_RDSCLIENT_ONDISCONNECTED), helpstring("OnDisconnected")]
  114. HRESULT OnDisconnected([in] IDispatch *iDisp);
  115. [propput, id(DISPID_RDSCLIENT_ONCONNECTREMOTEDESKTOPCOMPLETE), helpstring("OnConnectRemoteDesktopComplete")]
  116. HRESULT OnConnectRemoteDesktopComplete([in] IDispatch *iDisp);
  117. [propget, id(DISPID_RDSCLIENT_EXTENDEDERRORINFO), helpstring("ExtendedErrorInfo")]
  118. HRESULT ExtendedErrorInfo([out, retval]LONG *error);
  119. [propput, id(DISPID_RDSCLIENT_ENABLESMARTSIZING), helpstring("EnableSmartSizing")]
  120. HRESULT EnableSmartSizing([in] BOOL val);
  121. [propget, id(DISPID_RDSCLIENT_ENABLESMARTSIZING), helpstring("EnableSmartSizing")]
  122. HRESULT EnableSmartSizing([out, retval]BOOL *val);
  123. [propget, id(DISPID_RDSCLIENT_CONNECTEDSERVER), helpstring("ConnectedServer")]
  124. HRESULT ConnectedServer([out, retval]BSTR *val);
  125. [propget, id(DISPID_RDSCLIENT_CONNECTEDPORT), helpstring("ConnectedPort")]
  126. HRESULT ConnectedPort([out, retval]LONG *val);
  127. // Create a listening endpoint and return connect parm
  128. [id(DISPID_RDSCLIENT_CREATELISTENENDPOINT), helpstring("CreateListenEndpoint")]
  129. HRESULT CreateListenEndpoint([in] LONG port, [out, retval] BSTR* pConnectParm);
  130. // Wait for incoming connection ISAFRemoteDesktopServerHost
  131. [id(DISPID_RDSCLIENT_STARTLISTEN), helpstring("StartListen")]
  132. HRESULT StartListen([in] LONG timeout);
  133. [id(DISPID_RDSCLIENT_ACCEPTCONNECTION), helpstring("AcceptListenConnection")]
  134. HRESULT AcceptListenConnection([in]BSTR expertBlob);
  135. // no event is fired.
  136. [id(DISPID_RDSCLIENT_STOPLISTEN), helpstring("StopListen")]
  137. HRESULT StopListen();
  138. [propput, id(DISPID_RDSCLIENT_ONLISTENCONNECT), helpstring("OnListenConnect")]
  139. HRESULT OnListenConnect([in] IDispatch *iDisp);
  140. //set and get the colordepths
  141. [propput, id(DISPID_RDSCLIENT_COLORDEPTH), helpstring("ColorDepth")]
  142. HRESULT ColorDepth([in] LONG val);
  143. [propget, id(DISPID_RDSCLIENT_COLORDEPTH), helpstring("ColorDepth")]
  144. HRESULT ColorDepth([out, retval] LONG* val);
  145. [propput, id(DISPID_RDSCLIENT_ONBEGINCONNECT), helpstring("OnBeginConnect")]
  146. HRESULT OnBeginConnect([in] IDispatch *iDisp);
  147. };
  148. [
  149. object,
  150. uuid(69DE5BF3-5EB9-4158-81DA-6FD662BBDDDD),
  151. dual,
  152. helpstring("ISAFRemoteDesktopClientHost Interface"),
  153. pointer_default(unique)
  154. ]
  155. interface ISAFRemoteDesktopClientHost : IDispatch
  156. {
  157. [id(1), helpstring("method GetRemoteDesktopClient")]
  158. HRESULT GetRemoteDesktopClient([out, retval] ISAFRemoteDesktopClient **client);
  159. };
  160. [
  161. object,
  162. uuid(5C7A32EF-1C77-4F35-8FBA-729DD2DE7222),
  163. dual,
  164. helpstring("ISAFRemoteDesktopTestExtension Interface"),
  165. pointer_default(unique)
  166. ]
  167. interface ISAFRemoteDesktopTestExtension : IDispatch
  168. {
  169. [propput, id(1), helpstring("property TestExtDllName")] HRESULT TestExtDllName([in] BSTR newVal);
  170. [propput, id(2), helpstring("property TestExtParams")] HRESULT TestExtParams([in] BSTR newVal);
  171. };
  172. /**
  173. ** RDSClientHost Type Lib
  174. **/
  175. cpp_quote("")
  176. cpp_quote("#define DISPID_RDSCLIENTEVENTS_CONNECTED 2")
  177. cpp_quote("#define DISPID_RDSCLIENTEVENTS_DISCONNECTED 3")
  178. cpp_quote("#define DISPID_RDSCLIENTEVENTS_REMOTECONTROLREQUESTCOMPLETE 4")
  179. cpp_quote("#define DISPID_DATACHANNELEVEVENTS_DATAREADY 1")
  180. cpp_quote("#define DISPID_RDSCLIENTEVENTS_LISTENCONNECT 5")
  181. cpp_quote("#define DISPID_RDSCLIENTEVENTS_BEGINCONNECT 6")
  182. cpp_quote("")
  183. #define DISPID_RDSCLIENTEVENTS_CONNECTED 2
  184. #define DISPID_RDSCLIENTEVENTS_DISCONNECTED 3
  185. #define DISPID_RDSCLIENTEVENTS_REMOTECONTROLREQUESTCOMPLETE 4
  186. #define DISPID_DATACHANNELEVEVENTS_DATAREADY 1
  187. #define DISPID_RDSCLIENTEVENTS_LISTENCONNECT 5
  188. #define DISPID_RDSCLIENTEVENTS_BEGINCONNECT 6
  189. cpp_quote("")
  190. cpp_quote("#define DISPID_RDSCHANNELEVENTS_CHANNELDATAREADY 1")
  191. cpp_quote("")
  192. #define DISPID_RDSCHANNELEVENTS_CHANNELDATAREADY 1
  193. [
  194. uuid(97917068-BB0B-4DDA-8067-B1A00C890F44),
  195. version(1.0),
  196. helpstring("RDCClientHost 1.0 Type Library")
  197. ]
  198. library RDCCLIENTHOSTLib
  199. {
  200. importlib("stdole2.tlb");
  201. /* TODO: Find a way to define this in a common location, instead of in the client and server IDL */
  202. //
  203. // Changes made here must be reflected in the server RDSHost IDL.
  204. //
  205. cpp_quote("")
  206. cpp_quote("#define DISPID_RDSCHANNELEVENTS_CHANNELDATAREADY 1")
  207. cpp_quote("")
  208. #define DISPID_RDSCHANNELEVENTS_CHANNELDATAREADY 1
  209. [
  210. uuid(59AE79BC-9721-42df-9396-9D98E7F7A396),
  211. helpstring("_ISAFRemoteDesktopDataChannelEvents Interface")
  212. ]
  213. dispinterface _ISAFRemoteDesktopDataChannelEvents
  214. {
  215. properties:
  216. methods:
  217. [id(DISPID_RDSCHANNELEVENTS_CHANNELDATAREADY), helpstring("method ChannelDataReady")]
  218. void ChannelDataReady([in]BSTR channelName);
  219. };
  220. [
  221. uuid(299BE050-E83E-4DB7-A7DA-D86FDEBFE6D0),
  222. helpstring("RemoteDesktopClientHost Class")
  223. ]
  224. coclass SAFRemoteDesktopClientHost
  225. {
  226. [default] interface ISAFRemoteDesktopClientHost;
  227. };
  228. [
  229. uuid(C91C2A81-8B14-4a96-A5DB-4640F551F3EE),
  230. helpstring("ClientDataChannel Class")
  231. ]
  232. coclass ClientDataChannel
  233. {
  234. [default] interface ISAFRemoteDesktopDataChannel;
  235. [default, source] dispinterface _ISAFRemoteDesktopDataChannelEvents;
  236. };
  237. [
  238. uuid(078BB428-FA9B-43f1-B002-1ABF3A8C95CF),
  239. helpstring("ClientRemoteDesktopChannelMgr Class")
  240. ]
  241. coclass ClientRemoteDesktopChannelMgr
  242. {
  243. [default] interface ISAFRemoteDesktopChannelMgr;
  244. [source] dispinterface _ISAFRemoteDesktopDataChannelEvents;
  245. };
  246. [
  247. uuid(327A98F6-B337-43B0-A3DE-408B46E6C4CE),
  248. helpstring("_ISAFRemoteDesktopClientEvents Interface")
  249. ]
  250. dispinterface _ISAFRemoteDesktopClientEvents
  251. {
  252. properties:
  253. methods:
  254. [id(DISPID_RDSCLIENTEVENTS_CONNECTED), helpstring("method Connected")] void Connected();
  255. [id(DISPID_RDSCLIENTEVENTS_DISCONNECTED), helpstring("method Disconnected")]
  256. void Disconnected([in]long reason);
  257. [id(DISPID_RDSCLIENTEVENTS_REMOTECONTROLREQUESTCOMPLETE), helpstring("method RemoteControlRequestComplete")]
  258. void RemoteControlRequestComplete([in]long status);
  259. // Fire SAFERROR_NOERROR - listen connection established
  260. // SAFERROR_CONNECTIONTIMEDOUT - listen timeout
  261. // SAFERROR_OUTOFMEMORY - out of memory
  262. // SAFERROR_INTERNALERROR - internal error
  263. [id(DISPID_RDSCLIENTEVENTS_LISTENCONNECT), helpstring("method ListenConnect")]
  264. void ListenConnect([in]long status);
  265. [id(DISPID_RDSCLIENTEVENTS_BEGINCONNECT), helpstring("method BeginConnect")]
  266. void BeginConnect();
  267. };
  268. [
  269. uuid(85C037E5-743F-4938-936B-A8DB95430391),
  270. helpstring("_IDataChannelIOEvents Interface")
  271. ]
  272. dispinterface _IDataChannelIOEvents
  273. {
  274. properties:
  275. methods:
  276. [id(DISPID_DATACHANNELEVEVENTS_DATAREADY), helpstring("method DataReady")]
  277. void DataReady([in]BSTR data);
  278. };
  279. [
  280. uuid(B90D0115-3AEA-45D3-801E-93913008D49E),
  281. helpstring("RemoteDesktopClient Class")
  282. ]
  283. coclass SAFRemoteDesktopClient
  284. {
  285. [default] interface ISAFRemoteDesktopClient;
  286. interface ISAFRemoteDesktopTestExtension;
  287. [source] dispinterface _ISAFRemoteDesktopClientEvents;
  288. };
  289. [
  290. uuid(F137E241-0092-4575-976A-D3E33980BB26),
  291. helpstring("TSRDPRemoteDesktopClient Class")
  292. ]
  293. coclass TSRDPRemoteDesktopClient
  294. {
  295. [default] interface ISAFRemoteDesktopClient;
  296. interface ISAFRemoteDesktopTestExtension;
  297. [source] dispinterface _ISAFRemoteDesktopClientEvents;
  298. };
  299. };