Tapi3if.Idl
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:109k
源码类别:

模拟服务器

开发平台:

C/C++

  1. //
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. cpp_quote("/* Copyright (c) Microsoft Corporation. All rights reserved. */")
  4. #ifndef __TAPI3IF_IDL__
  5. #define __TAPI3IF_IDL__
  6. import "oaidl.idl";
  7. import "basetsd.h";
  8. import "strmif.idl";
  9. midl_pragma warning( disable: 2039 )
  10. cpp_quote("#if 0")
  11. #ifdef _X86_
  12. typedef long TAPIHWND;
  13. #else
  14. typedef LONGLONG TAPIHWND;
  15. #endif
  16. cpp_quote("#endif")
  17. cpp_quote("#ifdef _X86_")
  18. cpp_quote("typedef long TAPIHWND;")
  19. cpp_quote("#else")
  20. cpp_quote("typedef LONGLONG TAPIHWND;")
  21. cpp_quote("#endif")
  22. typedef long TAPI_DIGITMODE;
  23. typedef enum TAPI_TONEMODE
  24. {
  25.   TTM_RINGBACK  = 0x00000002,
  26.   TTM_BUSY      = 0x00000004,
  27.   TTM_BEEP      = 0x00000008,
  28.   TTM_BILLING   = 0x00000010
  29. } TAPI_TONEMODE;
  30. typedef enum TAPI_GATHERTERM
  31. {
  32.   TGT_BUFFERFULL   = 0x00000001,
  33.   TGT_TERMDIGIT    = 0x00000002,
  34.   TGT_FIRSTTIMEOUT = 0x00000004,
  35.   TGT_INTERTIMEOUT = 0x00000008,
  36.   TGT_CANCEL       = 0x00000010
  37. } TAPI_GATHERTERM;
  38. typedef struct TAPI_CUSTOMTONE
  39. {
  40.     DWORD       dwFrequency;
  41.     DWORD       dwCadenceOn;
  42.     DWORD       dwCadenceOff;
  43.     DWORD       dwVolume;
  44. } TAPI_CUSTOMTONE, *LPTAPI_CUSTOMTONE;
  45. typedef struct TAPI_DETECTTONE
  46. {
  47.     DWORD       dwAppSpecific;
  48.     DWORD       dwDuration;
  49.     DWORD       dwFrequency1;
  50.     DWORD       dwFrequency2;
  51.     DWORD       dwFrequency3;
  52. } TAPI_DETECTTONE, *LPTAPI_DETECTTONE;
  53. typedef enum ADDRESS_EVENT
  54. {
  55.     AE_STATE,
  56.     AE_CAPSCHANGE,
  57.     AE_RINGING,
  58.     AE_CONFIGCHANGE,
  59.     AE_FORWARD,
  60.     AE_NEWTERMINAL,
  61.     AE_REMOVETERMINAL,
  62.     AE_MSGWAITON,
  63.     AE_MSGWAITOFF,
  64.     AE_LASTITEM = AE_MSGWAITOFF
  65. } ADDRESS_EVENT;
  66. typedef enum ADDRESS_STATE
  67. {
  68.     AS_INSERVICE,
  69.     AS_OUTOFSERVICE
  70. } ADDRESS_STATE;
  71. typedef enum CALL_STATE
  72. {
  73.     CS_IDLE,
  74.     CS_INPROGRESS,
  75.     CS_CONNECTED,
  76.     CS_DISCONNECTED,
  77.     CS_OFFERING,
  78.     CS_HOLD,
  79.     CS_QUEUED,
  80.     CS_LASTITEM = CS_QUEUED
  81. } CALL_STATE;
  82. typedef enum CALL_STATE_EVENT_CAUSE
  83. {
  84.     CEC_NONE,
  85.     CEC_DISCONNECT_NORMAL,
  86.     CEC_DISCONNECT_BUSY,
  87.     CEC_DISCONNECT_BADADDRESS,
  88.     CEC_DISCONNECT_NOANSWER,
  89.     CEC_DISCONNECT_CANCELLED,
  90.     CEC_DISCONNECT_REJECTED,
  91.     CEC_DISCONNECT_FAILED,
  92.     CEC_DISCONNECT_BLOCKED
  93. } CALL_STATE_EVENT_CAUSE;
  94. typedef enum CALL_MEDIA_EVENT
  95. {
  96.     CME_NEW_STREAM,
  97.     CME_STREAM_FAIL,
  98.     CME_TERMINAL_FAIL,
  99.     CME_STREAM_NOT_USED,
  100.     CME_STREAM_ACTIVE,
  101.     CME_STREAM_INACTIVE,
  102.     CME_LASTITEM = CME_STREAM_INACTIVE
  103.             
  104. } CALL_MEDIA_EVENT;
  105. typedef enum CALL_MEDIA_EVENT_CAUSE
  106. {
  107.    CMC_UNKNOWN,
  108.    CMC_BAD_DEVICE,
  109.    CMC_CONNECT_FAIL,
  110.    CMC_LOCAL_REQUEST,
  111.    CMC_REMOTE_REQUEST,
  112.    CMC_MEDIA_TIMEOUT,
  113.    CMC_MEDIA_RECOVERED,
  114.    CMC_QUALITY_OF_SERVICE
  115.             
  116. } CALL_MEDIA_EVENT_CAUSE;
  117. typedef enum DISCONNECT_CODE
  118. {
  119.     DC_NORMAL,
  120.     DC_NOANSWER,
  121.     DC_REJECTED
  122. } DISCONNECT_CODE;
  123. typedef enum TERMINAL_STATE
  124. {
  125.     TS_INUSE,
  126.     TS_NOTINUSE
  127. } TERMINAL_STATE;
  128. typedef enum TERMINAL_DIRECTION
  129. {
  130.     TD_CAPTURE,
  131.     TD_RENDER,
  132.     TD_BIDIRECTIONAL,
  133.     TD_MULTITRACK_MIXED,
  134.     TD_NONE
  135. } TERMINAL_DIRECTION;
  136. typedef enum TERMINAL_TYPE
  137. {
  138.     TT_STATIC,
  139.     TT_DYNAMIC
  140. } TERMINAL_TYPE;
  141. typedef enum CALL_PRIVILEGE
  142. {
  143.     CP_OWNER,
  144.     CP_MONITOR
  145. } CALL_PRIVILEGE;
  146. typedef enum TAPI_EVENT
  147. {
  148.     TE_TAPIOBJECT         = 0x00000001,
  149.     TE_ADDRESS            = 0x00000002,
  150.     TE_CALLNOTIFICATION   = 0x00000004,
  151.     TE_CALLSTATE          = 0x00000008,
  152.     TE_CALLMEDIA          = 0x00000010,
  153.     TE_CALLHUB            = 0x00000020,
  154.     TE_CALLINFOCHANGE     = 0x00000040,
  155.     TE_PRIVATE            = 0x00000080,
  156.     TE_REQUEST            = 0x00000100,
  157.     TE_AGENT              = 0x00000200,
  158.     TE_AGENTSESSION       = 0x00000400,
  159.     TE_QOSEVENT           = 0x00000800,
  160.     TE_AGENTHANDLER       = 0x00001000,
  161.     TE_ACDGROUP           = 0x00002000,
  162.     TE_QUEUE              = 0x00004000,
  163.     TE_DIGITEVENT         = 0x00008000,
  164.     TE_GENERATEEVENT      = 0x00010000,
  165.     TE_ASRTERMINAL        = 0x00020000,
  166.     TE_TTSTERMINAL        = 0x00040000,
  167.     TE_FILETERMINAL       = 0x00080000,
  168.     TE_TONETERMINAL       = 0x00100000,
  169.     TE_PHONEEVENT         = 0x00200000,
  170.     TE_TONEEVENT          = 0x00400000,
  171.     TE_GATHERDIGITS       = 0x00800000,
  172.     TE_ADDRESSDEVSPECIFIC = 0x01000000,
  173.     TE_PHONEDEVSPECIFIC   = 0x02000000
  174. } TAPI_EVENT;
  175. typedef enum CALL_NOTIFICATION_EVENT
  176. {
  177.     CNE_OWNER,
  178.     CNE_MONITOR,
  179.     CNE_LASTITEM = CNE_MONITOR
  180. } CALL_NOTIFICATION_EVENT;
  181. typedef enum CALLHUB_EVENT
  182. {
  183.     CHE_CALLJOIN,
  184.     CHE_CALLLEAVE,
  185.     CHE_CALLHUBNEW,
  186.     CHE_CALLHUBIDLE,
  187.     CHE_LASTITEM = CHE_CALLHUBIDLE
  188.         
  189. } CALLHUB_EVENT;
  190. typedef enum CALLHUB_STATE
  191. {
  192.     CHS_ACTIVE,
  193.     CHS_IDLE
  194.             
  195. } CALLHUB_STATE;
  196. typedef enum TAPIOBJECT_EVENT
  197. {
  198.     TE_ADDRESSCREATE,
  199.     TE_ADDRESSREMOVE,
  200.     TE_REINIT,
  201.     TE_TRANSLATECHANGE,
  202.     TE_ADDRESSCLOSE,
  203.     TE_PHONECREATE,
  204.     TE_PHONEREMOVE
  205. } TAPIOBJECT_EVENT;
  206. typedef enum TAPI_OBJECT_TYPE
  207. {
  208.     TOT_NONE,
  209.     TOT_TAPI,
  210.     TOT_ADDRESS,
  211.     TOT_TERMINAL,
  212.     TOT_CALL,
  213.     TOT_CALLHUB,
  214.     TOT_PHONE
  215. } TAPI_OBJECT_TYPE;
  216. typedef enum QOS_SERVICE_LEVEL
  217. {
  218.     QSL_NEEDED = 1,
  219.     QSL_IF_AVAILABLE = 2,
  220.     QSL_BEST_EFFORT = 3
  221. } QOS_SERVICE_LEVEL;
  222. typedef enum QOS_EVENT
  223. {
  224.     QE_NOQOS = 1,
  225.     QE_ADMISSIONFAILURE = 2,
  226.     QE_POLICYFAILURE = 3,
  227.     QE_GENERICERROR = 4,
  228.     QE_LASTITEM = QE_GENERICERROR
  229.             
  230. } QOS_EVENT;
  231. typedef enum CALLINFOCHANGE_CAUSE
  232. {
  233.     CIC_OTHER,
  234.     CIC_DEVSPECIFIC,
  235.     CIC_BEARERMODE,
  236.     CIC_RATE,
  237.     CIC_APPSPECIFIC,
  238.     CIC_CALLID,
  239.     CIC_RELATEDCALLID,
  240.     CIC_ORIGIN,
  241.     CIC_REASON,
  242.     CIC_COMPLETIONID,
  243.     CIC_NUMOWNERINCR,
  244.     CIC_NUMOWNERDECR,
  245.     CIC_NUMMONITORS,
  246.     CIC_TRUNK,
  247.     CIC_CALLERID,
  248.     CIC_CALLEDID,
  249.     CIC_CONNECTEDID,
  250.     CIC_REDIRECTIONID,
  251.     CIC_REDIRECTINGID,
  252.     CIC_USERUSERINFO,
  253.     CIC_HIGHLEVELCOMP,
  254.     CIC_LOWLEVELCOMP,
  255.     CIC_CHARGINGINFO,
  256.     CIC_TREATMENT,
  257.     CIC_CALLDATA,
  258.     CIC_PRIVILEGE,
  259.     CIC_MEDIATYPE,
  260.     CIC_LASTITEM = CIC_MEDIATYPE
  261. } CALLINFOCHANGE_CAUSE;
  262. typedef enum CALLINFO_LONG
  263. {
  264.     CIL_MEDIATYPESAVAILABLE,
  265.     CIL_BEARERMODE,
  266.     CIL_CALLERIDADDRESSTYPE,
  267.     CIL_CALLEDIDADDRESSTYPE,
  268.     CIL_CONNECTEDIDADDRESSTYPE,
  269.     CIL_REDIRECTIONIDADDRESSTYPE,
  270.     CIL_REDIRECTINGIDADDRESSTYPE,
  271.     CIL_ORIGIN,
  272.     CIL_REASON,
  273.     CIL_APPSPECIFIC,
  274.     CIL_CALLPARAMSFLAGS,
  275.     CIL_CALLTREATMENT,
  276.     CIL_MINRATE,
  277.     CIL_MAXRATE,
  278.     CIL_COUNTRYCODE,
  279.     CIL_CALLID,
  280.     CIL_RELATEDCALLID,
  281.     CIL_COMPLETIONID,
  282.     CIL_NUMBEROFOWNERS,
  283.     CIL_NUMBEROFMONITORS,
  284.     CIL_TRUNK,
  285.     CIL_RATE,
  286.     CIL_GENERATEDIGITDURATION,
  287.     CIL_MONITORDIGITMODES,
  288.     CIL_MONITORMEDIAMODES
  289. } CALLINFO_LONG;
  290. typedef enum CALLINFO_STRING
  291. {
  292.     CIS_CALLERIDNAME,
  293.     CIS_CALLERIDNUMBER,
  294.     CIS_CALLEDIDNAME,
  295.     CIS_CALLEDIDNUMBER,
  296.     CIS_CONNECTEDIDNAME,
  297.     CIS_CONNECTEDIDNUMBER,
  298.     CIS_REDIRECTIONIDNAME,
  299.     CIS_REDIRECTIONIDNUMBER,
  300.     CIS_REDIRECTINGIDNAME,
  301.     CIS_REDIRECTINGIDNUMBER,
  302.     CIS_CALLEDPARTYFRIENDLYNAME,
  303.     CIS_COMMENT,
  304.     CIS_DISPLAYABLEADDRESS,
  305.     CIS_CALLINGPARTYID
  306. } CALLINFO_STRING;
  307. typedef enum CALLINFO_BUFFER
  308. {
  309.     CIB_USERUSERINFO,
  310.     CIB_DEVSPECIFICBUFFER,
  311.     CIB_CALLDATABUFFER,
  312.     CIB_CHARGINGINFOBUFFER,
  313.     CIB_HIGHLEVELCOMPATIBILITYBUFFER,
  314.     CIB_LOWLEVELCOMPATIBILITYBUFFER
  315. } CALLINFO_BUFFER;
  316. typedef enum ADDRESS_CAPABILITY
  317. {
  318.     AC_ADDRESSTYPES,
  319.     AC_BEARERMODES,
  320.     AC_MAXACTIVECALLS,
  321.     AC_MAXONHOLDCALLS,
  322.     AC_MAXONHOLDPENDINGCALLS,
  323.     AC_MAXNUMCONFERENCE,
  324.     AC_MAXNUMTRANSCONF,
  325.     AC_MONITORDIGITSUPPORT,
  326.     AC_GENERATEDIGITSUPPORT,
  327.     AC_GENERATETONEMODES,
  328.     AC_GENERATETONEMAXNUMFREQ,
  329.     AC_MONITORTONEMAXNUMFREQ,
  330.     AC_MONITORTONEMAXNUMENTRIES,
  331.     AC_DEVCAPFLAGS,
  332.     AC_ANSWERMODES,
  333.     AC_LINEFEATURES,
  334.     AC_SETTABLEDEVSTATUS,
  335.     AC_PARKSUPPORT,
  336.     AC_CALLERIDSUPPORT,
  337.     AC_CALLEDIDSUPPORT,
  338.     AC_CONNECTEDIDSUPPORT,
  339.     AC_REDIRECTIONIDSUPPORT,
  340.     AC_REDIRECTINGIDSUPPORT,
  341.     AC_ADDRESSCAPFLAGS,
  342.     AC_CALLFEATURES1,
  343.     AC_CALLFEATURES2,
  344.     AC_REMOVEFROMCONFCAPS,
  345.     AC_REMOVEFROMCONFSTATE,
  346.     AC_TRANSFERMODES,
  347.     AC_ADDRESSFEATURES,
  348.     AC_PREDICTIVEAUTOTRANSFERSTATES,
  349.     AC_MAXCALLDATASIZE,
  350.     AC_LINEID,
  351.     AC_ADDRESSID,
  352.     AC_FORWARDMODES,
  353.     AC_MAXFORWARDENTRIES,
  354.     AC_MAXSPECIFICENTRIES,
  355.     AC_MINFWDNUMRINGS,
  356.     AC_MAXFWDNUMRINGS,
  357.     AC_MAXCALLCOMPLETIONS,
  358.     AC_CALLCOMPLETIONCONDITIONS,
  359.     AC_CALLCOMPLETIONMODES,
  360.     AC_PERMANENTDEVICEID,
  361.     AC_GATHERDIGITSMINTIMEOUT,
  362.     AC_GATHERDIGITSMAXTIMEOUT,
  363.     AC_GENERATEDIGITMINDURATION,
  364.     AC_GENERATEDIGITMAXDURATION,
  365.     AC_GENERATEDIGITDEFAULTDURATION
  366. } ADDRESS_CAPABILITY;
  367. typedef enum ADDRESS_CAPABILITY_STRING
  368. {
  369.     ACS_PROTOCOL,
  370.     ACS_ADDRESSDEVICESPECIFIC,
  371.     ACS_LINEDEVICESPECIFIC,
  372.     ACS_PROVIDERSPECIFIC,
  373.     ACS_SWITCHSPECIFIC,
  374.     ACS_PERMANENTDEVICEGUID
  375.             
  376. } ADDRESS_CAPABILITY_STRING;
  377. typedef enum FULLDUPLEX_SUPPORT
  378. {
  379.     FDS_SUPPORTED,
  380.     FDS_NOTSUPPORTED,
  381.     FDS_UNKNOWN
  382. } FULLDUPLEX_SUPPORT;
  383. typedef enum FINISH_MODE
  384. {
  385.      FM_ASTRANSFER,
  386.      FM_ASCONFERENCE
  387. } FINISH_MODE;
  388. typedef enum PHONE_PRIVILEGE
  389. {
  390.     PP_OWNER,
  391.     PP_MONITOR
  392. } PHONE_PRIVILEGE;
  393. //
  394. // the hookswitch types
  395. //
  396. typedef enum PHONE_HOOK_SWITCH_DEVICE
  397. {
  398.     PHSD_HANDSET             = 0x00000001,
  399.     PHSD_SPEAKERPHONE        = 0x00000002,
  400.     PHSD_HEADSET             = 0x00000004
  401.             
  402. } PHONE_HOOK_SWITCH_DEVICE;
  403. //
  404. // hookswitch mode
  405. //
  406. typedef enum PHONE_HOOK_SWITCH_STATE
  407. {
  408.     PHSS_ONHOOK               = 0x00000001,
  409.     PHSS_OFFHOOK_MIC_ONLY     = 0x00000002,
  410.     PHSS_OFFHOOK_SPEAKER_ONLY = 0x00000004,
  411.     PHSS_OFFHOOK              = 0x00000008
  412.             
  413. } PHONE_HOOK_SWITCH_STATE;
  414. //
  415. // lamp mode
  416. // how the lamp is flashing.
  417. // as defined in TAPI 2.x
  418. //
  419. typedef enum PHONE_LAMP_MODE
  420. {
  421.     LM_DUMMY                = 0x00000001,
  422.     LM_OFF                  = 0x00000002,
  423.     LM_STEADY               = 0x00000004,
  424.     LM_WINK                 = 0x00000008,
  425.     LM_FLASH                = 0x00000010,
  426.     LM_FLUTTER              = 0x00000020,
  427.     LM_BROKENFLUTTER        = 0x00000040,
  428.     LM_UNKNOWN              = 0x00000080
  429. } PHONE_LAMP_MODE;
  430. //
  431. // capabilities of the phone
  432. //
  433. typedef enum PHONECAPS_LONG
  434. {
  435.     PCL_HOOKSWITCHES,
  436.     PCL_HANDSETHOOKSWITCHMODES,
  437.     PCL_HEADSETHOOKSWITCHMODES,
  438.     PCL_SPEAKERPHONEHOOKSWITCHMODES,
  439.     PCL_DISPLAYNUMROWS,
  440.     PCL_DISPLAYNUMCOLUMNS,
  441.     PCL_NUMRINGMODES,
  442.     PCL_NUMBUTTONLAMPS,
  443.     PCL_GENERICPHONE
  444.     
  445. } PHONECAPS_LONG;
  446. //
  447. // capabilities of the phone (strings)
  448. //
  449. typedef enum PHONECAPS_STRING
  450. {
  451.     PCS_PHONENAME,
  452.     PCS_PHONEINFO,
  453.     PCS_PROVIDERINFO
  454. } PHONECAPS_STRING;
  455. //
  456. // capabilities of the phone (buffers)
  457. //
  458. typedef enum PHONECAPS_BUFFER
  459. {
  460.     PCB_DEVSPECIFICBUFFER
  461. } PHONECAPS_BUFFER;
  462. //
  463. // state of the button
  464. // do we need to reflect the one shot vs. state?
  465. //
  466. typedef enum PHONE_BUTTON_STATE
  467. {
  468.     PBS_UP                  = 0x00000001,
  469.     PBS_DOWN                = 0x00000002,
  470.     PBS_UNKNOWN             = 0x00000004,
  471.     PBS_UNAVAIL             = 0x00000008
  472.             
  473. } PHONE_BUTTON_STATE;
  474. //
  475. // what the button is used for
  476. //
  477. typedef enum PHONE_BUTTON_MODE
  478. {
  479.     PBM_DUMMY,
  480.     PBM_CALL,
  481.     PBM_FEATURE,
  482.     PBM_KEYPAD,
  483.     PBM_LOCAL,
  484.     PBM_DISPLAY
  485.             
  486. } PHONE_BUTTON_MODE;
  487. //
  488. // the function of the button - when the button is pressed,
  489. // what is expected to happen.
  490. //
  491. typedef enum PHONE_BUTTON_FUNCTION
  492. {
  493.     PBF_UNKNOWN,
  494.     PBF_CONFERENCE,
  495.     PBF_TRANSFER,
  496.     PBF_DROP,
  497.     PBF_HOLD,
  498.     PBF_RECALL,
  499.     PBF_DISCONNECT,
  500.     PBF_CONNECT,
  501.     PBF_MSGWAITON,
  502.     PBF_MSGWAITOFF,
  503.     PBF_SELECTRING,
  504.     PBF_ABBREVDIAL,
  505.     PBF_FORWARD,
  506.     PBF_PICKUP,
  507.     PBF_RINGAGAIN,
  508.     PBF_PARK,
  509.     PBF_REJECT,
  510.     PBF_REDIRECT,
  511.     PBF_MUTE,
  512.     PBF_VOLUMEUP,
  513.     PBF_VOLUMEDOWN,
  514.     PBF_SPEAKERON,
  515.     PBF_SPEAKEROFF,
  516.     PBF_FLASH,
  517.     PBF_DATAON,
  518.     PBF_DATAOFF,
  519.     PBF_DONOTDISTURB,
  520.     PBF_INTERCOM,
  521.     PBF_BRIDGEDAPP,
  522.     PBF_BUSY,
  523.     PBF_CALLAPP,
  524.     PBF_DATETIME,
  525.     PBF_DIRECTORY,
  526.     PBF_COVER,
  527.     PBF_CALLID,
  528.     PBF_LASTNUM,
  529.     PBF_NIGHTSRV,
  530.     PBF_SENDCALLS,
  531.     PBF_MSGINDICATOR,
  532.     PBF_REPDIAL,
  533.     PBF_SETREPDIAL,
  534.     PBF_SYSTEMSPEED,
  535.     PBF_STATIONSPEED,
  536.     PBF_CAMPON,
  537.     PBF_SAVEREPEAT,
  538.     PBF_QUEUECALL,
  539.     PBF_NONE,
  540.     PBF_SEND
  541. } PHONE_BUTTON_FUNCTION;
  542. //
  543. // Used by ITAutomatedPhoneControl
  544. //
  545. typedef enum PHONE_TONE
  546. {
  547.     PT_KEYPADZERO,
  548.     PT_KEYPADONE,
  549.     PT_KEYPADTWO,
  550.     PT_KEYPADTHREE,
  551.     PT_KEYPADFOUR,
  552.     PT_KEYPADFIVE,
  553.     PT_KEYPADSIX,
  554.     PT_KEYPADSEVEN,
  555.     PT_KEYPADEIGHT,
  556.     PT_KEYPADNINE,
  557.     PT_KEYPADSTAR,
  558.     PT_KEYPADPOUND,
  559.     PT_KEYPADA,
  560.     PT_KEYPADB,
  561.     PT_KEYPADC,
  562.     PT_KEYPADD,
  563.     PT_NORMALDIALTONE,
  564.     PT_EXTERNALDIALTONE,
  565.     PT_BUSY,
  566.     PT_RINGBACK,
  567.     PT_ERRORTONE,
  568.     PT_SILENCE
  569. } PHONE_TONE;
  570. //
  571. // events related to phones
  572. //
  573. typedef enum PHONE_EVENT
  574. {
  575.     PE_DISPLAY,
  576.     PE_LAMPMODE,
  577.     PE_RINGMODE,
  578.     PE_RINGVOLUME,
  579.     PE_HOOKSWITCH,
  580.     PE_CAPSCHANGE,
  581.     PE_BUTTON,
  582.     PE_CLOSE,
  583.     PE_NUMBERGATHERED,
  584.     PE_DIALING,
  585.     PE_ANSWER,
  586.     PE_DISCONNECT,
  587.     PE_LASTITEM = PE_DISCONNECT
  588.             
  589. } PHONE_EVENT;
  590. // Dispach ID mapping constants
  591. const DISPID  INTERFACEMASK                     = 0x00FF0000;
  592. const DISPID  DISPIDMASK                        = 0x0000FFFF;
  593.                                
  594. // Tapi Object Interfaces
  595. const DISPID  IDISPTAPI                         = 0x00010000;
  596. const DISPID  IDISPTAPICALLCENTER               = 0x00020000;
  597. // Call Object Interfaces
  598. const DISPID  IDISPCALLINFO                     = 0x00010000;
  599. const DISPID  IDISPBASICCALLCONTROL             = 0x00020000;
  600. const DISPID  IDISPLEGACYCALLMEDIACONTROL       = 0x00030000;
  601. const DISPID  IDISPAGGREGATEDMSPCALLOBJ         = 0x00040000;
  602. // Address Object Interfaces
  603. const DISPID  IDISPADDRESS                      = 0x00010000;
  604. const DISPID  IDISPADDRESSCAPABILITIES          = 0x00020000;
  605. const DISPID  IDISPMEDIASUPPORT                 = 0x00030000;
  606. const DISPID  IDISPADDRESSTRANSLATION           = 0x00040000;
  607. const DISPID  IDISPLEGACYADDRESSMEDIACONTROL    = 0x00050000;
  608. const DISPID  IDISPAGGREGATEDMSPADDRESSOBJ      = 0x00060000;
  609. // Phone Object Interfaces
  610. const DISPID  IDISPPHONE                        = 0x00010000;
  611. const DISPID  IDISPAPC                          = 0x00020000;
  612. // file terminal object interfaces
  613. const DISPID  IDISPMULTITRACK                   = 0x00010000;
  614. const DISPID  IDISPMEDIACONTROL                 = 0x00020000;
  615. const DISPID  IDISPMEDIARECORD                  = 0x00030000;
  616. const DISPID  IDISPMEDIAPLAYBACK                = 0x00040000;
  617. // file terminal track interfaces
  618. const DISPID  IDISPFILETRACK                    = 0x00010000;
  619. // forward definitions
  620. interface IEnumAddress;
  621. interface IEnumPhone;
  622. interface IEnumCall;
  623. interface IEnumTerminalClass;
  624. interface IEnumTerminal;
  625. interface IEnumLocation;
  626. interface IEnumCallingCard;
  627. interface IEnumBstr;
  628. interface ITCollection;
  629. interface ITCollection2;
  630. interface ITTerminal;
  631. interface ITAMTerminal;
  632. interface ITTAPI;
  633. interface ITTAPI2;
  634. interface ITMediaSupport;
  635. interface ITTerminalSupport;
  636. interface ITTerminalSupport2;
  637. interface ITCallInfo;
  638. interface ITCallInfo2;
  639. interface ITCallHub;
  640. interface ITBasicCallControl;
  641. interface IEnumCallHub;
  642. interface ITForwardInformation;
  643. interface ITAddressTranslation;
  644. interface ITAddressTranslationInfo;
  645. interface ITLocationInfo;
  646. interface ITCallingCard;
  647. interface ITAddress;
  648. interface ITAddress2;
  649. interface ITPhone;
  650. interface ITStaticAudioTerminal;
  651. interface ITStream;
  652. interface ITStreamControl;
  653. interface ITStream;
  654. interface ITSubStreamControl;
  655. interface ITSubStream;
  656. interface IEnumStream;
  657. interface IEnumSubStream;
  658. interface ITTone;
  659. interface ITToneGeneration;
  660. interface ITToneDetection;
  661. interface ITScriptableAudioFormat;
  662. interface ITPluggableTerminalSuperclassInfo;
  663. interface ITPluggableTerminalClassInfo;
  664. interface IEnumPluggableTerminalClassInfo;
  665. interface IEnumPluggableSuperclassInfo;
  666. interface ITDetectTone;
  667. interface ITCustomTone;
  668. [
  669.    uuid( B1EFC382-9355-11d0-835C-00AA003CCABD ),
  670.    helpstring("TAPI 3.0 ITTAPI interface"),
  671.    pointer_default(unique),
  672.    dual
  673. ]
  674. interface ITTAPI : IDispatch
  675. {
  676.     [id(IDISPTAPI | 13), helpstring("Initialize")]
  677.     HRESULT Initialize();
  678.     [id(IDISPTAPI | 14), helpstring("Shutdown")]
  679.     HRESULT Shutdown();
  680.     [propget, id(IDISPTAPI | 1), helpstring("property Addresses")]
  681.     HRESULT Addresses( 
  682.             [out, retval] VARIANT * pVariant
  683.             );
  684.     [id(IDISPTAPI | 2), hidden, helpstring("method EnumerateAddresses")]
  685.     HRESULT EnumerateAddresses(
  686.             [out, retval] IEnumAddress ** ppEnumAddress
  687.             );
  688.     [id(IDISPTAPI | 3), helpstring("method RegisterCallNotifications")]
  689.     HRESULT RegisterCallNotifications(
  690.             [in]ITAddress * pAddress,
  691.             [in]VARIANT_BOOL fMonitor,
  692.             [in]VARIANT_BOOL fOwner,
  693.             [in]long lMediaTypes,
  694.             [in]long lCallbackInstance,
  695.             [out,retval]long * plRegister
  696.             );
  697.     [id(IDISPTAPI | 4), helpstring("method UnregisterNotifications")]
  698.     HRESULT UnregisterNotifications(
  699.             [in] long lRegister
  700.             );
  701.     
  702.     [propget, id(IDISPTAPI | 5), helpstring("property CallHubs")]
  703.     HRESULT CallHubs(
  704.                      [out, retval] VARIANT * pVariant
  705.                     );
  706.     [id(IDISPTAPI | 6), hidden, helpstring("method EnumerateCallHubs")]
  707.     HRESULT EnumerateCallHubs(
  708.                               [out, retval] IEnumCallHub ** ppEnumCallHub
  709.                              );
  710.     [id(IDISPTAPI | 7), helpstring("method SetCallHubTracking")]
  711.     HRESULT SetCallHubTracking(
  712.                                [in] VARIANT pAddresses,
  713.                                [in] VARIANT_BOOL bTracking
  714.                                );
  715.     
  716.     [id(IDISPTAPI | 8), hidden]
  717.     HRESULT EnumeratePrivateTAPIObjects(
  718.             [out] IEnumUnknown ** ppEnumUnknown
  719.             );
  720.     [propget, id(IDISPTAPI | 9), helpstring("property PrivateTAPIObjects")]
  721.     HRESULT PrivateTAPIObjects(
  722.             [out, retval] VARIANT * pVariant
  723.             );
  724.     [id(IDISPTAPI | 10), helpstring("method RegisterRequestRecipient")]
  725.     HRESULT RegisterRequestRecipient(
  726.             [in] long lRegistrationInstance,
  727.             [in] long lRequestMode,
  728.             [in] VARIANT_BOOL fEnable
  729.             );
  730.     [id(IDISPTAPI | 11), helpstring("method SetAssistedTelephonyPriority")]
  731.     HRESULT SetAssistedTelephonyPriority(
  732.             [in] BSTR pAppFilename,
  733.             [in] VARIANT_BOOL fPriority
  734.             );
  735.     [id(IDISPTAPI | 12), helpstring("method SetApplicationPriority")]
  736.     HRESULT SetApplicationPriority(
  737.             [in] BSTR pAppFilename,
  738.             [in] long lMediaType,
  739.             [in] VARIANT_BOOL fPriority
  740.             );
  741.     [propput, id(IDISPTAPI | 15), helpstring("property EventFilter")]
  742.     HRESULT EventFilter( 
  743.             [in] long lFilterMask
  744.             );
  745.             
  746.     [propget, id(IDISPTAPI | 15), helpstring("property EventFilter")]
  747.     HRESULT EventFilter( 
  748.             [out, retval] long * plFilterMask
  749.             );
  750. }
  751. [
  752.     uuid( 54FBDC8C-D90F-4dad-9695-B373097F094B ),
  753.     helpstring("TAPI 3.1 ITTAPI2 interface"),
  754.     dual
  755. ]
  756. interface ITTAPI2 : ITTAPI
  757. {
  758.     //
  759.     // get the phones that can be used on this address
  760.     // returns a collection/enumeration for scripting and c/c++
  761.     //
  762.     [propget, id(IDISPTAPI | 16), helpstring("property Phones")]
  763.     HRESULT Phones( 
  764.             [out, retval]  VARIANT * pPhones
  765.             );
  766.     [id(IDISPTAPI | 17), hidden, helpstring("method EnumeratePhones")]
  767.     HRESULT EnumeratePhones(
  768.             [out, retval] IEnumPhone ** ppEnumPhone
  769.             );
  770.     [id(IDISPTAPI | 18), helpstring("method CreateEmptyCollectionObject")]
  771.     HRESULT CreateEmptyCollectionObject(
  772.             [out, retval] ITCollection2 ** ppCollection
  773.             );
  774. }
  775. [
  776.    uuid( B1EFC384-9355-11d0-835C-00AA003CCABD ),
  777.    helpstring("TAPI 3.0 ITMediaSupport interface"),
  778.    dual
  779. ]
  780. interface ITMediaSupport : IDispatch
  781. {
  782.     [propget, id(IDISPMEDIASUPPORT | 1), helpstring("property MediaTypes")]
  783.     HRESULT MediaTypes( 
  784.             [out, retval] long * plMediaTypes
  785.             );
  786.     [id(IDISPMEDIASUPPORT | 2), helpstring("method QueryMediaType")]
  787.     HRESULT QueryMediaType(
  788.             [in] long lMediaType,
  789.             [out, retval] VARIANT_BOOL * pfSupport
  790.             );
  791. }
  792. [
  793.     uuid( 41757F4A-CF09-4b34-BC96-0A79D2390076 ),
  794.     helpstring("TAPI 3.1 ITPluggableTerminalClassInfo interface"),
  795.     dual
  796. ]
  797. interface ITPluggableTerminalClassInfo : IDispatch
  798. {
  799.     //
  800.     // Terminal Friendly Name
  801.     //
  802.     [id(1), propget, helpstring("method get_Name")]
  803.     HRESULT Name(
  804.             [out, retval] BSTR*           pName
  805.             );
  806.     //
  807.     // Company name
  808.     //
  809.     [id(2), propget, helpstring("method get_Company")]
  810.     HRESULT Company(
  811.             [out, retval] BSTR*          pCompany
  812.             );
  813.     //
  814.     // Terminal Version
  815.     //
  816.     [id(3), propget, helpstring("method get_Version")]
  817.     HRESULT Version(
  818.             [out, retval] BSTR*          pVersion
  819.             );
  820.     //
  821.     // TerminalClass
  822.     //
  823.     [id(4), propget, helpstring("method get_TerminalClass")]
  824.     HRESULT TerminalClass(
  825.             [out, retval] BSTR*          pTerminalClass
  826.             );
  827.     //
  828.     // This CLSID is used to CoCreate the terminal
  829.     //
  830.     [id(5), propget, helpstring("method get_CLSID")]
  831.     HRESULT CLSID(
  832.             [out, retval] BSTR*          pCLSID
  833.             );
  834.     //
  835.     // Direction supported by terminal
  836.     //
  837.     [id(6), propget, helpstring("method get_Direction")]
  838.     HRESULT Direction(
  839.             [out, retval] TERMINAL_DIRECTION*  pDirection
  840.             );
  841.     //
  842.     // Media Types supported by terminal
  843.     //
  844.     [id(7), propget, helpstring("method get_MediaTypes")]
  845.     HRESULT MediaTypes(
  846.             [out, retval] long*  pMediaTypes
  847.             );
  848. }
  849. [
  850.     uuid( 6D54E42C-4625-4359-A6F7-631999107E05 ),
  851.     helpstring("TAPI 3.1 ITPluggableTerminalSuperclassInfo interface"),
  852.     dual
  853. ]
  854. interface ITPluggableTerminalSuperclassInfo : IDispatch
  855. {
  856.     [id(1), propget, helpstring("method get_Name")]
  857.     HRESULT Name(
  858.             [out, retval] BSTR*          pName
  859.             );
  860.     [id(2), propget, helpstring("method get_CLSID")]
  861.     HRESULT CLSID(
  862.             [out, retval] BSTR*           pCLSID
  863.             );
  864. }
  865. [
  866.     uuid( B1EFC385-9355-11d0-835C-00AA003CCABD ),
  867.     helpstring("TAPI 3.0 ITTerminalSupport interface"),
  868.     dual
  869. ]
  870. interface ITTerminalSupport : IDispatch
  871. {
  872.     [propget, id(IDISPAGGREGATEDMSPADDRESSOBJ | 1), helpstring("property StaticTerminals")]
  873.     HRESULT StaticTerminals( 
  874.             [out, retval] VARIANT * pVariant
  875.             );
  876.     [id(IDISPAGGREGATEDMSPADDRESSOBJ | 2), hidden, helpstring("method EnumerateStaticTerminals")]
  877.     HRESULT EnumerateStaticTerminals( 
  878.             [out, retval] IEnumTerminal ** ppTerminalEnumerator 
  879.             );
  880.     [propget, id(IDISPAGGREGATEDMSPADDRESSOBJ | 3), helpstring("property DynamicTerminalClasses")]
  881.     HRESULT DynamicTerminalClasses( 
  882.             [out, retval] VARIANT * pVariant
  883.             );
  884.     [id(IDISPAGGREGATEDMSPADDRESSOBJ | 4), hidden, helpstring("method EnumerateDynamicTerminalClasses")]
  885.     HRESULT EnumerateDynamicTerminalClasses(
  886.             [out, retval] IEnumTerminalClass ** ppTerminalClassEnumerator
  887.             );
  888.     [id(IDISPAGGREGATEDMSPADDRESSOBJ | 5), helpstring("method CreateTerminal")]
  889.     HRESULT CreateTerminal(
  890.             [in] BSTR pTerminalClass,
  891.             [in] long lMediaType,
  892.             [in] TERMINAL_DIRECTION Direction,
  893.             [out, retval] ITTerminal ** ppTerminal
  894.             );
  895.     [id(IDISPAGGREGATEDMSPADDRESSOBJ | 6), helpstring("method GetDefaultStaticTerminal")]
  896.     HRESULT GetDefaultStaticTerminal(
  897.             [in] long lMediaType,
  898.             [in] TERMINAL_DIRECTION Direction,
  899.             [out, retval] ITTerminal ** ppTerminal
  900.             );
  901. }
  902. [
  903.     uuid( F3EB39BC-1B1F-4e99-A0C0-56305C4DD591 ),
  904.     helpstring("TAPI 3.1 ITTerminalSupport2 interface"),
  905.     dual
  906. ]
  907. interface ITTerminalSupport2 : ITTerminalSupport
  908. {
  909.     [propget, id(IDISPAGGREGATEDMSPADDRESSOBJ | 7), helpstring("property PluggableSuperclasses")]
  910.     HRESULT PluggableSuperclasses( 
  911.             [out, retval] VARIANT * pVariant
  912.             );
  913.     [id(IDISPAGGREGATEDMSPADDRESSOBJ | 8), hidden, helpstring("method EnumeratePluggableSuperclasses")]
  914.     HRESULT EnumeratePluggableSuperclasses( 
  915.             [out, retval] IEnumPluggableSuperclassInfo ** ppSuperclassEnumerator 
  916.             );
  917.     [propget, id(IDISPAGGREGATEDMSPADDRESSOBJ | 9), helpstring("property PluggableTerminalClasses")]
  918.     HRESULT PluggableTerminalClasses( 
  919.             [in] BSTR bstrTerminalSuperclass,
  920.             [in] long lMediaType,
  921.             [out, retval] VARIANT * pVariant
  922.             );
  923.     [id(IDISPAGGREGATEDMSPADDRESSOBJ | 10), hidden, helpstring("method EnumeratePluggableTerminalClasses")]
  924.     HRESULT EnumeratePluggableTerminalClasses(
  925.             [in] CLSID iidTerminalSuperclass,
  926.             [in] long lMediaType,
  927.             [out, retval] IEnumPluggableTerminalClassInfo ** ppClassEnumerator 
  928.             );
  929. }
  930. [
  931.     uuid( B1EFC386-9355-11d0-835C-00AA003CCABD ),
  932.     helpstring("TAPI 3.0 ITAddress interface"),
  933.     dual
  934. ]
  935. interface ITAddress : IDispatch
  936. {
  937.     [propget, id(IDISPADDRESS | 1), helpstring("property State")]
  938.     HRESULT State( 
  939.             [out, retval] ADDRESS_STATE * pAddressState 
  940.             );
  941.     [propget, id(IDISPADDRESS | 2), helpstring("property AddressName")]
  942.     HRESULT AddressName( 
  943.             [out, retval] BSTR *  ppName 
  944.             );
  945.         
  946.     [propget, id(IDISPADDRESS | 3), helpstring("property ServiceProviderName")]
  947.     HRESULT ServiceProviderName( 
  948.             [out, retval] BSTR *  ppName 
  949.             );
  950.     [propget, id(IDISPADDRESS | 4), helpstring("property TAPIObject")]
  951.     HRESULT TAPIObject(
  952.             [out, retval] ITTAPI ** ppTapiObject
  953.             );
  954.     [id(IDISPADDRESS | 5), helpstring("method CreateCall")]
  955.     HRESULT CreateCall(
  956.             [in] BSTR pDestAddress,
  957.             [in] long lAddressType,
  958.             [in] long lMediaTypes,
  959.             [out, retval] ITBasicCallControl ** ppCall 
  960.             );
  961.     [propget, id(IDISPADDRESS | 6), helpstring("property Calls")]
  962.     HRESULT Calls(
  963.             [out, retval] VARIANT * pVariant
  964.             );
  965.     [id(IDISPADDRESS | 7), hidden, helpstring("method EnumerateCalls")]
  966.     HRESULT EnumerateCalls(
  967.             [out, retval] IEnumCall ** ppCallEnum 
  968.             );
  969.     [propget, id(IDISPADDRESS | 8), helpstring("property DialableAddress")]
  970.     HRESULT DialableAddress(
  971.             [out,retval] BSTR * pDialableAddress
  972.             );
  973.     [id(IDISPADDRESS | 10), helpstring("method CreateForwardInfoObject")]
  974.     HRESULT CreateForwardInfoObject(
  975.             [out, retval] ITForwardInformation ** ppForwardInfo
  976.             );
  977.     [id(IDISPADDRESS | 11), helpstring("method Forward")]
  978.     HRESULT Forward(
  979.             [in] ITForwardInformation * pForwardInfo,
  980.             [in] ITBasicCallControl * pCall
  981.             );
  982.     [propget, id(IDISPADDRESS | 12), helpstring("method Forward")]
  983.     HRESULT CurrentForwardInfo(
  984.             [out, retval] ITForwardInformation ** ppForwardInfo
  985.             );
  986.     [propput, id(IDISPADDRESS | 14), helpstring("property MessageWaiting")]
  987.     HRESULT MessageWaiting(
  988.             [in] VARIANT_BOOL  fMessageWaiting
  989.             );
  990.     [propget, id(IDISPADDRESS | 14), helpstring("property MessageWaiting")]
  991.     HRESULT MessageWaiting(
  992.             [out, retval] VARIANT_BOOL * pfMessageWaiting
  993.             );
  994.     [propput, id(IDISPADDRESS | 15), helpstring("property DoNotDisturb")]
  995.     HRESULT DoNotDisturb(
  996.             [in] VARIANT_BOOL  fDoNotDisturb
  997.             );
  998.     [propget, id(IDISPADDRESS | 15), helpstring("property DoNotDisturb")]
  999.     HRESULT DoNotDisturb(
  1000.             [out, retval] VARIANT_BOOL * pfDoNotDisturb
  1001.             );
  1002. }
  1003. ///////////////////////////////////////////////////////
  1004. //   ITAddress2
  1005. ///////////////////////////////////////////////////////
  1006. [
  1007.     uuid( B0AE5D9B-BE51-46c9-B0F7-DFA8A22A8BC4 ),
  1008.     helpstring("TAPI 3.1 ITAddress2 interface"),
  1009.     dual
  1010. ]
  1011. interface ITAddress2 : ITAddress
  1012. {
  1013.     //
  1014.     // get the phones that can be used on this address
  1015.     // returns a collection/enumeration for scripting and c/c++
  1016.     //
  1017.     [propget, id(IDISPADDRESS | 16), helpstring("property Phones")]
  1018.     HRESULT Phones( 
  1019.             [out, retval]  VARIANT * pPhones
  1020.             );
  1021.     [id(IDISPADDRESS | 17), hidden, helpstring("method EnumeratePhones")]
  1022.     HRESULT EnumeratePhones(
  1023.             [out, retval] IEnumPhone ** ppEnumPhone
  1024.             );
  1025.     [id(IDISPADDRESS | 18), helpstring("method GetPhoneFromTerminal")]
  1026.     HRESULT GetPhoneFromTerminal(
  1027.             [in] ITTerminal * pTerminal,
  1028.             [out, retval] ITPhone ** ppPhone
  1029.             );
  1030.     [propget, id(IDISPADDRESS | 20), helpstring("property PreferredPhones")]
  1031.     HRESULT PreferredPhones( 
  1032.             [out, retval]  VARIANT * pPhones
  1033.             );
  1034.     [id(IDISPADDRESS | 21), hidden, helpstring("method EnumeratePreferredPhones")]
  1035.     HRESULT EnumeratePreferredPhones(
  1036.             [out, retval] IEnumPhone ** ppEnumPhone
  1037.             );
  1038.     //
  1039.     // Filtering events
  1040.     //
  1041.     [propget, id(IDISPADDRESS | 19), helpstring("method EventFilter")]
  1042.     HRESULT EventFilter(
  1043.             [in] TAPI_EVENT     TapiEvent,
  1044.             [in] long           lSubEvent,
  1045.             [out,retval] VARIANT_BOOL*   pEnable
  1046.             );
  1047.     [propput, id(IDISPADDRESS | 19), helpstring("method EventFilter")]
  1048.     HRESULT EventFilter(
  1049.             [in] TAPI_EVENT     TapiEvent,
  1050.             [in] long           lSubEvent,
  1051.             [in] VARIANT_BOOL   bEnable
  1052.             );
  1053.     //
  1054.     // device specific methods
  1055.     //
  1056.     [id(IDISPADDRESS | 22), hidden, helpstring("method DeviceSpecific")]
  1057.     HRESULT DeviceSpecific(
  1058.          [in] ITCallInfo *pCall,
  1059.          [in] BYTE *pParams,
  1060.          [in] DWORD dwSize
  1061.             );
  1062.     [id(IDISPADDRESS | 23), helpstring("method DeviceSpecificVariant")]
  1063.     HRESULT DeviceSpecificVariant(
  1064.          [in] ITCallInfo *pCall,
  1065.          [in] VARIANT varDevSpecificByteArray
  1066.             );
  1067.     [id(IDISPADDRESS | 24), helpstring("method NegotiateExtVersion")]
  1068.     HRESULT NegotiateExtVersion (
  1069.          [in]  long lLowVersion,
  1070.          [in]  long lHighVersion,
  1071.          [out, retval] long *plExtVersion
  1072.             );
  1073. }
  1074. [
  1075.     uuid( 8DF232F5-821B-11d1-BB5C-00C04FB6809F ),
  1076.     helpstring("TAPI 3.0 ITAddressCapabilities interface"),
  1077.     dual
  1078. ]
  1079. interface ITAddressCapabilities : IDispatch
  1080. {
  1081.     [propget, id(IDISPADDRESSCAPABILITIES | 1), helpstring("property AddressCapability")]
  1082.     HRESULT AddressCapability( 
  1083.             [in] ADDRESS_CAPABILITY AddressCap, 
  1084.             [out, retval] long * plCapability
  1085.             );
  1086.     [propget, id(IDISPADDRESSCAPABILITIES | 2), helpstring("property AddressCapabilityString")]
  1087.     HRESULT AddressCapabilityString(
  1088.             [in] ADDRESS_CAPABILITY_STRING AddressCapString,
  1089.             [out, retval] BSTR * ppCapabilityString
  1090.             );
  1091.     [propget, id(IDISPADDRESSCAPABILITIES | 3), helpstring("property CallTreatments")]
  1092.     HRESULT CallTreatments( [out, retval] VARIANT * pVariant );
  1093.     [id(IDISPADDRESSCAPABILITIES | 4), hidden]
  1094.     HRESULT EnumerateCallTreatments( [out, retval] IEnumBstr ** ppEnumCallTreatment );
  1095.     [propget, id(IDISPADDRESSCAPABILITIES | 5), helpstring("property CompletionMessages")]
  1096.     HRESULT CompletionMessages( [out, retval] VARIANT * pVariant );
  1097.     [id(IDISPADDRESSCAPABILITIES | 6), hidden]
  1098.     HRESULT EnumerateCompletionMessages( [out, retval] IEnumBstr ** ppEnumCompletionMessage );
  1099.     [propget, id(IDISPADDRESSCAPABILITIES | 7), helpstring("property DeviceClasses")]
  1100.     HRESULT DeviceClasses( [out, retval] VARIANT * pVariant );
  1101.     [id(IDISPADDRESSCAPABILITIES | 8), hidden]
  1102.     HRESULT EnumerateDeviceClasses( [out, retval] IEnumBstr ** ppEnumDeviceClass );
  1103. }
  1104. ///////////////////////////////////////////////////////
  1105. //   ITPhone
  1106. ///////////////////////////////////////////////////////
  1107. [
  1108.     uuid( 09D48DB4-10CC-4388-9DE7-A8465618975A ),
  1109.     helpstring("TAPI 3.1 ITPhone interface"),
  1110.     dual
  1111. ]
  1112. interface ITPhone : IDispatch
  1113. {
  1114.     //
  1115.     // opens the phone devices
  1116.     //
  1117.     [id(IDISPPHONE | 1), helpstring("method Open")]
  1118.     HRESULT Open(
  1119.             [in] PHONE_PRIVILEGE Privilege
  1120.             );
  1121.     //
  1122.     // closes the phone
  1123.     //
  1124.     [id(IDISPPHONE | 2), helpstring("method Close")]
  1125.     HRESULT Close();
  1126.     //
  1127.     // returns a collection/enumeration of addresses that the phone
  1128.     // can be used on
  1129.     //
  1130.     [propget, id(IDISPPHONE | 3), helpstring("property Addresses")]
  1131.     HRESULT Addresses(
  1132.         [out, retval] VARIANT * pAddresses
  1133.         );
  1134.     [id(IDISPPHONE | 4), hidden, helpstring("method EnumerateAddresses")]
  1135.     HRESULT EnumerateAddresses(
  1136.             [out, retval] IEnumAddress ** ppEnumAddress
  1137.             );
  1138.     //
  1139.     // gets a DWORD (long) capability of the phone, based on the PHONECAPS_LONG
  1140.     // passed in.
  1141.     //
  1142.     [propget, id(IDISPPHONE | 5), helpstring("property PhoneCapsLong")]
  1143.     HRESULT PhoneCapsLong(
  1144.         [in] PHONECAPS_LONG pclCap,
  1145.         [out, retval] long * plCapability
  1146.         );
  1147.     //
  1148.     // gets a string capability/information about the phone, based on the PHONECAPS_STRING
  1149.     // passed in.
  1150.     //
  1151.     [propget, id(IDISPPHONE | 6), helpstring("property PhoneCapsString")]
  1152.     HRESULT PhoneCapsString(
  1153.         [in] PHONECAPS_STRING pcsCap,
  1154.         [out, retval] BSTR * ppCapability
  1155.         );
  1156.     //
  1157.     // gets a collection/enumerations of terminals that are the terminals that
  1158.     // are associated with the phone.
  1159.     //
  1160.     [propget, id(IDISPPHONE | 7), helpstring("property Terminals")]
  1161.     HRESULT Terminals(
  1162.         [in]          ITAddress * pAddress,
  1163.         [out, retval] VARIANT * pTerminals
  1164.         );
  1165.     [id(IDISPPHONE | 8), hidden, helpstring("method EnumerateTerminals")]
  1166.     HRESULT EnumerateTerminals(
  1167.         [in]          ITAddress * pAddress,
  1168.         [out, retval] IEnumTerminal ** ppEnumTerminal
  1169.         );
  1170.     //
  1171.     // get the button mode
  1172.     //
  1173.     [propget, id(IDISPPHONE | 9), helpstring("property ButtonMode")]
  1174.     HRESULT ButtonMode(
  1175.         [in]          long                lButtonID,
  1176.         [out, retval] PHONE_BUTTON_MODE * pButtonMode
  1177.         );
  1178.     //
  1179.     // put the button mode
  1180.     //
  1181.     [propput, id(IDISPPHONE | 9), helpstring("property ButtonMode")]
  1182.     HRESULT ButtonMode(
  1183.         [in]          long                lButtonID,
  1184.         [in]          PHONE_BUTTON_MODE   ButtonMode
  1185.         );
  1186.     //
  1187.     // get the button function
  1188.     //
  1189.     [propget, id(IDISPPHONE | 10), helpstring("property ButtonFunction")]
  1190.     HRESULT ButtonFunction(
  1191.         [in]          long                    lButtonID,
  1192.         [out, retval] PHONE_BUTTON_FUNCTION * pButtonFunction
  1193.         );
  1194.     //
  1195.     // put the button function
  1196.     //
  1197.     [propput, id(IDISPPHONE | 10), helpstring("property ButtonFunction")]
  1198.     HRESULT ButtonFunction(
  1199.             [in] long                  lButtonID, 
  1200.             [in] PHONE_BUTTON_FUNCTION ButtonFunction
  1201.             );
  1202.     //
  1203.     // get the button text
  1204.     //
  1205.     [propget, id(IDISPPHONE | 11), helpstring("property ButtonText")]
  1206.     HRESULT ButtonText(
  1207.         [in]          long   lButtonID,
  1208.         [out, retval] BSTR * ppButtonText
  1209.         );
  1210.     //
  1211.     // set the button text
  1212.     //
  1213.     [propput, id(IDISPPHONE | 11), helpstring("property ButtonText")]
  1214.     HRESULT ButtonText(
  1215.         [in]          long   lButtonID,
  1216.         [in]          BSTR   bstrButtonText
  1217.         );
  1218.     //
  1219.     // get the button state
  1220.     //
  1221.     [propget, id(IDISPPHONE | 12), helpstring("property ButtonState")]
  1222.     HRESULT ButtonState(
  1223.         [in]          long                 lButtonID,
  1224.         [out, retval] PHONE_BUTTON_STATE * pButtonState
  1225.         );
  1226.     //
  1227.     // set the current hookswitch state
  1228.     //
  1229.     [propget, id(IDISPPHONE | 13), helpstring("property HookSwitchState")]
  1230.     HRESULT HookSwitchState(
  1231.         [in]          PHONE_HOOK_SWITCH_DEVICE  HookSwitchDevice,
  1232.         [out, retval] PHONE_HOOK_SWITCH_STATE * pHookSwitchState
  1233.         );
  1234.     //
  1235.     // set the current hookswitch state
  1236.     //
  1237.     [propput, id(IDISPPHONE | 13), helpstring("property HookSwitchState")]
  1238.     HRESULT HookSwitchState(
  1239.         [in] PHONE_HOOK_SWITCH_DEVICE HookSwitchDevice,
  1240.         [in] PHONE_HOOK_SWITCH_STATE  HookSwitchState
  1241.         );
  1242.     //
  1243.     // set the ring mode for the phone
  1244.     //
  1245.     [propput, id(IDISPPHONE | 14), helpstring("property RingMode")]
  1246.     HRESULT RingMode(
  1247.         [in] long lRingMode
  1248.         );
  1249.     
  1250.     //
  1251.     // get the ring mode for the phone
  1252.     //
  1253.     [propget, id(IDISPPHONE | 14), helpstring("property RingMode")]
  1254.     HRESULT RingMode(
  1255.         [out, retval] long * plRingMode
  1256.         );
  1257.     //
  1258.     // set the ring volume for the phone
  1259.     //
  1260.     [propput, id(IDISPPHONE | 15), helpstring("property RingVolume")]
  1261.     HRESULT RingVolume(
  1262.         [in] long lRingVolume
  1263.         );
  1264.     
  1265.     //
  1266.     // get the ring volume for the phone
  1267.     //
  1268.     [propget, id(IDISPPHONE | 15), helpstring("property RingVolume")]
  1269.     HRESULT RingVolume(
  1270.         [out, retval] long * plRingVolume
  1271.         );
  1272.     //
  1273.     // get the privilege for the phone
  1274.     //
  1275.     [propget, id(IDISPPHONE | 16), helpstring("property Privilege")]
  1276.     HRESULT Privilege(
  1277.         [out, retval] PHONE_PRIVILEGE * pPrivilege
  1278.         );
  1279.     [id(IDISPPHONE | 17), hidden, helpstring("method GetPhoneDevCapsBuffer")]
  1280.     HRESULT GetPhoneCapsBuffer(
  1281.             [in] PHONECAPS_BUFFER pcbCaps,
  1282.             [out] DWORD *pdwSize,
  1283.             [out] BYTE **ppPhoneCapsBuffer
  1284.             );
  1285.     [propget, id(IDISPPHONE | 18), helpstring("property PhoneCapsBuffer")]
  1286.     HRESULT PhoneCapsBuffer(
  1287.             [in]          PHONECAPS_BUFFER  pcbCaps,
  1288.             [out, retval] VARIANT          *pVarBuffer
  1289.             );
  1290.     [propget, id(IDISPPHONE | 19), helpstring("property LampMode")]
  1291.     HRESULT LampMode(
  1292.             [in]          long                lLampID,
  1293.             [out, retval] PHONE_LAMP_MODE   * pLampMode
  1294.             );
  1295.     [propput, id(IDISPPHONE | 19), helpstring("property LampMode")]
  1296.     HRESULT LampMode(
  1297.             [in]          long                lLampID,
  1298.             [in]          PHONE_LAMP_MODE     LampMode
  1299.             );
  1300.     [propget, id(IDISPPHONE | 20), helpstring("property Display")]
  1301.     HRESULT Display(
  1302.             [out, retval] BSTR *pbstrDisplay
  1303.             );
  1304.     [id(IDISPPHONE | 21), helpstring("method SetDisplay")]
  1305.     HRESULT SetDisplay(
  1306.             [in] long lRow,
  1307.             [in] long lColumn,
  1308.             [in] BSTR bstrDisplay
  1309.             );
  1310.     //
  1311.     // returns a collection/enumeration of addresses that the phone
  1312.     // is preferred on
  1313.     //
  1314.     [propget, id(IDISPPHONE | 22), helpstring("property PreferredAddresses")]
  1315.     HRESULT PreferredAddresses(
  1316.         [out, retval] VARIANT * pAddresses
  1317.         );
  1318.     [id(IDISPPHONE | 23), hidden, helpstring("method EnumeratePreferredAddresses")]
  1319.     HRESULT EnumeratePreferredAddresses(
  1320.             [out, retval] IEnumAddress ** ppEnumAddress
  1321.             );
  1322.     //
  1323.     // device specific methods
  1324.     //
  1325.     [id(IDISPADDRESS | 24), hidden, helpstring("method DeviceSpecific")]
  1326.     HRESULT DeviceSpecific(
  1327.          [in] BYTE *pParams,
  1328.          [in] DWORD dwSize
  1329.             );
  1330.     [id(IDISPADDRESS | 25), helpstring("method DeviceSpecificVariant")]
  1331.     HRESULT DeviceSpecificVariant(
  1332.          [in] VARIANT varDevSpecificByteArray
  1333.             );
  1334.     [id(IDISPADDRESS | 26), helpstring("method NegotiateExtVersion")]
  1335.     HRESULT NegotiateExtVersion(
  1336.          [in]  long lLowVersion,
  1337.          [in]  long lHighVersion,
  1338.          [out, retval] long *plExtVersion
  1339.             );
  1340. }
  1341. ///////////////////////////////////////////////////////
  1342. //   ITAutomatedPhoneControl
  1343. ///////////////////////////////////////////////////////
  1344. [
  1345.     uuid( 1EE1AF0E-6159-4a61-B79B-6A4BA3FC9DFC ),
  1346.     helpstring("TAPI 3.1 ITAutomatedPhoneControl interface"),
  1347.     dual
  1348. ]
  1349. interface ITAutomatedPhoneControl : IDispatch
  1350. {
  1351.     [id(IDISPAPC | 1), helpstring("method StartTone")]
  1352.     HRESULT StartTone(
  1353.             [in] PHONE_TONE Tone,
  1354.             [in] long       lDuration
  1355.             );
  1356.     [id(IDISPAPC | 2), helpstring("method StopTone")]
  1357.     HRESULT StopTone();
  1358.     [propget, id(IDISPAPC | 3), helpstring("property Tone")]
  1359.     HRESULT Tone(
  1360.             [out, retval] PHONE_TONE * pTone
  1361.             );
  1362.     [id(IDISPAPC | 4), helpstring("method StartRinger")]
  1363.     HRESULT StartRinger(
  1364.             [in] long lRingMode,
  1365.             [in] long lDuration
  1366.             );
  1367.     [id(IDISPAPC | 5), helpstring("method StopRinger")]
  1368.     HRESULT StopRinger();
  1369.     [propget, id(IDISPAPC | 6), helpstring("property Ringer")]
  1370.     HRESULT Ringer(
  1371.             [out, retval] VARIANT_BOOL * pfRinging
  1372.             );
  1373.     [propput, id(IDISPAPC | 7), helpstring("property PhoneHandlingEnabled")]
  1374.     HRESULT PhoneHandlingEnabled(
  1375.             [in] VARIANT_BOOL fEnabled
  1376.             );
  1377.     [propget, id(IDISPAPC | 7), helpstring("property PhoneHandlingEnabled")]
  1378.     HRESULT PhoneHandlingEnabled(
  1379.             [out, retval] VARIANT_BOOL * pfEnabled
  1380.             );
  1381.     [propput, id(IDISPAPC | 8), helpstring("property AutoEndOfNumberTimeout")]
  1382.     HRESULT AutoEndOfNumberTimeout(
  1383.             [in] long lTimeout
  1384.             );
  1385.     [propget, id(IDISPAPC | 8), helpstring("property AutoEndOfNumberTimeout")]
  1386.     HRESULT AutoEndOfNumberTimeout(
  1387.             [out, retval] long * plTimeout
  1388.             );
  1389.     [propput, id(IDISPAPC | 9), helpstring("property AutoDialtone")]
  1390.     HRESULT AutoDialtone(
  1391.             [in] VARIANT_BOOL fEnabled
  1392.             );
  1393.     [propget, id(IDISPAPC | 9), helpstring("property AutoDialtone")]
  1394.     HRESULT AutoDialtone(
  1395.             [out, retval] VARIANT_BOOL * pfEnabled
  1396.             );
  1397.     [propput, id(IDISPAPC | 10), helpstring("property AutoStopTonesOnOnHook")]
  1398.     HRESULT AutoStopTonesOnOnHook(
  1399.             [in] VARIANT_BOOL fEnabled
  1400.             );
  1401.     [propget, id(IDISPAPC | 10), helpstring("property AutoStopTonesOnOnHook")]
  1402.     HRESULT AutoStopTonesOnOnHook(
  1403.             [out, retval] VARIANT_BOOL * pfEnabled
  1404.             );
  1405.     [propput, id(IDISPAPC | 11), helpstring("property AutoStopRingOnOffHook")]
  1406.     HRESULT AutoStopRingOnOffHook(
  1407.             [in] VARIANT_BOOL fEnabled
  1408.             );
  1409.     [propget, id(IDISPAPC | 11), helpstring("property AutoStopRingOnOffHook")]
  1410.     HRESULT AutoStopRingOnOffHook(
  1411.             [out, retval] VARIANT_BOOL * pfEnabled
  1412.             );
  1413.     [propput, id(IDISPAPC | 12), helpstring("property AutoKeypadTones")]
  1414.     HRESULT AutoKeypadTones(
  1415.             [in] VARIANT_BOOL fEnabled
  1416.             );
  1417.     [propget, id(IDISPAPC | 12), helpstring("property AutoKeypadTones")]
  1418.     HRESULT AutoKeypadTones (
  1419.             [out, retval] VARIANT_BOOL * pfEnabled
  1420.             );
  1421.     [propput, id(IDISPAPC | 13), helpstring("property AutoKeypadTonesMinimumDuration")]
  1422.     HRESULT AutoKeypadTonesMinimumDuration(
  1423.             [in] long lDuration
  1424.             );
  1425.     [propget, id(IDISPAPC | 13), helpstring("property AutoKeypadTonesMinimumDuration")]
  1426.     HRESULT AutoKeypadTonesMinimumDuration(
  1427.             [out, retval] long * plDuration
  1428.             );
  1429.     [propput, id(IDISPAPC | 14), helpstring("property AutoVolumeControl")]
  1430.     HRESULT AutoVolumeControl(
  1431.             [in] VARIANT_BOOL fEnabled
  1432.             );
  1433.     [propget, id(IDISPAPC | 14), helpstring("property AutoVolumeControl")]
  1434.     HRESULT AutoVolumeControl(
  1435.             [out, retval] VARIANT_BOOL * fEnabled
  1436.             );
  1437.     [propput, id(IDISPAPC | 15), helpstring("property AutoVolumeControlStep")]
  1438.     HRESULT AutoVolumeControlStep(
  1439.             [in] long lStepSize
  1440.             );
  1441.     [propget, id(IDISPAPC | 15), helpstring("property AutoVolumeControlStep")]
  1442.     HRESULT AutoVolumeControlStep(
  1443.             [out, retval] long * plStepSize
  1444.             );
  1445.     [propput, id(IDISPAPC | 16), helpstring("property AutoVolumeControlRepeatDelay")]
  1446.     HRESULT AutoVolumeControlRepeatDelay(
  1447.             [in] long lDelay
  1448.             );
  1449.     [propget, id(IDISPAPC | 16), helpstring("property AutoVolumeControlRepeatDelay")]
  1450.     HRESULT AutoVolumeControlRepeatDelay(
  1451.             [out, retval] long * plDelay
  1452.             );
  1453.     [propput, id(IDISPAPC | 17), helpstring("property AutoVolumeControlRepeatPeriod")]
  1454.     HRESULT AutoVolumeControlRepeatPeriod(
  1455.             [in] long lPeriod
  1456.             );
  1457.     [propget, id(IDISPAPC | 17), helpstring("property AutoVolumeControlRepeatPeriod")]
  1458.     HRESULT AutoVolumeControlRepeatPeriod(
  1459.             [out, retval] long * plPeriod
  1460.             );
  1461.     [id(IDISPAPC | 18), helpstring("method SelectCall")]
  1462.     HRESULT SelectCall(
  1463.             [in] ITCallInfo   * pCall,
  1464.             [in] VARIANT_BOOL   fSelectDefaultTerminals
  1465.             );
  1466.     [id(IDISPAPC | 19), helpstring("method UnselectCall")]
  1467.     HRESULT UnselectCall(
  1468.             [in] ITCallInfo * pCall
  1469.             );
  1470.     [id(IDISPAPC | 20), hidden, helpstring("method EnumerateSelectedCalls")]
  1471.     HRESULT EnumerateSelectedCalls(
  1472.             [out, retval] IEnumCall ** ppCallEnum
  1473.             );
  1474.     [propget, id(IDISPAPC | 21), helpstring("property SelectedCalls")]
  1475.     HRESULT SelectedCalls(
  1476.             [out, retval] VARIANT * pVariant
  1477.             );
  1478. }
  1479. [
  1480.     uuid( B1EFC389-9355-11d0-835C-00AA003CCABD ),
  1481.     helpstring("TAPI 3.0 ITBasicCallControl interface"),
  1482.     dual
  1483. ]
  1484.     
  1485. interface ITBasicCallControl : IDispatch
  1486. {
  1487.     [id(IDISPBASICCALLCONTROL | 3), helpstring("method Connect")]
  1488.     HRESULT Connect(
  1489.             [in] VARIANT_BOOL fSync
  1490.             );
  1491.     [id(IDISPBASICCALLCONTROL | 4), helpstring("method Answer")]
  1492.     HRESULT Answer();
  1493.     [id(IDISPBASICCALLCONTROL | 5), helpstring("method Disconnect")]
  1494.     HRESULT Disconnect( 
  1495.             [in] DISCONNECT_CODE code 
  1496.             );
  1497.     [id(IDISPBASICCALLCONTROL | 6), helpstring("method Hold")]
  1498.     HRESULT Hold( 
  1499.             [in] VARIANT_BOOL fHold 
  1500.             );
  1501.     [id(IDISPBASICCALLCONTROL | 7), helpstring("method HandoffDirect")]
  1502.     HRESULT HandoffDirect(
  1503.             [in] BSTR pApplicationName
  1504.             );
  1505.     [id(IDISPBASICCALLCONTROL | 8), helpstring("method HandoffIndirect")]
  1506.     HRESULT HandoffIndirect(
  1507.             [in] long lMediaType
  1508.             );
  1509.     [id(IDISPBASICCALLCONTROL | 9), helpstring("method Conference")]
  1510.     HRESULT Conference(
  1511.             [in] ITBasicCallControl * pCall,
  1512.             [in] VARIANT_BOOL fSync
  1513.             );
  1514.     [id(IDISPBASICCALLCONTROL | 10), helpstring("method Transfer")]
  1515.     HRESULT Transfer( 
  1516.             [in] ITBasicCallControl * pCall,
  1517.             [in] VARIANT_BOOL fSync
  1518.             );
  1519.     [id(IDISPBASICCALLCONTROL | 11), helpstring("method BlindTransfer")]
  1520.     HRESULT BlindTransfer( 
  1521.             [in] BSTR pDestAddress
  1522.             );
  1523.     [id(IDISPBASICCALLCONTROL | 12), helpstring("method SwapHold")]
  1524.     HRESULT SwapHold( 
  1525.             [in] ITBasicCallControl * pCall
  1526.             );
  1527.     [id(IDISPBASICCALLCONTROL | 13), helpstring("method ParkDirect")]
  1528.     HRESULT ParkDirect(
  1529.             [in] BSTR pParkAddress
  1530.             );
  1531.     [id(IDISPBASICCALLCONTROL | 14), helpstring("method ParkIndirect")]
  1532.     HRESULT ParkIndirect(
  1533.             [out, retval] BSTR * ppNonDirAddress
  1534.             );
  1535.     [id(IDISPBASICCALLCONTROL | 15), helpstring("method Unpark")]
  1536.     HRESULT Unpark();
  1537.     [id(IDISPBASICCALLCONTROL | 16), helpstring("method SetQOS")]
  1538.     HRESULT SetQOS(
  1539.             [in] long lMediaType,
  1540.             [in] QOS_SERVICE_LEVEL ServiceLevel
  1541.             );
  1542.     [id(IDISPBASICCALLCONTROL | 19), helpstring("method Pickup")]
  1543.     HRESULT Pickup(
  1544.             [in] BSTR pGroupID
  1545.             );
  1546.     [id(IDISPBASICCALLCONTROL | 20), helpstring("method Dial")]
  1547.     HRESULT Dial(
  1548.             [in] BSTR pDestAddress
  1549.             );
  1550.     [id(IDISPBASICCALLCONTROL | 21), helpstring("method Finish")]
  1551.     HRESULT Finish(
  1552.             [in]  FINISH_MODE   finishMode
  1553.             );
  1554.     [id(IDISPBASICCALLCONTROL | 22), helpstring("method RemoveFromConference")]
  1555.     HRESULT RemoveFromConference();
  1556. }
  1557. [
  1558.     uuid( 350F85D1-1227-11D3-83D4-00C04FB6809F ),
  1559.     helpstring("TAPI 3.0 ITCallInfo interface"),
  1560.     dual
  1561. ]
  1562.     
  1563. interface ITCallInfo : IDispatch
  1564. {
  1565.     [propget, id(IDISPCALLINFO | 1), helpstring("property Address")]
  1566.     HRESULT Address(
  1567.             [out, retval] ITAddress ** ppAddress
  1568.             );
  1569.     [propget, id(IDISPCALLINFO | 2), helpstring("property CallState")]
  1570.     HRESULT CallState( 
  1571.             [out, retval] CALL_STATE * pCallState 
  1572.             );
  1573.     [propget, id(IDISPCALLINFO | 3), helpstring("property Privilege")]
  1574.     HRESULT Privilege(
  1575.             [out, retval] CALL_PRIVILEGE * pPrivilege
  1576.             );
  1577.     [propget, id(IDISPCALLINFO | 4), helpstring("property CallHub")]
  1578.     HRESULT CallHub(
  1579.                     [out,retval] ITCallHub ** ppCallHub
  1580.                    );
  1581.     [propget, id(IDISPCALLINFO | 5), helpstring("property CallInfoLong")]
  1582.     HRESULT CallInfoLong(
  1583.             [in] CALLINFO_LONG CallInfoLong,
  1584.             [out, retval] long * plCallInfoLongVal
  1585.             );
  1586.     [propput, id(IDISPCALLINFO | 5), helpstring("property CallInfoLong")]
  1587.     HRESULT CallInfoLong(
  1588.             [in] CALLINFO_LONG CallInfoLong,
  1589.             [in] long lCallInfoLongVal
  1590.             );
  1591.     [propget, id(IDISPCALLINFO | 6), helpstring("property CallInfoString")]
  1592.     HRESULT CallInfoString(
  1593.             [in] CALLINFO_STRING CallInfoString,
  1594.             [out, retval] BSTR * ppCallInfoString
  1595.             );
  1596.     [propput, id(IDISPCALLINFO | 6), helpstring("property CallInfoString")]
  1597.     HRESULT CallInfoString(
  1598.             [in] CALLINFO_STRING CallInfoString,
  1599.             [in] BSTR pCallInfoString
  1600.             );
  1601.     [propget, id(IDISPCALLINFO | 7), helpstring("property CallInfoBuffer")]
  1602.     HRESULT CallInfoBuffer(
  1603.             [in] CALLINFO_BUFFER CallInfoBuffer,
  1604.             [out, retval] VARIANT * ppCallInfoBuffer
  1605.             );
  1606.     [propput, id(IDISPCALLINFO | 7), helpstring("property CallInfoBuffer")]
  1607.     HRESULT CallInfoBuffer(
  1608.             [in] CALLINFO_BUFFER CallInfoBuffer,
  1609.             [in] VARIANT pCallInfoBuffer
  1610.             );
  1611.     [id(IDISPCALLINFO | 8), hidden]
  1612.     HRESULT GetCallInfoBuffer(
  1613.             [in] CALLINFO_BUFFER CallInfoBuffer,
  1614.             [out] DWORD * pdwSize,
  1615.             [out, size_is(,*pdwSize)] BYTE ** ppCallInfoBuffer
  1616.             );
  1617.     [id(IDISPCALLINFO | 9), hidden]
  1618.     HRESULT SetCallInfoBuffer(
  1619.             [in] CALLINFO_BUFFER CallInfoBuffer,
  1620.             [in] DWORD dwSize,
  1621.             [in, size_is(dwSize)] BYTE * pCallInfoBuffer
  1622.             );
  1623.     [id(IDISPCALLINFO | 10), helpstring("method ReleaseUserUserInfo")]
  1624.     HRESULT ReleaseUserUserInfo();
  1625. }
  1626. [
  1627.     uuid( 94D70CA6-7AB0-4daa-81CA-B8F8643FAEC1 ),
  1628.     helpstring("TAPI 3.1 ITCallInfo2 interface"),
  1629.     dual
  1630. ]
  1631. interface ITCallInfo2 : ITCallInfo
  1632. {
  1633.     [propget, id(IDISPCALLINFO | 11), helpstring("method EventFilter")]
  1634.     HRESULT EventFilter(
  1635.         [in]    TAPI_EVENT      TapiEvent,
  1636.         [in]    long            lSubEvent,
  1637.         [out,retval]    VARIANT_BOOL*    pEnable
  1638.         );
  1639.     [propput, id(IDISPCALLINFO | 11), helpstring("method EventFilter")]
  1640.     HRESULT EventFilter(
  1641.         [in]    TAPI_EVENT      TapiEvent,
  1642.         [in]    long            lSubEvent,
  1643.         [in]    VARIANT_BOOL    bEnable
  1644.         );
  1645. }
  1646. //
  1647. // Implemented by the MSP's Terminal objects.
  1648. //
  1649. [
  1650.     uuid( B1EFC38A-9355-11d0-835C-00AA003CCABD ),
  1651.     helpstring("TAPI 3.0 ITTerminal interface"),
  1652.     dual
  1653. ]
  1654. interface ITTerminal : IDispatch
  1655. {
  1656.     [propget, id(1), helpstring("property Name")]
  1657.     HRESULT Name(
  1658.             [out, retval] BSTR * ppName
  1659.             );
  1660.     [propget, id(2), helpstring("property State")]
  1661.     HRESULT State( 
  1662.             [out, retval] TERMINAL_STATE * pTerminalState 
  1663.             );
  1664.     [propget, id(3), helpstring("property TerminalType")]
  1665.     HRESULT TerminalType(
  1666.             [out, retval] TERMINAL_TYPE * pType
  1667.             );
  1668.     // terminal class is actually a guid
  1669.     [propget, id(4), helpstring("property TerminalClass")] 
  1670.     HRESULT TerminalClass(
  1671.             [out, retval] BSTR * ppTerminalClass
  1672.             );
  1673.     [propget, id(5), helpstring("property MediaType")]
  1674.     HRESULT MediaType(
  1675.             [out, retval] long * plMediaType
  1676.             );
  1677.     [propget, id(6), helpstring("property Direction")]
  1678.     HRESULT Direction(
  1679.             [out, retval] TERMINAL_DIRECTION *pDirection
  1680.             );
  1681. }
  1682. //
  1683. // implemented by multitrack terminals
  1684. //
  1685. [
  1686.     object,
  1687.     uuid(FE040091-ADE8-4072-95C9-BF7DE8C54B44),
  1688.     dual,
  1689.     helpstring("ITMultiTrackTerminal Interface"),
  1690. ]
  1691. interface ITMultiTrackTerminal : IDispatch
  1692. {
  1693.     [propget, id(IDISPMULTITRACK | 1), helpstring("property TrackTerminals")]
  1694.     HRESULT TrackTerminals(
  1695.             [out, retval] VARIANT *pVariant
  1696.             );
  1697.     [id(IDISPMULTITRACK | 2), hidden, helpstring("method EnumerateTrackTerminals")]
  1698.     HRESULT EnumerateTrackTerminals(
  1699.             [out, retval] IEnumTerminal **ppEnumTerminal
  1700.             );
  1701.     [id(IDISPMULTITRACK | 3), helpstring("method CreateTrackTerminal")]
  1702.     HRESULT CreateTrackTerminal(
  1703.             [in]long MediaType,
  1704.             [in]TERMINAL_DIRECTION TerminalDirection,
  1705.             [out,retval]ITTerminal **ppTerminal
  1706.             );
  1707.     [propget, id(IDISPMULTITRACK | 4), helpstring("property MediaTypesInUse")]
  1708.     HRESULT MediaTypesInUse(
  1709.             [out, retval] long *plMediaTypesInUse
  1710.             );
  1711.     [propget, id(IDISPMULTITRACK | 5), helpstring("property DirectionsInUse")]
  1712.     HRESULT DirectionsInUse(
  1713.             [out, retval] TERMINAL_DIRECTION *plDirectionsInUsed
  1714.             );
  1715.     
  1716.     [id(IDISPMULTITRACK | 6), helpstring("method RemoveTrackTerminal")]
  1717.     HRESULT RemoveTrackTerminal(
  1718.             [in] ITTerminal *pTrackTerminalToRemove
  1719.             );
  1720. }
  1721. //
  1722. // this describes state of the terminal
  1723. //
  1724. typedef enum TERMINAL_MEDIA_STATE
  1725. {
  1726.     TMS_IDLE,      // Terminal is doing nothing.  No transfer of data
  1727.     TMS_ACTIVE,    // Transferring media stream <-> storage
  1728.     TMS_PAUSED,    // Transfer temporarily suspended
  1729.     TMS_LASTITEM = TMS_PAUSED
  1730. } TERMINAL_MEDIA_STATE;
  1731. //
  1732. // state transition causes
  1733. //
  1734. typedef enum FT_STATE_EVENT_CAUSE
  1735. {
  1736.     FTEC_NORMAL,
  1737.     FTEC_END_OF_FILE,
  1738.     FTEC_READ_ERROR,
  1739.     FTEC_WRITE_ERROR
  1740. } FT_STATE_EVENT_CAUSE;
  1741. [
  1742.     object,
  1743.     uuid(31CA6EA9-C08A-4bea-8811-8E9C1BA3EA3A),
  1744.     dual,
  1745.     helpstring("ITFileTrack Interface"),
  1746.     pointer_default(unique)
  1747. ]
  1748. interface ITFileTrack  : IDispatch
  1749. {
  1750.     [propget, id(IDISPFILETRACK | 1), hidden, helpstring("property Format")]
  1751.     HRESULT Format(
  1752.         [out, retval] AM_MEDIA_TYPE **ppmt
  1753.         );
  1754.     [propput, id(IDISPFILETRACK | 1), hidden, helpstring("property Format")]
  1755.     HRESULT Format(
  1756.         [in] const AM_MEDIA_TYPE *pmt
  1757.         );
  1758.     [propget, id(IDISPFILETRACK | 2), helpstring("property ControllingTerminal")]
  1759.     HRESULT ControllingTerminal(
  1760.         [out, retval] ITTerminal **ppControllingTerminal
  1761.         );
  1762.     [propget, id(IDISPFILETRACK | 3), helpstring("property AudioFormatForScripting")]
  1763.     HRESULT AudioFormatForScripting(
  1764.         [out, retval] ITScriptableAudioFormat** ppAudioFormat
  1765.         );
  1766.     [propput, id(IDISPFILETRACK | 3), helpstring("property AudioFormatForScripting")]
  1767.     HRESULT AudioFormatForScripting(
  1768.         [in] ITScriptableAudioFormat* pAudioFormat
  1769.         );
  1770.     [propget, id(IDISPFILETRACK | 5), helpstring("property EmptyAudioFormatForScripting")]
  1771.     HRESULT EmptyAudioFormatForScripting(
  1772.         [out, retval] ITScriptableAudioFormat** ppAudioFormat
  1773.         );
  1774. };
  1775. [
  1776.     object,
  1777.     uuid(627E8AE6-AE4C-4a69-BB63-2AD625404B77),
  1778.     dual,
  1779.     helpstring("ITMediaPlayback Interface"),
  1780.     pointer_default(unique)
  1781. ]
  1782. interface ITMediaPlayback : IDispatch
  1783. {
  1784.     [propput, id(IDISPMEDIAPLAYBACK | 1), helpstring("property PlayList")] 
  1785.     HRESULT PlayList(
  1786.         [in] VARIANTARG PlayListVariant
  1787.         );
  1788.     [propget, id(IDISPMEDIAPLAYBACK | 1), helpstring("property PlayList")] 
  1789.     HRESULT PlayList(
  1790.         [out, retval] VARIANTARG* pPlayListVariant
  1791.         );
  1792. };
  1793. [
  1794.     object,
  1795.     uuid(F5DD4592-5476-4cc1-9D4D-FAD3EEFE7DB2),
  1796.     dual,
  1797.     helpstring("ITMediaRecord Interface"),
  1798.     pointer_default(unique)
  1799. ]
  1800. interface ITMediaRecord : IDispatch
  1801. {
  1802.     [propput, id(IDISPMEDIARECORD | 1), helpstring("propery FileName")]
  1803.     HRESULT FileName
  1804.     (
  1805.         [in] BSTR bstrFileName
  1806.     );
  1807.     [propget, id(IDISPMEDIARECORD | 1), helpstring("property FileName")] 
  1808.     HRESULT FileName(
  1809.         [out, retval] BSTR *pbstrFileName
  1810.         );
  1811. };
  1812. [
  1813.     object,
  1814.     uuid(C445DDE8-5199-4bc7-9807-5FFB92E42E09),
  1815.     dual,
  1816.     helpstring("ITMediaControl Interface"),
  1817.     pointer_default(unique)
  1818. ]
  1819. interface ITMediaControl : IDispatch
  1820. {
  1821.     [id(IDISPMEDIACONTROL | 1), helpstring("method Start")] 
  1822.     HRESULT Start();
  1823.     [id(IDISPMEDIACONTROL | 2), helpstring("method Stop")] 
  1824.     HRESULT Stop();
  1825.     [id(IDISPMEDIACONTROL | 3), helpstring("method Pause")] 
  1826.     HRESULT Pause();
  1827.     [propget, id(IDISPMEDIACONTROL | 4), helpstring("property MediaState")] 
  1828.     HRESULT MediaState(
  1829.         [out, retval] TERMINAL_MEDIA_STATE *pTerminalMediaState
  1830.         );
  1831. };
  1832. [
  1833.     uuid( B1EFC38D-9355-11d0-835C-00AA003CCABD ),
  1834.     helpstring("TAPI 3.0 ITBasicAudioTerminal interface"),
  1835.     dual
  1836. ]
  1837.     
  1838. interface ITBasicAudioTerminal : IDispatch
  1839. {
  1840.     [propput, id(1), helpstring("property Volume")]
  1841.     HRESULT Volume(
  1842.             [in] long lVolume
  1843.             );
  1844.     [propget, id(1), helpstring("property Volume")]
  1845.     HRESULT Volume(
  1846.             [out, retval] long * plVolume
  1847.             );
  1848.     [propput, id(2), helpstring("property Balance")]
  1849.     HRESULT Balance(
  1850.             [in] long lBalance
  1851.             );
  1852.     [propget, id(2), helpstring("property Balance")]
  1853.     HRESULT Balance(
  1854.             [out, retval] long * plBalance
  1855.             );
  1856. }
  1857. ///////////////////////////////////////////////////////
  1858. //   ITStaticAudioTerminal
  1859. ///////////////////////////////////////////////////////
  1860. [
  1861.     uuid( A86B7871-D14C-48e6-922E-A8D15F984800 ),
  1862.     helpstring("TAPI 3.1 ITStaticAudioTerminal Interface"),
  1863.     dual
  1864. ]   
  1865. interface ITStaticAudioTerminal : IDispatch
  1866. {
  1867.     [propget, id(1), helpstring("property WaveId")]
  1868.     HRESULT WaveId(
  1869.             [out, retval] long * plWaveId
  1870.             );
  1871. }
  1872. [
  1873.     uuid( A3C1544E-5B92-11d1-8F4E-00C04FB6809F ),
  1874.     helpstring("TAPI 3.0 ITCallHub interface"),
  1875.     dual
  1876. ]
  1877. interface ITCallHub : IDispatch
  1878. {
  1879.     [id(1), helpstring("method Clear")]
  1880.     HRESULT Clear();
  1881.     [id(2), hidden, helpstring("method EnumerateCalls")]
  1882.     HRESULT EnumerateCalls( 
  1883.         [out, retval] IEnumCall ** ppEnumCall 
  1884.         );
  1885.     [propget, id(3), helpstring("property Calls")]
  1886.     HRESULT Calls(
  1887.         [out, retval] VARIANT * pCalls
  1888.         );
  1889.     [propget, id(4), helpstring("property NumCalls")]
  1890.     HRESULT NumCalls(
  1891.        [out, retval] long * plCalls
  1892.        );
  1893.     [propget, id(5), helpstring("property State")]
  1894.     HRESULT State(
  1895.                   [out, retval] CALLHUB_STATE * pState
  1896.                  );
  1897. }
  1898. [
  1899.     uuid(AB493640-4C0B-11D2-A046-00C04FB6809F),
  1900.     helpstring("TAPI 3.0 ITLegacyAddressMediaControl Interface"),
  1901.     hidden,
  1902.     pointer_default(unique)
  1903. ]
  1904. interface ITLegacyAddressMediaControl : IUnknown
  1905. {
  1906.     [id(IDISPLEGACYADDRESSMEDIACONTROL | 1), hidden]
  1907.     HRESULT GetID(
  1908.         [in] BSTR pDeviceClass,
  1909.         [out] DWORD * pdwSize,
  1910.         [out, size_is(,*pdwSize)] BYTE ** ppDeviceID
  1911.         );
  1912.     [id(IDISPLEGACYADDRESSMEDIACONTROL | 2), hidden]
  1913.     HRESULT GetDevConfig(
  1914.         [in] BSTR pDeviceClass,
  1915.         [out] DWORD * pdwSize,
  1916.         [out, size_is(,*pdwSize)] BYTE ** ppDeviceConfig
  1917.         );
  1918.     [id(IDISPLEGACYADDRESSMEDIACONTROL | 3), hidden]
  1919.     HRESULT SetDevConfig(
  1920.         [in] BSTR pDeviceClass,
  1921.         [in] DWORD dwSize,
  1922.         [in, size_is(dwSize)] BYTE * pDeviceConfig
  1923.         );
  1924. }
  1925. [
  1926.     uuid( 0e269cd0-10d4-4121-9c22-9c85d625650d ),
  1927.     helpstring("TAPI 3.0 ITPrivateEvent Interface"),
  1928.     dual
  1929. ]
  1930. interface ITPrivateEvent : IDispatch
  1931. {
  1932.     [propget, id(1), helpstring("property Address")]
  1933.     HRESULT Address(
  1934.         [out, retval] ITAddress ** ppAddress
  1935.         );        
  1936.     [propget, id(2), helpstring("property Call")]
  1937.     HRESULT Call(
  1938.         [out, retval] ITCallInfo ** ppCallInfo
  1939.         );
  1940.         
  1941.     [propget, id(3), helpstring("property CallHub")]
  1942.     HRESULT CallHub(
  1943.         [out, retval] ITCallHub ** ppCallHub
  1944.         );
  1945.         
  1946.     [propget, id(4), helpstring("property EventCode")]
  1947.     HRESULT EventCode(
  1948.         [out, retval] long * plEventCode
  1949.         );
  1950.     
  1951.     [propget, id(5), helpstring("property EventInterface")]
  1952.     HRESULT EventInterface(
  1953.         [out, retval] IDispatch ** pEventInterface
  1954.         );
  1955. }
  1956. [
  1957.     uuid(B0EE512B-A531-409e-9DD9-4099FE86C738),
  1958.     helpstring("TAPI 3.1 ITLegacyAddressMediaControl2 Interface"),
  1959.     hidden,
  1960.     pointer_default(unique)
  1961. ]
  1962. interface ITLegacyAddressMediaControl2 : ITLegacyAddressMediaControl
  1963. {
  1964.     [id(IDISPLEGACYADDRESSMEDIACONTROL | 4), hidden]
  1965.     HRESULT ConfigDialog(
  1966.         [in] HWND hwndOwner,
  1967.         [in] BSTR pDeviceClass
  1968.         );
  1969.     [id(IDISPLEGACYADDRESSMEDIACONTROL | 5), hidden]
  1970.     HRESULT ConfigDialogEdit(
  1971.         [in] HWND hwndOwner,
  1972.         [in] BSTR pDeviceClass,
  1973.         [in] DWORD dwSizeIn,
  1974.         [in, size_is(dwSizeIn)] BYTE * pDeviceConfigIn,
  1975.         [out] DWORD * pdwSizeOut,
  1976.         [out, size_is(,*pdwSizeOut)] BYTE ** ppDeviceConfigOut
  1977.         );
  1978. }
  1979. [
  1980.     uuid(d624582f-cc23-4436-b8a5-47c625c8045d),
  1981.     helpstring("TAPI 3.0 ITLegacyCallMediaControl Interface"),
  1982.     dual,
  1983.     pointer_default(unique)
  1984. ]
  1985. interface ITLegacyCallMediaControl : IDispatch
  1986. {
  1987.     [id(IDISPLEGACYCALLMEDIACONTROL | 1), helpstring("method DetectDigits")]
  1988.     HRESULT DetectDigits(
  1989.             [in] TAPI_DIGITMODE DigitMode
  1990.             );
  1991.     [id(IDISPLEGACYCALLMEDIACONTROL | 2), helpstring("method GenerateDigits")]
  1992.     HRESULT GenerateDigits(
  1993.             [in] BSTR pDigits,
  1994.             [in] TAPI_DIGITMODE DigitMode
  1995.             );
  1996.     [id(IDISPLEGACYCALLMEDIACONTROL | 3), hidden]
  1997.     HRESULT GetID(
  1998.         [in] BSTR pDeviceClass,
  1999.         [out] DWORD * pdwSize,
  2000.         [out, size_is(,*pdwSize)] BYTE ** ppDeviceID
  2001.         );
  2002.     [id(IDISPLEGACYCALLMEDIACONTROL | 4), helpstring("method SetMediaType")]
  2003.     HRESULT SetMediaType(
  2004.         [in] long lMediaType
  2005.         );
  2006.     [id(IDISPLEGACYCALLMEDIACONTROL | 5), helpstring("method MonitorMedia")]
  2007.     HRESULT MonitorMedia(
  2008.         [in] long lMediaType
  2009.         );
  2010. }
  2011. [
  2012.     uuid(57CA332D-7BC2-44f1-A60C-936FE8D7CE73),
  2013.     helpstring("TAPI 3.1 ITLegacyCallMediaControl2 Interface"),
  2014.     dual
  2015. ]
  2016. interface ITLegacyCallMediaControl2 : ITLegacyCallMediaControl
  2017. {
  2018.     [id(IDISPLEGACYCALLMEDIACONTROL | 6), helpstring("method GenerateDigits2")]
  2019.     HRESULT GenerateDigits2(
  2020.             [in] BSTR pDigits,
  2021.             [in] TAPI_DIGITMODE DigitMode,
  2022.             [in] long lDuration
  2023.             );
  2024.     [id(IDISPLEGACYCALLMEDIACONTROL | 7), helpstring("method GatherDigits")]
  2025.     HRESULT GatherDigits(
  2026.             [in] TAPI_DIGITMODE DigitMode,
  2027.             [in] long lNumDigits,
  2028.             [in] BSTR pTerminationDigits,
  2029.             [in] long lFirstDigitTimeout,
  2030.             [in] long lInterDigitTimeout
  2031.             );
  2032.     [id(IDISPLEGACYCALLMEDIACONTROL | 8), hidden, helpstring("method DetectTones")]
  2033.     HRESULT DetectTones(
  2034.             [in] TAPI_DETECTTONE * pToneList,
  2035.             [in] long lNumTones
  2036.             );
  2037.     [id(IDISPLEGACYCALLMEDIACONTROL | 9), helpstring("method DetectTonesByCollection")]
  2038.     HRESULT DetectTonesByCollection(
  2039.             [in] ITCollection2 * pDetectToneCollection
  2040.             );
  2041.     [id(IDISPLEGACYCALLMEDIACONTROL | 10), helpstring("method GenerateTone")]
  2042.     HRESULT GenerateTone(
  2043.             [in] TAPI_TONEMODE ToneMode,
  2044.             [in] long lDuration
  2045.             );
  2046.     [id(IDISPLEGACYCALLMEDIACONTROL | 11), hidden, helpstring("method GenerateCustomTones")]
  2047.     HRESULT GenerateCustomTones(
  2048.             [in] TAPI_CUSTOMTONE * pToneList,
  2049.             [in] long lNumTones,
  2050.             [in] long lDuration
  2051.             );
  2052.     [id(IDISPLEGACYCALLMEDIACONTROL | 12), helpstring("method GenerateCustomTonesByCollection")]
  2053.     HRESULT GenerateCustomTonesByCollection(
  2054.             [in] ITCollection2 * pCustomToneCollection,
  2055.             [in] long lDuration
  2056.             );
  2057.     [id(IDISPLEGACYCALLMEDIACONTROL | 13), helpstring("method CreateDetectToneObject")]
  2058.     HRESULT CreateDetectToneObject(
  2059.             [out, retval] ITDetectTone ** ppDetectTone
  2060.             );
  2061.     [id(IDISPLEGACYCALLMEDIACONTROL | 14), helpstring("method CreateCustomToneObject")]
  2062.     HRESULT CreateCustomToneObject(
  2063.             [out, retval] ITCustomTone ** ppCustomTone
  2064.             );
  2065.     [id(IDISPLEGACYCALLMEDIACONTROL | 15), helpstring("method GetIDAsVariant")]
  2066.     HRESULT GetIDAsVariant(
  2067.         [in] BSTR bstrDeviceClass,
  2068.         [out, retval] VARIANT *pVarDeviceID
  2069.         );
  2070. }
  2071. [
  2072.     uuid( 961F79BD-3097-49df-A1D6-909B77E89CA0 ),
  2073.     helpstring("TAPI 3.1 ITDetectTone Interface"),
  2074.     dual
  2075. ]
  2076. interface ITDetectTone : IDispatch
  2077. {
  2078.     [propget, id(1), helpstring("property AppSpecific")] 
  2079.     HRESULT AppSpecific(
  2080.         [out, retval] long * plAppSpecific
  2081.         );
  2082.     [propput, id(1), helpstring("property AppSpecific")] 
  2083.     HRESULT AppSpecific(
  2084.         [in] long  lAppSpecific
  2085.         );
  2086.     [propget, id(2), helpstring("property Duration")] 
  2087.     HRESULT Duration(
  2088.         [out, retval] long * plDuration
  2089.         );
  2090.     [propput, id(2), helpstring("property Duration")] 
  2091.     HRESULT Duration(
  2092.         [in] long  lDuration
  2093.         );
  2094.     [propget, id(3), helpstring("property Frequency")] 
  2095.     HRESULT Frequency(
  2096.         [in] long Index,
  2097.         [out, retval] long * plFrequency
  2098.         );
  2099.     [propput, id(3), helpstring("property Frequency")] 
  2100.     HRESULT Frequency(
  2101.         [in] long Index,
  2102.         [in] long lFrequency
  2103.         );
  2104. }
  2105. [
  2106.     uuid( 357AD764-B3C6-4b2a-8FA5-0722827A9254 ),
  2107.     helpstring("TAPI 3.1 ITCustomTone Interface"),
  2108.     dual,
  2109.     pointer_default(unique)
  2110. ]
  2111. interface ITCustomTone : IDispatch
  2112. {
  2113.     [propget, id(1), helpstring("property Frequency")] 
  2114.     HRESULT Frequency(
  2115.         [out, retval] long * plFrequency
  2116.         );
  2117.     [propput, id(1), helpstring("property Frequency")] 
  2118.     HRESULT Frequency(
  2119.         [in] long  lFrequency
  2120.         );
  2121.     [propget, id(2), helpstring("property CadenceOn")] 
  2122.     HRESULT CadenceOn(
  2123.         [out, retval] long * plCadenceOn
  2124.         );
  2125.     [propput, id(2), helpstring("property CadenceOn")] 
  2126.     HRESULT CadenceOn(
  2127.         [in] long  CadenceOn
  2128.         );
  2129.     [propget, id(3), helpstring("property CadenceOff")] 
  2130.     HRESULT CadenceOff(
  2131.         [out, retval] long * plCadenceOff
  2132.         );
  2133.     [propput, id(3), helpstring("property CadenceOff")] 
  2134.     HRESULT CadenceOff(
  2135.         [in] long lCadenceOff
  2136.         );
  2137.     [propget, id(4), helpstring("property Volume")] 
  2138.     HRESULT Volume(
  2139.         [out, retval] long * plVolume
  2140.         );
  2141.     [propput, id(4), helpstring("property Volume")] 
  2142.     HRESULT Volume(
  2143.         [in] long lVolume
  2144.         );
  2145. }
  2146. ///////////////////////////////////////////////////////
  2147. //   IEnumPhone
  2148. ///////////////////////////////////////////////////////
  2149. [
  2150.     uuid( F15B7669-4780-4595-8C89-FB369C8CF7AA ),
  2151.     helpstring("TAPI 3.1 IEnumPhone Interface"),
  2152.     hidden,
  2153.     pointer_default(unique)
  2154. ]  
  2155. interface IEnumPhone : IUnknown
  2156. {
  2157.     HRESULT Next(
  2158.             [in] ULONG celt,
  2159.             [out, size_is(celt)] ITPhone ** ppElements,
  2160.             [in,out,ptr] ULONG * pceltFetched
  2161.             );
  2162.     HRESULT Reset( void );
  2163.     HRESULT Skip (
  2164.             [in] ULONG celt
  2165.             );
  2166.     HRESULT Clone (
  2167.             [out, retval] IEnumPhone ** ppEnum
  2168.             );
  2169. }
  2170. [
  2171.     uuid( AE269CF4-935E-11d0-835C-00AA003CCABD ),
  2172.     helpstring("TAPI 3.0 IEnumTerminal Interface"),
  2173.     hidden,
  2174.     pointer_default(unique)
  2175. ]
  2176.     
  2177. interface IEnumTerminal : IUnknown
  2178. {
  2179.     HRESULT Next(
  2180.             [in] ULONG celt,
  2181.             [out] ITTerminal ** ppElements,
  2182.             [in,out,ptr] ULONG * pceltFetched
  2183.             );
  2184.     HRESULT Reset( void );
  2185.     HRESULT Skip (
  2186.             [in] ULONG celt
  2187.             );
  2188.     HRESULT Clone (
  2189.             [out, retval] IEnumTerminal ** ppEnum
  2190.             );
  2191. }
  2192. [
  2193.     uuid( AE269CF5-935E-11d0-835C-00AA003CCABD ),
  2194.     helpstring("TAPI 3.0 IEnumTerminalClass interface"),
  2195.     hidden,
  2196.     pointer_default(unique)
  2197. ]
  2198.     
  2199. interface IEnumTerminalClass : IUnknown
  2200. {
  2201.     HRESULT Next(
  2202.             [in] ULONG celt,
  2203.             [out, size_is(celt)] GUID * pElements,
  2204.             [in,out,ptr] ULONG * pceltFetched
  2205.             );
  2206.     HRESULT Reset( void );
  2207.     HRESULT Skip (
  2208.             [in] ULONG celt
  2209.             );
  2210.     HRESULT Clone (
  2211.             [out, retval] IEnumTerminalClass ** ppEnum
  2212.             );
  2213. }
  2214. [
  2215.     uuid( AE269CF6-935E-11d0-835C-00AA003CCABD ),
  2216.     helpstring("TAPI 3.0 IEnumCall interface"),
  2217.     hidden,
  2218.     pointer_default(unique)
  2219. ]
  2220.     
  2221. interface IEnumCall : IUnknown
  2222. {
  2223.     HRESULT Next(
  2224.             [in] ULONG celt,
  2225.             [out] ITCallInfo ** ppElements,
  2226.             [in,out,ptr] ULONG * pceltFetched
  2227.             );
  2228.     HRESULT Reset( void );
  2229.     HRESULT Skip (
  2230.             [in] ULONG celt
  2231.             );
  2232.     HRESULT Clone (
  2233.             [out, retval] IEnumCall ** ppEnum
  2234.             );
  2235. }
  2236. [
  2237.     uuid( 1666FCA1-9363-11d0-835C-00AA003CCABD ),
  2238.     helpstring("TAPI 3.0 IEnumAddress interface"),
  2239.     hidden,
  2240.     pointer_default(unique)
  2241. ]
  2242.     
  2243. interface IEnumAddress : IUnknown
  2244. {
  2245.     HRESULT Next(
  2246.             [in] ULONG celt,
  2247.             [out, size_is(celt)] ITAddress ** ppElements,
  2248.             [in,out,ptr] ULONG * pceltFetched
  2249.             );
  2250.     HRESULT Reset( void );
  2251.     HRESULT Skip (
  2252.             [in] ULONG celt
  2253.             );
  2254.     HRESULT Clone (
  2255.             [out, retval] IEnumAddress ** ppEnum
  2256.             );
  2257. }
  2258. [
  2259.     uuid( A3C15450-5B92-11d1-8F4E-00C04FB6809F ),
  2260.     helpstring("TAPI 3.0 IEnumCallHub interface"),
  2261.     hidden,
  2262.     pointer_default(unique)
  2263. ]
  2264. interface IEnumCallHub : IUnknown
  2265. {
  2266.     HRESULT Next(
  2267.             [in] ULONG celt,
  2268.             [out, size_is(celt)] ITCallHub ** ppElements,
  2269.             [in,out,ptr] ULONG * pceltFetched
  2270.             );
  2271.     HRESULT Reset( void );
  2272.     HRESULT Skip (
  2273.             [in] ULONG celt
  2274.             );
  2275.     HRESULT Clone (
  2276.             [out, retval] IEnumCallHub ** ppEnum
  2277.             );
  2278. }
  2279. [
  2280.     uuid( 35372049-0BC6-11d2-A033-00C04FB6809F ),
  2281.     helpstring("TAPI 3.0 IEnumBstr interface"),
  2282.     hidden,
  2283.     pointer_default(unique)
  2284. ]
  2285. interface IEnumBstr : IUnknown
  2286. {
  2287.     HRESULT Next(
  2288.             [in] ULONG celt,
  2289.             [out, size_is(celt)] BSTR * ppStrings,
  2290.             [in,out,ptr] ULONG * pceltFetched
  2291.             );
  2292.     HRESULT Reset( void );
  2293.     HRESULT Skip (
  2294.             [in] ULONG celt
  2295.             );
  2296.     HRESULT Clone (
  2297.             [out, retval] IEnumBstr ** ppEnum
  2298.             );
  2299. }
  2300. [
  2301.     uuid( 4567450C-DBEE-4e3f-AAF5-37BF9EBF5E29 ),
  2302.     helpstring("TAPI 3.1 IEnumPluggableTerminalClassInfo interface"),
  2303.     hidden,
  2304.     pointer_default(unique)
  2305. ]
  2306.     
  2307. interface IEnumPluggableTerminalClassInfo : IUnknown
  2308. {
  2309.     HRESULT Next(
  2310.             [in] ULONG celt,
  2311.             [out, size_is(celt)] ITPluggableTerminalClassInfo** ppElements,
  2312.             [in,out,ptr] ULONG * pceltFetched
  2313.             );
  2314.     HRESULT Reset( void );
  2315.     HRESULT Skip (
  2316.             [in] ULONG celt
  2317.             );
  2318.     HRESULT Clone (
  2319.             [out, retval] IEnumPluggableTerminalClassInfo ** ppEnum
  2320.             );
  2321. }
  2322. [
  2323.     uuid( E9586A80-89E6-4cff-931D-478D5751F4C0 ),
  2324.     helpstring("TAPI 3.1 IEnumPluggableSuperclassInfo interface"),
  2325.     hidden,
  2326.     pointer_default(unique)
  2327. ]
  2328.     
  2329. interface IEnumPluggableSuperclassInfo : IUnknown
  2330. {
  2331.     HRESULT Next(
  2332.             [in] ULONG celt,
  2333.             [out, size_is(celt)] ITPluggableTerminalSuperclassInfo** ppElements,
  2334.             [in,out,ptr] ULONG * pceltFetched
  2335.             );
  2336.     HRESULT Reset( void );
  2337.     HRESULT Skip (
  2338.             [in] ULONG celt
  2339.             );
  2340.     HRESULT Clone (
  2341.             [out, retval] IEnumPluggableSuperclassInfo ** ppEnum
  2342.             );
  2343. }
  2344. ///////////////////////////////////////////////////////
  2345. //   ITPhoneEvent
  2346. ///////////////////////////////////////////////////////
  2347. [
  2348.     uuid( 8F942DD8-64ED-4aaf-A77D-B23DB0837EAD ),
  2349.     helpstring("TAPI 3.1 ITPhoneEvent Interface"),
  2350.     oleautomation
  2351. ]
  2352. interface ITPhoneEvent : IDispatch
  2353. {
  2354.     [propget, id(1), helpstring("property Phone")]
  2355.     HRESULT Phone( [out, retval] ITPhone ** ppPhone );
  2356.     
  2357.     [propget, id(2), helpstring("property Event")]
  2358.     HRESULT Event( [out, retval] PHONE_EVENT * pEvent );
  2359.     [propget, id(3), helpstring("property ButtonState")]
  2360.     HRESULT ButtonState( [out, retval] PHONE_BUTTON_STATE * pState );
  2361.     [propget, id(4), helpstring("property HookSwitchState")]
  2362.     HRESULT HookSwitchState( [out, retval] PHONE_HOOK_SWITCH_STATE * pState );
  2363.     [propget, id(5), helpstring("property HookSwitchDevice")]
  2364.     HRESULT HookSwitchDevice( [out, retval] PHONE_HOOK_SWITCH_DEVICE * pDevice );
  2365.     [propget, id(6), helpstring("property RingMode")]
  2366.     HRESULT RingMode( [out, retval] long * plRingMode );
  2367.     [propget, id(7), helpstring("property ButtonLampId")]
  2368.     HRESULT ButtonLampId( [out, retval] long * plButtonLampId );
  2369.     [propget, id(8), helpstring("property NumberGathered")]
  2370.     HRESULT NumberGathered( [out, retval] BSTR * ppNumber );
  2371.     [propget, id(9), helpstring("property Call")]
  2372.     HRESULT Call( [out, retval] ITCallInfo ** ppCallInfo );
  2373. }
  2374. [
  2375.     uuid( 62F47097-95C9-11d0-835D-00AA003CCABD ),
  2376.     helpstring("TAPI 3.0 ITCallStateEvent Interface"),
  2377.     dual
  2378. ]
  2379. interface ITCallStateEvent : IDispatch
  2380. {
  2381.     [propget, id(1), helpstring("property Call")]
  2382.     HRESULT Call(
  2383.             [out, retval] ITCallInfo ** ppCallInfo
  2384.     );
  2385.     [propget, id(2), helpstring("property State")]
  2386.     HRESULT State(
  2387.             [out, retval] CALL_STATE * pCallState
  2388.             );
  2389.     [propget, id(3), helpstring("property Cause")]
  2390.     HRESULT Cause(
  2391.             [out, retval] CALL_STATE_EVENT_CAUSE * pCEC
  2392.             );
  2393.     [propget, id(4), helpstring("property CallbackInstance")]
  2394.     HRESULT CallbackInstance(
  2395.             [out, retval] long * plCallbackInstance
  2396.             );
  2397. }
  2398. [
  2399.     uuid( 63FFB2A6-872B-4cd3-A501-326E8FB40AF7 ),
  2400.     helpstring("TAPI 3.1 ITPhoneDeviceSpecificEvent interface"),
  2401.     oleautomation
  2402. ]
  2403. interface ITPhoneDeviceSpecificEvent : IDispatch
  2404. {
  2405.     [propget, id(1), helpstring("property Phone")]
  2406.     HRESULT Phone( [out, retval] ITPhone ** ppPhone );
  2407.     
  2408.     [propget, id(2), helpstring("property lParam1")]
  2409.     HRESULT lParam1( [out, retval] long *pParam1);
  2410.     [propget, id(3), helpstring("property lParam2")]
  2411.     HRESULT lParam2( [out, retval] long *pParam2);
  2412.     [propget, id(4), helpstring("property lParam3")]
  2413.     HRESULT lParam3( [out, retval] long *pParam3);
  2414. }
  2415. [
  2416.     uuid( FF36B87F-EC3A-11d0-8EE4-00C04FB6809F ),
  2417.     helpstring("TAPI 3.0 ITCallMediaEvent Interface"),
  2418.     dual
  2419. ]
  2420. interface ITCallMediaEvent : IDispatch
  2421. {
  2422.     [propget, id(1), helpstring("property Call")]
  2423.     HRESULT Call(
  2424.             [out, retval] ITCallInfo ** ppCallInfo
  2425.             );
  2426.     
  2427.     [propget, id(2), helpstring("property Event")]
  2428.     HRESULT Event(
  2429.             [out, retval] CALL_MEDIA_EVENT * pCallMediaEvent
  2430.             );
  2431.     
  2432.     [propget, id(3), helpstring("property Error")]
  2433.     HRESULT Error(
  2434.             [out, retval] HRESULT * phrError
  2435.             );
  2436.     [propget, id(4), helpstring("property Terminal")]
  2437.     HRESULT Terminal(
  2438.             [out, retval] ITTerminal ** ppTerminal
  2439.             );
  2440.     [propget, id(5), helpstring("property Stream")]
  2441.     HRESULT Stream(
  2442.             [out, retval] ITStream ** ppStream
  2443.             );
  2444.     [propget, id(6), helpstring("property Cause")]
  2445.     HRESULT Cause(
  2446.             [out, retval] CALL_MEDIA_EVENT_CAUSE * pCause
  2447.             );
  2448. }
  2449. [
  2450.     uuid( 80D3BFAC-57D9-11d2-A04A-00C04FB6809F ),
  2451.     helpstring("TAPI 3.0 ITDigitDetectionEvent interface"),
  2452.     oleautomation
  2453. ]
  2454. interface ITDigitDetectionEvent : IDispatch
  2455. {
  2456.     [propget, id(1), helpstring("property Call")]
  2457.     HRESULT Call( [out, retval] ITCallInfo ** ppCallInfo );
  2458.     [propget, id(2), helpstring("property Digit")]
  2459.     HRESULT Digit( [out, retval] unsigned char * pucDigit );
  2460.     [propget, id(3), helpstring("property DigitMode")]
  2461.     HRESULT DigitMode( [out, retval] TAPI_DIGITMODE * pDigitMode );
  2462.     [propget, id(4), helpstring("property TickCount")]
  2463.     HRESULT TickCount( [out, retval] long * plTickCount );
  2464.     [propget, id(5), helpstring("property CallbackInstance")]
  2465.     HRESULT CallbackInstance( [out, retval] long * plCallbackInstance );
  2466. }
  2467. [
  2468.     uuid(80D3BFAD-57D9-11d2-A04A-00C04FB6809F),
  2469.     helpstring("TAPI 3.0 ITDigitGenerationEvent interface"),
  2470.     dual
  2471. ]
  2472. interface ITDigitGenerationEvent : IDispatch
  2473. {
  2474.     [propget, id(1), helpstring("property Call")]
  2475.     HRESULT Call( [out, retval] ITCallInfo ** ppCallInfo );
  2476.     [propget, id(2), helpstring("property GenerationTermination")]
  2477.     HRESULT GenerationTermination( [out, retval] long * plGenerationTermination );
  2478.     [propget, id(3), helpstring("property TickCount")]
  2479.     HRESULT TickCount( [out, retval] long * plTickCount );
  2480.     [propget, id(4), helpstring("property CallbackInstance")]
  2481.     HRESULT CallbackInstance( [out, retval] long * plCallbackInstance );
  2482. }
  2483. [
  2484.     uuid( E52EC4C1-CBA3-441a-9E6A-93CB909E9724 ),
  2485.     helpstring("TAPI 3.1 ITDigitsGatheredEvent Interface"),
  2486.     dual
  2487. ]
  2488. interface ITDigitsGatheredEvent : IDispatch
  2489. {
  2490.     [propget, id(1), helpstring("property Call")]
  2491.     HRESULT Call( [out, retval] ITCallInfo ** ppCallInfo );
  2492.     [propget, id(2), helpstring("property Digits")]
  2493.     HRESULT Digits( [out, retval] BSTR * ppDigits );
  2494.     [propget, id(3), helpstring("property GatherTermination")]
  2495.     HRESULT GatherTermination( [out, retval] TAPI_GATHERTERM * pGatherTermination );
  2496.     [propget, id(4), helpstring("property TickCount")]
  2497.     HRESULT TickCount( [out, retval] long * plTickCount );
  2498.     [propget, id(5), helpstring("property CallbackInstance")]
  2499.     HRESULT CallbackInstance( [out, retval] long * plCallbackInstance );
  2500. }
  2501. [
  2502.     uuid( 407E0FAF-D047-4753-B0C6-8E060373FECD ),
  2503.     helpstring("TAPI 3.1 ITToneDetectionEvent Interface"),
  2504.     dual
  2505. ]
  2506. interface ITToneDetectionEvent : IDispatch
  2507. {
  2508.     [propget, id(1), helpstring("property Call")]
  2509.     HRESULT Call( [out, retval] ITCallInfo ** ppCallInfo );
  2510.     [propget, id(2), helpstring("property AppSpecific")]
  2511.     HRESULT AppSpecific( [out, retval] long * plAppSpecific );
  2512.     [propget, id(3), helpstring("property TickCount")]
  2513.     HRESULT TickCount( [out, retval] long * plTickCount );
  2514.     [propget, id(4), helpstring("property CallbackInstance")]
  2515.     HRESULT CallbackInstance( [out, retval] long * plCallbackInstance );
  2516. }
  2517. [
  2518.     uuid( F4854D48-937A-11d1-BB58-00C04FB6809F ),
  2519.     helpstring("TAPI 3.0 ITTAPIObjectEvent Interface"),
  2520.     dual
  2521. ]
  2522. interface ITTAPIObjectEvent : IDispatch
  2523. {
  2524.     [propget, id(1), helpstring("property TAPIObject")]
  2525.     HRESULT TAPIObject(
  2526.         [out, retval] ITTAPI ** ppTAPIObject
  2527.         );
  2528.     [propget, id(2), helpstring("property Event")]
  2529.     HRESULT Event(
  2530.         [out, retval] TAPIOBJECT_EVENT * pEvent
  2531.         );
  2532.     [propget, id(3), helpstring("property Address")]
  2533.     HRESULT Address(
  2534.         [out, retval] ITAddress ** ppAddress
  2535.         );
  2536.     [propget, id(4), helpstring("property CallbackInstance")]
  2537.     HRESULT CallbackInstance(
  2538.         [out, retval] long * plCallbackInstance
  2539.         );
  2540. }
  2541. [
  2542.     uuid( 359DDA6E-68CE-4383-BF0B-169133C41B46 ),
  2543.     helpstring("TAPI 3.1 ITTAPIObjectEvent2 interface"),
  2544.     oleautomation
  2545. ]
  2546. interface ITTAPIObjectEvent2 : ITTAPIObjectEvent
  2547. {
  2548.     [propget, id(5), helpstring("property Phone")]
  2549.     HRESULT Phone( [out, retval] ITPhone ** ppPhone );
  2550. }
  2551. [
  2552.     uuid( EDDB9426-3B91-11d1-8F30-00C04FB6809F ),
  2553.     helpstring("TAPI 3.0 ITTAPIEventNotification Interface"),
  2554.     oleautomation
  2555. ]
  2556. interface ITTAPIEventNotification : IUnknown
  2557. {
  2558.     [id(1), helpstring("method Event")]
  2559.     HRESULT Event(
  2560.             [in] TAPI_EVENT TapiEvent,
  2561.             [in] IDispatch * pEvent
  2562.             );
  2563. }
  2564. [
  2565.     uuid( A3C15451-5B92-11d1-8F4E-00C04FB6809F ),
  2566.     helpstring("TAPI 3.0 ITCallHubEvent Interface"),
  2567.     oleautomation
  2568. ]
  2569. interface ITCallHubEvent : IDispatch
  2570. {
  2571.     [propget, id(1), helpstring("property Event")]
  2572.     HRESULT Event(
  2573.                   [out, retval] CALLHUB_EVENT * pEvent
  2574.                  );
  2575.     [propget, id(2), helpstring("property CallHub")]
  2576.     HRESULT CallHub(
  2577.                     [out, retval] ITCallHub ** ppCallHub
  2578.                    );
  2579.     [propget, id(3), helpstring("property Call")]
  2580.     HRESULT Call(
  2581.                  [out, retval] ITCallInfo ** ppCall
  2582.                 );
  2583. }
  2584. [
  2585.     uuid( 831CE2D1-83B5-11d1-BB5C-00C04FB6809F ),
  2586.     helpstring("TAPI 3.0 ITAddressEvent interface"),
  2587.     oleautomation
  2588. ]
  2589. interface ITAddressEvent : IDispatch
  2590. {
  2591.     [propget, id(1), helpstring("property Address")]
  2592.     HRESULT Address( [out, retval] ITAddress ** ppAddress );
  2593.     
  2594.     [propget, id(2), helpstring("property Event")]
  2595.     HRESULT Event( [out, retval] ADDRESS_EVENT * pEvent );
  2596.     [propget, id(3), helpstring("property Terminal")]
  2597.     HRESULT Terminal( [out, retval] ITTerminal ** ppTerminal );
  2598. }
  2599. [
  2600.     uuid( 3ACB216B-40BD-487a-8672-5CE77BD7E3A3 ),
  2601.     helpstring("TAPI 3.1 ITAddressDeviceSpecificEvent interface"),
  2602.     oleautomation
  2603. ]
  2604. interface ITAddressDeviceSpecificEvent : IDispatch
  2605. {
  2606.     [propget, id(1), helpstring("property Address")]
  2607.     HRESULT Address( [out, retval] ITAddress ** ppAddress );
  2608.     
  2609.     [propget, id(2), helpstring("property Call")]
  2610.     HRESULT Call( [out, retval] ITCallInfo ** ppCall );
  2611.     [propget, id(3), helpstring("property lParam1")]
  2612.     HRESULT lParam1( [out, retval] long *pParam1);
  2613.     [propget, id(4), helpstring("property lParam2")]
  2614.     HRESULT lParam2( [out, retval] long *pParam2);
  2615.     [propget, id(5), helpstring("property lParam3")]
  2616.     HRESULT lParam3( [out, retval] long *pParam3);
  2617. }
  2618. [
  2619.     uuid( E4A7FBAC-8C17-4427-9F55-9F589AC8AF00 ),
  2620.     helpstring("TAPI 3.0 ITFileTerminalEvent interface"),
  2621.     oleautomation
  2622. ]
  2623. interface ITFileTerminalEvent : IDispatch
  2624. {
  2625.     [propget, id(1), helpstring("property Terminal")]
  2626.     HRESULT Terminal( [out, retval] ITTerminal ** ppTerminal );
  2627.     
  2628.     [propget, id(2), helpstring("property Track")]
  2629.     HRESULT Track( [out, retval] ITFileTrack ** ppTrackTerminal );
  2630.     [propget, id(3), helpstring("property Call") ]
  2631.     HRESULT Call( [out, retval] ITCallInfo ** ppCall );
  2632.     [propget, id(4), helpstring("property State")]
  2633.     HRESULT State( [out, retval] TERMINAL_MEDIA_STATE * pState);
  2634.     [propget, id(5), helpstring("property Cause")]
  2635.     HRESULT Cause( [out, retval] FT_STATE_EVENT_CAUSE * pCause );
  2636.     [propget, id(6), helpstring("property Error")]
  2637.     HRESULT Error( [out, retval] HRESULT * phrErrorCode );
  2638. }
  2639. [
  2640.     uuid( D964788F-95A5-461d-AB0C-B9900A6C2713 ),
  2641.     helpstring("TAPI 3.0 ITTTSTerminalEvent interface"),
  2642.     oleautomation
  2643. ]
  2644. interface ITTTSTerminalEvent : IDispatch
  2645. {
  2646.     [propget, id(1), helpstring("property Terminal")]
  2647.     HRESULT Terminal( [out, retval] ITTerminal ** ppTerminal );
  2648.     
  2649.     [propget, id(2), helpstring("property Call") ]
  2650.     HRESULT Call( [out, retval] ITCallInfo ** ppCall );
  2651.     [propget, id(3), helpstring("property Error")]
  2652.     HRESULT Error( [out, retval] HRESULT * phrErrorCode );
  2653. }
  2654. [
  2655.     uuid( EE016A02-4FA9-467c-933F-5A15B12377D7 ),
  2656.     helpstring("TAPI 3.0 ITASRTerminalEvent interface"),
  2657.     oleautomation
  2658. ]
  2659. interface ITASRTerminalEvent : IDispatch
  2660. {
  2661.     [propget, id(1), helpstring("property Terminal")]
  2662.     HRESULT Terminal( [out, retval] ITTerminal ** ppTerminal );
  2663.     
  2664.     [propget, id(2), helpstring("property Call") ]
  2665.     HRESULT Call( [out, retval] ITCallInfo ** ppCall );
  2666.     [propget, id(3), helpstring("property Error")]
  2667.     HRESULT Error( [out, retval] HRESULT * phrErrorCode );
  2668. }
  2669. [
  2670.     uuid( E6F56009-611F-4945-BBD2-2D0CE5612056 ),
  2671.     helpstring("TAPI 3.0 ITToneTerminalEvent interface"),
  2672.     oleautomation
  2673. ]
  2674. interface ITToneTerminalEvent : IDispatch
  2675. {
  2676.     [propget, id(1), helpstring("property Terminal")]
  2677.     HRESULT Terminal( [out, retval] ITTerminal ** ppTerminal );
  2678.     
  2679.     [propget, id(2), helpstring("property Call") ]
  2680.     HRESULT Call( [out, retval] ITCallInfo ** ppCall );
  2681.     [propget, id(3), helpstring("property Error")]
  2682.     HRESULT Error( [out, retval] HRESULT * phrErrorCode );
  2683. }
  2684. [
  2685.     uuid( CFA3357C-AD77-11d1-BB68-00C04FB6809F ),
  2686.     helpstring("TAPI 3.0 ITQOSEvent Interface"),
  2687.     oleautomation
  2688. ]
  2689. interface ITQOSEvent : IDispatch
  2690. {
  2691.     [propget, id(1), helpstring("property CallHub")]
  2692.     HRESULT Call( [out, retval] ITCallInfo ** ppCall );
  2693.     [propget, id(3), helpstring("property Event")]
  2694.     HRESULT Event( [out, retval] QOS_EVENT * pQosEvent );
  2695.     [propget, id(4), helpstring("property MediaType")]
  2696.     HRESULT MediaType( [out, retval] long * plMediaType );
  2697. }
  2698. [
  2699.     uuid( 5D4B65F9-E51C-11d1-A02F-00C04FB6809F ),
  2700.     helpstring("TAPI 3.0 ITCallInfoChangeEvent Interface"),
  2701.     oleautomation
  2702. ]
  2703. interface ITCallInfoChangeEvent : IDispatch
  2704. {
  2705.     [ propget, id(1), helpstring("property Call") ]
  2706.     HRESULT Call( [out, retval] ITCallInfo ** ppCall );
  2707.     [ propget, id(2), helpstring("property Cause") ]
  2708.     HRESULT Cause( [out, retval] CALLINFOCHANGE_CAUSE * pCIC );
  2709.     [ propget, id(3), helpstring("property Callback Instance") ]
  2710.     HRESULT CallbackInstance( [out, retval] long * plCallbackInstance );
  2711. }
  2712. [
  2713.     uuid( AC48FFDF-F8C4-11d1-A030-00C04FB6809F ),
  2714.     helpstring("TAPI 3.0 ITRequest Interface"),
  2715.     oleautomation
  2716. ]
  2717. interface ITRequest : IDispatch
  2718. {
  2719.     [ id(1), helpstring("method MakeCall") ]
  2720.     HRESULT MakeCall(
  2721.         [in] BSTR pDestAddress,
  2722.         [in] BSTR pAppName,
  2723.         [in] BSTR pCalledParty,
  2724.         [in] BSTR pComment
  2725.         );
  2726. }
  2727. [
  2728.     uuid(AC48FFDE-F8C4-11d1-A030-00C04FB6809F ),
  2729.     helpstring("TAPI 3.0 ITRequestEvent Interface"),
  2730.     oleautomation
  2731. ]
  2732. interface ITRequestEvent : IDispatch
  2733. {
  2734.     [ propget, id(1), helpstring("property RegistrationInstance") ]
  2735.     HRESULT RegistrationInstance( [out, retval] long * plRegistrationInstance );
  2736.     [ propget, id(2), helpstring("property RequestMode") ]
  2737.     HRESULT RequestMode( [out, retval] long * plRequestMode );
  2738.     [ propget, id(3), helpstring("property DestAddress") ]
  2739.     HRESULT DestAddress( [out, retval] BSTR * ppDestAddress );
  2740.     [ propget, id(5), helpstring("property AppName") ]
  2741.     HRESULT AppName( [out, retval] BSTR * ppAppName );
  2742.     [ propget, id(6), helpstring("property CalledParty") ]
  2743.     HRESULT CalledParty( [out, retval] BSTR * ppCalledParty );
  2744.     [ propget, id(7), helpstring("property Comment") ]
  2745.     HRESULT Comment( [out, retval] BSTR * ppComment );
  2746. }
  2747. [
  2748.     object,
  2749.     public,
  2750.     uuid( 5EC5ACF2-9C02-11d0-8362-00AA003CCABD ),
  2751.     helpstring("TAPI 3.0 ITCollection interface"),
  2752.     dual
  2753. ]
  2754. interface ITCollection : IDispatch
  2755. {
  2756.     [propget, helpstring("Returns number of items in collection.")]
  2757.     HRESULT Count(
  2758.             [out, retval] long * lCount
  2759.             );
  2760.     [propget, id(DISPID_VALUE), 
  2761.         helpstring("Given an index, returns an item in the collection.")]
  2762.     HRESULT Item(
  2763.             [in] long Index, 
  2764.             [out, retval] VARIANT * pVariant
  2765.             );
  2766.     [propget, restricted, id(DISPID_NEWENUM),
  2767.         helpstring("returns an enumerator for the collection.")]
  2768.         HRESULT _NewEnum(
  2769.             [out, retval] IUnknown ** ppNewEnum
  2770.             );
  2771. }
  2772. [
  2773.     object,
  2774.     public,
  2775.     uuid( E6DDDDA5-A6D3-48ff-8737-D32FC4D95477 ),
  2776.     helpstring("TAPI 3.1 ITCollection2 interface"),
  2777.     dual
  2778. ]
  2779. interface ITCollection2 : ITCollection
  2780. {
  2781.     [id(1), helpstring("Adds an item to the collection.")]
  2782.     HRESULT Add(
  2783.             [in] long Index,
  2784.             [in] VARIANT * pVariant
  2785.             );
  2786.     [id(2), helpstring("Removes an item from the collection.")]
  2787.     HRESULT Remove(
  2788.             [in] long Index
  2789.             );
  2790. }
  2791. [
  2792.     uuid( 449F659E-88A3-11d1-BB5D-00C04FB6809F ),
  2793.     helpstring("TAPI 3.0 ITForwardInformation Interface"),
  2794.     dual
  2795. ]
  2796. interface ITForwardInformation : IDispatch
  2797. {
  2798.     [propput, id(1), helpstring("property NumRingsNoAnswer")]
  2799.     HRESULT NumRingsNoAnswer( 
  2800.         [in] long lNumRings 
  2801.         );
  2802.     [propget, id(1), helpstring("property NumRingsNoAnswer")]
  2803.     HRESULT NumRingsNoAnswer( 
  2804.         [out, retval] long * plNumRings 
  2805.         );
  2806.     [id(2), helpstring("method SetForwardType")]
  2807.     HRESULT SetForwardType( 
  2808.         [in] long ForwardType, 
  2809.         [in] BSTR pDestAddress,
  2810.         [in] BSTR pCallerAddress
  2811.         );
  2812.     [propget, id(3), helpstring("property ForwardTypeDestination")]
  2813.     HRESULT ForwardTypeDestination( 
  2814.         [in] long ForwardType, 
  2815.         [out, retval] BSTR * ppDestAddress 
  2816.         );
  2817.     [propget, id(4), helpstring("property ForwardTypeCaller")]    
  2818.     HRESULT ForwardTypeCaller( 
  2819.         [in] long Forwardtype, 
  2820.         [out, retval] BSTR * ppCallerAddress 
  2821.         );
  2822.     [id(5),hidden]
  2823.     HRESULT GetForwardType(
  2824.         [in] long ForwardType,
  2825.         [out] BSTR * ppDestinationAddress,
  2826.         [out] BSTR * ppCallerAddress
  2827.         );
  2828.     [id(6), helpstring("method Clear")]
  2829.     HRESULT Clear();
  2830. }
  2831. [
  2832.     uuid( 5229B4ED-B260-4382-8E1A-5DF3A8A4CCC0 ),
  2833.     helpstring("TAPI 3.1 ITForwardInformation2 Interface"),
  2834.     dual
  2835. ]
  2836. interface ITForwardInformation2 : ITForwardInformation
  2837. {
  2838.     [id(7), helpstring("method SetForwardType2")]
  2839.     HRESULT SetForwardType2( 
  2840.         [in] long ForwardType, 
  2841.         [in] BSTR pDestAddress,
  2842.         [in] long DestAddressType,
  2843.         [in] BSTR pCallerAddress,
  2844.         [in] long CallerAddressType
  2845.         );
  2846.     [id(8),hidden]
  2847.     HRESULT GetForwardType2(
  2848.         [in] long ForwardType,
  2849.         [out] BSTR * ppDestinationAddress,
  2850.         [out] long * pDestAddressType,
  2851.         [out] BSTR * ppCallerAddress,
  2852.         [out] long * pCallerAddressType
  2853.         );
  2854.     [propget, id(9), helpstring("property ForwardTypeDestinationAddressType")]
  2855.     HRESULT ForwardTypeDestinationAddressType( 
  2856.         [in] long ForwardType, 
  2857.         [out, retval] long * pDestAddressType
  2858.         );
  2859.     [propget, id(10), helpstring("property ForwardTypeCallerAddressType")]    
  2860.     HRESULT ForwardTypeCallerAddressType( 
  2861.         [in] long Forwardtype, 
  2862.         [out, retval] long * pCallerAddressType
  2863.         );
  2864. }
  2865. [
  2866.     uuid( 0C4D8F03-8DDB-11d1-A09E-00805FC147D3 ),
  2867.     helpstring("TAPI 3.0 ITAddressTranslation Interface"),
  2868.     dual
  2869. ]
  2870. interface ITAddressTranslation : IDispatch
  2871. {
  2872.     [id(IDISPADDRESSTRANSLATION | 1), helpstring("method TranslateAddress")]
  2873.     HRESULT TranslateAddress(
  2874.             [in] BSTR pAddressToTranslate,
  2875.             [in] long lCard,
  2876.             [in] long lTranslateOptions,
  2877.             [out, retval] ITAddressTranslationInfo ** ppTranslated
  2878.             );
  2879.     [ id(IDISPADDRESSTRANSLATION | 2), helpstring("method TranslateDialog")]
  2880.     HRESULT TranslateDialog(
  2881.             [in] TAPIHWND hwndOwner,
  2882.             [in] BSTR pAddressIn
  2883.             );
  2884.     [id(IDISPADDRESSTRANSLATION | 3), hidden, helpstring("method EnumerateLocations")]
  2885.     HRESULT EnumerateLocations(
  2886.             [out, retval] IEnumLocation ** ppEnumLocation
  2887.             );
  2888.     [propget, id(IDISPADDRESSTRANSLATION | 4), helpstring("property Locations")]
  2889.     HRESULT Locations( 
  2890.             [out, retval] VARIANT * pVariant
  2891.             );
  2892.     [id(IDISPADDRESSTRANSLATION | 5), hidden, helpstring("method EnumerateCallingCards")]
  2893.     HRESULT EnumerateCallingCards(
  2894.             [out, retval] IEnumCallingCard ** ppEnumCallingCard 
  2895.             );
  2896.     [propget, id(IDISPADDRESSTRANSLATION | 6), helpstring("property CallingCards")]
  2897.     HRESULT CallingCards( 
  2898.             [out, retval] VARIANT * pVariant
  2899.             );
  2900. }
  2901. [
  2902.     uuid( AFC15945-8D40-11d1-A09E-00805FC147D3 ),
  2903.     helpstring("TAPI 3.0 ITAddressTranslationInfo Interface"),
  2904.     dual
  2905. ]
  2906. interface ITAddressTranslationInfo : IDispatch
  2907. {
  2908.     [propget, id(1), helpstring("property Dialable String")]
  2909.     HRESULT DialableString( 
  2910.         [out, retval] BSTR * ppDialableString 
  2911.         );
  2912.     [propget, id(2), helpstring("property Displayable String")]
  2913.     HRESULT DisplayableString( 
  2914.         [out, retval] BSTR * ppDisplayableString 
  2915.         );
  2916.     [propget, id(3), helpstring("property Current Country Code")]    
  2917.     HRESULT CurrentCountryCode( 
  2918.         [out, retval] long * CountryCode
  2919.         );
  2920.     [propget, id(4), helpstring("property Destination Country Code")]    
  2921.     HRESULT DestinationCountryCode( 
  2922.         [out, retval] long * CountryCode
  2923.         );
  2924.     [propget, id(5), helpstring("property Translation Results")]    
  2925.     HRESULT TranslationResults( 
  2926.         [out, retval] long * plResults
  2927.         );
  2928. }
  2929. [
  2930.     uuid( 0C4D8EFF-8DDB-11d1-A09E-00805FC147D3 ),
  2931.     helpstring("TAPI 3.0 ITLocationInfo Interface"),
  2932.     dual
  2933. ]
  2934. interface ITLocationInfo : IDispatch
  2935. {
  2936.     [propget, id(1), helpstring("property Permanent Location ID")]    
  2937.     HRESULT PermanentLocationID( 
  2938.         [out, retval] long * plLocationID
  2939.         );
  2940.     [propget, id(2), helpstring("property Country Code")]    
  2941.     HRESULT CountryCode( 
  2942.         [out, retval] long * plCountryCode
  2943.         );
  2944.     [propget, id(3), helpstring("property Country ID")]    
  2945.     HRESULT CountryID( 
  2946.         [out, retval] long * plCountryID
  2947.         );
  2948.     [propget, id(4), helpstring("property Options")]    
  2949.     HRESULT Options( 
  2950.         [out, retval] long * plOptions
  2951.         );
  2952.     [propget, id(5), helpstring("property Preferred Credit Card ID")]    
  2953.     HRESULT PreferredCardID( 
  2954.         [out, retval] long * plCardID
  2955.         );
  2956.     [propget, id(6), helpstring("property Location Name")]
  2957.     HRESULT LocationName( 
  2958.         [out, retval] BSTR * ppLocationName 
  2959.         );
  2960.     [propget, id(7), helpstring("property City/Area Code")]
  2961.     HRESULT CityCode( 
  2962.         [out, retval] BSTR * ppCode 
  2963.         );
  2964.     [propget, id(8), helpstring("property Local Access Code")]
  2965.     HRESULT LocalAccessCode( 
  2966.         [out, retval] BSTR * ppCode 
  2967.         );
  2968.     [propget, id(9), helpstring("property Long Distance Access Code")]
  2969.     HRESULT LongDistanceAccessCode( 
  2970.         [out, retval] BSTR * ppCode 
  2971.         );
  2972.     [propget, id(10), helpstring("property Toll Prefix List")]
  2973.     HRESULT TollPrefixList( 
  2974.         [out, retval] BSTR * ppTollList
  2975.         );
  2976.     [propget, id(11), helpstring("property Cancel Call Waiting Code")]
  2977.     HRESULT CancelCallWaitingCode( 
  2978.         [out, retval] BSTR * ppCode 
  2979.         );
  2980. }
  2981. [
  2982.     uuid( 0C4D8F01-8DDB-11d1-A09E-00805FC147D3 ),
  2983.     helpstring("TAPI 3.0 IEnumLocation interface"),
  2984.     hidden,
  2985.     pointer_default(unique)
  2986. ]
  2987.     
  2988. interface IEnumLocation : IUnknown
  2989. {
  2990.     HRESULT Next(
  2991.             [in] ULONG celt,
  2992.             [out] ITLocationInfo ** ppElements,
  2993.             [in,out,ptr] ULONG * pceltFetched
  2994.             );
  2995.     HRESULT Reset( void );
  2996.     HRESULT Skip (
  2997.             [in] ULONG celt
  2998.             );
  2999.     HRESULT Clone (
  3000.             [out, retval] IEnumLocation ** ppEnum
  3001.             );
  3002. }
  3003. [
  3004.     uuid( 0C4D8F00-8DDB-11d1-A09E-00805FC147D3 ),
  3005.     helpstring("TAPI 3.0 ITCallingCard Interface"),
  3006.     dual
  3007. ]
  3008. interface ITCallingCard : IDispatch
  3009. {
  3010.     [propget, id(1), helpstring("property Permanent Card ID")]    
  3011.     HRESULT PermanentCardID( 
  3012.         [out, retval] long * plCardID
  3013.         );
  3014.     [propget, id(2), helpstring("property Number Of Digits")]    
  3015.     HRESULT NumberOfDigits( 
  3016.         [out, retval] long * plDigits
  3017.         );
  3018.     [propget, id(3), helpstring("property Options")]    
  3019.     HRESULT Options( 
  3020.         [out, retval] long * plOptions
  3021.         );
  3022.     [propget, id(4), helpstring("property Card Name")]
  3023.     HRESULT CardName( 
  3024.         [out, retval] BSTR * ppCardName 
  3025.         );
  3026.     [propget, id(5), helpstring("property Same Area Dialing Rule")]
  3027.     HRESULT SameAreaDialingRule( 
  3028.         [out, retval] BSTR * ppRule 
  3029.         );
  3030.     [propget, id(6), helpstring("property Long Distance Dialing Rule")]
  3031.     HRESULT LongDistanceDialingRule( 
  3032.         [out, retval] BSTR * ppRule 
  3033.         );
  3034.     [propget, id(7), helpstring("property International Dialing Rule")]
  3035.     HRESULT InternationalDialingRule( 
  3036.         [out, retval] BSTR * ppRule 
  3037.         );
  3038. }
  3039. [
  3040.     uuid( 0C4D8F02-8DDB-11d1-A09E-00805FC147D3 ),
  3041.     helpstring("TAPI 3.0 IEnumCallingCard interface"),
  3042.     hidden,
  3043.     pointer_default(unique)
  3044. ]
  3045.     
  3046. interface IEnumCallingCard : IUnknown
  3047. {
  3048.     HRESULT Next(
  3049.             [in] ULONG celt,
  3050.             [out] ITCallingCard ** ppElements,
  3051.             [in,out,ptr] ULONG * pceltFetched
  3052.             );
  3053.     HRESULT Reset( void );
  3054.     HRESULT Skip (
  3055.             [in] ULONG celt
  3056.             );
  3057.     HRESULT Clone (
  3058.             [out, retval] IEnumCallingCard ** ppEnum
  3059.             );
  3060. }
  3061. [
  3062.     uuid( 895801DF-3DD6-11d1-8F30-00C04FB6809F ),
  3063.     helpstring("TAPI 3.0 ITCallNotificationEvent interface"),
  3064.     dual
  3065. ]
  3066. interface ITCallNotificationEvent : IDispatch
  3067. {
  3068.     [propget, id(1), helpstring("property Call")]
  3069.     HRESULT Call(
  3070.             [out,retval] ITCallInfo ** ppCall
  3071.             );
  3072.     [propget, id(2), helpstring("property Event")]
  3073.     HRESULT Event(
  3074.             [out,retval] CALL_NOTIFICATION_EVENT * pCallNotificationEvent
  3075.             );
  3076.     [propget, id(3), helpstring("property CallbackInstance")]
  3077.     HRESULT CallbackInstance(
  3078.             [out, retval] long * plCallbackInstance
  3079.             );
  3080. }
  3081. [
  3082.     uuid( E9225295-C759-11d1-A02B-00C04FB6809F ),
  3083.     helpstring("TAPI 3.0 ITDispatchMapper interface")
  3084. ]
  3085. interface ITDispatchMapper : IDispatch
  3086. {
  3087.     [id(1), helpstring("QueryDispatchInterface")]
  3088.     HRESULT
  3089.     QueryDispatchInterface(
  3090.         [in] BSTR pIID,
  3091.         [in] IDispatch * pInterfaceToMap,
  3092.         [out, retval] IDispatch ** ppReturnedInterface
  3093.         );
  3094. }
  3095. [
  3096.     uuid( EE3BD604-3868-11D2-A045-00C04FB6809F ),
  3097.     helpstring( "ITStreamControl interface" ),
  3098.     pointer_default(unique),
  3099.     dual
  3100. ]
  3101. interface ITStreamControl : IDispatch
  3102. {
  3103.     [id(IDISPAGGREGATEDMSPCALLOBJ | 1), helpstring("method CreateStream")]
  3104.     HRESULT CreateStream(
  3105.         [in] long lMediaType,
  3106.         [in] TERMINAL_DIRECTION td,
  3107.         [out, retval] ITStream ** ppStream
  3108.         );
  3109.     [id(IDISPAGGREGATEDMSPCALLOBJ | 2), helpstring("method RemoveStream")]
  3110.     HRESULT RemoveStream(
  3111.         [in] ITStream * pStream
  3112.         );
  3113.     [id(IDISPAGGREGATEDMSPCALLOBJ | 3), hidden]
  3114.     HRESULT EnumerateStreams(
  3115.         [out] IEnumStream ** ppEnumStream
  3116.         );
  3117.     [propget, id(IDISPAGGREGATEDMSPCALLOBJ | 4), helpstring("property Streams")]
  3118.     HRESULT Streams(
  3119.         [out, retval] VARIANT * pVariant
  3120.         );
  3121. }
  3122. [
  3123.     uuid( EE3BD605-3868-11D2-A045-00C04FB6809F ),
  3124.     helpstring( "ITStream interface" ),
  3125.     pointer_default(unique),
  3126.     dual
  3127. ]
  3128. interface ITStream : IDispatch
  3129. {
  3130.     [propget, id(1), helpstring("property MediaType")]
  3131.     HRESULT MediaType(
  3132.         [out, retval] long * plMediaType
  3133.         );
  3134.     [propget, id(2), helpstring("property Direction")]
  3135.     HRESULT Direction(
  3136.         [out, retval] TERMINAL_DIRECTION * pTD
  3137.         );
  3138.     [propget, id(3), helpstring("property Name")]
  3139.     HRESULT Name(
  3140.         [out, retval] BSTR * ppName
  3141.         );
  3142.     [id(4), helpstring("method StartStream")]
  3143.     HRESULT StartStream(void);
  3144.     [id(5), helpstring("method PauseStream")]
  3145.     HRESULT PauseStream(void);
  3146.     [id(6), helpstring("method StopStream")]
  3147.     HRESULT StopStream(void);
  3148.     [id(7), helpstring("method SelectTerminal")]
  3149.     HRESULT SelectTerminal(
  3150.         [in] ITTerminal * pTerminal
  3151.         );
  3152.     [id(8), helpstring("method UnselectTerminal")]
  3153.     HRESULT UnselectTerminal(
  3154.         [in] ITTerminal * pTerminal
  3155.         );
  3156.     [id(9), hidden]
  3157.     HRESULT EnumerateTerminals(
  3158.         [out] IEnumTerminal ** ppEnumTerminal
  3159.         );
  3160.     [propget, id(10), helpstring("property Terminals")]
  3161.     HRESULT Terminals(
  3162.         [out, retval] VARIANT * pTerminals
  3163.         );
  3164. }
  3165. [
  3166.     uuid( EE3BD606-3868-11d2-A045-00C04FB6809F ),
  3167.     helpstring( "IEnumStream interface" ),
  3168.     hidden,
  3169.     pointer_default(unique)
  3170. ]
  3171. interface IEnumStream : IUnknown
  3172. {
  3173.     HRESULT Next(
  3174.             [in] ULONG celt,
  3175.             [out] ITStream ** ppElements,
  3176.             [in,out,ptr] ULONG * pceltFetched
  3177.             );
  3178.     HRESULT Reset( void );
  3179.     HRESULT Skip (
  3180.             [in] ULONG celt
  3181.             );
  3182.     HRESULT Clone (
  3183.             [out, retval] IEnumStream ** ppEnum
  3184.             );
  3185. }
  3186. [
  3187.     uuid( EE3BD607-3868-11D2-A045-00C04FB6809F ),
  3188.     helpstring( "ITSubStreamControl interface" ),
  3189.     pointer_default(unique),
  3190.     dual
  3191. ]
  3192. interface ITSubStreamControl : IDispatch
  3193. {
  3194.     [id(1), helpstring("method CreateSubStream")]
  3195.     HRESULT CreateSubStream(
  3196.         [out, retval] ITSubStream ** ppSubStream
  3197.         );
  3198.     [id(2), helpstring("method RemoveSubStream")]
  3199.     HRESULT RemoveSubStream(
  3200.         [in] ITSubStream * pSubStream
  3201.         );
  3202.     [id(3), hidden]
  3203.     HRESULT EnumerateSubStreams(
  3204.         [out] IEnumSubStream ** ppEnumSubStream
  3205.         );
  3206.     [propget, id(4), helpstring("property SubStreams")]
  3207.     HRESULT SubStreams(
  3208.         [out, retval] VARIANT * pVariant
  3209.         );
  3210. }
  3211. [
  3212.     uuid( EE3BD608-3868-11D2-A045-00C04FB6809F ),
  3213.     helpstring( "ITSubStream interface" ),
  3214.     pointer_default(unique),
  3215.     dual
  3216. ]
  3217. interface ITSubStream : IDispatch
  3218. {
  3219.     [id(1), helpstring("method StartStream")]
  3220.     HRESULT StartSubStream(void);
  3221.     [id(2), helpstring("method PauseStream")]
  3222.     HRESULT PauseSubStream(void);
  3223.     [id(3), helpstring("method StopStream")]
  3224.     HRESULT StopSubStream(void);
  3225.     [id(4), helpstring("method SelectTerminal")]
  3226.     HRESULT SelectTerminal(
  3227.         [in] ITTerminal * pTerminal
  3228.         );
  3229.     [id(5), helpstring("method UnselectTerminal")]
  3230.     HRESULT UnselectTerminal(
  3231.         [in] ITTerminal * pTerminal
  3232.         );
  3233.     [id(6), hidden]
  3234.     HRESULT EnumerateTerminals(
  3235.         [out] IEnumTerminal ** ppEnumTerminal
  3236.         );
  3237.     [propget, id(7), helpstring("property Terminals")]
  3238.     HRESULT Terminals(
  3239.         [out, retval] VARIANT * pTerminals
  3240.         );
  3241.     [propget, id(8), helpstring("property Stream")]
  3242.     HRESULT Stream(
  3243.         [out, retval] ITStream ** ppITStream
  3244.         );
  3245. }
  3246. [
  3247.     uuid( EE3BD609-3868-11d2-A045-00C04FB6809F ),
  3248.     helpstring( "IEnumSubStream interface" ),
  3249.     hidden,
  3250.     pointer_default(unique)
  3251. ]
  3252. interface IEnumSubStream : IUnknown
  3253. {
  3254.     HRESULT Next(
  3255.             [in] ULONG celt,
  3256.             [out] ITSubStream ** ppElements,
  3257.             [in,out,ptr] ULONG * pceltFetched
  3258.             );
  3259.     HRESULT Reset( void );
  3260.     HRESULT Skip (
  3261.             [in] ULONG celt
  3262.             );
  3263.     HRESULT Clone (
  3264.             [out, retval] IEnumSubStream ** ppEnum
  3265.             );
  3266. }
  3267. [
  3268.     uuid( 207823EA-E252-11d2-B77E-0080C7135381 ),
  3269.     helpstring("ITLegacyWaveSupport"),
  3270.     dual
  3271. ]
  3272. interface ITLegacyWaveSupport : IDispatch
  3273. {
  3274.     HRESULT IsFullDuplex( [out] FULLDUPLEX_SUPPORT * pSupport );
  3275. }
  3276. [
  3277.     uuid(161A4A56-1E99-4b3f-A46A-168F38A5EE4C ),
  3278.     helpstring("TAPI 3.0 ITBasicCallControl2 interface"),
  3279.     dual
  3280. ]
  3281.     
  3282. interface ITBasicCallControl2 : ITBasicCallControl
  3283. {
  3284.     [id(IDISPBASICCALLCONTROL | 23), helpstring("method RequestTerminal")]
  3285.     HRESULT RequestTerminal(
  3286.         [in]    BSTR                  bstrTerminalClassGUID,
  3287.         [in]    long                  lMediaType,
  3288.         [in]    TERMINAL_DIRECTION    Direction,
  3289.         [out, retval]   ITTerminal         ** ppTerminal
  3290.         );
  3291.     [id(IDISPBASICCALLCONTROL | 24), helpstring("method SelectTerminalOnCall")]
  3292.     HRESULT SelectTerminalOnCall(
  3293.         [in]    ITTerminal *pTerminal
  3294.         );
  3295.     [id(IDISPBASICCALLCONTROL | 25), helpstring("method UnselectTerminalOnCall")]
  3296.     HRESULT UnselectTerminalOnCall(
  3297.         [in]    ITTerminal *pTerminal
  3298.         );
  3299. }
  3300. [
  3301.     uuid( B87658BD-3C59-4f64-BE74-AEDE3E86A81E ),
  3302.     helpstring("TAPI 3.0 ITScriptableAudioFormat Interface"),
  3303.     dual
  3304. ]
  3305. interface ITScriptableAudioFormat : IDispatch
  3306. {
  3307.     [propget, id(1), helpstring("property Channels")]
  3308.     HRESULT Channels(
  3309.         [out, retval] long* pVal
  3310.         );
  3311.     [propput, id(1), helpstring("property Channels")]
  3312.     HRESULT Channels(
  3313.         [in] const long nNewVal
  3314.         );
  3315.     [propget, id(2), helpstring("property SamplesPerSec")]
  3316.     HRESULT SamplesPerSec(
  3317.         [out, retval] long* pVal
  3318.         );
  3319.     [propput, id(2), helpstring("property SamplesPerSec")]
  3320.     HRESULT SamplesPerSec(
  3321.         [in] const long nNewVal
  3322.         );
  3323.     [propget, id(3), helpstring("property AvgBytesPerSec")]
  3324.     HRESULT AvgBytesPerSec(
  3325.         [out, retval] long* pVal
  3326.         );
  3327.     [propput, id(3), helpstring("property AvgBytesPerSec")]
  3328.     HRESULT AvgBytesPerSec(
  3329.         [in] const long nNewVal
  3330.         );
  3331.     [propget, id(4), helpstring("property BlockAlign")]
  3332.     HRESULT BlockAlign(
  3333.         [out, retval] long* pVal
  3334.         );
  3335.     [propput, id(4), helpstring("property BlockAlign")]
  3336.     HRESULT BlockAlign(
  3337.         [in] const long nNewVal
  3338.         );
  3339.     [propget, id(5), helpstring("property BitsPerSample")]
  3340.     HRESULT BitsPerSample(
  3341.         [out, retval] long* pVal
  3342.         );
  3343.     [propput, id(5), helpstring("property BitsPerSample")]
  3344.     HRESULT BitsPerSample(
  3345.         [in] const long nNewVal
  3346.         );
  3347.     [propget, id(6), helpstring("property FormatTag")]
  3348.     HRESULT FormatTag(
  3349.         [out, retval] long* pVal
  3350.         );
  3351.     [propput, id(6), helpstring("property FormatTag")]
  3352.     HRESULT FormatTag(
  3353.         [in] const long nNewVal
  3354.         );
  3355. };
  3356. cpp_quote("/****************************************")
  3357. cpp_quote(" * Terminal Classes")
  3358. cpp_quote(" ****************************************/")
  3359. cpp_quote("")
  3360. cpp_quote("// Video Windows - {F7438990-D6EB-11d0-82A6-00AA00B5CA1B}")
  3361. cpp_quote("EXTERN_C const CLSID CLSID_VideoWindowTerm;")
  3362. cpp_quote("")
  3363. cpp_quote("// Video input (camera) {AAF578EC-DC70-11d0-8ED3-00C04FB6809F}")
  3364. cpp_quote("EXTERN_C const CLSID CLSID_VideoInputTerminal;")
  3365. cpp_quote("")
  3366. cpp_quote("// Handset device {AAF578EB-DC70-11d0-8ED3-00C04FB6809F}")
  3367. cpp_quote("EXTERN_C const CLSID CLSID_HandsetTerminal;")
  3368. cpp_quote("")
  3369. cpp_quote("// Headset device {AAF578ED-DC70-11d0-8ED3-00C04FB6809F}")
  3370. cpp_quote("EXTERN_C const CLSID CLSID_HeadsetTerminal;")
  3371. cpp_quote("")
  3372. cpp_quote("// Speakerphone device {AAF578EE-DC70-11d0-8ED3-00C04FB6809F}")
  3373. cpp_quote("EXTERN_C const CLSID CLSID_SpeakerphoneTerminal;")
  3374. cpp_quote("")
  3375. cpp_quote("// Microphone (sound card) {AAF578EF-DC70-11d0-8ED3-00C04FB6809F}")
  3376. cpp_quote("EXTERN_C const CLSID CLSID_MicrophoneTerminal;")
  3377. cpp_quote("")
  3378. cpp_quote("// Speakers (sound card) {AAF578F0-DC70-11d0-8ED3-00C04FB6809F}")
  3379. cpp_quote("EXTERN_C const CLSID CLSID_SpeakersTerminal;")
  3380. cpp_quote("")
  3381. cpp_quote("// Media stream terminal {E2F7AEF7-4971-11D1-A671-006097C9A2E8}")
  3382. cpp_quote("EXTERN_C const CLSID CLSID_MediaStreamTerminal;")
  3383. cpp_quote("")
  3384. cpp_quote("// File Recording terminal {521F3D06-C3D0-4511-8617-86B9A783DA77}")
  3385. cpp_quote("EXTERN_C const CLSID CLSID_FileRecordingTerminal;")
  3386. cpp_quote("")
  3387. cpp_quote("// File Recording Track {BF14A2E4-E88B-4ef5-9740-5AC5D022F8C9}")
  3388. cpp_quote("EXTERN_C const CLSID CLSID_FileRecordingTrack;")
  3389. cpp_quote("")
  3390. cpp_quote("// File Playback Terminal {0CB9914C-79CD-47dc-ADB0-327F47CEFB20}")
  3391. cpp_quote("EXTERN_C const CLSID CLSID_FilePlaybackTerminal;")
  3392. cpp_quote("")
  3393. cpp_quote("// define the media modes")
  3394. cpp_quote("#define TAPIMEDIATYPE_AUDIO                     0x8")
  3395. cpp_quote("#define TAPIMEDIATYPE_VIDEO                     0x8000")
  3396. cpp_quote("#define TAPIMEDIATYPE_DATAMODEM                 0x10")
  3397. cpp_quote("#define TAPIMEDIATYPE_G3FAX                     0x20")
  3398. cpp_quote("#define TAPIMEDIATYPE_MULTITRACK                0x10000")
  3399. cpp_quote("")
  3400. cpp_quote("// {831CE2D6-83B5-11d1-BB5C-00C04FB6809F}")
  3401. cpp_quote("EXTERN_C const CLSID TAPIPROTOCOL_PSTN;")
  3402. cpp_quote("")
  3403. cpp_quote("// {831CE2D7-83B5-11d1-BB5C-00C04FB6809F}")
  3404. cpp_quote("EXTERN_C const CLSID TAPIPROTOCOL_H323;")
  3405. cpp_quote("")
  3406. cpp_quote("// {831CE2D8-83B5-11d1-BB5C-00C04FB6809F}")
  3407. cpp_quote("EXTERN_C const CLSID TAPIPROTOCOL_Multicast;")
  3408. cpp_quote("")
  3409. cpp_quote("#define __TapiConstants_MODULE_DEFINED__")
  3410. #endif // __TAPI3IF_IDL__