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.

170 lines
7.0 KiB

  1. /******************************************************************************
  2. *
  3. * INTEL Corporation Proprietary Information
  4. * Copyright (c) 1994, 1995, 1996 Intel Corporation.
  5. *
  6. * This listing is supplied under the terms of a license agreement
  7. * with INTEL Corporation and may not be used, copied, nor disclosed
  8. * except in accordance with the terms of that agreement.
  9. *
  10. *****************************************************************************/
  11. /******************************************************************************
  12. *
  13. * $Workfile: api_util.x $
  14. * $Revision: 1.10 $
  15. * $Modtime: 11 Oct 1996 14:27:46 $
  16. * $Log: S:/STURGEON/SRC/H245/INCLUDE/VCS/api_util.x_v $
  17. Rev 1.10 11 Oct 1996 15:20:22 EHOWARDX
  18. Fixed H245CopyCap() bug.
  19. Rev 1.9 28 Aug 1996 11:41:16 EHOWARDX
  20. const changes.
  21. Rev 1.8 09 Jul 1996 17:10:46 EHOWARDX
  22. Fixed pointer offset bug in processing DataType from received
  23. OpenLogicalChannel.
  24. Rev 1.7 17 Jun 1996 18:07:58 EHOWARDX
  25. Changed argument to build_totcap_cap_client_from_capability().
  26. Rev 1.6 14 Jun 1996 18:55:56 EHOWARDX
  27. Geneva update.
  28. Rev 1.5 29 May 1996 15:21:48 EHOWARDX
  29. Change to use HRESULT.
  30. Rev 1.4 28 May 1996 14:10:06 EHOWARDX
  31. Tel Aviv update.
  32. Rev 1.3 16 May 1996 15:56:52 EHOWARDX
  33. Changed set_capability prototype.
  34. Renamed free_mux_cap to del_mux_cap.
  35. Renamed convert_mux_cap to set_mux_cap.
  36. Rev 1.2 14 May 1996 15:55:14 EHOWARDX
  37. Added del_mux_cap.
  38. Rev 1.1 13 May 1996 23:15:58 EHOWARDX
  39. Fixed remote termcap handling.
  40. Rev 1.0 09 May 1996 21:05:02 EHOWARDX
  41. Initial revision.
  42. Rev 1.12.1.2 09 May 1996 19:32:16 EHOWARDX
  43. Redesigned thread locking logic.
  44. Added new API functions.
  45. Rev 1.12.1.1 23 Apr 1996 18:07:02 EHOWARDX
  46. Missed one...
  47. Rev 1.12.1.0 23 Apr 1996 17:57:24 EHOWARDX
  48. Changed struct ObjectID * to ObjectID.
  49. Rev 1.12 15 Apr 1996 13:57:22 cjutzi
  50. - added conflict resolution.
  51. Rev 1.11 12 Apr 1996 15:25:16 cjutzi
  52. - completed NonStandard w/ ObjectID
  53. - cleandup the cleanup and dealloc of caps for NonStandard Parameters
  54. Rev 1.10 01 Apr 1996 16:42:44 cjutzi
  55. - changed EndConnection and Shutdown
  56. Rev 1.9 18 Mar 1996 15:22:18 cjutzi
  57. Rev 1.8 08 Mar 1996 14:02:28 cjutzi
  58. - added free mux table and element calls
  59. Rev 1.7 05 Mar 1996 17:35:14 cjutzi
  60. Rev 1.6 01 Mar 1996 13:50:08 cjutzi
  61. - added debug message stuff for tracking fsm events.. (map_fsm_event)
  62. Rev 1.5 26 Feb 1996 11:06:46 cjutzi
  63. - added simultanoius caps.. and fixed bugs..
  64. lot's o-changes..
  65. Rev 1.4 15 Feb 1996 10:54:24 cjutzi
  66. - changed some interfaces.. andded define macro for updateing tcap.
  67. Rev 1.3 09 Feb 1996 16:58:34 cjutzi
  68. - cleanup.. and some fixes..
  69. - added and or changed headers to reflect the log of changes
  70. *
  71. *****************************************************************************/
  72. #define disable_cap_link(p) {(p)->value.bit_mask &= ~capability_present;}
  73. extern BYTE DataTypeMap[];
  74. unsigned ObjectIdLength (const NonStandardIdentifier *pIdentifier);
  75. CapabilityTableLink find_capid_by_entrynumber (struct TerminalCapabilitySet *,H245_CAPID_T);
  76. CapabilityTableLink alloc_link_cap_entry ( struct TerminalCapabilitySet *);
  77. HRESULT load_cap (struct Capability *pCapability, const H245_TOTCAP_T *pTotCap);
  78. void free_cap (struct Capability *pCapability, const H245_TOTCAP_T *pTotCap);
  79. HRESULT build_totcap_from_captbl (H245_TOTCAP_T *,CapabilityTableLink, int);
  80. HRESULT build_totcap_cap_n_client_from_capability (struct Capability *, H245_DATA_T, unsigned short, H245_TOTCAP_T *);
  81. void clean_cap_table( struct TerminalCapabilitySet *);
  82. HRESULT del_cap_link ( struct TerminalCapabilitySet *, CapabilityTableLink);
  83. Tracker_T * alloc_link_tracker (struct InstanceStruct *pInstance,
  84. API_TRACKER_T,
  85. DWORD_PTR,
  86. API_TRACKER_STATE_T,
  87. API_TRACKER_CH_ALLOC_T,
  88. API_TRACKER_CH_T,
  89. H245_DATA_T,
  90. H245_CHANNEL_T,
  91. H245_CHANNEL_T,
  92. DWORD);
  93. void unlink_dealloc_tracker (struct InstanceStruct *pInstance, Tracker_T *);
  94. Tracker_T * find_tracker_by_txchannel(struct InstanceStruct *pInstance, DWORD, API_TRACKER_CH_ALLOC_T);
  95. Tracker_T * find_tracker_by_rxchannel(struct InstanceStruct *pInstance, DWORD, API_TRACKER_CH_ALLOC_T);
  96. Tracker_T * find_tracker_by_pointer (struct InstanceStruct *pInstance, Tracker_T *);
  97. Tracker_T * find_tracker_by_type (struct InstanceStruct *pInstance, API_TRACKER_T, Tracker_T *);
  98. void del_mux_cap (struct TerminalCapabilitySet *pTermCapSet);
  99. HRESULT set_mux_cap (
  100. struct InstanceStruct *pInstance,
  101. struct TerminalCapabilitySet *pTermCapSet,
  102. H245_TOTCAP_T *pTotCap);
  103. HRESULT set_capability (
  104. struct InstanceStruct *pInstance,
  105. struct TerminalCapabilitySet *pTermCapSet,
  106. H245_TOTCAP_T *pTotCap);
  107. HRESULT set_cap_descriptor (
  108. struct InstanceStruct *pInstance,
  109. H245_CAPDESC_T *pCapDesc,
  110. H245_CAPDESCID_T *pCapDescId,
  111. struct TerminalCapabilitySet *pTermCapSet);
  112. HRESULT del_cap_descriptor (
  113. struct InstanceStruct *pInstance,
  114. H245_CAPDESCID_T CapDescId,
  115. struct TerminalCapabilitySet *pTermCapSet);
  116. HRESULT build_totcap_from_mux(H245_TOTCAP_T *pTotCap, MultiplexCapability *pMuxCap, H245_CAPDIR_T Dir);
  117. LPSTR map_api_error (HRESULT);
  118. void free_mux_desc_list (MultiplexEntryDescriptorLink);
  119. H245_LINK_T * alloc_link (int);
  120. void dealloc_simultaneous_cap (CapabilityDescriptor *);
  121. LPSTR map_fsm_event (DWORD);
  122. LPSTR map_tracker_type (API_TRACKER_T);
  123. void free_mux_table_list (H245_MUX_TABLE_T *);
  124. void free_mux_el_list (H245_MUX_ENTRY_ELEMENT_T *);
  125. unsigned ObjectIdLength (const NonStandardIdentifier *pIdentifier);
  126. void FreeNonStandardParameter(NonStandardParameter *pFree);
  127. HRESULT CopyNonStandardParameter(NonStandardParameter *pNew, const NonStandardParameter *pOld);
  128. void FreeH222Cap(H222Capability *pFree);
  129. HRESULT CopyH222Cap(H222Capability *pNew, const H222Capability *pOld);
  130. void FreeH2250Cap(H2250Capability *pFree);
  131. HRESULT CopyH2250Cap(H2250Capability *pNew, const H2250Capability *pOld);
  132.