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.

286 lines
10 KiB

  1. /*++
  2. Copyright (c) 1999-2000 Microsoft Corporation
  3. Module Name:
  4. RDSHOST.IDL
  5. Abstract:
  6. Remote Desktopping Server-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. /**
  16. ** Remote Desktop Sharing class.
  17. **/
  18. typedef [
  19. uuid(34b3166d-870a-4f39-9e2a-09fd8d31ad83),
  20. helpstring("Remote Desktop Sharing Class")
  21. ]
  22. enum {
  23. [helpstring("REMOTE DESKTOP SHARING CLASS")] DESKTOPSHARING_DEFAULT = 0x0000,
  24. NO_DESKTOP_SHARING = 0x0001,
  25. VIEWDESKTOP_PERMISSION_REQUIRE = 0x0002,
  26. VIEWDESKTOP_PERMISSION_NOT_REQUIRE = 0x0004,
  27. CONTROLDESKTOP_PERMISSION_REQUIRE = 0x0008,
  28. CONTROLDESKTOP_PERMISSION_NOT_REQUIRE = 0x00010,
  29. } REMOTE_DESKTOP_SHARING_CLASS;
  30. /**
  31. ** ISAFRemoteDesktopSession Interface
  32. **/
  33. cpp_quote("")
  34. cpp_quote("#define DISPID_RDSSESSION_CHANNELMANAGER 1")
  35. cpp_quote("#define DISPID_RDSSESSION_CONNECTPARMS 2")
  36. cpp_quote("#define DISPID_RDSSESSION_SHARINGCLASS 3")
  37. cpp_quote("#define DISPID_RDSSESSION_ONCONNECTED 4")
  38. cpp_quote("#define DISPID_RDSSESSION_ONDISCONNECTED 5")
  39. cpp_quote("#define DISPID_RDSSESSION_CLOSERDSSESSION 6")
  40. cpp_quote("#define DISPID_RDSSESSION_DISCONNECT 7")
  41. cpp_quote("#define DISPID_RDSSESSION_HELPSESSIONID 8")
  42. cpp_quote("#define DISPID_RDSSESSION_USERBLOB 9")
  43. cpp_quote("#define DISPID_RDSSESSION_EXPIRATETIME 10")
  44. cpp_quote("")
  45. #define DISPID_RDSSESSION_CHANNELMANAGER 1
  46. #define DISPID_RDSSESSION_CONNECTPARMS 2
  47. #define DISPID_RDSSESSION_SHARINGCLASS 3
  48. #define DISPID_RDSSESSION_ONCONNECTED 4
  49. #define DISPID_RDSSESSION_ONDISCONNECTED 5
  50. #define DISPID_RDSSESSION_CLOSERDSSESSION 6
  51. #define DISPID_RDSSESSION_DISCONNECT 7
  52. #define DISPID_RDSSESSION_HELPSESSIONID 8
  53. #define DISPID_RDSSESSION_USERBLOB 9
  54. #define DISPID_RDSSESSION_EXPIRETIME 10
  55. [
  56. object,
  57. uuid(9D8C82C9-A89F-42C5-8A52-FE2A77B00E82),
  58. dual,
  59. helpstring("ISAFRemoteDesktopSession Interface"),
  60. pointer_default(unique)
  61. ]
  62. interface ISAFRemoteDesktopSession : IDispatch
  63. {
  64. [propget, id(DISPID_RDSSESSION_CHANNELMANAGER), helpstring("ChannelManager")]
  65. HRESULT ChannelManager([out, retval]ISAFRemoteDesktopChannelMgr **mgr);
  66. [propget, id(DISPID_RDSSESSION_CONNECTPARMS), helpstring("ConnectParms")]
  67. HRESULT ConnectParms([out, retval]BSTR *parms);
  68. [propput, id(DISPID_RDSSESSION_SHARINGCLASS), helpstring("Sharing Class")]
  69. HRESULT SharingClass([in] REMOTE_DESKTOP_SHARING_CLASS sharingClass);
  70. [propget, id(DISPID_RDSSESSION_SHARINGCLASS), helpstring("Sharing Class")]
  71. HRESULT SharingClass([out, retval]REMOTE_DESKTOP_SHARING_CLASS *sharingClass);
  72. [id(DISPID_RDSSESSION_CLOSERDSSESSION), helpstring("method CloseRemoteDesktopSession")]
  73. HRESULT CloseRemoteDesktopSession();
  74. [id(DISPID_RDSSESSION_DISCONNECT), helpstring("method Disconnect")]
  75. HRESULT Disconnect();
  76. [propput, id(DISPID_RDSSESSION_ONCONNECTED), helpstring("OnConnected")]
  77. HRESULT OnConnected([in] IDispatch *iDisp);
  78. [propput, id(DISPID_RDSSESSION_ONDISCONNECTED), helpstring("OnDisconnected")]
  79. HRESULT OnDisconnected([in] IDispatch *iDisp);
  80. [propget, id(DISPID_RDSSESSION_HELPSESSIONID), helpstring("HelpSessionId")]
  81. HRESULT HelpSessionId([out, retval] BSTR* HelpId);
  82. [propget, id(DISPID_RDSSESSION_USERBLOB), helpstring("UserBlob")]
  83. HRESULT UserBlob([out, retval] BSTR* UserBlob);
  84. [propput, id(DISPID_RDSSESSION_USERBLOB), helpstring("UserBlob")]
  85. HRESULT UserBlob([in] BSTR UserBlob);
  86. [propget, id(DISPID_RDSSESSION_EXPIRETIME), helpstring("ExpireTime")]
  87. HRESULT ExpireTime([out, retval] DWORD* ExpireTime);
  88. };
  89. /**
  90. ** IRDSThreadBridge Interface
  91. **/
  92. [
  93. object,
  94. uuid(35B9A4B1-7CA6-4aec-8762-1B590056C05D),
  95. dual,
  96. helpstring("IRDSThreadBridge Interface"),
  97. pointer_default(unique)
  98. ]
  99. interface IRDSThreadBridge : IUnknown
  100. {
  101. [id(1), helpstring("method ClientConnectedNotify")] HRESULT ClientConnectedNotify();
  102. [id(2), helpstring("method ClientDisconnectedNotify")] HRESULT ClientDisconnectedNotify();
  103. [id(3), helpstring("method DataReadyNotify")] HRESULT DataReadyNotify([in]BSTR msg);
  104. };
  105. /**
  106. ** ISAFRemoteDesktopServerHost Interface
  107. **/
  108. cpp_quote("")
  109. cpp_quote("#define DISPID_RDSSERVERHOST_CREATERDSSESSION 1")
  110. cpp_quote("#define DISPID_RDSSERVERHOST_OPENRDSSESSION 2")
  111. cpp_quote("#define DISPID_RDSSERVERHOST_CLOSERDSSESSION 3")
  112. cpp_quote("#define DISPID_RDSSERVERHOST_DISCONNECTRDSSESSION 4")
  113. cpp_quote("#define DISPID_RDSSERVERHOST_CREATERDSSESSIONEX 5")
  114. cpp_quote("#define DISPID_RDSSERVERHOST_CONNECTEXPERT 6")
  115. cpp_quote("")
  116. #define DISPID_RDSSERVERHOST_CREATERDSSESSION 1
  117. #define DISPID_RDSSERVERHOST_OPENRDSSESSION 2
  118. #define DISPID_RDSSERVERHOST_CLOSERDSSESSION 3
  119. #define DISPID_RDSSERVERHOST_DISCONNECTRDSSESSION 4
  120. #define DISPID_RDSSERVERHOST_CREATERDSSESSIONEX 5
  121. #define DISPID_RDSSERVERHOST_CONNECTEXPERT 6
  122. [
  123. object,
  124. uuid(C9CCDEB3-A3DD-4673-B495-C1C89494D90E),
  125. dual,
  126. helpstring("ISAFRemoteDesktopServerHost Interface"),
  127. pointer_default(unique)
  128. ]
  129. interface ISAFRemoteDesktopServerHost : IDispatch
  130. {
  131. [id(DISPID_RDSSERVERHOST_CREATERDSSESSION), helpstring("method CreateRemoteDesktopSession")]
  132. HRESULT CreateRemoteDesktopSession(
  133. [in] REMOTE_DESKTOP_SHARING_CLASS sharingClass,
  134. [in] BOOL fEnableCallback,
  135. [in] LONG timeOut,
  136. [in] BSTR userHelpBlob,
  137. [out, retval] ISAFRemoteDesktopSession **
  138. );
  139. [id(DISPID_RDSSERVERHOST_CREATERDSSESSIONEX), helpstring("method CreateRemoteDesktopSessionEx")]
  140. HRESULT CreateRemoteDesktopSessionEx(
  141. [in] REMOTE_DESKTOP_SHARING_CLASS sharingClass,
  142. [in] BOOL fEnableCallback,
  143. [in] LONG timeOut,
  144. [in] BSTR userHelpBlob,
  145. [in] LONG tsSessionID,
  146. [in] BSTR userSID,
  147. [out, retval] ISAFRemoteDesktopSession **
  148. );
  149. [id(DISPID_RDSSERVERHOST_OPENRDSSESSION), helpstring("method OpenRemoteDesktopSession")]
  150. HRESULT OpenRemoteDesktopSession([in] BSTR parms, [in] BSTR userSID, [out, retval] ISAFRemoteDesktopSession **);
  151. [id(DISPID_RDSSERVERHOST_CLOSERDSSESSION), helpstring("method CloseRemoteDesktopSession")]
  152. HRESULT CloseRemoteDesktopSession([in] ISAFRemoteDesktopSession *);
  153. [id(DISPID_RDSSERVERHOST_CONNECTEXPERT), helpstring("method ConnectToExpert")]
  154. HRESULT ConnectToExpert([in] BSTR expertConnectParm, [in] LONG timeout, [out, retval] LONG* SafErrorCode);
  155. };
  156. /**
  157. ** RDSServerHost Type Lib
  158. **/
  159. cpp_quote("")
  160. cpp_quote("#define DISPID_RDSSESSIONSEVENTS_CLIENTCONNECTED 1")
  161. cpp_quote("#define DISPID_RDSSESSIONSEVENTS_CLIENTDISCONNECTED 2")
  162. cpp_quote("")
  163. #define DISPID_RDSSESSIONSEVENTS_CLIENTCONNECTED 1
  164. #define DISPID_RDSSESSIONSEVENTS_CLIENTDISCONNECTED 2
  165. cpp_quote("")
  166. cpp_quote("#define DISPID_RDSCHANNELEVENTS_CHANNELDATAREADY 1")
  167. cpp_quote("")
  168. #define DISPID_RDSCHANNELEVENTS_CHANNELDATAREADY 1
  169. [
  170. uuid(1B16CE61-2406-412F-969E-21BC082F76E8),
  171. version(1.0),
  172. helpstring("RDSServerHost 1.0 Type Library")
  173. ]
  174. library RDSSERVERHOSTLib
  175. {
  176. importlib("stdole2.tlb");
  177. /* TODO: Find a way to define this in a common location, instead of in the client and server IDL */
  178. //
  179. // Changes made here must be reflected in the client RDCHost IDL.
  180. //
  181. cpp_quote("")
  182. cpp_quote("#define DISPID_RDSCHANNELEVENTS_CHANNELDATAREADY 1")
  183. cpp_quote("")
  184. #define DISPID_RDSCHANNELEVENTS_CHANNELDATAREADY 1
  185. [
  186. uuid(59AE79BC-9721-42df-9396-9D98E7F7A396),
  187. helpstring("_ISAFRemoteDesktopDataChannelEvents Interface")
  188. ]
  189. dispinterface _ISAFRemoteDesktopDataChannelEvents
  190. {
  191. properties:
  192. methods:
  193. [id(DISPID_RDSCHANNELEVENTS_CHANNELDATAREADY), helpstring("method ChannelDataReady")]
  194. void ChannelDataReady([in]BSTR channelName);
  195. };
  196. [
  197. uuid(8C71C09E-3176-4be6-B294-EA3C41CABB99),
  198. helpstring("TSRDPServerDataChannel Class")
  199. ]
  200. coclass TSRDPServerDataChannel
  201. {
  202. [default] interface ISAFRemoteDesktopDataChannel;
  203. [default, source] dispinterface _ISAFRemoteDesktopDataChannelEvents;
  204. };
  205. [
  206. uuid(92550D33-3272-43b6-B536-2DB08C1D569C),
  207. helpstring("SAFRemoteDesktopChannelMgr Class")
  208. ]
  209. coclass TSRDPServerDataChannelMgr
  210. {
  211. [default] interface ISAFRemoteDesktopChannelMgr;
  212. interface IRDSThreadBridge;
  213. };
  214. [
  215. uuid(5EA6F67B-7713-45F3-B535-0E03DD637345),
  216. helpstring("RemoteDesktopServerHost Class")
  217. ]
  218. coclass SAFRemoteDesktopServerHost
  219. {
  220. [default] interface ISAFRemoteDesktopServerHost;
  221. };
  222. [
  223. uuid(434AD1CF-4054-44A8-933F-C69889CA22D7),
  224. helpstring("_ISAFRemoteDesktopSessionEvents Interface")
  225. ]
  226. dispinterface _ISAFRemoteDesktopSessionEvents
  227. {
  228. properties:
  229. methods:
  230. [id(DISPID_RDSSESSIONSEVENTS_CLIENTCONNECTED), helpstring("method ClientConnected")]
  231. void ClientConnected();
  232. [id(DISPID_RDSSESSIONSEVENTS_CLIENTDISCONNECTED), helpstring("method ClientDisconnected")]
  233. void ClientDisconnected();
  234. };
  235. [
  236. uuid(3D5D6889-14CC-4E28-8464-6B02A26F506D),
  237. helpstring("RemoteDesktopServer Class")
  238. ]
  239. coclass SAFRemoteDesktopSession
  240. {
  241. [default] interface ISAFRemoteDesktopSession;
  242. [default, source] dispinterface _ISAFRemoteDesktopSessionEvents;
  243. };
  244. };