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.

190 lines
5.0 KiB

  1. // RRCM.idl : IDL source for rrcm.dll
  2. //
  3. // This file will be processed by the MIDL tool to
  4. // produce the type library (mp.tlb) and marshalling code.
  5. import "oaidl.idl";
  6. import "ocidl.idl";
  7. cpp_quote("//")
  8. cpp_quote("// The following declarations within the 'if 0' block are dummy typedefs used to make")
  9. cpp_quote("// the idl file build. The actual definitions are contained in WINSOCK2.H")
  10. cpp_quote("//")
  11. cpp_quote("#if 0")
  12. #ifndef WSAOVERLAPPED
  13. typedef struct _OVERLAPPED {
  14. DWORD Internal;
  15. DWORD InternalHigh;
  16. DWORD Offset;
  17. DWORD OffsetHigh;
  18. HANDLE hEvent;
  19. } WSAOVERLAPPED, *LPWSAOVERLAPPED;
  20. #endif
  21. typedef
  22. void
  23. (__stdcall * LPWSAOVERLAPPED_COMPLETION_ROUTINE)(
  24. DWORD dwError,
  25. DWORD cbTransferred,
  26. WSAOVERLAPPED *lpOverlapped,
  27. DWORD dwFlags
  28. );
  29. typedef struct _WSABUF {
  30. ULONG len; /* the length of the buffer */
  31. char * buf; /* the pointer to the buffer */
  32. } WSABUF, * LPWSABUF;
  33. // from qos.h
  34. typedef ULONG SERVICETYPE;
  35. typedef struct _flowspec
  36. {
  37. ULONG TokenRate; /* In Bytes/sec */
  38. ULONG TokenBucketSize; /* In Bytes */
  39. ULONG PeakBandwidth; /* In Bytes/sec */
  40. ULONG Latency; /* In microseconds */
  41. ULONG DelayVariation; /* In microseconds */
  42. SERVICETYPE ServiceType;
  43. ULONG MaxSduSize; /* In Bytes */
  44. ULONG MinimumPolicedSize; /* In Bytes */
  45. } FLOWSPEC, *PFLOWSPEC, * LPFLOWSPEC;
  46. cpp_quote ("#endif")
  47. typedef struct {
  48. UINT ssrc; // RTP stream source id
  49. UINT payload; // RTP payload
  50. UINT packetsSent; // num packets sent by source
  51. UINT packetsDelivered; // num packets that reached receiver
  52. UINT packetsLost; // num packets that receiver knows it dropped
  53. UINT jitter; // inter-packet jitter
  54. UINT packetErrors; // local Winsock errors
  55. UINT bytesSent; // num bytes sent by source
  56. UINT bytesDelivered; // num bytest that reached (valid only in recv side)
  57. } RTP_STATS;
  58. typedef BOOL (* PRTPRECVCALLBACK)(HANDLE_PTR dwCallback, WSABUF *pNetBuf);
  59. interface IRTPRecv;
  60. [
  61. uuid(26FCF000-61D1-11D1-AA66-00C04FC9B202),
  62. local,
  63. helpstring("IRTPControl Interface"),
  64. pointer_default(unique)
  65. ]
  66. interface IRTPSession : IUnknown
  67. {
  68. HRESULT SetLocalAddress([in] BYTE *sockaddr, [in]UINT addrlen);
  69. HRESULT GetLocalAddress([out] const BYTE **sockaddr, [out] UINT *paddrlen);
  70. HRESULT SetRemoteRTPAddress([in] BYTE *rtpaddr, [in] UINT addrlen);
  71. HRESULT SetRemoteRTCPAddress([in] BYTE *rtcpaddr, [in] UINT addrlen);
  72. HRESULT GetRemoteRTPAddress([out] const BYTE **sockaddr, [out] UINT *paddrlen);
  73. HRESULT GetRemoteRTCPAddress([out] const BYTE **sockaddr, [out] UINT *paddrlen);
  74. HRESULT SetSendFlowspec([in] FLOWSPEC *pFlowspec);
  75. HRESULT SetRecvFlowspec([in] FLOWSPEC *pFlowspec);
  76. HRESULT CreateRecvRTPStream([in]DWORD ssrc, [out] IRTPRecv **ppIRTPRecv);
  77. };
  78. [
  79. uuid(44F9B073-641C-11D1-AA67-00C04FC9B202),
  80. local,
  81. helpstring("IRTPSend Interface"),
  82. pointer_default(unique)
  83. ]
  84. interface IRTPSend : IUnknown
  85. {
  86. HRESULT Send(WSABUF *pWsabufs,UINT nWsabufs,WSAOVERLAPPED *pOverlapped,LPWSAOVERLAPPED_COMPLETION_ROUTINE pWSAPC );
  87. HRESULT GetSendStats([out] RTP_STATS *pRTPStats);
  88. };
  89. [
  90. uuid(fcedc784-afdc-11d1-aa91-00c04fc9b202),
  91. local,
  92. helpstring("IRTPRecvSink Interface"),
  93. pointer_default(unique)
  94. ]
  95. interface IRTPRecvSink : IUnknown
  96. {
  97. BOOL ReceivePacket(WSABUF *pPacket);
  98. };
  99. [
  100. uuid(76c7f79c-afdc-11d1-aa91-00c04fc9b202),
  101. local,
  102. helpstring("IRTPRecv Interface"),
  103. pointer_default(unique)
  104. ]
  105. interface IRTPRecv : IUnknown
  106. {
  107. HRESULT SetRecvNotification([in] PRTPRECVCALLBACK pIRTPRecvSink, [in] HANDLE_PTR dwCB, [in] UINT nBufs);
  108. HRESULT CancelRecvNotification();
  109. HRESULT FreePacket([in] WSABUF *pPacket);
  110. HRESULT GetRecvStats([out] RTP_STATS *pRTPStats);
  111. };
  112. /*
  113. [
  114. uuid(2fe04e9c-8917-11d1-aa78-00c04fc9b202),
  115. version(1.0)
  116. ]
  117. interface IRTPSink: IUnknown
  118. {
  119. HRESULT AddSession(IRTPSession *pSess);
  120. HRESULT RemoveSession(IRTPSession *pSess);
  121. HRESULT SetMediaStream(IRTPMediaStream *pStream);
  122. };
  123. */
  124. /* OpenSession flags */
  125. enum {
  126. SESSIONF_RECV = 0x1,
  127. SESSIONF_SEND = 0x2,
  128. SESSIONF_MULTICAST = 0x4,
  129. SESSIONF_AUDIO = 0x8,
  130. SESSIONF_VIDEO = 0x10,
  131. SESSIONF_EXISTING = 0x80
  132. };
  133. [
  134. uuid(06CE0C39-8917-11D1-AA78-00C04FC9B202),
  135. helpstring("IRTP Interface"),
  136. pointer_default(unique)
  137. ]
  138. interface IRTP : IUnknown
  139. {
  140. HRESULT OpenSession([in] UINT sessionId, [in] DWORD dwFlags, [in] BYTE *localaddr, [in]UINT addrlen, [out] IRTPSession **ppIRTPSession);
  141. //HRESULT CreateSink([out] IRTPSink **ppIRTPSink);
  142. };
  143. [
  144. uuid(3C90D0D2-5F80-11D1-AA64-00C04FC9B202),
  145. version(1.0),
  146. helpstring("RRCM 1.0 Type Library")
  147. ]
  148. library RRCMLib
  149. {
  150. importlib("stdole2.tlb");
  151. [
  152. uuid(06CE0C3A-8917-11D1-AA78-00C04FC9B202),
  153. helpstring("RTP Class")
  154. ]
  155. coclass RTP
  156. {
  157. [default] interface IRTP;
  158. };
  159. };