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.

81 lines
1.6 KiB

  1. /****************************************************************************
  2. *
  3. * FILE: ConfApi.cpp
  4. *
  5. * CONTENTS: CConfRoom Application Programming Interface
  6. *
  7. ****************************************************************************/
  8. #include "precomp.h"
  9. #include "global.h"
  10. #include "Conf.h"
  11. #include "confapi.h"
  12. #include "nameres.h"
  13. #include "nmmanager.h"
  14. #include "ConfUtil.h"
  15. // from conf.cpp
  16. extern INmSysInfo2 * g_pNmSysInfo;
  17. BOOL g_fLoggedOn = FALSE;
  18. /* S E T L O G G E D O N */
  19. /*-------------------------------------------------------------------------
  20. %%Function: SetLoggedOn
  21. -------------------------------------------------------------------------*/
  22. VOID SetLoggedOn(BOOL fLoggedOn)
  23. {
  24. g_fLoggedOn = fLoggedOn;
  25. if (NULL == g_pNmSysInfo)
  26. return;
  27. g_pNmSysInfo->SetOption(NM_SYSOPT_LOGGED_ON, fLoggedOn);
  28. }
  29. DWORD MapNmAddrTypeToNameType(NM_ADDR_TYPE addrType)
  30. {
  31. switch (addrType)
  32. {
  33. case NM_ADDR_IP:
  34. return NAMETYPE_IP;
  35. case NM_ADDR_PSTN:
  36. return NAMETYPE_PSTN;
  37. case NM_ADDR_ULS:
  38. return NAMETYPE_ULS;
  39. case NM_ADDR_H323_GATEWAY:
  40. return NAMETYPE_H323GTWY;
  41. case NM_ADDR_ALIAS_ID:
  42. return NAMETYPE_ALIAS_ID;
  43. case NM_ADDR_ALIAS_E164:
  44. return NAMETYPE_ALIAS_E164;
  45. case NM_ADDR_UNKNOWN:
  46. default:
  47. return NAMETYPE_UNKNOWN;
  48. }
  49. }
  50. // Return TRUE if NetMeeting should display the incoming file transfer dialog
  51. BOOL FFtDialog(void)
  52. {
  53. return TRUE;
  54. }
  55. BOOL FUiVisible(void)
  56. {
  57. HWND hwnd = ::GetMainWindow();
  58. if (NULL == hwnd)
  59. return FALSE;
  60. return IsWindowVisible(hwnd);
  61. }