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.

361 lines
11 KiB

  1. /*
  2. (C) Copyright 1998
  3. All rights reserved.
  4. Portions of this software are:
  5. (C) Copyright 1995, 1999 TriplePoint, Inc. -- http://www.TriplePoint.com
  6. License to use this software is granted under the terms outlined in
  7. the TriplePoint Software Services Agreement.
  8. (C) Copyright 1992 Microsoft Corp. -- http://www.Microsoft.com
  9. License to use this software is granted under the terms outlined in
  10. the Microsoft Windows Device Driver Development Kit.
  11. @doc INTERNAL Tspi Tspi_h
  12. @module Tspi.h |
  13. This module defines the interface to the <t TAPILINE_OBJECT>.
  14. @head3 Contents |
  15. @index class,mfunc,func,msg,mdata,struct,enum | Tspi_h
  16. @end
  17. */
  18. #ifndef _TSPI_H
  19. #define _TSPI_H
  20. #define TSPI_OBJECT_TYPE ((ULONG)'T')+\
  21. ((ULONG)'S'<<8)+\
  22. ((ULONG)'P'<<16)+\
  23. ((ULONG)'I'<<24)
  24. #define TSPIDEV_OBJECT_TYPE ((ULONG)'T')+\
  25. ((ULONG)'S'<<8)+\
  26. ((ULONG)'P'<<16)+\
  27. ((ULONG)'D'<<24)
  28. #define TSPILINE_OBJECT_TYPE ((ULONG)'T')+\
  29. ((ULONG)'S'<<8)+\
  30. ((ULONG)'P'<<16)+\
  31. ((ULONG)'L'<<24)
  32. #define TSPIADDR_OBJECT_TYPE ((ULONG)'T')+\
  33. ((ULONG)'S'<<8)+\
  34. ((ULONG)'P'<<16)+\
  35. ((ULONG)'A'<<24)
  36. #define TSPICALL_OBJECT_TYPE ((ULONG)'T')+\
  37. ((ULONG)'S'<<8)+\
  38. ((ULONG)'P'<<16)+\
  39. ((ULONG)'C'<<24)
  40. /*
  41. // There is only one TAPI address ID per line device (zero based).
  42. */
  43. #define TSPI_NUM_ADDRESSES 1
  44. #define TSPI_ADDRESS_ID 0
  45. /*
  46. // The following constants are used by the TSPI to determine the DeviceClass.
  47. */
  48. #define TAPI_DEVICECLASS_NAME "tapi/line"
  49. #define TAPI_DEVICECLASS_ID 1
  50. #define NDIS_DEVICECLASS_NAME "ndis"
  51. #define NDIS_DEVICECLASS_ID 2
  52. /* @doc INTERNAL Tspi Tspi_h TAPI_DEVICE_ID
  53. @struct TAPI_DEVICE_ID |
  54. This structure is defined by the Win32 TAPI extensions for the "ndis"
  55. device class.
  56. The ndis device class consists of devices that can be associated with
  57. network driver interface specification (NDIS) media access control (MAC)
  58. drivers to support network communications. You access these devices by
  59. using functions.
  60. The lineGetID and phoneGetID functions fill a VARSTRING structure,
  61. setting the dwStringFormat member to the STRINGFORMAT_BINARY value and
  62. appending these additional members.
  63. @iex
  64. HANDLE hDevice; // NDIS connection identifier
  65. CHAR szDeviceType[1]; // name of device
  66. @comm
  67. The hDevice member is the identifier to pass to a MAC, such as the
  68. asynchronous MAC for dial-up networking, to associate a network
  69. connection with the call/modem connection. The szDeviceType member is a
  70. null-terminated ASCII string specifying the name of the device associated
  71. with the identifier. For more information, see documentation about
  72. writing NDIS MAC drivers for use with dial-up networking.
  73. */
  74. typedef struct TAPI_DEVICE_ID
  75. {
  76. ULONG hDevice; // @field
  77. // The NDIS Connection Wrapper identifier <p ConnectionWrapperID>.
  78. UCHAR DeviceName[sizeof(VER_DEFAULT_MEDIATYPE)]; // @field
  79. // Name of device (e.g. "isdn", "x25", or "framerelay" )
  80. } TAPI_DEVICE_ID, *PTAPI_DEVICE_ID;
  81. /*
  82. Function prototypes.
  83. */
  84. BOOLEAN STR_EQU(
  85. IN PCHAR s1,
  86. IN PCHAR s2,
  87. IN int len
  88. );
  89. NDIS_STATUS TspiRequestHandler(
  90. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  91. IN NDIS_OID Oid,
  92. IN PVOID InformationBuffer,
  93. IN ULONG InformationBufferLength,
  94. OUT PULONG BytesUsed,
  95. OUT PULONG BytesNeeded
  96. );
  97. NDIS_STATUS TspiConfigDialog(
  98. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  99. IN PNDIS_TAPI_CONFIG_DIALOG Request,
  100. OUT PULONG BytesWritten,
  101. OUT PULONG BytesNeeded
  102. );
  103. NDIS_STATUS TspiGetAddressCaps(
  104. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  105. IN PNDIS_TAPI_GET_ADDRESS_CAPS Request,
  106. OUT PULONG BytesWritten,
  107. OUT PULONG BytesNeeded
  108. );
  109. NDIS_STATUS TspiGetAddressID(
  110. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  111. IN PNDIS_TAPI_GET_ADDRESS_ID Request,
  112. OUT PULONG BytesWritten,
  113. OUT PULONG BytesNeeded
  114. );
  115. NDIS_STATUS TspiGetAddressStatus(
  116. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  117. IN PNDIS_TAPI_GET_ADDRESS_STATUS Request,
  118. OUT PULONG BytesWritten,
  119. OUT PULONG BytesNeeded
  120. );
  121. NDIS_STATUS TspiGetCallAddressID(
  122. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  123. IN PNDIS_TAPI_GET_CALL_ADDRESS_ID Request,
  124. OUT PULONG BytesWritten,
  125. OUT PULONG BytesNeeded
  126. );
  127. NDIS_STATUS TspiGetCallInfo(
  128. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  129. IN PNDIS_TAPI_GET_CALL_INFO Request,
  130. OUT PULONG BytesWritten,
  131. OUT PULONG BytesNeeded
  132. );
  133. NDIS_STATUS TspiGetCallStatus(
  134. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  135. IN PNDIS_TAPI_GET_CALL_STATUS Request,
  136. OUT PULONG BytesWritten,
  137. OUT PULONG BytesNeeded
  138. );
  139. NDIS_STATUS TspiGetDevCaps(
  140. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  141. IN PNDIS_TAPI_GET_DEV_CAPS Request,
  142. OUT PULONG BytesWritten,
  143. OUT PULONG BytesNeeded
  144. );
  145. NDIS_STATUS TspiGetDevConfig(
  146. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  147. IN PNDIS_TAPI_GET_DEV_CONFIG Request,
  148. OUT PULONG BytesWritten,
  149. OUT PULONG BytesNeeded
  150. );
  151. NDIS_STATUS TspiGetID(
  152. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  153. IN PNDIS_TAPI_GET_ID Request,
  154. OUT PULONG BytesWritten,
  155. OUT PULONG BytesNeeded
  156. );
  157. NDIS_STATUS TspiGetLineDevStatus(
  158. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  159. IN PNDIS_TAPI_GET_LINE_DEV_STATUS Request,
  160. OUT PULONG BytesWritten,
  161. OUT PULONG BytesNeeded
  162. );
  163. NDIS_STATUS TspiMakeCall(
  164. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  165. IN PNDIS_TAPI_MAKE_CALL Request,
  166. OUT PULONG BytesWritten,
  167. OUT PULONG BytesNeeded
  168. );
  169. NDIS_STATUS TspiOpen(
  170. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  171. IN PNDIS_TAPI_OPEN Request,
  172. OUT PULONG BytesWritten,
  173. OUT PULONG BytesNeeded
  174. );
  175. NDIS_STATUS TspiProviderInitialize(
  176. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  177. IN PNDIS_TAPI_PROVIDER_INITIALIZE Request,
  178. OUT PULONG BytesWritten,
  179. OUT PULONG BytesNeeded
  180. );
  181. NDIS_STATUS TspiAccept(
  182. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  183. IN PNDIS_TAPI_ACCEPT Request,
  184. OUT PULONG BytesRead,
  185. OUT PULONG BytesNeeded
  186. );
  187. NDIS_STATUS TspiAnswer(
  188. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  189. IN PNDIS_TAPI_ANSWER Request,
  190. OUT PULONG BytesRead,
  191. OUT PULONG BytesNeeded
  192. );
  193. NDIS_STATUS TspiClose(
  194. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  195. IN PNDIS_TAPI_CLOSE Request,
  196. OUT PULONG BytesRead,
  197. OUT PULONG BytesNeeded
  198. );
  199. NDIS_STATUS TspiCloseCall(
  200. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  201. IN PNDIS_TAPI_CLOSE_CALL Request,
  202. OUT PULONG BytesRead,
  203. OUT PULONG BytesNeeded
  204. );
  205. NDIS_STATUS TspiConditionalMediaDetection(
  206. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  207. IN PNDIS_TAPI_CONDITIONAL_MEDIA_DETECTION Request,
  208. OUT PULONG BytesRead,
  209. OUT PULONG BytesNeeded
  210. );
  211. NDIS_STATUS TspiDrop(
  212. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  213. IN PNDIS_TAPI_DROP Request,
  214. OUT PULONG BytesRead,
  215. OUT PULONG BytesNeeded
  216. );
  217. NDIS_STATUS TspiProviderShutdown(
  218. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  219. IN PNDIS_TAPI_PROVIDER_SHUTDOWN Request,
  220. OUT PULONG BytesRead,
  221. OUT PULONG BytesNeeded
  222. );
  223. NDIS_STATUS TspiSetAppSpecific(
  224. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  225. IN PNDIS_TAPI_SET_APP_SPECIFIC Request,
  226. OUT PULONG BytesRead,
  227. OUT PULONG BytesNeeded
  228. );
  229. NDIS_STATUS TspiSetCallParams(
  230. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  231. IN PNDIS_TAPI_SET_CALL_PARAMS Request,
  232. OUT PULONG BytesRead,
  233. OUT PULONG BytesNeeded
  234. );
  235. NDIS_STATUS TspiSetDefaultMediaDetection(
  236. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  237. IN PNDIS_TAPI_SET_DEFAULT_MEDIA_DETECTION Request,
  238. OUT PULONG BytesRead,
  239. OUT PULONG BytesNeeded
  240. );
  241. NDIS_STATUS TspiSetDevConfig(
  242. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  243. IN PNDIS_TAPI_SET_DEV_CONFIG Request,
  244. OUT PULONG BytesRead,
  245. OUT PULONG BytesNeeded
  246. );
  247. NDIS_STATUS TspiSetMediaMode(
  248. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  249. IN PNDIS_TAPI_SET_MEDIA_MODE Request,
  250. OUT PULONG BytesRead,
  251. OUT PULONG BytesNeeded
  252. );
  253. NDIS_STATUS TspiSetStatusMessages(
  254. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  255. IN PNDIS_TAPI_SET_STATUS_MESSAGES Request,
  256. OUT PULONG BytesRead,
  257. OUT PULONG BytesNeeded
  258. );
  259. VOID TspiAddressStateHandler(
  260. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  261. IN PBCHANNEL_OBJECT pBChannel,
  262. IN ULONG AddressState
  263. );
  264. VOID TspiCallStateHandler(
  265. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  266. IN PBCHANNEL_OBJECT pBChannel,
  267. IN ULONG CallState,
  268. IN ULONG StateParam
  269. );
  270. VOID TspiLineDevStateHandler(
  271. IN PMINIPORT_ADAPTER_OBJECT pAdapter,
  272. IN PBCHANNEL_OBJECT pBChannel,
  273. IN ULONG LineDevState
  274. );
  275. VOID TspiResetHandler(
  276. IN PMINIPORT_ADAPTER_OBJECT pAdapter
  277. );
  278. VOID TspiCallTimerHandler(
  279. IN PVOID SystemSpecific1,
  280. IN PBCHANNEL_OBJECT pBChannel,
  281. IN PVOID SystemSpecific2,
  282. IN PVOID SystemSpecific3
  283. );
  284. #endif // _TSPI_H