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.

232 lines
5.7 KiB

  1. // File: DlgCall.h
  2. #ifndef _CDLGCALL2_H_
  3. #define _CDLGCALL2_H_
  4. #include "richaddr.h"
  5. #include "GenContainers.h"
  6. #include "ConfRoom.h"
  7. class CLDAP;
  8. class CWAB;
  9. class CGAL;
  10. class CSPEEDDIAL;
  11. class CHISTORY;
  12. class CALV;
  13. class CTranslateAccelTable;
  14. class CMRUList;
  15. #define MAX_DIR_COLUMNS 7
  16. // These are the indexes the columns are actually added to the listview in...
  17. #define COLUMN_INDEX_ADDRESS 0
  18. #define COLUMN_INDEX_AUDIO 1
  19. #define COLUMN_INDEX_VIDEO 2
  20. #define COLUMN_INDEX_LAST_NAME 3
  21. #define COLUMN_INDEX_FIRST_NAME 4
  22. #define COLUMN_INDEX_LOCATION 5
  23. #define COLUMN_INDEX_COMMENTS 6
  24. class CFindSomeone : public CFrame, public IConferenceChangeHandler
  25. {
  26. public:
  27. static void findSomeone(CConfRoom *pConfRoom);
  28. static VOID Destroy();
  29. virtual void Layout();
  30. virtual void OnDesiredSizeChanged()
  31. {
  32. ScheduleLayout();
  33. }
  34. public: // IConferenceChangeHandler methods
  35. virtual HRESULT STDMETHODCALLTYPE QueryInterface(
  36. /* [in] */ REFIID riid,
  37. /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject)
  38. {
  39. return(CFrame::QueryInterface(riid, ppvObject));
  40. }
  41. virtual ULONG STDMETHODCALLTYPE AddRef( void)
  42. {
  43. return(CFrame::AddRef());
  44. }
  45. virtual ULONG STDMETHODCALLTYPE Release( void)
  46. {
  47. return(CFrame::Release());
  48. }
  49. virtual void OnCallStarted();
  50. virtual void OnCallEnded();
  51. virtual void OnAudioLevelChange(BOOL fSpeaker, DWORD dwVolume) {}
  52. virtual void OnAudioMuteChange(BOOL fSpeaker, BOOL fMute) {}
  53. virtual void OnChangeParticipant(CParticipant *pPart, NM_MEMBER_NOTIFY uNotify) {}
  54. virtual void OnChangePermissions() {}
  55. virtual void OnVideoChannelChanged(NM_CHANNEL_NOTIFY uNotify, INmChannel *pChannel) {}
  56. protected:
  57. ~CFindSomeone();
  58. virtual LRESULT ProcessMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  59. private:
  60. // constants
  61. enum { DEFAULT_NUM_LISTVIEW_COLUMNS = 2 };
  62. // Member Vars
  63. static CFindSomeone *s_pDlgCall;
  64. CTranslateAccelTable *m_pAccel; // The accelerator table we need to clean up
  65. HWND m_hwndList; // list view
  66. HWND m_ilsListView; // ils list view
  67. HWND m_webView; // web view
  68. HWND m_hwndOwnerDataList; // list view ( The owner-data one )
  69. WNDPROC m_WndOwnerDataListOldWndProc; // For subclassing the above wnd
  70. HWND m_hwndFrame; // group box
  71. HWND m_hwndCombo; // combo box
  72. HWND m_hwndComboEdit; // combo box's edit control
  73. HWND m_hwndEdit; // edit control (for type-ahead)
  74. BOOL m_fInEdit; // TRUE if editing the name/address
  75. DWORD m_dwOptions; // options (NM_CALLDLG_*)
  76. LPCTSTR m_pszDefault; // initial text to put in the edit control
  77. HIMAGELIST m_himlIcon; // small icon image list
  78. int m_cVisible; // number of visible lines in the listbox
  79. int m_dxButton; // width of the "Advanced..." button
  80. int m_dyButton; // height of the "Advanced..." button
  81. int m_dyText; // height of a line of text
  82. int m_dyTextIntro; // height of intro text at top of dialog
  83. LPTSTR m_pszTextIntro; // Introductory text for top of dialog
  84. bool m_bPlacedCall; // TRUE if we successfuly placed a call
  85. bool m_secure; // Save the state of the secure button
  86. int m_iIlsFirst; // index of first ILS server
  87. CMRUList * m_pMruServer; // list of ILS servers
  88. RAI * m_pRai; // Rich Address Information
  89. // CALV items
  90. CLDAP * m_pUls;
  91. CWAB * m_pWab;
  92. CSPEEDDIAL * m_pSpeedDial;
  93. #if USE_GAL
  94. CGAL * m_pGAL;
  95. #endif // USE_GAL
  96. CHISTORY * m_pHistory;
  97. CConfRoom * m_pConfRoom;
  98. #ifdef ENABLE_BL
  99. CBL * m_pBl;
  100. #endif /* ENABLE_BL */
  101. CALV * m_pAlv; // Current Address List View (NOTE: NULL == m_pUls)
  102. int m_iSel; // current selection in combo box
  103. TCHAR m_szAddress[CCHMAXSZ_ADDRESS];
  104. TCHAR m_szDirectory[CCHMAXSZ];
  105. CFindSomeone(CConfRoom *pConfRoom);
  106. HWND GetHwndList();
  107. int GetEditText(LPTSTR psz, int cchMax);
  108. RAI * GetAddrInfo();
  109. int AddAlv(CALV * pAlv);
  110. int AddAlvSz(CALV * pAlv, LPCTSTR psz, int cbIndex=-1);
  111. HRESULT doModeless(void);
  112. HRESULT CreateDlgCall(HWND hwndParent);
  113. BOOL FMsgSpecial(MSG * pMsg);
  114. VOID CalcDyText(void);
  115. VOID InitAlv(void);
  116. void OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  117. void OnContextMenu(HWND hwnd, HWND hwndContext, UINT xPos, UINT yPos);
  118. LRESULT OnNotifyCombo(LPARAM lParam);
  119. LRESULT OnNotifyList(LPARAM lParam);
  120. VOID EndComboEdit(int iWhy);
  121. VOID UpdateIlsServer(void);
  122. LRESULT DoCustomDraw(LPNMLVCUSTOMDRAW lplvcd);
  123. VOID ShowList(int iSel);
  124. HWND
  125. createIlsListView(void);
  126. VOID OnEditChangeDirectory(void);
  127. int FindSz(LPCTSTR psz);
  128. int FindSzBySortedColumn(LPCTSTR psz);
  129. HRESULT HrGetSelection(void);
  130. void OnDeleteIlsServer(void);
  131. static LRESULT CALLBACK OwnerDataListWndProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
  132. private:
  133. // Helper Fns
  134. int _GetCurListViewNumColumns();
  135. bool _IsDirectoryServicePolicyDisabled();
  136. BOOL
  137. InitColumns(void);
  138. BOOL
  139. LoadColumnInfo(void);
  140. void
  141. StoreColumnInfo(void);
  142. static
  143. int
  144. CALLBACK
  145. CompareWrapper
  146. (
  147. LPARAM param1,
  148. LPARAM param2,
  149. LPARAM This
  150. );
  151. int
  152. DirListViewCompareProc
  153. (
  154. LPARAM param1,
  155. LPARAM param2
  156. );
  157. int
  158. LParamToPos
  159. (
  160. LPARAM lParam
  161. );
  162. void
  163. onAdvanced(void);
  164. void
  165. onCall(void);
  166. LONG m_alColumns[MAX_DIR_COLUMNS];
  167. int m_iSortColumn;
  168. BOOL m_fSortAscending;
  169. };
  170. CMRUList * GetMruListServer(void);
  171. #define WM_DISPLAY_MSG (WM_USER + 200)
  172. #endif /* _CDLGCALL2_H_ */