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.

778 lines
25 KiB

  1. // The Telephony API is jointly copyrighted by Intel and Microsoft. You are
  2. // granted a royalty free worldwide, unlimited license to make copies, and use
  3. // the API/SPI for making applications/drivers that interface with the
  4. // specification provided that this paragraph and the Intel/Microsoft copyright
  5. // statement is maintained as is in the text and source code files.
  6. //
  7. // Copyright 1994 Microsoft, all rights reserved.
  8. // Portions copyright 1992, 1993 Intel/Microsoft, all rights reserved.
  9. #ifndef TSPI_H
  10. #define TSPI_H
  11. #include <windows.h>
  12. #include "tapi.h"
  13. // tspi.h is only of use in conjunction with tapi.h. Very few types are
  14. // defined in tspi.h. Most types of procedure formal parameters are simply
  15. // passed through from corresponding procedures in tapi.h. A working knowledge
  16. // of the TAPI interface is required for an understanding of this interface.
  17. #ifdef __cplusplus
  18. extern "C" { /* Assume C declarations for C++ */
  19. #endif /* __cplusplus */
  20. #ifndef DECLARE_OPAQUE32
  21. #define DECLARE_OPAQUE32(name) struct name##__ { int unused; }; \
  22. typedef const struct name##__ FAR* name
  23. #endif // DECLARE_OPAQUE32
  24. #ifndef TSPIAPI
  25. #define TSPIAPI __export __far __pascal
  26. #endif
  27. DECLARE_OPAQUE32(HDRVCALL);
  28. DECLARE_OPAQUE32(HDRVLINE);
  29. DECLARE_OPAQUE32(HDRVPHONE);
  30. typedef HDRVCALL FAR * LPHDRVCALL;
  31. typedef HDRVLINE FAR * LPHDRVLINE;
  32. typedef HDRVPHONE FAR * LPHDRVPHONE;
  33. DECLARE_OPAQUE32(HTAPICALL);
  34. DECLARE_OPAQUE32(HTAPILINE);
  35. DECLARE_OPAQUE32(HTAPIPHONE);
  36. typedef HTAPICALL FAR * LPHTAPICALL;
  37. typedef HTAPILINE FAR * LPHTAPILINE;
  38. typedef HTAPIPHONE FAR * LPHTAPIPHONE;
  39. typedef void (CALLBACK * LINEEVENT) (
  40. HTAPILINE htLine,
  41. HTAPICALL htCall,
  42. DWORD dwMsg,
  43. DWORD dwParam1,
  44. DWORD dwParam2,
  45. DWORD dwParam3);
  46. typedef void (CALLBACK * PHONEEVENT) (
  47. HTAPIPHONE htPhone,
  48. DWORD dwMsg,
  49. DWORD dwParam1,
  50. DWORD dwParam2,
  51. DWORD dwParam3);
  52. #define TSPI_MESSAGE_BASE 500
  53. // The lowest-numbered TSPI-specific message ID number
  54. #define LINE_NEWCALL ((long) TSPI_MESSAGE_BASE + 0)
  55. #define LINE_CALLDEVSPECIFIC ((long) TSPI_MESSAGE_BASE + 1)
  56. #define LINE_CALLDEVSPECIFICFEATURE ((long) TSPI_MESSAGE_BASE + 2)
  57. #define INITIALIZE_NEGOTIATION 0xFFFFFFFFL
  58. typedef DWORD DRV_REQUESTID;
  59. typedef void (CALLBACK * ASYNC_COMPLETION) (
  60. DRV_REQUESTID dwRequestID,
  61. LONG lResult);
  62. // TSPIAPI TSPI_line functions
  63. // ----------------------------------------------------------------------------
  64. LONG TSPIAPI TSPI_lineAccept(
  65. DRV_REQUESTID dwRequestID,
  66. HDRVCALL hdCall,
  67. LPCSTR lpsUserUserInfo,
  68. DWORD dwSize);
  69. LONG TSPIAPI TSPI_lineAddToConference(
  70. DRV_REQUESTID dwRequestID,
  71. HDRVCALL hdConfCall,
  72. HDRVCALL hdConsultCall);
  73. LONG TSPIAPI TSPI_lineAnswer(
  74. DRV_REQUESTID dwRequestID,
  75. HDRVCALL hdCall,
  76. LPCSTR lpsUserUserInfo,
  77. DWORD dwSize);
  78. LONG TSPIAPI TSPI_lineBlindTransfer(
  79. DRV_REQUESTID dwRequestID,
  80. HDRVCALL hdCall,
  81. LPCSTR lpszDestAddress,
  82. DWORD dwCountryCode);
  83. LONG TSPIAPI TSPI_lineClose(
  84. HDRVLINE hdLine);
  85. LONG TSPIAPI TSPI_lineCloseCall(
  86. HDRVCALL hdCall);
  87. LONG TSPIAPI TSPI_lineCompleteCall(
  88. DRV_REQUESTID dwRequestID,
  89. HDRVCALL hdCall,
  90. LPDWORD lpdwCompletionID,
  91. DWORD dwCompletionMode,
  92. DWORD dwMessageID);
  93. LONG TSPIAPI TSPI_lineCompleteTransfer(
  94. DRV_REQUESTID dwRequestID,
  95. HDRVCALL hdCall,
  96. HDRVCALL hdConsultCall,
  97. HTAPICALL htConfCall,
  98. LPHDRVCALL lphdConfCall,
  99. DWORD dwTransferMode);
  100. LONG TSPIAPI TSPI_lineConditionalMediaDetection(
  101. HDRVLINE hdLine,
  102. DWORD dwMediaModes,
  103. LPLINECALLPARAMS const lpCallParams);
  104. LONG TSPIAPI TSPI_lineConfigDialog(
  105. DWORD dwDeviceID,
  106. HWND hwndOwner,
  107. LPCSTR lpszDeviceClass);
  108. LONG TSPIAPI TSPI_lineDevSpecific(
  109. DRV_REQUESTID dwRequestID,
  110. HDRVLINE hdLine,
  111. DWORD dwAddressID,
  112. HDRVCALL hdCall,
  113. LPVOID lpParams,
  114. DWORD dwSize);
  115. LONG TSPIAPI TSPI_lineDevSpecificFeature(
  116. DRV_REQUESTID dwRequestID,
  117. HDRVLINE hdLine,
  118. DWORD dwFeature,
  119. LPVOID lpParams,
  120. DWORD dwSize);
  121. LONG TSPIAPI TSPI_lineDial(
  122. DRV_REQUESTID dwRequestID,
  123. HDRVCALL hdCall,
  124. LPCSTR lpszDestAddress,
  125. DWORD dwCountryCode);
  126. LONG TSPIAPI TSPI_lineDrop(
  127. DRV_REQUESTID dwRequestID,
  128. HDRVCALL hdCall,
  129. LPCSTR lpsUserUserInfo,
  130. DWORD dwSize);
  131. LONG TSPIAPI TSPI_lineDropOnClose(
  132. HDRVCALL hdCall);
  133. LONG TSPIAPI TSPI_lineDropNoOwner(
  134. HDRVCALL hdCall);
  135. LONG TSPIAPI TSPI_lineForward(
  136. DRV_REQUESTID dwRequestID,
  137. HDRVLINE hdLine,
  138. DWORD bAllAddresses,
  139. DWORD dwAddressID,
  140. LPLINEFORWARDLIST const lpForwardList,
  141. DWORD dwNumRingsNoAnswer,
  142. HTAPICALL htConsultCall,
  143. LPHDRVCALL lphdConsultCall,
  144. LPLINECALLPARAMS const lpCallParams);
  145. LONG TSPIAPI TSPI_lineGatherDigits(
  146. HDRVCALL hdCall,
  147. DWORD dwEndToEndID,
  148. DWORD dwDigitModes,
  149. LPSTR lpsDigits,
  150. DWORD dwNumDigits,
  151. LPCSTR lpszTerminationDigits,
  152. DWORD dwFirstDigitTimeout,
  153. DWORD dwInterDigitTimeout);
  154. LONG TSPIAPI TSPI_lineGenerateDigits(
  155. HDRVCALL hdCall,
  156. DWORD dwEndToEndID,
  157. DWORD dwDigitMode,
  158. LPCSTR lpszDigits,
  159. DWORD dwDuration);
  160. LONG TSPIAPI TSPI_lineGenerateTone(
  161. HDRVCALL hdCall,
  162. DWORD dwEndToEndID,
  163. DWORD dwToneMode,
  164. DWORD dwDuration,
  165. DWORD dwNumTones,
  166. LPLINEGENERATETONE const lpTones);
  167. LONG TSPIAPI TSPI_lineGetAddressCaps(
  168. DWORD dwDeviceID,
  169. DWORD dwAddressID,
  170. DWORD dwTSPIVersion,
  171. DWORD dwExtVersion,
  172. LPLINEADDRESSCAPS lpAddressCaps);
  173. LONG TSPIAPI TSPI_lineGetAddressID(
  174. HDRVLINE hdLine,
  175. LPDWORD lpdwAddressID,
  176. DWORD dwAddressMode,
  177. LPCSTR lpsAddress,
  178. DWORD dwSize);
  179. LONG TSPIAPI TSPI_lineGetAddressStatus(
  180. HDRVLINE hdLine,
  181. DWORD dwAddressID,
  182. LPLINEADDRESSSTATUS lpAddressStatus);
  183. LONG TSPIAPI TSPI_lineGetCallAddressID(
  184. HDRVCALL hdCall,
  185. LPDWORD lpdwAddressID);
  186. LONG TSPIAPI TSPI_lineGetCallInfo(
  187. HDRVCALL hdCall,
  188. LPLINECALLINFO lpCallInfo);
  189. LONG TSPIAPI TSPI_lineGetCallStatus(
  190. HDRVCALL hdCall,
  191. LPLINECALLSTATUS lpCallStatus);
  192. LONG TSPIAPI TSPI_lineGetDevCaps(
  193. DWORD dwDeviceID,
  194. DWORD dwTSPIVersion,
  195. DWORD dwExtVersion,
  196. LPLINEDEVCAPS lpLineDevCaps);
  197. LONG TSPIAPI TSPI_lineGetDevConfig(
  198. DWORD dwDeviceID,
  199. LPVARSTRING lpDeviceConfig,
  200. LPCSTR lpszDeviceClass);
  201. LONG TSPIAPI TSPI_lineGetExtensionID(
  202. DWORD dwDeviceID,
  203. DWORD dwTSPIVersion,
  204. LPLINEEXTENSIONID lpExtensionID);
  205. LONG TSPIAPI TSPI_lineGetIcon(
  206. DWORD dwDeviceID,
  207. LPCSTR lpszDeviceClass,
  208. LPHICON lphIcon);
  209. LONG TSPIAPI TSPI_lineGetID(
  210. HDRVLINE hdLine,
  211. DWORD dwAddressID,
  212. HDRVCALL hdCall,
  213. DWORD dwSelect,
  214. LPVARSTRING lpDeviceID,
  215. LPCSTR lpszDeviceClass);
  216. LONG TSPIAPI TSPI_lineGetLineDevStatus(
  217. HDRVLINE hdLine,
  218. LPLINEDEVSTATUS lpLineDevStatus);
  219. LONG TSPIAPI TSPI_lineGetNumAddressIDs(
  220. HDRVLINE hdLine,
  221. LPDWORD lpdwNumAddressIDs);
  222. LONG TSPIAPI TSPI_lineHold(
  223. DRV_REQUESTID dwRequestID,
  224. HDRVCALL hdCall);
  225. LONG TSPIAPI TSPI_lineMakeCall(
  226. DRV_REQUESTID dwRequestID,
  227. HDRVLINE hdLine,
  228. HTAPICALL htCall,
  229. LPHDRVCALL lphdCall,
  230. LPCSTR lpszDestAddress,
  231. DWORD dwCountryCode,
  232. LPLINECALLPARAMS const lpCallParams);
  233. LONG TSPIAPI TSPI_lineMonitorDigits(
  234. HDRVCALL hdCall,
  235. DWORD dwDigitModes);
  236. LONG TSPIAPI TSPI_lineMonitorMedia(
  237. HDRVCALL hdCall,
  238. DWORD dwMediaModes);
  239. LONG TSPIAPI TSPI_lineMonitorTones(
  240. HDRVCALL hdCall,
  241. DWORD dwToneListID,
  242. LPLINEMONITORTONE const lpToneList,
  243. DWORD dwNumEntries);
  244. LONG TSPIAPI TSPI_lineNegotiateExtVersion(
  245. DWORD dwDeviceID,
  246. DWORD dwTSPIVersion,
  247. DWORD dwLowVersion,
  248. DWORD dwHighVersion,
  249. LPDWORD lpdwExtVersion);
  250. LONG TSPIAPI TSPI_lineNegotiateTSPIVersion(
  251. DWORD dwDeviceID,
  252. DWORD dwLowVersion,
  253. DWORD dwHighVersion,
  254. LPDWORD lpdwTSPIVersion);
  255. LONG TSPIAPI TSPI_lineOpen(
  256. DWORD dwDeviceID,
  257. HTAPILINE htLine,
  258. LPHDRVLINE lphdLine,
  259. DWORD dwTSPIVersion,
  260. LINEEVENT lpfnEventProc);
  261. LONG TSPIAPI TSPI_linePark(
  262. DRV_REQUESTID dwRequestID,
  263. HDRVCALL hdCall,
  264. DWORD dwParkMode,
  265. LPCSTR lpszDirAddress,
  266. LPVARSTRING lpNonDirAddress);
  267. LONG TSPIAPI TSPI_linePickup(
  268. DRV_REQUESTID dwRequestID,
  269. HDRVLINE hdLine,
  270. DWORD dwAddressID,
  271. HTAPICALL htCall,
  272. LPHDRVCALL lphdCall,
  273. LPCSTR lpszDestAddress,
  274. LPCSTR lpszGroupID);
  275. LONG TSPIAPI TSPI_linePrepareAddToConference(
  276. DRV_REQUESTID dwRequestID,
  277. HDRVCALL hdConfCall,
  278. HTAPICALL htConsultCall,
  279. LPHDRVCALL lphdConsultCall,
  280. LPLINECALLPARAMS const lpCallParams);
  281. LONG TSPIAPI TSPI_lineRedirect(
  282. DRV_REQUESTID dwRequestID,
  283. HDRVCALL hdCall,
  284. LPCSTR lpszDestAddress,
  285. DWORD dwCountryCode);
  286. LONG TSPIAPI TSPI_lineRemoveFromConference(
  287. DRV_REQUESTID dwRequestID,
  288. HDRVCALL hdCall);
  289. LONG TSPIAPI TSPI_lineSecureCall(
  290. DRV_REQUESTID dwRequestID,
  291. HDRVCALL hdCall);
  292. LONG TSPIAPI TSPI_lineSelectExtVersion(
  293. HDRVLINE hdLine,
  294. DWORD dwExtVersion);
  295. LONG TSPIAPI TSPI_lineSendUserUserInfo(
  296. DRV_REQUESTID dwRequestID,
  297. HDRVCALL hdCall,
  298. LPCSTR lpsUserUserInfo,
  299. DWORD dwSize);
  300. LONG TSPIAPI TSPI_lineSetAppSpecific(
  301. HDRVCALL hdCall,
  302. DWORD dwAppSpecific);
  303. LONG TSPIAPI TSPI_lineSetCallParams(
  304. DRV_REQUESTID dwRequestID,
  305. HDRVCALL hdCall,
  306. DWORD dwBearerMode,
  307. DWORD dwMinRate,
  308. DWORD dwMaxRate,
  309. LPLINEDIALPARAMS const lpDialParams);
  310. LONG TSPIAPI TSPI_lineSetDefaultMediaDetection(
  311. HDRVLINE hdLine,
  312. DWORD dwMediaModes);
  313. LONG TSPIAPI TSPI_lineSetDevConfig(
  314. DWORD dwDeviceID,
  315. LPVOID const lpDeviceConfig,
  316. DWORD dwSize,
  317. LPCSTR lpszDeviceClass);
  318. LONG TSPIAPI TSPI_lineSetMediaControl(
  319. HDRVLINE hdLine,
  320. DWORD dwAddressID,
  321. HDRVCALL hdCall,
  322. DWORD dwSelect,
  323. LPLINEMEDIACONTROLDIGIT const lpDigitList,
  324. DWORD dwDigitNumEntries,
  325. LPLINEMEDIACONTROLMEDIA const lpMediaList,
  326. DWORD dwMediaNumEntries,
  327. LPLINEMEDIACONTROLTONE const lpToneList,
  328. DWORD dwToneNumEntries,
  329. LPLINEMEDIACONTROLCALLSTATE const lpCallStateList,
  330. DWORD dwCallStateNumEntries);
  331. LONG TSPIAPI TSPI_lineSetMediaMode(
  332. HDRVCALL hdCall,
  333. DWORD dwMediaMode);
  334. LONG TSPIAPI TSPI_lineSetStatusMessages(
  335. HDRVLINE hdLine,
  336. DWORD dwLineStates,
  337. DWORD dwAddressStates);
  338. LONG TSPIAPI TSPI_lineSetTerminal(
  339. DRV_REQUESTID dwRequestID,
  340. HDRVLINE hdLine,
  341. DWORD dwAddressID,
  342. HDRVCALL hdCall,
  343. DWORD dwSelect,
  344. DWORD dwTerminalModes,
  345. DWORD dwTerminalID,
  346. DWORD bEnable);
  347. LONG TSPIAPI TSPI_lineSetupConference(
  348. DRV_REQUESTID dwRequestID,
  349. HDRVCALL hdCall,
  350. HDRVLINE hdLine,
  351. HTAPICALL htConfCall,
  352. LPHDRVCALL lphdConfCall,
  353. HTAPICALL htConsultCall,
  354. LPHDRVCALL lphdConsultCall,
  355. DWORD dwNumParties,
  356. LPLINECALLPARAMS const lpCallParams);
  357. LONG TSPIAPI TSPI_lineSetupTransfer(
  358. DRV_REQUESTID dwRequestID,
  359. HDRVCALL hdCall,
  360. HTAPICALL htConsultCall,
  361. LPHDRVCALL lphdConsultCall,
  362. LPLINECALLPARAMS const lpCallParams);
  363. LONG TSPIAPI TSPI_lineSwapHold(
  364. DRV_REQUESTID dwRequestID,
  365. HDRVCALL hdActiveCall,
  366. HDRVCALL hdHeldCall);
  367. LONG TSPIAPI TSPI_lineUncompleteCall(
  368. DRV_REQUESTID dwRequestID,
  369. HDRVLINE hdLine,
  370. DWORD dwCompletionID);
  371. LONG TSPIAPI TSPI_lineUnhold(
  372. DRV_REQUESTID dwRequestID,
  373. HDRVCALL hdCall);
  374. LONG TSPIAPI TSPI_lineUnpark(
  375. DRV_REQUESTID dwRequestID,
  376. HDRVLINE hdLine,
  377. DWORD dwAddressID,
  378. HTAPICALL htCall,
  379. LPHDRVCALL lphdCall,
  380. LPCSTR lpszDestAddress);
  381. // TSPIAPI TSPI_phone functions
  382. // ----------------------------------------------------------------------------
  383. LONG TSPIAPI TSPI_phoneClose(
  384. HDRVPHONE hdPhone);
  385. LONG TSPIAPI TSPI_phoneConfigDialog(
  386. DWORD dwDeviceID,
  387. HWND hwndOwner,
  388. LPCSTR lpszDeviceClass);
  389. LONG TSPIAPI TSPI_phoneDevSpecific(
  390. DRV_REQUESTID dwRequestID,
  391. HDRVPHONE hdPhone,
  392. LPVOID lpParams,
  393. DWORD dwSize);
  394. LONG TSPIAPI TSPI_phoneGetButtonInfo(
  395. HDRVPHONE hdPhone,
  396. DWORD dwButtonLampID,
  397. LPPHONEBUTTONINFO lpButtonInfo);
  398. LONG TSPIAPI TSPI_phoneGetData(
  399. HDRVPHONE hdPhone,
  400. DWORD dwDataID,
  401. LPVOID lpData,
  402. DWORD dwSize);
  403. LONG TSPIAPI TSPI_phoneGetDevCaps(
  404. DWORD dwDeviceID,
  405. DWORD dwTSPIVersion,
  406. DWORD dwExtVersion,
  407. LPPHONECAPS lpPhoneCaps);
  408. LONG TSPIAPI TSPI_phoneGetDisplay(
  409. HDRVPHONE hdPhone,
  410. LPVARSTRING lpDisplay);
  411. LONG TSPIAPI TSPI_phoneGetExtensionID(
  412. DWORD dwDeviceID,
  413. DWORD dwTSPIVersion,
  414. LPPHONEEXTENSIONID lpExtensionID);
  415. LONG TSPIAPI TSPI_phoneGetGain(
  416. HDRVPHONE hdPhone,
  417. DWORD dwHookSwitchDev,
  418. LPDWORD lpdwGain);
  419. LONG TSPIAPI TSPI_phoneGetHookSwitch(
  420. HDRVPHONE hdPhone,
  421. LPDWORD lpdwHookSwitchDevs);
  422. LONG TSPIAPI TSPI_phoneGetIcon(
  423. DWORD dwDeviceID,
  424. LPCSTR lpszDeviceClass,
  425. LPHICON lphIcon);
  426. LONG TSPIAPI TSPI_phoneGetID(
  427. HDRVPHONE hdPhone,
  428. LPVARSTRING lpDeviceID,
  429. LPCSTR lpszDeviceClass);
  430. LONG TSPIAPI TSPI_phoneGetLamp(
  431. HDRVPHONE hdPhone,
  432. DWORD dwButtonLampID,
  433. LPDWORD lpdwLampMode);
  434. LONG TSPIAPI TSPI_phoneGetRing(
  435. HDRVPHONE hdPhone,
  436. LPDWORD lpdwRingMode,
  437. LPDWORD lpdwVolume);
  438. LONG TSPIAPI TSPI_phoneGetStatus(
  439. HDRVPHONE hdPhone,
  440. LPPHONESTATUS lpPhoneStatus);
  441. LONG TSPIAPI TSPI_phoneGetVolume(
  442. HDRVPHONE hdPhone,
  443. DWORD dwHookSwitchDev,
  444. LPDWORD lpdwVolume);
  445. LONG TSPIAPI TSPI_phoneNegotiateExtVersion(
  446. DWORD dwDeviceID,
  447. DWORD dwTSPIVersion,
  448. DWORD dwLowVersion,
  449. DWORD dwHighVersion,
  450. LPDWORD lpdwExtVersion);
  451. LONG TSPIAPI TSPI_phoneNegotiateTSPIVersion(
  452. DWORD dwDeviceID,
  453. DWORD dwLowVersion,
  454. DWORD dwHighVersion,
  455. LPDWORD lpdwTSPIVersion);
  456. LONG TSPIAPI TSPI_phoneOpen(
  457. DWORD dwDeviceID,
  458. HTAPIPHONE htPhone,
  459. LPHDRVPHONE lphdPhone,
  460. DWORD dwTSPIVersion,
  461. PHONEEVENT lpfnEventProc);
  462. LONG TSPIAPI TSPI_phoneSelectExtVersion(
  463. HDRVPHONE hdPhone,
  464. DWORD dwExtVersion);
  465. LONG TSPIAPI TSPI_phoneSetButtonInfo(
  466. DRV_REQUESTID dwRequestID,
  467. HDRVPHONE hdPhone,
  468. DWORD dwButtonLampID,
  469. LPPHONEBUTTONINFO const lpButtonInfo);
  470. LONG TSPIAPI TSPI_phoneSetData(
  471. DRV_REQUESTID dwRequestID,
  472. HDRVPHONE hdPhone,
  473. DWORD dwDataID,
  474. LPVOID const lpData,
  475. DWORD dwSize);
  476. LONG TSPIAPI TSPI_phoneSetDisplay(
  477. DRV_REQUESTID dwRequestID,
  478. HDRVPHONE hdPhone,
  479. DWORD dwRow,
  480. DWORD dwColumn,
  481. LPCSTR lpsDisplay,
  482. DWORD dwSize);
  483. LONG TSPIAPI TSPI_phoneSetGain(
  484. DRV_REQUESTID dwRequestID,
  485. HDRVPHONE hdPhone,
  486. DWORD dwHookSwitchDev,
  487. DWORD dwGain);
  488. LONG TSPIAPI TSPI_phoneSetHookSwitch(
  489. DRV_REQUESTID dwRequestID,
  490. HDRVPHONE hdPhone,
  491. DWORD dwHookSwitchDevs,
  492. DWORD dwHookSwitchMode);
  493. LONG TSPIAPI TSPI_phoneSetLamp(
  494. DRV_REQUESTID dwRequestID,
  495. HDRVPHONE hdPhone,
  496. DWORD dwButtonLampID,
  497. DWORD dwLampMode);
  498. LONG TSPIAPI TSPI_phoneSetRing(
  499. DRV_REQUESTID dwRequestID,
  500. HDRVPHONE hdPhone,
  501. DWORD dwRingMode,
  502. DWORD dwVolume);
  503. LONG TSPIAPI TSPI_phoneSetStatusMessages(
  504. HDRVPHONE hdPhone,
  505. DWORD dwPhoneStates,
  506. DWORD dwButtonModes,
  507. DWORD dwButtonStates);
  508. LONG TSPIAPI TSPI_phoneSetVolume(
  509. DRV_REQUESTID dwRequestID,
  510. HDRVPHONE hdPhone,
  511. DWORD dwHookSwitchDev,
  512. DWORD dwVolume);
  513. // TSPIAPI TSPI_provider functions
  514. // ----------------------------------------------------------------------------
  515. LONG TSPIAPI TSPI_providerConfig(
  516. HWND hwndOwner,
  517. DWORD dwPermanentProviderID);
  518. LONG TSPIAPI TSPI_providerInit(
  519. DWORD dwTSPIVersion,
  520. DWORD dwPermanentProviderID,
  521. DWORD dwLineDeviceIDBase,
  522. DWORD dwPhoneDeviceIDBase,
  523. DWORD dwNumLines,
  524. DWORD dwNumPhones,
  525. ASYNC_COMPLETION lpfnCompletionProc);
  526. LONG TSPIAPI TSPI_providerInstall(
  527. HWND hwndOwner,
  528. DWORD dwPermanentProviderID);
  529. LONG TSPIAPI TSPI_providerRemove(
  530. HWND hwndOwner,
  531. DWORD dwPermanentProviderID);
  532. LONG TSPIAPI TSPI_providerShutdown(
  533. DWORD dwTSPIVersion);
  534. LONG TSPIAPI TSPI_providerEnumDevices(
  535. DWORD dwPermanentProviderID,
  536. LPDWORD lpdwNumLines,
  537. LPDWORD lpdwNumPhones);
  538. // The following macros are the ordinal numbers of the exported tspi functions
  539. #define TSPI_PROC_BASE 500
  540. #define TSPI_LINEACCEPT (TSPI_PROC_BASE + 0)
  541. #define TSPI_LINEADDTOCONFERENCE (TSPI_PROC_BASE + 1)
  542. #define TSPI_LINEANSWER (TSPI_PROC_BASE + 2)
  543. #define TSPI_LINEBLINDTRANSFER (TSPI_PROC_BASE + 3)
  544. #define TSPI_LINECLOSE (TSPI_PROC_BASE + 4)
  545. #define TSPI_LINECLOSECALL (TSPI_PROC_BASE + 5)
  546. #define TSPI_LINECOMPLETECALL (TSPI_PROC_BASE + 6)
  547. #define TSPI_LINECOMPLETETRANSFER (TSPI_PROC_BASE + 7)
  548. #define TSPI_LINECONDITIONALMEDIADETECTION (TSPI_PROC_BASE + 8)
  549. #define TSPI_LINECONFIGDIALOG (TSPI_PROC_BASE + 9)
  550. #define TSPI_LINEDEVSPECIFIC (TSPI_PROC_BASE + 10)
  551. #define TSPI_LINEDEVSPECIFICFEATURE (TSPI_PROC_BASE + 11)
  552. #define TSPI_LINEDIAL (TSPI_PROC_BASE + 12)
  553. #define TSPI_LINEDROP (TSPI_PROC_BASE + 13)
  554. #define TSPI_LINEFORWARD (TSPI_PROC_BASE + 14)
  555. #define TSPI_LINEGATHERDIGITS (TSPI_PROC_BASE + 15)
  556. #define TSPI_LINEGENERATEDIGITS (TSPI_PROC_BASE + 16)
  557. #define TSPI_LINEGENERATETONE (TSPI_PROC_BASE + 17)
  558. #define TSPI_LINEGETADDRESSCAPS (TSPI_PROC_BASE + 18)
  559. #define TSPI_LINEGETADDRESSID (TSPI_PROC_BASE + 19)
  560. #define TSPI_LINEGETADDRESSSTATUS (TSPI_PROC_BASE + 20)
  561. #define TSPI_LINEGETCALLADDRESSID (TSPI_PROC_BASE + 21)
  562. #define TSPI_LINEGETCALLINFO (TSPI_PROC_BASE + 22)
  563. #define TSPI_LINEGETCALLSTATUS (TSPI_PROC_BASE + 23)
  564. #define TSPI_LINEGETDEVCAPS (TSPI_PROC_BASE + 24)
  565. #define TSPI_LINEGETDEVCONFIG (TSPI_PROC_BASE + 25)
  566. #define TSPI_LINEGETEXTENSIONID (TSPI_PROC_BASE + 26)
  567. #define TSPI_LINEGETICON (TSPI_PROC_BASE + 27)
  568. #define TSPI_LINEGETID (TSPI_PROC_BASE + 28)
  569. #define TSPI_LINEGETLINEDEVSTATUS (TSPI_PROC_BASE + 29)
  570. #define TSPI_LINEGETNUMADDRESSIDS (TSPI_PROC_BASE + 30)
  571. #define TSPI_LINEHOLD (TSPI_PROC_BASE + 31)
  572. #define TSPI_LINEMAKECALL (TSPI_PROC_BASE + 32)
  573. #define TSPI_LINEMONITORDIGITS (TSPI_PROC_BASE + 33)
  574. #define TSPI_LINEMONITORMEDIA (TSPI_PROC_BASE + 34)
  575. #define TSPI_LINEMONITORTONES (TSPI_PROC_BASE + 35)
  576. #define TSPI_LINENEGOTIATEEXTVERSION (TSPI_PROC_BASE + 36)
  577. #define TSPI_LINENEGOTIATETSPIVERSION (TSPI_PROC_BASE + 37)
  578. #define TSPI_LINEOPEN (TSPI_PROC_BASE + 38)
  579. #define TSPI_LINEPARK (TSPI_PROC_BASE + 39)
  580. #define TSPI_LINEPICKUP (TSPI_PROC_BASE + 40)
  581. #define TSPI_LINEPREPAREADDTOCONFERENCE (TSPI_PROC_BASE + 41)
  582. #define TSPI_LINEREDIRECT (TSPI_PROC_BASE + 42)
  583. #define TSPI_LINEREMOVEFROMCONFERENCE (TSPI_PROC_BASE + 43)
  584. #define TSPI_LINESECURECALL (TSPI_PROC_BASE + 44)
  585. #define TSPI_LINESELECTEXTVERSION (TSPI_PROC_BASE + 45)
  586. #define TSPI_LINESENDUSERUSERINFO (TSPI_PROC_BASE + 46)
  587. #define TSPI_LINESETAPPSPECIFIC (TSPI_PROC_BASE + 47)
  588. #define TSPI_LINESETCALLPARAMS (TSPI_PROC_BASE + 48)
  589. #define TSPI_LINESETDEFAULTMEDIADETECTION (TSPI_PROC_BASE + 49)
  590. #define TSPI_LINESETDEVCONFIG (TSPI_PROC_BASE + 50)
  591. #define TSPI_LINESETMEDIACONTROL (TSPI_PROC_BASE + 51)
  592. #define TSPI_LINESETMEDIAMODE (TSPI_PROC_BASE + 52)
  593. #define TSPI_LINESETSTATUSMESSAGES (TSPI_PROC_BASE + 53)
  594. #define TSPI_LINESETTERMINAL (TSPI_PROC_BASE + 54)
  595. #define TSPI_LINESETUPCONFERENCE (TSPI_PROC_BASE + 55)
  596. #define TSPI_LINESETUPTRANSFER (TSPI_PROC_BASE + 56)
  597. #define TSPI_LINESWAPHOLD (TSPI_PROC_BASE + 57)
  598. #define TSPI_LINEUNCOMPLETECALL (TSPI_PROC_BASE + 58)
  599. #define TSPI_LINEUNHOLD (TSPI_PROC_BASE + 59)
  600. #define TSPI_LINEUNPARK (TSPI_PROC_BASE + 60)
  601. #define TSPI_PHONECLOSE (TSPI_PROC_BASE + 61)
  602. #define TSPI_PHONECONFIGDIALOG (TSPI_PROC_BASE + 62)
  603. #define TSPI_PHONEDEVSPECIFIC (TSPI_PROC_BASE + 63)
  604. #define TSPI_PHONEGETBUTTONINFO (TSPI_PROC_BASE + 64)
  605. #define TSPI_PHONEGETDATA (TSPI_PROC_BASE + 65)
  606. #define TSPI_PHONEGETDEVCAPS (TSPI_PROC_BASE + 66)
  607. #define TSPI_PHONEGETDISPLAY (TSPI_PROC_BASE + 67)
  608. #define TSPI_PHONEGETEXTENSIONID (TSPI_PROC_BASE + 68)
  609. #define TSPI_PHONEGETGAIN (TSPI_PROC_BASE + 69)
  610. #define TSPI_PHONEGETHOOKSWITCH (TSPI_PROC_BASE + 70)
  611. #define TSPI_PHONEGETICON (TSPI_PROC_BASE + 71)
  612. #define TSPI_PHONEGETID (TSPI_PROC_BASE + 72)
  613. #define TSPI_PHONEGETLAMP (TSPI_PROC_BASE + 73)
  614. #define TSPI_PHONEGETRING (TSPI_PROC_BASE + 74)
  615. #define TSPI_PHONEGETSTATUS (TSPI_PROC_BASE + 75)
  616. #define TSPI_PHONEGETVOLUME (TSPI_PROC_BASE + 76)
  617. #define TSPI_PHONENEGOTIATEEXTVERSION (TSPI_PROC_BASE + 77)
  618. #define TSPI_PHONENEGOTIATETSPIVERSION (TSPI_PROC_BASE + 78)
  619. #define TSPI_PHONEOPEN (TSPI_PROC_BASE + 79)
  620. #define TSPI_PHONESELECTEXTVERSION (TSPI_PROC_BASE + 80)
  621. #define TSPI_PHONESETBUTTONINFO (TSPI_PROC_BASE + 81)
  622. #define TSPI_PHONESETDATA (TSPI_PROC_BASE + 82)
  623. #define TSPI_PHONESETDISPLAY (TSPI_PROC_BASE + 83)
  624. #define TSPI_PHONESETGAIN (TSPI_PROC_BASE + 84)
  625. #define TSPI_PHONESETHOOKSWITCH (TSPI_PROC_BASE + 85)
  626. #define TSPI_PHONESETLAMP (TSPI_PROC_BASE + 86)
  627. #define TSPI_PHONESETRING (TSPI_PROC_BASE + 87)
  628. #define TSPI_PHONESETSTATUSMESSAGES (TSPI_PROC_BASE + 88)
  629. #define TSPI_PHONESETVOLUME (TSPI_PROC_BASE + 89)
  630. #define TSPI_PROVIDERCONFIG (TSPI_PROC_BASE + 90)
  631. #define TSPI_PROVIDERINIT (TSPI_PROC_BASE + 91)
  632. #define TSPI_PROVIDERINSTALL (TSPI_PROC_BASE + 92)
  633. #define TSPI_PROVIDERREMOVE (TSPI_PROC_BASE + 93)
  634. #define TSPI_PROVIDERSHUTDOWN (TSPI_PROC_BASE + 94)
  635. #define TSPI_PROVIDERENUMDEVICES (TSPI_PROC_BASE + 95)
  636. #define TSPI_LINEDROPONCLOSE (TSPI_PROC_BASE + 96)
  637. #define TSPI_LINEDROPNOOWNER (TSPI_PROC_BASE + 97)
  638. #ifdef __cplusplus
  639. } /* End of extern "C" { */
  640. #endif /* __cplusplus */
  641. #endif // TSPI_H