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.

109 lines
2.9 KiB

  1. /***************************************************************************
  2. *
  3. * CDMODEM.H
  4. *
  5. * This module contains private CD defines and structures
  6. *
  7. * Copyright 1996, Citrix Systems Inc.
  8. *
  9. * Author: Brad Pedersen (7/12/96)
  10. *
  11. * $Log: N:\NT\PRIVATE\CITRIX\CD\CDMODEM\INC\VCS\CDMODEM.H $
  12. *
  13. * Rev 1.1 06 Feb 1997 17:36:16 kurtp
  14. * update
  15. *
  16. * Rev 1.0 16 Oct 1996 11:17:36 brucef
  17. * Initial revision.
  18. *
  19. * Rev 1.3 25 Sep 1996 13:23:40 bradp
  20. * update
  21. *
  22. * Rev 1.2 11 Sep 1996 17:52:20 brucef
  23. * update
  24. *
  25. * Rev 1.1 05 Sep 1996 11:00:48 brucef
  26. * update
  27. *
  28. * Rev 1.0 15 Jul 1996 11:04:00 bradp
  29. * Initial revision.
  30. *
  31. *
  32. *************************************************************************/
  33. /*=============================================================================
  34. == Defines
  35. =============================================================================*/
  36. #ifdef DBG
  37. #define DBGPRINT(_arg) DbgPrint _arg
  38. #else
  39. #define DBGPRINT(_arg) { }
  40. #endif
  41. /*
  42. * these TIMEOUT values should come from the Registry
  43. */
  44. #define DISCONN_TIMEOUT (10*1000)
  45. #define CALLBACK_TIMEOUT (60*1000)
  46. /*
  47. * Given the total buffer size of a buffer which contains
  48. * a CDMODEM_ENDPOINT at the beginning, return the number of bytes
  49. * following the CDMODEM_ENDPOINT structure.
  50. */
  51. #define STACK_ENDPOINT_SIZE(_sz) ( \
  52. (_sz) == 0 ? 0 : (_sz) - sizeof(CDMODEM_ENDPOINT) \
  53. )
  54. /*
  55. * Given the address of a buffer which contains a CDMODEM_ENDPOINT
  56. * at the beginning, return the address of the word following the
  57. * CDMODEM_ENDPOINT structure.
  58. */
  59. #define STACK_ENDPOINT_ADDR(_ep) ( \
  60. (_ep) == NULL ? NULL : (PVOID)((BYTE *)(_ep) + sizeof(CDMODEM_ENDPOINT)) \
  61. )
  62. /*=============================================================================
  63. == Structures
  64. =============================================================================*/
  65. /*
  66. * Modem CD structure
  67. */
  68. typedef struct _CDMODEM {
  69. HANDLE hStack; // ica device driver stack handle
  70. DEVICENAME DeviceName; // transport driver device name
  71. HANDLE hPort; // modem port handle
  72. HANDLE hCommDevice; // comm port handle
  73. HANDLE hDiscEvent; // disconnect event handle, used by TAPI
  74. } CDMODEM, * PCDMODEM;
  75. /*
  76. * The CDMODEM_ENDPOINT prefixes the ICA_STACK_ENDOINT on device
  77. * connections that utilize a modem. The Length element must
  78. * include not only the size of CDMODEM_ENDPOINT, but also the
  79. * Endpoint which it preceeds.
  80. *
  81. * !!! WARNING !!!
  82. * The length field must be in the same position within this
  83. * structure as it is in the ICA_STACK_ENDPOINT structure (icadd.h>.
  84. */
  85. typedef struct _CDMODEM_ENDPOINT {
  86. ULONG Length; // length of ALL endpoint data
  87. HANDLE hPort; // modem port handle
  88. HANDLE hCommDevice; // comm port handle
  89. HANDLE hDiscEvent; // disconnect event handle, used by TAPI
  90. } CDMODEM_ENDPOINT, * PCDMODEM_ENDPOINT;