Source code of Windows XP (NT5)
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.

156 lines
4.3 KiB

  1. //
  2. // SERVER.H
  3. //
  4. BOOL InitServer(void);
  5. void TermServer(void);
  6. BOOL CALLBACK ServerDlgProc(HWND, UINT, WPARAM, LPARAM);
  7. BOOL ActivateServer(void);
  8. void DeactivateServer(void);
  9. BOOL ActivatePrivateChannel(void);
  10. void DeactivatePrivateChannel(void);
  11. void SendPrivateData(void);
  12. class CMgrNotify : public RefCount,
  13. public CNotify,
  14. public INmManagerNotify,
  15. public IAppSharingNotify
  16. {
  17. public:
  18. CMgrNotify();
  19. ~CMgrNotify();
  20. // IUnknown methods
  21. STDMETHODIMP_(ULONG) AddRef(void);
  22. STDMETHODIMP_(ULONG) Release(void);
  23. STDMETHODIMP QueryInterface(REFIID riid, PVOID *ppvObj);
  24. // ICNotify methods
  25. STDMETHODIMP Connect (IUnknown *pUnk);
  26. STDMETHODIMP Disconnect(void);
  27. // INmManagerNotify
  28. STDMETHODIMP NmUI(CONFN confn);
  29. STDMETHODIMP ConferenceCreated(INmConference *pConference);
  30. STDMETHODIMP CallCreated(INmCall *pNmCall);
  31. // IAppSharingNotify
  32. STDMETHODIMP OnReadyToShare(BOOL fReady);
  33. STDMETHODIMP OnShareStarted();
  34. STDMETHODIMP OnSharingStarted();
  35. STDMETHODIMP OnShareEnded();
  36. STDMETHODIMP OnPersonJoined(IAS_GCC_ID gccID);
  37. STDMETHODIMP OnPersonLeft(IAS_GCC_ID gccID);
  38. STDMETHODIMP OnStartInControl(IAS_GCC_ID gccInControlOf);
  39. STDMETHODIMP OnStopInControl(IAS_GCC_ID gccInControlOf);
  40. STDMETHODIMP OnControllable(BOOL fControllable);
  41. STDMETHODIMP OnStartControlled(IAS_GCC_ID gccControlledBy);
  42. STDMETHODIMP OnStopControlled(IAS_GCC_ID gccControlledBy);
  43. };
  44. class CConfNotify : public RefCount,
  45. public CNotify,
  46. public INmConferenceNotify
  47. {
  48. public:
  49. CConfNotify();
  50. ~CConfNotify();
  51. // IUnknown methods
  52. STDMETHODIMP_(ULONG) AddRef(void);
  53. STDMETHODIMP_(ULONG) Release(void);
  54. STDMETHODIMP QueryInterface(REFIID riid, PVOID *ppvObj);
  55. // ICNotify methods
  56. STDMETHODIMP Connect (IUnknown *pUnk);
  57. STDMETHODIMP Disconnect(void);
  58. // INmConferenceNotify
  59. STDMETHODIMP NmUI(CONFN uNotify);
  60. STDMETHODIMP StateChanged(NM_CONFERENCE_STATE uState);
  61. STDMETHODIMP MemberChanged(NM_MEMBER_NOTIFY uNotify, INmMember *pfMember);
  62. };
  63. class CCallNotify : public INmCallNotify
  64. {
  65. private:
  66. INmCall * m_pCall;
  67. BOOL m_fIncoming;
  68. LPTSTR m_pszName;
  69. NM_CALL_STATE m_State;
  70. BOOL m_fSelectedConference;
  71. POSITION m_pos; // position in g_pCallList
  72. DWORD m_dwTick; // tick count at call start
  73. ULONG m_cRef;
  74. DWORD m_dwCookie;
  75. public:
  76. CCallNotify(INmCall * pCall);
  77. ~CCallNotify();
  78. // IUnknown methods
  79. STDMETHODIMP_(ULONG) AddRef(void);
  80. STDMETHODIMP_(ULONG) Release(void);
  81. STDMETHODIMP QueryInterface(REFIID riid, PVOID *ppv);
  82. // INmCallNotify methods
  83. STDMETHODIMP NmUI(CONFN uNotify);
  84. STDMETHODIMP StateChanged(NM_CALL_STATE uState);
  85. STDMETHODIMP Failed(ULONG uError);
  86. STDMETHODIMP Accepted(INmConference *pConference);
  87. STDMETHODIMP CallError(UINT cns);
  88. STDMETHODIMP RemoteConference(BOOL fMCU, BSTR *pwszConfNames, BSTR *pbstrConfToJoin);
  89. STDMETHODIMP RemotePassword(BSTR bstrConference, BSTR *pbstrPassword, BYTE *pb, DWORD cb);
  90. // Internal methods
  91. VOID Update(void);
  92. VOID RemoveCall(void);
  93. };
  94. class CNmDataNotify : public RefCount,
  95. public CNotify,
  96. public INmChannelDataNotify
  97. {
  98. public:
  99. // IUnknown methods
  100. STDMETHODIMP_(ULONG) AddRef(void);
  101. STDMETHODIMP_(ULONG) Release(void);
  102. STDMETHODIMP QueryInterface(REFIID riid, PVOID *ppvObj);
  103. // ICNotify methods
  104. STDMETHODIMP Connect (IUnknown *pUnk);
  105. STDMETHODIMP Disconnect(void);
  106. // INmChannelDataNotify
  107. STDMETHODIMP NmUI(CONFN uNotify);
  108. STDMETHODIMP MemberChanged(NM_MEMBER_NOTIFY uNotify, INmMember *pfMember);
  109. STDMETHODIMP DataSent(INmMember * pMember, ULONG uSize, LPBYTE pvBuffer);
  110. STDMETHODIMP DataReceived(INmMember * pMember, ULONG uSize, LPBYTE pvBuffer,
  111. ULONG dwFlags);
  112. STDMETHODIMP AllocateHandleConfirm(ULONG handle_value, ULONG chandles);
  113. };
  114. extern HINSTANCE g_hInst;
  115. extern HWND g_hwndMain;
  116. extern INmManager * g_pMgr;
  117. extern INmConference * g_pConf;
  118. extern IAppSharing * g_pAS;
  119. extern BOOL g_fUnattended;
  120. extern BOOL g_fSecurity;
  121. extern CMgrNotify * g_pMgrNotify;
  122. extern CConfNotify * g_pConfNotify;
  123. extern UINT g_cPeopleInConf;
  124. extern UINT g_cPeopleInShare;
  125. extern INmChannelData * g_pPrivateChannel;
  126. extern CNmDataNotify * g_pDataNotify;