Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

810 lines
18 KiB

  1. //
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. cpp_quote("/* Copyright (c) Microsoft Corporation. All rights reserved. */")
  4. // callcent.idl : IDL source for tapi3 Call centre support
  5. //
  6. import "oaidl.idl";
  7. import "tapi3if.idl";
  8. typedef enum AGENT_EVENT
  9. {
  10. AE_NOT_READY,
  11. AE_READY,
  12. AE_BUSY_ACD,
  13. AE_BUSY_INCOMING,
  14. AE_BUSY_OUTGOING,
  15. AE_UNKNOWN,
  16. } AGENT_EVENT;
  17. typedef enum AGENT_STATE
  18. {
  19. AS_NOT_READY,
  20. AS_READY,
  21. AS_BUSY_ACD,
  22. AS_BUSY_INCOMING,
  23. AS_BUSY_OUTGOING,
  24. AS_UNKNOWN
  25. } AGENT_STATE;
  26. typedef enum AGENT_SESSION_EVENT
  27. {
  28. ASE_NEW_SESSION,
  29. ASE_NOT_READY,
  30. ASE_READY,
  31. ASE_BUSY,
  32. ASE_WRAPUP,
  33. ASE_END
  34. } AGENT_SESSION_EVENT;
  35. typedef enum AGENT_SESSION_STATE
  36. {
  37. ASST_NOT_READY,
  38. ASST_READY,
  39. ASST_BUSY_ON_CALL,
  40. ASST_BUSY_WRAPUP,
  41. ASST_SESSION_ENDED
  42. } AGENT_SESSION_STATE;
  43. typedef enum AGENTHANDLER_EVENT
  44. {
  45. AHE_NEW_AGENTHANDLER,
  46. AHE_AGENTHANDLER_REMOVED
  47. } AGENTHANDLER_EVENT;
  48. typedef enum ACDGROUP_EVENT
  49. {
  50. ACDGE_NEW_GROUP,
  51. ACDGE_GROUP_REMOVED
  52. } ACDGROUP_EVENT;
  53. typedef enum ACDQUEUE_EVENT
  54. {
  55. ACDQE_NEW_QUEUE,
  56. ACDQE_QUEUE_REMOVED
  57. } ACDQUEUE_EVENT;
  58. // forward definitions
  59. interface IEnumAgentSession;
  60. interface IEnumAgent;
  61. interface IEnumQueue;
  62. interface IEnumACDGroup;
  63. interface IEnumAgentHandler;
  64. interface ITAgentHandler;
  65. interface ITAgent;
  66. interface ITAgentSession;
  67. interface ITACDGroup;
  68. interface ITQueue;
  69. interface ITAgentEvent;
  70. interface ITAgentSessionEvent;
  71. interface ITAgentHandlerEvent;
  72. interface ITACDGroupEvent;
  73. interface ITQueueEvent;
  74. // ITAgent
  75. [
  76. uuid( 5770ECE5-4B27-11d1-BF80-00805FC147D3 ),
  77. helpstring("TAPI 3.0 ITAgent interface"),
  78. dual
  79. ]
  80. interface ITAgent : IDispatch
  81. {
  82. [id(1), hidden, helpstring("method EnumerateAgentSessions")]
  83. HRESULT EnumerateAgentSessions(
  84. [out, retval] IEnumAgentSession ** ppEnumAgentSession
  85. );
  86. [id(2), helpstring("method CreateSession")]
  87. HRESULT CreateSession(
  88. [in] ITACDGroup * pACDGroup,
  89. [in] ITAddress * pAddress,
  90. [out,retval] ITAgentSession ** ppAgentSession
  91. );
  92. [id(3), helpstring("method CreateSessionWithPIN")]
  93. HRESULT CreateSessionWithPIN(
  94. [in] ITACDGroup * pACDGroup,
  95. [in] ITAddress * pAddress,
  96. [in] BSTR pPIN,
  97. [out,retval] ITAgentSession ** ppAgentSession
  98. );
  99. [propget, id(4), helpstring("property ID")]
  100. HRESULT ID(
  101. [out, retval] BSTR * ppID
  102. );
  103. [propget, id(5), helpstring("property User")]
  104. HRESULT User(
  105. [out, retval] BSTR * ppUser
  106. );
  107. [propput, id(6), helpstring("property State")]
  108. HRESULT State(
  109. [in] AGENT_STATE AgentState
  110. );
  111. [propget, id(6), helpstring("property State")]
  112. HRESULT State(
  113. [out, retval] AGENT_STATE * pAgentState
  114. );
  115. [propput, id(7), helpstring("property MeasurementPeriod")]
  116. HRESULT MeasurementPeriod(
  117. [in] long lPeriod
  118. );
  119. [propget, id(7), helpstring("property MeasurementPeriod")]
  120. HRESULT MeasurementPeriod(
  121. [out, retval] long * plPeriod
  122. );
  123. [propget, id(8), helpstring("property OverallCallRate")]
  124. HRESULT OverallCallRate(
  125. [out, retval] CURRENCY * pcyCallrate
  126. );
  127. [propget, id(9), helpstring("property NumberOfACDCalls")]
  128. HRESULT NumberOfACDCalls(
  129. [out, retval] long * plCalls
  130. );
  131. [propget, id(10), helpstring("property NumberOfIncomingCalls")]
  132. HRESULT NumberOfIncomingCalls(
  133. [out, retval] long * plCalls
  134. );
  135. [propget, id(11), helpstring("property NumberOfOutgoingCalls")]
  136. HRESULT NumberOfOutgoingCalls(
  137. [out, retval] long * plCalls
  138. );
  139. [propget, id(12), helpstring("property TotalACDTalkTime")]
  140. HRESULT TotalACDTalkTime(
  141. [out, retval] long * plTalkTime
  142. );
  143. [propget, id(13), helpstring("property TotalACDCallTime")]
  144. HRESULT TotalACDCallTime(
  145. [out, retval] long * plCallTime
  146. );
  147. [propget, id(14), helpstring("property TotalWrapUpTime")]
  148. HRESULT TotalWrapUpTime(
  149. [out, retval] long * plWrapUpTime
  150. );
  151. [propget, id(15), helpstring("property AgentSessions")]
  152. HRESULT AgentSessions(
  153. [out, retval] VARIANT * pVariant
  154. );
  155. }
  156. // ITAgentSession
  157. [
  158. uuid( 5AFC3147-4BCC-11d1-BF80-00805FC147D3 ),
  159. helpstring("TAPI 3.0 ITAgentSession interface"),
  160. dual
  161. ]
  162. interface ITAgentSession : IDispatch
  163. {
  164. [propget, id(1), helpstring("property Agent")]
  165. HRESULT Agent(
  166. [out, retval] ITAgent ** ppAgent
  167. );
  168. [propget, id(2), helpstring("property Address")]
  169. HRESULT Address(
  170. [out, retval] ITAddress ** ppAddress
  171. );
  172. [propget, id(3), helpstring("property ACDGroup")]
  173. HRESULT ACDGroup(
  174. [out, retval] ITACDGroup ** ppACDGroup
  175. );
  176. [propput, id(4), helpstring("property State")]
  177. HRESULT State(
  178. [in] AGENT_SESSION_STATE SessionState
  179. );
  180. [propget, id(4), helpstring("property State")]
  181. HRESULT State(
  182. [out, retval] AGENT_SESSION_STATE * pSessionState
  183. );
  184. [propget, id(5), helpstring("property SessionStartTime")]
  185. HRESULT SessionStartTime(
  186. [out, retval] DATE * pdateSessionStart
  187. );
  188. [propget, id(6), helpstring("property SessionDuration")]
  189. HRESULT SessionDuration(
  190. [out, retval] long * plDuration
  191. );
  192. [propget, id(7), helpstring("property NumberOfCalls")]
  193. HRESULT NumberOfCalls(
  194. [out, retval] long * plCalls
  195. );
  196. [propget, id(8), helpstring("property TotalTalkTime")]
  197. HRESULT TotalTalkTime(
  198. [out, retval] long * plTalkTime
  199. );
  200. [propget, id(9), helpstring("property AverageTalkTime")]
  201. HRESULT AverageTalkTime(
  202. [out, retval] long * plTalkTime
  203. );
  204. [propget, id(10), helpstring("property TotalCallTime")]
  205. HRESULT TotalCallTime(
  206. [out, retval] long * plCallTime
  207. );
  208. [propget, id(11), helpstring("property AverageCallTime")]
  209. HRESULT AverageCallTime(
  210. [out, retval] long * plCallTime
  211. );
  212. [propget, id(12), helpstring("property TotalWrapUpTime")]
  213. HRESULT TotalWrapUpTime(
  214. [out, retval] long * plWrapUpTime
  215. );
  216. [propget, id(13), helpstring("property AverageWrapUpTime")]
  217. HRESULT AverageWrapUpTime(
  218. [out, retval] long * plWrapUpTime
  219. );
  220. [propget, id(14), helpstring("property ACDCallRate")]
  221. HRESULT ACDCallRate(
  222. [out, retval] CURRENCY * pcyCallrate
  223. );
  224. [propget, id(15), helpstring("property LongestTimeToAnswer")]
  225. HRESULT LongestTimeToAnswer(
  226. [out, retval] long * plAnswerTime
  227. );
  228. [propget, id(16), helpstring("property AverageTimeToAnswer")]
  229. HRESULT AverageTimeToAnswer(
  230. [out, retval] long * plAnswerTime
  231. );
  232. }
  233. // ITACDGroup
  234. [
  235. uuid( 5AFC3148-4BCC-11d1-BF80-00805FC147D3 ),
  236. helpstring("TAPI 3.0 ITACDGroup interface"),
  237. dual
  238. ]
  239. interface ITACDGroup : IDispatch
  240. {
  241. [propget, id(1), helpstring("property Name")]
  242. HRESULT Name(
  243. [out, retval] BSTR * ppName
  244. );
  245. [id(2), hidden, helpstring("method EnumerateQueues")]
  246. HRESULT EnumerateQueues(
  247. [out, retval] IEnumQueue ** ppEnumQueue
  248. );
  249. [propget, id(3), helpstring("property Queues")]
  250. HRESULT Queues(
  251. [out, retval] VARIANT * pVariant
  252. );
  253. }
  254. /*
  255. // ITGroupSupervisor
  256. [
  257. uuid( 587E8C24-9802-11d1-A0A4-00805FC147D3 ),
  258. helpstring("TAPI 3.0 ITGroupSupervisor interface"),
  259. dual
  260. ]
  261. interface ITGroupSupervisor : IDispatch
  262. {
  263. [id(1), hidden, helpstring("method EnumerateAgentSessions")]
  264. HRESULT EnumerateAgentSessions(
  265. [out, retval] IEnumAgentSession ** ppEnumAgentSession
  266. );
  267. [id(2), hidden, helpstring("method EnumerateAgents")]
  268. HRESULT EnumerateAgents(
  269. [out, retval] IEnumAgent ** ppEnumAgent
  270. );
  271. [id(3), helpstring("method RegisterAgentSessionEvents")]
  272. HRESULT RegisterAgentSessionEvents(
  273. [in] VARIANT_BOOL bNotify
  274. );
  275. }
  276. */
  277. // ITQueue
  278. [
  279. uuid( 5AFC3149-4BCC-11d1-BF80-00805FC147D3 ),
  280. helpstring("TAPI 3.0 ITQueue interface"),
  281. dual
  282. ]
  283. interface ITQueue : IDispatch
  284. {
  285. [propput, id(1), helpstring("property MeasurementPeriod")]
  286. HRESULT MeasurementPeriod(
  287. [in] long lPeriod
  288. );
  289. [propget, id(1), helpstring("property MeasurementPeriod")]
  290. HRESULT MeasurementPeriod(
  291. [out, retval] long * plPeriod
  292. );
  293. [propget, id(2), helpstring("property TotalCallsQueued")]
  294. HRESULT TotalCallsQueued(
  295. [out, retval] long * plCalls
  296. );
  297. [propget, id(3), helpstring("property CurrentCallsQueued")]
  298. HRESULT CurrentCallsQueued(
  299. [out, retval] long * plCalls
  300. );
  301. [propget, id(4), helpstring("property TotalCallsAbandoned")]
  302. HRESULT TotalCallsAbandoned(
  303. [out, retval] long * plCalls
  304. );
  305. [propget, id(5), helpstring("property TotalCallsFlowedIn")]
  306. HRESULT TotalCallsFlowedIn(
  307. [out, retval] long * plCalls
  308. );
  309. [propget, id(6), helpstring("property TotalCallsFlowedOut")]
  310. HRESULT TotalCallsFlowedOut(
  311. [out, retval] long * plCalls
  312. );
  313. [propget, id(7), helpstring("property LongestEverWaitTime")]
  314. HRESULT LongestEverWaitTime(
  315. [out, retval] long * plWaitTime
  316. );
  317. [propget, id(8), helpstring("property CurrentLongestWaitTime")]
  318. HRESULT CurrentLongestWaitTime(
  319. [out, retval] long * plWaitTime
  320. );
  321. [propget, id(9), helpstring("property AverageWaitTime")]
  322. HRESULT AverageWaitTime(
  323. [out, retval] long * plWaitTime
  324. );
  325. [propget, id(10), helpstring("property FinalDisposition")]
  326. HRESULT FinalDisposition(
  327. [out, retval] long * plCalls
  328. );
  329. [propget, id(11), helpstring("property Name")]
  330. HRESULT Name(
  331. [out, retval] BSTR * ppName
  332. );
  333. }
  334. // ITAgentEvent;
  335. [
  336. uuid( 5AFC314A-4BCC-11d1-BF80-00805FC147D3 ),
  337. helpstring("TAPI 3.0 ITAgentEvent interface"),
  338. dual
  339. ]
  340. interface ITAgentEvent : IDispatch
  341. {
  342. [propget, id(1), helpstring("property Agent")]
  343. HRESULT Agent(
  344. [out, retval] ITAgent ** ppAgent
  345. );
  346. [propget, id(2), helpstring("property Event")]
  347. HRESULT Event(
  348. [out, retval] AGENT_EVENT * pEvent
  349. );
  350. }
  351. // ITAgentSessionEvent;
  352. [
  353. uuid( 5AFC314B-4BCC-11d1-BF80-00805FC147D3 ),
  354. helpstring("TAPI 3.0 ITAgentSessionEvent interface"),
  355. dual
  356. ]
  357. interface ITAgentSessionEvent : IDispatch
  358. {
  359. [propget, id(1), helpstring("property Session")]
  360. HRESULT Session(
  361. [out, retval] ITAgentSession ** ppSession
  362. );
  363. [propget, id(2), helpstring("property Event")]
  364. HRESULT Event(
  365. [out, retval] AGENT_SESSION_EVENT * pEvent
  366. );
  367. }
  368. // ITACDGroupEvent;
  369. [
  370. uuid( 297F3032-BD11-11d1-A0A7-00805FC147D3 ),
  371. helpstring("TAPI 3.0 ITACDGroupEvent interface"),
  372. dual
  373. ]
  374. interface ITACDGroupEvent : IDispatch
  375. {
  376. [propget, id(1), helpstring("property Group")]
  377. HRESULT Group(
  378. [out, retval] ITACDGroup ** ppGroup
  379. );
  380. [propget, id(2), helpstring("property Event")]
  381. HRESULT Event(
  382. [out, retval] ACDGROUP_EVENT * pEvent
  383. );
  384. }
  385. // ITQueueEvent;
  386. [
  387. uuid( 297F3033-BD11-11d1-A0A7-00805FC147D3 ),
  388. helpstring("TAPI 3.0 ITQueueEvent interface"),
  389. dual
  390. ]
  391. interface ITQueueEvent : IDispatch
  392. {
  393. [propget, id(1), helpstring("property Queue")]
  394. HRESULT Queue(
  395. [out, retval] ITQueue ** ppQueue
  396. );
  397. [propget, id(2), helpstring("property Event")]
  398. HRESULT Event(
  399. [out, retval] ACDQUEUE_EVENT * pEvent
  400. );
  401. }
  402. // ITAgentHandlerEvent;
  403. [
  404. uuid( 297F3034-BD11-11d1-A0A7-00805FC147D3 ),
  405. helpstring("TAPI 3.0 ITAgentHandlerEvent interface"),
  406. dual
  407. ]
  408. interface ITAgentHandlerEvent : IDispatch
  409. {
  410. [propget, id(1), helpstring("property AgentHandler")]
  411. HRESULT AgentHandler(
  412. [out, retval] ITAgentHandler ** ppAgentHandler
  413. );
  414. [propget, id(2), helpstring("property Event")]
  415. HRESULT Event(
  416. [out, retval] AGENTHANDLER_EVENT * pEvent
  417. );
  418. }
  419. // ITTAPICallCenter
  420. [
  421. uuid( 5AFC3154-4BCC-11d1-BF80-00805FC147D3 ),
  422. helpstring("TAPI 3.0 ITTAPICallCenter interface"),
  423. dual
  424. ]
  425. interface ITTAPICallCenter : IDispatch
  426. {
  427. [id(IDISPTAPICALLCENTER | 1), hidden, helpstring("method EnumerateAgentHandlers")]
  428. HRESULT EnumerateAgentHandlers(
  429. [out, retval] IEnumAgentHandler ** ppEnumHandler
  430. );
  431. [propget, id(IDISPTAPICALLCENTER | 2), helpstring("property AgentHandlers")]
  432. HRESULT AgentHandlers(
  433. [out, retval] VARIANT * pVariant
  434. );
  435. }
  436. // ITAgentHandler
  437. [
  438. uuid( 587E8C22-9802-11d1-A0A4-00805FC147D3 ),
  439. helpstring("TAPI 3.0 ITAgentHandler interface"),
  440. dual
  441. ]
  442. interface ITAgentHandler : IDispatch
  443. {
  444. [propget, id(1), helpstring("property Name")]
  445. HRESULT Name(
  446. [out, retval] BSTR * ppName
  447. );
  448. [id(2), helpstring("property CreateAgent")]
  449. HRESULT CreateAgent(
  450. [out, retval] ITAgent ** ppAgent
  451. );
  452. [id(3), helpstring("property CreateAgentWithID")]
  453. HRESULT CreateAgentWithID(
  454. [in] BSTR pID,
  455. [in] BSTR pPIN,
  456. [out, retval] ITAgent ** ppAgent
  457. );
  458. [id(4), hidden, helpstring("method EnumerateACDGroups")]
  459. HRESULT EnumerateACDGroups(
  460. [out, retval] IEnumACDGroup** ppEnumACDGroup
  461. );
  462. [id(5), hidden, helpstring("method EnumerateUsableAddresses")]
  463. HRESULT EnumerateUsableAddresses(
  464. [out, retval] IEnumAddress ** ppEnumAddress
  465. );
  466. [propget, id(6), helpstring("property ACDGroups")]
  467. HRESULT ACDGroups(
  468. [out, retval] VARIANT * pVariant
  469. );
  470. [propget, id(7), helpstring("property UsableAddresses")]
  471. HRESULT UsableAddresses(
  472. [out, retval] VARIANT * pVariant
  473. );
  474. }
  475. /*
  476. // ITAgentSupervisor
  477. [
  478. uuid( 587E8C26-9802-11d1-A0A4-00805FC147D3 ),
  479. helpstring("TAPI 3.0 ITAgentSupervisor interface"),
  480. dual
  481. ]
  482. interface ITAgentSupervisor : IDispatch
  483. {
  484. [id(1), hidden, helpstring("method EnumerateQueues")]
  485. HRESULT EnumerateQueues(
  486. [out, retval] IEnumQueue ** ppEnumQueue
  487. );
  488. [id(2), hidden, helpstring("method EnumerateAgents")]
  489. HRESULT EnumerateAgents(
  490. [out, retval] IEnumAgent ** ppEnumAgent
  491. );
  492. }
  493. */
  494. // IEnumAgent
  495. [
  496. uuid( 5AFC314D-4BCC-11d1-BF80-00805FC147D3 ),
  497. helpstring("TAPI 3.0 IEnumAgent interface"),
  498. hidden,
  499. pointer_default(unique)
  500. ]
  501. interface IEnumAgent : IUnknown
  502. {
  503. HRESULT Next(
  504. [in] ULONG celt,
  505. [out] ITAgent ** ppElements,
  506. [out] ULONG * pceltFetched
  507. );
  508. HRESULT Reset( void );
  509. HRESULT Skip (
  510. [in] ULONG celt
  511. );
  512. HRESULT Clone (
  513. [out, retval] IEnumAgent ** ppEnum
  514. );
  515. }
  516. // IEnumAgentSession
  517. [
  518. uuid( 5AFC314E-4BCC-11d1-BF80-00805FC147D3 ),
  519. helpstring("TAPI 3.0 IEnumAgentSession interface"),
  520. hidden,
  521. pointer_default(unique)
  522. ]
  523. interface IEnumAgentSession : IUnknown
  524. {
  525. HRESULT Next(
  526. [in] ULONG celt,
  527. [out] ITAgentSession ** ppElements,
  528. [out] ULONG * pceltFetched
  529. );
  530. HRESULT Reset( void );
  531. HRESULT Skip (
  532. [in] ULONG celt
  533. );
  534. HRESULT Clone (
  535. [out, retval] IEnumAgentSession ** ppEnum
  536. );
  537. }
  538. // IEnumQueue;
  539. [
  540. uuid( 5AFC3158-4BCC-11d1-BF80-00805FC147D3 ),
  541. helpstring("TAPI 3.0 IEnumQueue interface"),
  542. hidden,
  543. pointer_default(unique)
  544. ]
  545. interface IEnumQueue : IUnknown
  546. {
  547. HRESULT Next(
  548. [in] ULONG celt,
  549. [out] ITQueue ** ppElements,
  550. [out] ULONG * pceltFetched
  551. );
  552. HRESULT Reset( void );
  553. HRESULT Skip (
  554. [in] ULONG celt
  555. );
  556. HRESULT Clone (
  557. [out, retval] IEnumQueue ** ppEnum
  558. );
  559. }
  560. // IEnumACDGroup
  561. [
  562. uuid( 5AFC3157-4BCC-11d1-BF80-00805FC147D3 ),
  563. helpstring("TAPI 3.0 IEnumACDGroup interface"),
  564. hidden,
  565. pointer_default(unique)
  566. ]
  567. interface IEnumACDGroup : IUnknown
  568. {
  569. HRESULT Next(
  570. [in] ULONG celt,
  571. [out] ITACDGroup ** ppElements,
  572. [out] ULONG * pceltFetched
  573. );
  574. HRESULT Reset( void );
  575. HRESULT Skip (
  576. [in] ULONG celt
  577. );
  578. HRESULT Clone (
  579. [out, retval] IEnumACDGroup ** ppEnum
  580. );
  581. }
  582. // IEnumAgentHandler
  583. [
  584. uuid( 587E8C28-9802-11d1-A0A4-00805FC147D3 ),
  585. helpstring("TAPI 3.0 IEnumAgentHandler interface"),
  586. hidden,
  587. pointer_default(unique)
  588. ]
  589. interface IEnumAgentHandler : IUnknown
  590. {
  591. HRESULT Next(
  592. [in] ULONG celt,
  593. [out] ITAgentHandler ** ppElements,
  594. [out] ULONG * pceltFetched
  595. );
  596. HRESULT Reset( void );
  597. HRESULT Skip (
  598. [in] ULONG celt
  599. );
  600. HRESULT Clone (
  601. [out, retval] IEnumAgentHandler ** ppEnum
  602. );
  603. }