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.

107 lines
4.2 KiB

  1. /*
  2. * File: t120chan.h
  3. *
  4. * T.120 implementation of media channel.
  5. * Interfaces: ICommChannel, ICtrlCommChan
  6. *
  7. * Revision History:
  8. *
  9. * 06/11/97 mikev created
  10. */
  11. #ifndef _T120CHAN_H
  12. #define _T120CHAN_H
  13. class ImpT120Chan : public ICommChannel, public ICtrlCommChan
  14. {
  15. protected:
  16. SOCKADDR_IN local_sin;
  17. SOCKADDR_IN remote_sin;
  18. UINT uRef;
  19. GUID m_MediaID;
  20. IControlChannel *m_pCtlChan;
  21. LPIH323PubCap m_pCapObject;
  22. IH323ConfAdvise *m_pH323ConfAdvise;
  23. DWORD m_dwFlags;
  24. DWORD_PTR dwhChannel; //General purpose handle. Whatever
  25. // creates an instance of this class can use this for whatever it wants
  26. public:
  27. ImpT120Chan ();
  28. ~ImpT120Chan ();
  29. // ICtrlCommChannel methods
  30. STDMETHODIMP_(IControlChannel *) GetControlChannel(VOID) {return m_pCtlChan;};
  31. STDMETHODIMP StandbyInit(LPGUID lpMID, LPIH323PubCap pCapObject,
  32. IMediaChannel* pMediaStreamSend)
  33. {
  34. return hrSuccess;
  35. };
  36. STDMETHODIMP_(BOOL) Init(LPGUID lpMID, IH323ConfAdvise *pH323ConfAdvise,
  37. BOOL fSendDirection)
  38. {
  39. m_MediaID = *lpMID;
  40. m_pH323ConfAdvise = pH323ConfAdvise;
  41. return TRUE;
  42. };
  43. STDMETHODIMP GetMediaType(LPGUID pGuid);
  44. STDMETHODIMP CtrlChanSetProperty(DWORD prop, PVOID pBuf, DWORD cbBuf){return CHAN_E_INVALID_PARAM;};
  45. STDMETHODIMP PauseNet(BOOL bPause, BOOL bRemote) {return CHAN_E_INVALID_PARAM;};
  46. STDMETHODIMP BeginControlSession(IControlChannel *pCtlChan, LPIH323PubCap pCapObject);
  47. STDMETHODIMP EndControlSession();
  48. STDMETHODIMP OnChannelOpening();
  49. STDMETHODIMP OnChannelOpen(DWORD dwStatus);
  50. STDMETHODIMP OnChannelClose(DWORD dwStatus);
  51. STDMETHODIMP_(UINT) Reset(VOID) {return 0;};
  52. STDMETHODIMP_(BOOL) SelectPorts(LPIControlChannel pCtlChannel);
  53. STDMETHODIMP_(PSOCKADDR_IN) GetLocalAddress(){return &local_sin;};
  54. STDMETHODIMP_(PORT) GetLocalRTPPort() {return 0;};
  55. STDMETHODIMP_(PORT) GetLocalRTCPPort() {return 0;};
  56. STDMETHODIMP AcceptRemoteAddress (PSOCKADDR_IN pSinD);
  57. STDMETHODIMP AcceptRemoteRTCPAddress(PSOCKADDR_IN pSinC) {return CHAN_E_INVALID_PARAM;};
  58. STDMETHODIMP_(BOOL) IsSendChannel () {return TRUE;};
  59. STDMETHODIMP_(BOOL) IsChannelOpen(){return ((m_dwFlags & COMCH_OPEN) !=0);};
  60. STDMETHODIMP_(BOOL) IsOpenPending(){return ((m_dwFlags & COMCH_OPEN_PENDING ) !=0);};
  61. STDMETHODIMP_(BOOL) IsChannelEnabled(){return ((m_dwFlags & COMCH_ENABLED ) !=0);};
  62. STDMETHODIMP ConfigureCapability(LPVOID lpvRemoteChannelParams, UINT uRemoteParamSize,
  63. LPVOID lpvLocalParams, UINT uLocalParamSize){return CHAN_E_INVALID_PARAM;};
  64. STDMETHODIMP GetLocalParams(LPVOID lpvChannelParams, UINT uBufSize){return CHAN_E_INVALID_PARAM;};
  65. STDMETHODIMP_(PVOID) GetRemoteParams(VOID) {return NULL;}
  66. STDMETHODIMP_(VOID) SetNegotiatedLocalFormat(DWORD dwF) {return;};
  67. STDMETHODIMP_(VOID) SetNegotiatedRemoteFormat(DWORD dwF) {return;};
  68. STDMETHODIMP_(DWORD_PTR) GetHChannel(VOID) {return dwhChannel;};
  69. STDMETHODIMP_(VOID) SetHChannel (DWORD_PTR dwSetChannel) {dwhChannel = dwSetChannel;};
  70. // ICommChannel Methods
  71. STDMETHODIMP QueryInterface(REFIID riid, LPVOID FAR * ppvObj);
  72. STDMETHOD_(ULONG,AddRef());
  73. STDMETHOD_(ULONG,Release());
  74. STDMETHOD(GetProperty(DWORD prop, PVOID pBuf, LPUINT pcbBuf)) {return CHAN_E_INVALID_PARAM;};
  75. STDMETHOD(SetProperty(DWORD prop, PVOID pBuf, UINT cbBuf)) {return CHAN_E_INVALID_PARAM;};
  76. STDMETHOD(IsChannelOpen(BOOL *pbOpen));
  77. STDMETHOD(Open(MEDIA_FORMAT_ID idLocalFormat,IH323Endpoint *pConnection));
  78. STDMETHOD(Close());
  79. STDMETHOD(SetAdviseInterface(IH323ConfAdvise *pH323ConfAdvise));
  80. STDMETHOD(EnableOpen(BOOL bEnable));
  81. STDMETHOD_(IMediaChannel *, GetMediaChannel(VOID)) {return NULL;};
  82. STDMETHOD(Preview(MEDIA_FORMAT_ID idLocalFormat, IMediaChannel * pMediaChannel)){return CHAN_E_INVALID_PARAM;};
  83. STDMETHOD(PauseNetworkStream(BOOL fPause)){return CHAN_E_INVALID_PARAM;};
  84. STDMETHOD_(BOOL, IsNetworkStreamPaused(VOID)){return TRUE;};
  85. STDMETHOD_(BOOL, IsRemotePaused(VOID)){return TRUE;};
  86. STDMETHODIMP_(MEDIA_FORMAT_ID) GetConfiguredFormatID() {return INVALID_MEDIA_FORMAT;};
  87. STDMETHODIMP GetRemoteAddress(PSOCKADDR_IN pAddrOutput);
  88. };
  89. #endif // _T120CHAN_H
  90.