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.

102 lines
3.0 KiB

  1. /*
  2. Copyright (c) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. blbconn.h
  5. Abstract:
  6. Implementation of ITConnection interface
  7. Author:
  8. */
  9. #ifndef __SDP_CONNECTION_IMPLEMENTATION_
  10. #define __SDP_CONNECTION_IMPLEMENTATION_
  11. #include "resource.h" // main symbols
  12. #include "sdpblb.h"
  13. #include "sdp.h"
  14. class CSdpConferenceBlob;
  15. class ATL_NO_VTABLE ITConnectionImpl :
  16. public IDispatchImpl<ITConnection, &IID_ITConnection, &LIBID_SDPBLBLib>
  17. {
  18. public:
  19. inline ITConnectionImpl();
  20. inline void SuccessInit(
  21. IN SDP &Sdp
  22. );
  23. inline void SuccessInit(
  24. IN SDP_MEDIA &SdpMedia
  25. );
  26. STDMETHOD(get_NumAddresses)(/*[out, retval]*/ LONG *pNumAddresses);
  27. STDMETHOD(get_StartAddress)(/*[out, retval]*/ BSTR *ppStartAddress);
  28. STDMETHOD(get_Ttl)(/*[out, retval]*/ BYTE *pTtl);
  29. STDMETHOD(SetAddressInfo)(/*[in]*/ BSTR pStartAddress, /*[in]*/ LONG NumAddresses, /*[in]*/ BYTE Ttl);
  30. STDMETHOD(get_Bandwidth)(/*[out, retval]*/ DOUBLE *pBandwidth);
  31. STDMETHOD(get_BandwidthModifier)(/*[out, retval]*/ BSTR *ppModifier);
  32. STDMETHOD(SetBandwidthInfo)(/*[in]*/ BSTR pModifier, /*[in]*/ DOUBLE Bandwidth);
  33. STDMETHOD(GetEncryptionKey)(/*[out]*/ BSTR *ppKeyType, /*[out]*/ VARIANT_BOOL *pfValidKeyData, /*[out]*/ BSTR *ppKeyData);
  34. STDMETHOD(SetEncryptionKey)(/*[in]*/ BSTR pKeyType, /*[in]*/ BSTR *ppKeyData);
  35. STDMETHOD(get_AddressType)(/*[out, retval]*/ BSTR *ppAddressType);
  36. STDMETHOD(put_AddressType)(/*[in]*/ BSTR pAddressType);
  37. STDMETHOD(get_NetworkType)(/*[out, retval]*/ BSTR *ppNetworkType);
  38. STDMETHOD(put_NetworkType)(/*[in]*/ BSTR pNetworkType);
  39. protected:
  40. BOOL m_IsMain;
  41. SDP_CONNECTION *m_SdpConnection;
  42. SDP_BANDWIDTH *m_SdpBandwidth;
  43. SDP_ENCRYPTION_KEY *m_SdpKey;
  44. // virtual fn to retrieve the conference blob
  45. // this is virtual so that another reference to the conference blob need not be maintained in this
  46. // class. this is important because all refs to the conf blob may be cleared by the deriving class
  47. // and it is easier to control access to a single reference in it
  48. virtual CSdpConferenceBlob *GetConfBlob() = 0;
  49. };
  50. inline
  51. ITConnectionImpl::ITConnectionImpl(
  52. )
  53. : m_SdpConnection(NULL),
  54. m_SdpBandwidth(NULL),
  55. m_SdpKey(NULL)
  56. {
  57. }
  58. inline void
  59. ITConnectionImpl::SuccessInit(
  60. IN SDP &Sdp
  61. )
  62. {
  63. m_IsMain = TRUE;
  64. m_SdpConnection = &Sdp.GetConnection();
  65. m_SdpBandwidth = &Sdp.GetBandwidth();
  66. m_SdpKey = &Sdp.GetEncryptionKey();
  67. }
  68. inline void
  69. ITConnectionImpl::SuccessInit(
  70. IN SDP_MEDIA &SdpMedia
  71. )
  72. {
  73. m_IsMain = FALSE;
  74. m_SdpConnection = &SdpMedia.GetConnection();
  75. m_SdpBandwidth = &SdpMedia.GetBandwidth();
  76. m_SdpKey = &SdpMedia.GetEncryptionKey();
  77. }
  78. #endif // __SDP_CONNECTION_IMPLEMENTATION_