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.

135 lines
3.7 KiB

  1. /*
  2. * File: nac.h
  3. *
  4. * Microsoft Network Audio Controller (NAC) header file
  5. *
  6. * Revision History:
  7. *
  8. * 11/28/95 mikev created
  9. */
  10. #ifndef _NAC_H
  11. #define _NAC_H
  12. #define _NAVC_
  13. #ifdef __cplusplus
  14. class CConnection;
  15. class DataPump;
  16. class CNac;
  17. typedef class CConnection CIPPhoneConnection;
  18. //
  19. // temporary defs
  20. //
  21. typedef CNac **LPLPNAC;
  22. HRESULT WINAPI CreateNac(LPLPNAC lplpNac);
  23. #endif // __cplusplus
  24. // windows messages
  25. #define WNAC_START WM_USER+0x100
  26. #define WNAC_CONNECTREQ WNAC_START+0x0000
  27. #define WCON_STATUS WNAC_START+0x0001
  28. //
  29. // end of temporary defs
  30. //
  31. //
  32. // utility functions
  33. //
  34. VOID FreeTranslatedAliasList(PCC_ALIASNAMES pDoomed);
  35. HRESULT AllocTranslatedAliasList(PCC_ALIASNAMES *ppDest, P_H323ALIASLIST pSource);
  36. #define DEF_AP_BWMAX 14400
  37. /*
  38. * Class definitions
  39. */
  40. #ifdef __cplusplus
  41. class CNac : public INac
  42. {
  43. protected:
  44. PCC_ALIASNAMES m_pLocalAliases;
  45. LPWSTR m_pUserName;
  46. UINT uRef;
  47. HRESULT hrLast;
  48. UINT m_uMaximumBandwidth;
  49. // application data
  50. CNOTIFYPROC pProcNotifyConnect; // connection notification callback
  51. HWND hWndNotifyConnect; // connection notification hwnd
  52. HWND hAppWnd; // hwnd of the process that owns the NAC
  53. HINSTANCE hAppInstance; // instance of the process that owns the NAC
  54. // subcomponent object references
  55. LPIH323PubCap m_pCapabilityResolver;
  56. CConnection *m_pListenLine; // connection object listening for incoming
  57. CConnection *m_pCurrentLine; // active connection object(talking), if there is one
  58. CConnection *m_pLineList;
  59. int m_numlines; // # of objects in m_pLineList
  60. ImpICommChan *m_pSendAudioChannel;
  61. ImpICommChan *m_pSendVideoChannel;
  62. // Internal interfaces
  63. BOOL Init(); // internal initialization
  64. OBJ_CPT; // profiling timer
  65. public:
  66. CConnection *m_pNextToAccept;
  67. HWND GetAppWnd(){return hAppWnd;};
  68. HINSTANCE GetAppInstance() {return hAppInstance;};
  69. LPWSTR GetUserDisplayName() {return m_pUserName;};
  70. PCC_ALIASNAMES GetUserAliases() {return m_pLocalAliases;};
  71. PCC_ALIASITEM GetUserDisplayAlias();
  72. CNac();
  73. ~CNac();
  74. HRESULT CreateConnection(CConnection **lplpConnection, GUID PIDofProtocolType);
  75. HRESULT RemoveConnection(CConnection *lpConnection);
  76. HRESULT LastHR() {return hrLast;};
  77. VOID SetLastHR(HRESULT hr) {hrLast = hr;};
  78. HRESULT GetConnobjArray(CConnection **lplpArray, UINT uSize);
  79. ICtrlCommChan *QueryPreviewChannel(LPGUID lpMID);
  80. STDMETHOD_( CREQ_RESPONSETYPE, ConnectionRequest(CConnection *pConnection));
  81. STDMETHOD_( CREQ_RESPONSETYPE, FilterConnectionRequest(CConnection *pConnection,
  82. P_APP_CALL_SETUP_DATA pAppData));
  83. // INacInterface stuff
  84. STDMETHODIMP QueryInterface(REFIID riid, LPVOID FAR * ppvObj);
  85. STDMETHOD_(ULONG, AddRef());
  86. STDMETHOD_(ULONG, Release());
  87. STDMETHOD( Initialize(HWND hWnd, HINSTANCE hInst, PORT *lpPort));
  88. STDMETHOD( SetMaxPPBandwidth(UINT Bandwidth));
  89. STDMETHOD( RegisterConnectionNotify(HWND hWnd, CNOTIFYPROC pConnectRequestHandler));
  90. STDMETHOD( DeregisterConnectionNotify(HWND hWnd, CNOTIFYPROC pConnectRequestHandler));
  91. STDMETHOD( GetNumConnections(ULONG *lp));
  92. STDMETHOD( GetConnectionArray(LPCONNECTIONIF *lplpArray, UINT uSize));
  93. STDMETHOD( CreateConnection(LPCONNECTIONIF *lplpLine, GUID PIDofProtocolType));
  94. STDMETHOD( DeleteConnection(LPCONNECTIONIF lpLine));
  95. STDMETHOD( SetUserDisplayName(LPWSTR lpwName));
  96. STDMETHODIMP CreateLocalCommChannel(ICommChannel** ppCommChan, LPGUID lpMID,
  97. IMediaChannel* pMediaStream);
  98. STDMETHODIMP SetUserAliasNames(P_H323ALIASLIST pAliases);
  99. STDMETHODIMP EnableGatekeeper(BOOL bEnable, PSOCKADDR_IN pGKAddr);
  100. };
  101. #else // not __cplusplus
  102. #endif // __cplusplus
  103. #endif //#ifndef _NAC_H