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.

204 lines
3.0 KiB

  1. //============================================================================
  2. // Copyright (c) 2000, Microsoft Corporation
  3. //
  4. // File: kmddsp.h
  5. //
  6. // History:
  7. // Yi Sun June-27-2000 Created
  8. //
  9. // Abstract:
  10. //============================================================================
  11. #ifndef _KMDDSP_H_
  12. #define _KMDDSP_H_
  13. // handle types
  14. #define HT_HDCALL 1
  15. #define HT_HDLINE 2
  16. // tapi success code
  17. #define TAPI_SUCCESS 0
  18. // alloc fixed mem then zeroinit it
  19. #define MALLOC(x) LocalAlloc(LPTR, x)
  20. #define FREE(x) LocalFree(x)
  21. // debug levels
  22. #define DL_ERROR 1
  23. #define DL_WARNING 2
  24. #define DL_INFO 4
  25. #define DL_TRACE 8
  26. typedef VOID (*FREEOBJPROC)(PVOID);
  27. // debug routine
  28. VOID
  29. TspLog(
  30. IN DWORD dwDebugLevel,
  31. IN PCHAR pchFormat,
  32. ...
  33. );
  34. //
  35. // implemented in mapper.c
  36. //
  37. LONG
  38. InitializeMapper();
  39. VOID
  40. UninitializeMapper();
  41. LONG
  42. OpenObjHandle(
  43. IN PVOID pObjPtr,
  44. IN FREEOBJPROC pfnFreeProc,
  45. OUT HANDLE *phObj
  46. );
  47. LONG
  48. CloseObjHandle(
  49. IN HANDLE hObj
  50. );
  51. LONG
  52. AcquireObjReadLock(
  53. IN HANDLE hObj
  54. );
  55. LONG
  56. GetObjWithReadLock(
  57. IN HANDLE hObj,
  58. OUT PVOID *ppObjPtr
  59. );
  60. LONG
  61. ReleaseObjReadLock(
  62. IN HANDLE hObj
  63. );
  64. LONG
  65. AcquireObjWriteLock(
  66. IN HANDLE hObj
  67. );
  68. LONG
  69. GetObjWithWriteLock(
  70. IN HANDLE hObj,
  71. OUT PVOID *ppObjPtr
  72. );
  73. LONG
  74. ReleaseObjWriteLock(
  75. IN HANDLE hObj
  76. );
  77. //
  78. // implemented in allocatr.c
  79. //
  80. VOID
  81. InitAllocator();
  82. VOID
  83. UninitAllocator();
  84. PVOID
  85. AllocRequest(
  86. IN DWORD dwSize
  87. );
  88. VOID
  89. FreeRequest(
  90. IN PVOID pMem
  91. );
  92. VOID
  93. MarkRequest(
  94. IN PVOID pMem
  95. );
  96. VOID
  97. UnmarkRequest(
  98. IN PVOID pMem
  99. );
  100. PVOID
  101. AllocCallObj(
  102. IN DWORD dwSize
  103. );
  104. VOID
  105. FreeCallObj(
  106. IN PVOID pCall
  107. );
  108. PVOID
  109. AllocLineObj(
  110. IN DWORD dwSize
  111. );
  112. VOID
  113. FreeLineObj(
  114. IN PVOID pLine
  115. );
  116. //
  117. // implemented in devlist.c
  118. //
  119. VOID
  120. InitLineDevList();
  121. VOID
  122. UninitLineDevList();
  123. LONG
  124. SetNegotiatedTSPIVersion(
  125. IN DWORD dwDeviceID,
  126. IN DWORD dwTSPIVersion
  127. );
  128. LONG
  129. SetNegotiatedExtVersion(
  130. IN DWORD dwDeviceID,
  131. IN DWORD dwExtVersion
  132. );
  133. LONG
  134. SetSelectedExtVersion(
  135. IN DWORD dwDeviceID,
  136. IN DWORD dwExtVersion
  137. );
  138. LONG
  139. CommitNegotiatedTSPIVersion(
  140. IN DWORD dwDeviceID
  141. );
  142. LONG
  143. DecommitNegotiatedTSPIVersion(
  144. IN DWORD dwDeviceID
  145. );
  146. LONG
  147. GetNumAddressIDs(
  148. IN DWORD dwDeviceID,
  149. OUT DWORD *pdwNumAddressIDs
  150. );
  151. LONG
  152. GetDevCaps(
  153. IN DWORD dwDeviceID,
  154. IN DWORD dwTSPIVersion,
  155. IN DWORD dwExtVersion,
  156. OUT LINEDEVCAPS *pLineDevCaps
  157. );
  158. //
  159. // implemented in kmddsp.c
  160. //
  161. LINEDEVCAPS *
  162. GetLineDevCaps(
  163. IN DWORD dwDeviceID,
  164. IN DWORD dwExtVersion
  165. );
  166. #endif // _KMDDSP_H_