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.

117 lines
3.5 KiB

  1. /*
  2. * File: h323cc.h
  3. *
  4. * Main H.323 call control interface implementation header file
  5. *
  6. * Revision History:
  7. *
  8. * 11/28/95 mikev created (as NAC.H).
  9. * 05/19/98 mikev H323CC.H - cleaned obsolete references to
  10. * streaming components, changed interface and object names
  11. */
  12. #ifndef _H323CC_H
  13. #define _H323CC_H
  14. #ifdef __cplusplus
  15. class CConnection;
  16. class CH323CallControl;
  17. typedef class CConnection CIPPhoneConnection;
  18. #endif // __cplusplus
  19. //
  20. // utility functions
  21. //
  22. VOID FreeTranslatedAliasList(PCC_ALIASNAMES pDoomed);
  23. HRESULT AllocTranslatedAliasList(PCC_ALIASNAMES *ppDest, P_H323ALIASLIST pSource);
  24. #define DEF_AP_BWMAX 14400
  25. extern UINT g_capFlags;
  26. /*
  27. * Class definitions
  28. */
  29. #ifdef __cplusplus
  30. class CH323CallControl : public IH323CallControl
  31. {
  32. protected:
  33. PCC_ALIASNAMES m_pLocalAliases;
  34. PCC_ALIASNAMES m_pRegistrationAliases;
  35. CC_VENDORINFO m_VendorInfo;
  36. LPWSTR m_pUserName;
  37. UINT m_uRef;
  38. HRESULT hrLast;
  39. BOOL m_fForCalling;
  40. UINT m_uMaximumBandwidth;
  41. // application data
  42. CNOTIFYPROC m_pProcNotifyConnect; // connection notification callback
  43. // subcomponent object references
  44. LPIH323PubCap m_pCapabilityResolver;
  45. CConnection *m_pListenLine; // connection object listening for incoming
  46. CConnection *m_pLineList;
  47. int m_numlines; // # of objects in m_pLineList
  48. ImpICommChan *m_pSendAudioChannel;
  49. ImpICommChan *m_pSendVideoChannel;
  50. // Internal interfaces
  51. BOOL Init(); // internal initialization
  52. OBJ_CPT; // profiling timer
  53. public:
  54. CConnection *m_pNextToAccept;
  55. LPWSTR GetUserDisplayName() {return m_pUserName;};
  56. PCC_ALIASNAMES GetUserAliases() {return m_pLocalAliases;};
  57. PCC_ALIASITEM GetUserDisplayAlias();
  58. CH323CallControl(BOOL fForCalling, UINT capFlags);
  59. ~CH323CallControl();
  60. HRESULT CreateConnection(CConnection **lplpConnection, GUID PIDofProtocolType);
  61. HRESULT RemoveConnection(CConnection *lpConnection);
  62. HRESULT LastHR() {return hrLast;};
  63. VOID SetLastHR(HRESULT hr) {hrLast = hr;};
  64. HRESULT GetConnobjArray(CConnection **lplpArray, UINT uSize);
  65. ICtrlCommChan *QueryPreviewChannel(LPGUID lpMID);
  66. STDMETHOD_( CREQ_RESPONSETYPE, ConnectionRequest(CConnection *pConnection));
  67. STDMETHOD_( CREQ_RESPONSETYPE, FilterConnectionRequest(CConnection *pConnection,
  68. P_APP_CALL_SETUP_DATA pAppData));
  69. STDMETHODIMP GetGKCallPermission();
  70. static VOID CALLBACK RasNotify(DWORD dwRasEvent, HRESULT hReason);
  71. static BOOL m_fGKProhibit;
  72. static RASNOTIFYPROC m_pRasNotifyProc;
  73. // IH323CallControl stuff
  74. STDMETHODIMP QueryInterface(REFIID riid, LPVOID FAR * ppvObj);
  75. STDMETHOD_(ULONG, AddRef());
  76. STDMETHOD_(ULONG, Release());
  77. STDMETHOD( Initialize(PORT *lpPort));
  78. STDMETHOD( SetMaxPPBandwidth(UINT Bandwidth));
  79. STDMETHOD( RegisterConnectionNotify(CNOTIFYPROC pConnectRequestHandler));
  80. STDMETHOD( DeregisterConnectionNotify(CNOTIFYPROC pConnectRequestHandler));
  81. STDMETHOD( GetNumConnections(ULONG *lp));
  82. STDMETHOD( GetConnectionArray(IH323Endpoint * *lplpArray, UINT uSize));
  83. STDMETHOD( CreateConnection(IH323Endpoint * *lplpLine, GUID PIDofProtocolType));
  84. STDMETHOD( SetUserDisplayName(LPWSTR lpwName));
  85. STDMETHODIMP CreateLocalCommChannel(ICommChannel** ppCommChan, LPGUID lpMID,
  86. IMediaChannel* pMediaStream);
  87. STDMETHODIMP SetUserAliasNames(P_H323ALIASLIST pAliases);
  88. STDMETHODIMP EnableGatekeeper(BOOL bEnable, PSOCKADDR_IN pGKAddr,
  89. P_H323ALIASLIST pAliases, RASNOTIFYPROC pRasNotifyProc);
  90. };
  91. #else // not __cplusplus
  92. #endif // __cplusplus
  93. #endif //#ifndef _H323CC_H