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.

264 lines
5.1 KiB

  1. #if !defined( CDLGACD_H )
  2. #define CDLGACD_H
  3. //--------------------------------------------------------------------------//
  4. //--------------------------------------------------------------------------//
  5. // Header Files. //
  6. //--------------------------------------------------------------------------//
  7. #include "MRUList2.h"
  8. #include "richaddr.h"
  9. #include "confroom.h"
  10. #define USE_GAL 0
  11. #define NM_CALLDLG_DEFAULT 0x0000
  12. #define NM_CALLDLG_NO_ILS_FILTER 0x0002
  13. #define NM_CALLDLG_NO_ILS 0x0010
  14. #if USE_GAL
  15. #define NM_CALLDLG_NO_GAL 0x0020
  16. #endif // USE_GAL
  17. #define NM_CALLDLG_NO_WAB 0x0040
  18. #define NM_CALLDLG_NO_SPEEDDIAL 0x0080
  19. #define NM_CALLDLG_NO_HISTORY 0x0100
  20. enum NmDlgCallOption
  21. {
  22. nmDlgCallNormal = NM_CALLDLG_DEFAULT,
  23. nmDlgCallNoFilter = NM_CALLDLG_NO_ILS_FILTER,
  24. nmDlgCallNoIls = NM_CALLDLG_NO_ILS,
  25. #if USE_GAL
  26. nmDlgCallNoGal = NM_CALLDLG_NO_GAL,
  27. #endif // USE_GAL
  28. nmDlgCallNoWab = NM_CALLDLG_NO_WAB,
  29. nmDlgCallNoSpeedDial = NM_CALLDLG_NO_SPEEDDIAL,
  30. nmDlgCallNoHistory = NM_CALLDLG_NO_HISTORY,
  31. nmDlgCallSecurityAlterable = 0x0200,
  32. nmDlgCallSecurityOn = 0x0400,
  33. nmDlgCallNoServerEdit = 0x0800,
  34. };
  35. const DWSTR _rgMruCall[] =
  36. {
  37. { 3, DLGCALL_MRU_KEY },
  38. { MRUTYPE_SZ, REGVAL_DLGCALL_NAME_MRU_PREFIX },
  39. { MRUTYPE_SZ, REGVAL_DLGCALL_ADDR_MRU_PREFIX },
  40. { MRUTYPE_DW, REGVAL_DLGCALL_TYPE_MRU_PREFIX }
  41. };
  42. enum ACD_MRUFIELDS
  43. {
  44. ACD_NAME = 0,
  45. ACD_ADDR,
  46. ACD_TYPE,
  47. } ;
  48. const int CENTRYMAX_MRUCALL = 15; // maximum number of recent calls
  49. class CAcdMru : public CMRUList2
  50. {
  51. public:
  52. CAcdMru();
  53. protected:
  54. int CompareEntry(int iItem, PMRUE pEntry);
  55. } ;
  56. //--------------------------------------------------------------------------//
  57. // CEnumMRU Class. //
  58. //--------------------------------------------------------------------------//
  59. class CEnumMRU: public IEnumRichAddressInfo,
  60. public RefCount,
  61. public CAcdMru
  62. {
  63. public: // public constructor ------------------------------------//
  64. CEnumMRU();
  65. public: // public methods ----------------------------------------//
  66. ULONG
  67. STDMETHODCALLTYPE
  68. AddRef(void);
  69. ULONG
  70. STDMETHODCALLTYPE
  71. Release(void);
  72. virtual
  73. HRESULT
  74. STDMETHODCALLTYPE
  75. GetAddress
  76. (
  77. long index,
  78. RichAddressInfo ** ppAddr
  79. );
  80. public: // public static methods --------------------------------//
  81. static
  82. HRESULT
  83. GetRecentAddresses
  84. (
  85. IEnumRichAddressInfo ** ppEnum
  86. );
  87. static
  88. HRESULT
  89. FreeAddress
  90. (
  91. RichAddressInfo ** ppAddr
  92. );
  93. static
  94. HRESULT
  95. CopyAddress
  96. (
  97. RichAddressInfo * pAddrIn,
  98. RichAddressInfo ** ppAddrOut
  99. );
  100. }; // End of class CEnumMRU.
  101. //--------------------------------------------------------------------------//
  102. // CDlgAcd Class. //
  103. //--------------------------------------------------------------------------//
  104. class CDlgAcd : public IConferenceChangeHandler
  105. {
  106. public: // public constructor ------------------------------------//
  107. CDlgAcd(CConfRoom *pConfRoom);
  108. public: // public destructor ------------------------------------//
  109. virtual
  110. ~CDlgAcd();
  111. public: // IConferenceChangeHandler methods
  112. virtual HRESULT STDMETHODCALLTYPE QueryInterface(
  113. /* [in] */ REFIID riid,
  114. /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject)
  115. {
  116. return(E_FAIL);
  117. }
  118. virtual ULONG STDMETHODCALLTYPE AddRef( void)
  119. {
  120. return(3);
  121. }
  122. virtual ULONG STDMETHODCALLTYPE Release( void)
  123. {
  124. return(2);
  125. }
  126. virtual void OnCallStarted();
  127. virtual void OnCallEnded();
  128. virtual void OnAudioLevelChange(BOOL fSpeaker, DWORD dwVolume) {}
  129. virtual void OnAudioMuteChange(BOOL fSpeaker, BOOL fMute) {}
  130. virtual void OnChangeParticipant(CParticipant *pPart, NM_MEMBER_NOTIFY uNotify) {}
  131. virtual void OnChangePermissions() {}
  132. virtual void OnVideoChannelChanged(NM_CHANNEL_NOTIFY uNotify, INmChannel *pChannel) {}
  133. public: // public methods ----------------------------------------//
  134. INT_PTR
  135. doModal
  136. (
  137. HWND parent,
  138. RichAddressInfo * rai,
  139. bool & secure
  140. );
  141. public: // public static methods --------------------------------//
  142. static
  143. void
  144. newCall
  145. (
  146. HWND parentWindow,
  147. CConfRoom * pConfRoom
  148. );
  149. private: // private methods ----------------------------------------//
  150. bool
  151. onInitDialog
  152. (
  153. HWND dialog
  154. );
  155. bool
  156. onCommand
  157. (
  158. int command,
  159. int notification
  160. );
  161. void
  162. onEditChange(void);
  163. void
  164. onMruSelect
  165. (
  166. int selection
  167. );
  168. void
  169. fillCallMruList(void);
  170. void
  171. fillAddressTypesList(void);
  172. int
  173. get_editText
  174. (
  175. LPTSTR psz,
  176. int cchMax
  177. );
  178. private: // private static methods --------------------------------//
  179. static
  180. INT_PTR
  181. CALLBACK
  182. DlgProcAcd
  183. (
  184. HWND dialog,
  185. UINT message,
  186. WPARAM wParam,
  187. LPARAM lParam
  188. );
  189. private: // private members ----------------------------------------//
  190. HWND m_hwnd;
  191. HWND m_nameCombo;
  192. HWND m_addressTypeCombo;
  193. RichAddressInfo * m_pRai;
  194. RichAddressInfo * m_mruRai;
  195. CConfRoom * m_pConfRoom;
  196. bool m_secure;
  197. CEnumMRU m_callMruList;
  198. }; // End of class CDlgAcd.
  199. //--------------------------------------------------------------------------//
  200. #endif // !defined( CDLGACD_H )
  201.