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.

1136 lines
34 KiB

  1. // winsip.idl
  2. //
  3. cpp_quote("//=--------------------------------------------------------------------------=")
  4. cpp_quote("// winsip.idl")
  5. cpp_quote("//=--------------------------------------------------------------------------=")
  6. cpp_quote("// (C) Copyright 2000-2001 Microsoft Corporation. All Rights Reserved.")
  7. cpp_quote("//")
  8. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
  9. cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
  10. cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  11. cpp_quote("// PARTICULAR PURPOSE.")
  12. cpp_quote("//=--------------------------------------------------------------------------=")
  13. cpp_quote("")
  14. cpp_quote("#include <windows.h>")
  15. import "unknwn.idl";
  16. import "ocidl.idl";
  17. import "wbemcli.idl";
  18. //
  19. // STRING is the struct defined in ntdef.h
  20. //
  21. cpp_quote("#ifndef _NTDEF_")
  22. typedef char * PCHAR;
  23. typedef BYTE * PBYTE;
  24. typedef struct _STRING {
  25. USHORT Length;
  26. USHORT MaximumLength;
  27. [size_is(MaximumLength), length_is(Length) ]
  28. PCHAR Buffer;
  29. } STRING;
  30. typedef STRING *PSTRING;
  31. cpp_quote("#endif // _NTDEF_")
  32. typedef ULONG_PTR SIP_HANDLE;
  33. typedef SIP_HANDLE* PSIP_HANDLE;
  34. // SIP header types %11
  35. typedef DWORD SIPHeaderID;
  36. const SIPHeaderID SIP_HID_UNKNOWN = 0; // 1 or more
  37. const SIPHeaderID SIP_HID_VIA = 1; // 1 or more headers
  38. const SIPHeaderID SIP_HID_CONTACT = 2; // 1+
  39. const SIPHeaderID SIP_HID_ROUTE = 3; // 1+
  40. const SIPHeaderID SIP_HID_TO = 4;
  41. const SIPHeaderID SIP_HID_FROM = 5;
  42. const SIPHeaderID SIP_HID_CALL_ID = 6;
  43. const SIPHeaderID SIP_HID_CSEQ = 7;
  44. const SIPHeaderID SIP_HID_CONTENT_LENGTH = 8;
  45. const SIPHeaderID SIP_HID_RECORD_ROUTE = 9;
  46. const SIPHeaderID SIP_HID_PROXY_AUTHORIZATION = 10;
  47. const SIPHeaderID SIP_HID_AUTHENTICATION_INFO = 14;
  48. const SIPHeaderID SIP_HID_AUTHORIZATION = 15;
  49. const SIPHeaderID SIP_HID_EVENT = 16;
  50. const SIPHeaderID SIP_HID_EXPIRES = 17;
  51. const SIPHeaderID SIP_HID_MAX_FORWARDS = 18;
  52. const SIPHeaderID SIP_HID_PROXY_AUTHENTICATE = 19;
  53. const SIPHeaderID SIP_HID_PROXY_AUTHENTICATION_INFO = 20;
  54. const SIPHeaderID SIP_HID_SOAPACTION = 24;
  55. const SIPHeaderID SIP_HID_ACCEPT = 25;
  56. const SIPHeaderID SIP_HID_ACCEPT_CONTACT = 26;
  57. const SIPHeaderID SIP_HID_ACCEPT_ENCODING = 27;
  58. const SIPHeaderID SIP_HID_ACCEPT_LANGUAGE = 28;
  59. const SIPHeaderID SIP_HID_ALLOW = 29;
  60. const SIPHeaderID SIP_HID_ALLOW_EVENTS = 30;
  61. const SIPHeaderID SIP_HID_CONTENT_DISPOSITION = 31;
  62. const SIPHeaderID SIP_HID_CONTENT_ENCODING = 32;
  63. const SIPHeaderID SIP_HID_CONTENT_FUNCTION = 33;
  64. const SIPHeaderID SIP_HID_CONTENT_LANGUAGE = 34;
  65. const SIPHeaderID SIP_HID_CONTENT_KEY = 35;
  66. const SIPHeaderID SIP_HID_CONTENT_TYPE = 36;
  67. const SIPHeaderID SIP_HID_DATE = 37;
  68. const SIPHeaderID SIP_HID_ENCRYPTION = 38;
  69. const SIPHeaderID SIP_HID_HIDE = 39;
  70. const SIPHeaderID SIP_HID_IN_REPLY_TO = 40;
  71. const SIPHeaderID SIP_HID_MIME_VERSION = 41;
  72. const SIPHeaderID SIP_HID_ORGANIZATION = 42;
  73. const SIPHeaderID SIP_HID_PRIORITY = 43;
  74. const SIPHeaderID SIP_HID_PROXY_REQUIRE = 44;
  75. const SIPHeaderID SIP_HID_PROXY_TYPE = 45;
  76. const SIPHeaderID SIP_HID_REJECT_CONTACT = 46;
  77. const SIPHeaderID SIP_HID_REQUEST_DISPOSITION = 47;
  78. const SIPHeaderID SIP_HID_REQUIRE = 48;
  79. const SIPHeaderID SIP_HID_RESPONSE_KEY = 49;
  80. const SIPHeaderID SIP_HID_RETRY_AFTER = 50;
  81. const SIPHeaderID SIP_HID_SERVER = 51;
  82. const SIPHeaderID SIP_HID_SUBJECT = 52;
  83. const SIPHeaderID SIP_HID_SUPPORTED = 53;
  84. const SIPHeaderID SIP_HID_TIMESTAMP = 54;
  85. const SIPHeaderID SIP_HID_UNSUPPORTED = 55;
  86. const SIPHeaderID SIP_HID_USER_AGENT = 56;
  87. const SIPHeaderID SIP_HID_WARNING = 57;
  88. const SIPHeaderID SIP_HID_WWW_AUTHENTICATE = 58;
  89. typedef enum {
  90. URI_SCHEME_UNKNOWN,
  91. URI_SCHEME_SIP
  92. } URI_SCHEME;
  93. typedef enum {
  94. CONTACT_ACTION_UNKNOWN,
  95. CONTACT_ACTION_PROXY,
  96. CONTACT_ACTION_REDIRECT
  97. } CONTACT_ACTION;
  98. typedef enum {
  99. SIP_MODULE_INCOMING_PROCESSING,
  100. SIP_MODULE_ROUTING_PROCESSING,
  101. SIP_MODULE_OUTGOING_PROCESSING
  102. } SIP_MODULE_TYPE;
  103. typedef enum {
  104. SIP_AUTH_PKG_UNKNOWN = 0x00,
  105. SIP_AUTH_PKG_NONE = 0x01,
  106. SIP_AUTH_PKG_NEGOTIATE = 0x02,
  107. SIP_AUTH_PKG_KERBEROS = 0x04,
  108. SIP_AUTH_PKG_NTLM = 0x08,
  109. SIP_AUTH_PKG_DIGEST = 0x10,
  110. SIP_AUTH_PKG_BASIC = 0x20,
  111. SIP_AUTH_PKG_ANY = 0xFF,
  112. } SIP_AUTH_PACKAGEID;
  113. const USHORT SIP_AUTH_PACKAGES = 0x7;
  114. //
  115. // values used by extension modules to register for state events
  116. //
  117. typedef enum
  118. {
  119. SIP_REGISTRATION_RAW_SIP_MESSAGES = 0x1, // all sip messages, no state
  120. SIP_REGISTRATION_TRANSACTION_EVENTS = 0x2,
  121. SIP_REGISTRATION_DIALOG_EVENTS = 0x4
  122. } SIPRegistrationType;
  123. //
  124. // definitions for session types observed by the state manager
  125. //
  126. typedef enum
  127. {
  128. SIP_SESSION_TYPE_TRANSACTION,
  129. SIP_SESSION_TYPE_DIALOG
  130. } SIPEventType;
  131. //
  132. // possible transaction state events
  133. //
  134. typedef enum
  135. {
  136. // helper flags
  137. SIP_COMPLETED_FLAG = 0x100,
  138. SIP_REPLY_FLAG = 0x200,
  139. SIP_RETRANSMISSION_FLAG = 0x400,
  140. SIP_REROUTE_FLAG = 0x800,
  141. // the actual possible transaction state events
  142. SIP_TRANSACTION_NONE = 0x0,
  143. // received a message that started a new transaction
  144. SIP_TRANSACTION_REQUEST_STARTED = 0x1,
  145. SIP_TRANSACTION_REQUEST_STARTED_REROUTE = SIP_TRANSACTION_REQUEST_STARTED | SIP_REROUTE_FLAG,
  146. // received a retransmission for an existing transaction
  147. SIP_TRANSACTION_REQUEST_RETRANSMISSION = 0x2 | SIP_RETRANSMISSION_FLAG,
  148. SIP_TRANSACTION_REQUEST_RETRANSMISSION_REROUTE = SIP_TRANSACTION_REQUEST_RETRANSMISSION | SIP_REROUTE_FLAG,
  149. // received a cancel for an existing transaction
  150. SIP_TRANSACTION_REQUEST_CANCEL_ATTEMPTED = 0x3,
  151. SIP_TRANSACTION_REQUEST_CANCEL_ATTEMPTED_REROUTE = SIP_TRANSACTION_REQUEST_CANCEL_ATTEMPTED | SIP_REROUTE_FLAG,
  152. // received a provisional reply for an existing transaction
  153. SIP_TRANSACTION_REPLY_PROVISIONAL = 0x4 | SIP_REPLY_FLAG,
  154. // received a final reply for an existing transaction
  155. SIP_TRANSACTION_REPLY_ERROR_COMPLETED = 0x5 | SIP_COMPLETED_FLAG | SIP_REPLY_FLAG,
  156. SIP_TRANSACTION_REPLY_CANCELLED_COMPLETED = 0x6 | SIP_COMPLETED_FLAG | SIP_REPLY_FLAG,
  157. SIP_TRANSACTION_REPLY_REDIRECT_COMPLETED = 0x7 | SIP_COMPLETED_FLAG | SIP_REPLY_FLAG,
  158. SIP_TRANSACTION_REPLY_SUCCESS_COMPLETED = 0x8 | SIP_COMPLETED_FLAG | SIP_REPLY_FLAG,
  159. // transaction completed due to a timeout
  160. SIP_TRANSACTION_TIMEOUT_COMPLETED = 0x9 | SIP_COMPLETED_FLAG,
  161. // transaction completed due to a timeout that took place after cancel successfully completed
  162. SIP_TRANSACTION_TIMEOUT_CANCEL_COMPLETED = 0xa | SIP_COMPLETED_FLAG,
  163. // we received a terminating non-success response to cancel
  164. SIP_TRANSACTION_REQUEST_CANCEL_CANCELLED = 0xb,
  165. // we received a success reply to the cancel
  166. SIP_TRANSACTION_REQUEST_CANCEL_REPLIED = 0xc | SIP_REPLY_FLAG,
  167. //
  168. // ack is a transaction in itself
  169. //
  170. SIP_TRANSACTION_REQUEST_ACK = 0xd | SIP_COMPLETED_FLAG,
  171. SIP_TRANSACTION_REQUEST_ACK_REROUTE = SIP_TRANSACTION_REQUEST_ACK | SIP_REROUTE_FLAG
  172. } SIPTransactionEvent;
  173. //
  174. // Multimedia Session State events
  175. //
  176. typedef enum
  177. {
  178. SIP_DIALOG_NONE = 0x0,
  179. SIP_DIALOG_INITIATED = 0x1,
  180. SIP_DIALOG_INITIATED_REROUTE = SIP_DIALOG_INITIATED | SIP_REROUTE_FLAG,
  181. SIP_DIALOG_CONFIRMED = 0x2,
  182. SIP_DIALOG_ESTABLISHED = 0x3,
  183. SIP_DIALOG_ESTABLISHED_REROUTE = SIP_DIALOG_ESTABLISHED | SIP_REROUTE_FLAG,
  184. SIP_DIALOG_REINITIATED = 0x4,
  185. SIP_DIALOG_REINITIATED_REROUTE = SIP_DIALOG_REINITIATED | SIP_REROUTE_FLAG,
  186. SIP_DIALOG_RECONFIRMED = 0x5,
  187. SIP_DIALOG_REESTABLISHED = 0x6,
  188. SIP_DIALOG_REESTABLISHED_REROUTE = SIP_DIALOG_REESTABLISHED | SIP_REROUTE_FLAG,
  189. SIP_DIALOG_REINITIATION_TIMED_OUT = 0x7,
  190. SIP_DIALOG_RECONFIRMATION_TIMED_OUT = 0x8,
  191. SIP_DIALOG_REINITIATION_REJECTED = 0x9,
  192. SIP_DIALOG_REINITIATION_CANCELLED = 0xa,
  193. SIP_DIALOG_CLOSED = 0xb | SIP_COMPLETED_FLAG,
  194. SIP_DIALOG_CLOSED_TIMED_OUT = 0xc | SIP_COMPLETED_FLAG,
  195. SIP_DIALOG_CLOSED_REJECTED = 0xd | SIP_COMPLETED_FLAG,
  196. SIP_DIALOG_CLOSED_CANCELLED = 0xe | SIP_COMPLETED_FLAG,
  197. SIP_DIALOG_MAX = 0xf
  198. } SIPDialogEvent;
  199. //
  200. // Status code definition
  201. //
  202. //Informational
  203. cpp_quote("#define STATUS_CODE_TRYING 100")
  204. cpp_quote("#define STATUS_CODE_RINGING 180")
  205. cpp_quote("#define STATUS_CODE_FORWARDED 181")
  206. cpp_quote("#define STATUS_CODE_QUEUED 182")
  207. cpp_quote("#define STATUS_CODE_SESSION_PROGRESS 183")
  208. //Successful
  209. cpp_quote("#define STATUS_CODE_OK 200")
  210. cpp_quote("#define STATUS_CODE_ACCEPTED 202")
  211. //Redirection
  212. cpp_quote("#define STATUS_CODE_MULTIPLE_CHOICES 300")
  213. cpp_quote("#define STATUS_CODE_MOVED_PERMANENTLY 301")
  214. cpp_quote("#define STATUS_CODE_MOVED_TEMPORARILY 302")
  215. cpp_quote("#define STATUS_CODE_USE_PROXY 305")
  216. cpp_quote("#define STATUS_CODE_ALTERNATIVE_SERVICES 380")
  217. //Request Failure
  218. cpp_quote("#define STATUS_CODE_BAD_REQUEST 400")
  219. cpp_quote("#define STATUS_CODE_UNAUTHORIZED 401")
  220. cpp_quote("#define STATUS_CODE_PAYMENT_REQUIRED 402")
  221. cpp_quote("#define STATUS_CODE_FORBIDDEN 403")
  222. cpp_quote("#define STATUS_CODE_NOT_FOUND 404")
  223. cpp_quote("#define STATUS_CODE_METHOD_UNALLOWED 405")
  224. cpp_quote("#define STATUS_CODE_NOT_ACCEPTABLE 406")
  225. cpp_quote("#define STATUS_CODE_PXY_AUTHENTICATION_REQUIRED 407")
  226. cpp_quote("#define STATUS_CODE_TIMEOUT 408")
  227. cpp_quote("#define STATUS_CODE_CONFLICT 409")
  228. cpp_quote("#define STATUS_CODE_GONE 410")
  229. cpp_quote("#define STATUS_CODE_LENGTH_REQUIRED 411")
  230. cpp_quote("#define STATUS_CODE_ENTITY_TOOLARGE 413")
  231. cpp_quote("#define STATUS_CODE_URI_TOOLONG 414")
  232. cpp_quote("#define STATUS_CODE_UNSUPPORTED_MEDIA_TYPE 415")
  233. cpp_quote("#define STATUS_CODE_BAD_EXTENSION 420")
  234. cpp_quote("#define STATUS_CODE_TEMP_UNAVAILABLE 480")
  235. cpp_quote("#define STATUS_CODE_CALLLEG_UNAVAILABLE 481")
  236. cpp_quote("#define STATUS_CODE_LOOP_DETECTED 482")
  237. cpp_quote("#define STATUS_CODE_TOOMANY_HOPS 483")
  238. cpp_quote("#define STATUS_CODE_ADDRESS_INCOMPLETE 484")
  239. cpp_quote("#define STATUS_CODE_AMBIGUOUS 485")
  240. cpp_quote("#define STATUS_CODE_BUSY_HERE 486")
  241. cpp_quote("#define STATUS_CODE_TERMINATED 487")
  242. cpp_quote("#define STATUS_CODE_NOT_ACCEPTABLE_HERE 488")
  243. //Server Failure
  244. cpp_quote("#define STATUS_CODE_SERVER_INTERNAL 500")
  245. cpp_quote("#define STATUS_CODE_NOT_IMPLEMENTED 501")
  246. cpp_quote("#define STATUS_CODE_BAD_GATEWAY 502")
  247. cpp_quote("#define STATUS_CODE_SERVICE_UNAVAILABLE 503")
  248. cpp_quote("#define STATUS_CODE_SERVER_TIMEOUT 504")
  249. cpp_quote("#define STATUS_CODE_VERSION_INCOMPATIBLE 505")
  250. //Global Failure
  251. cpp_quote("#define STATUS_CODE_BUSY_ALL 600")
  252. cpp_quote("#define STATUS_CODE_DECLINE 603")
  253. cpp_quote("#define STATUS_CODE_NONEXIST_ALL 604")
  254. cpp_quote("#define STATUS_CODE_NOT_ACCEPTABLE_ALL 606")
  255. interface ISIPElement;
  256. interface ISIPHeader;
  257. interface IUri;
  258. interface ISIPUrl;
  259. interface ISIPFromToHeader;
  260. interface ISIPContactEntry;
  261. interface ISIPContactEnum;
  262. interface ISIPMessage;
  263. interface ISIPRequest;
  264. interface ISIPResponse;
  265. interface ISIPEvent;
  266. interface ISIPController;
  267. interface ISIPModuleControl;
  268. interface ISIPModuleCallback;
  269. interface IEnumSIPModule;
  270. interface ISIPProxy;
  271. interface ISIPRegistrationDB;
  272. interface ISIPEventLogging;
  273. interface ISIPAuthRequest;
  274. interface ISIPExtensionModulePropertyPages;
  275. interface ISIPSerialize;
  276. /////////////////////////////////////////////////////////////////
  277. // ISIPElement
  278. /////////////////////////////////////////////////////////////////
  279. [
  280. local,
  281. object,
  282. uuid(8eeebdef-acd5-467e-b631-fe5650f065bd),
  283. helpstring("ISIPElement Interface"),
  284. pointer_default(unique)
  285. ]
  286. interface ISIPElement : IUnknown
  287. {
  288. HRESULT GetContentString(
  289. [out] PSTRING pstrContent
  290. );
  291. }
  292. /////////////////////////////////////////////////////////////////
  293. // ISIPHeader
  294. /////////////////////////////////////////////////////////////////
  295. [
  296. local,
  297. object,
  298. uuid(f59970a5-6f54-4269-9b96-416f8d231a85),
  299. helpstring("ISIPHeader Interface"),
  300. pointer_default(unique)
  301. ]
  302. interface ISIPHeader : ISIPElement
  303. {
  304. HRESULT GetHeaderID(
  305. [out] SIPHeaderID * pHeaderID
  306. );
  307. HRESULT GetHeaderNameString(
  308. [out] PSTRING pstrHeaderNameString
  309. );
  310. }
  311. /////////////////////////////////////////////////////////////////
  312. // IUri
  313. /////////////////////////////////////////////////////////////////
  314. [
  315. local,
  316. object,
  317. uuid(3ff9e85e-b735-4384-aff8-0f72d6dad59d),
  318. helpstring("IUri Interface"),
  319. pointer_default(unique)
  320. ]
  321. interface IUri : ISIPElement
  322. {
  323. HRESULT GetURIScheme(
  324. [out] URI_SCHEME * pUriScheme
  325. );
  326. HRESULT GetDisplayName(
  327. [out] PSTRING pstrDisplayName
  328. );
  329. HRESULT GetUser(
  330. [out] PSTRING pstrUser
  331. );
  332. HRESULT GetPassword(
  333. [out] PSTRING pstrPassword
  334. );
  335. HRESULT GetHost(
  336. [out] PSTRING pstrHost
  337. );
  338. HRESULT GetPort(
  339. [out] PSTRING pstrPort
  340. );
  341. //
  342. // Return a NULL-terminated normalized "user@host" string
  343. //
  344. HRESULT GetUserAtHost(
  345. [out] PSTRING pstrUserName
  346. );
  347. }
  348. /////////////////////////////////////////////////////////////////
  349. // ISIPUrl
  350. /////////////////////////////////////////////////////////////////
  351. [
  352. local,
  353. object,
  354. uuid(45af89e5-b0aa-423f-bb54-d623b1505642),
  355. helpstring("ISIPUrl Interface"),
  356. pointer_default(unique)
  357. ]
  358. interface ISIPUrl : IUri
  359. {
  360. HRESULT GetTransport(
  361. [out] PSTRING pstrTransport
  362. );
  363. HRESULT GetUserParam(
  364. [out] PSTRING pstrUserParam
  365. );
  366. HRESULT GetMethod(
  367. [out] PSTRING pstrMethod
  368. );
  369. HRESULT GetTtl(
  370. [out] PSTRING pstrTtl
  371. );
  372. HRESULT GetMaddr(
  373. [out] PSTRING pstrMaddr
  374. );
  375. HRESULT GetHeaders(
  376. [out] PSTRING pstrHeaders
  377. );
  378. }
  379. /////////////////////////////////////////////////////////////////
  380. // ISIPFromToHeader
  381. /////////////////////////////////////////////////////////////////
  382. [
  383. local,
  384. object,
  385. uuid(4fd9e8f8-b6a4-4391-b03b-9d89b8b0a02b),
  386. helpstring("ISIPFromToHeader Interface"),
  387. pointer_default(unique)
  388. ]
  389. interface ISIPFromToHeader : ISIPHeader
  390. {
  391. HRESULT GetUri(
  392. [out] IUri ** ppUri
  393. );
  394. HRESULT GetTag(
  395. [out] STRING * pstrTag
  396. );
  397. }
  398. /////////////////////////////////////////////////////////////////
  399. // ISIPContactEntry
  400. /////////////////////////////////////////////////////////////////
  401. [
  402. local,
  403. object,
  404. uuid(0c64209e-6276-4b95-baee-20e0b0e8332b),
  405. helpstring("ISIPContactEntry Interface"),
  406. pointer_default(unique)
  407. ]
  408. interface ISIPContactEntry : ISIPElement
  409. {
  410. // Is the entry '*' ?
  411. HRESULT IsAll(
  412. [out] BOOL * pbAll
  413. );
  414. HRESULT GetUri(
  415. [out] IUri ** ppUri
  416. );
  417. HRESULT GetAction(
  418. [out] CONTACT_ACTION* pAction
  419. );
  420. HRESULT GetQValue(
  421. [out] DWORD * pdwQValue
  422. );
  423. HRESULT GetExpires(
  424. [out] PSTRING pstrExpires
  425. );
  426. HRESULT SetExpires(
  427. [in] PSTRING pstrExpires
  428. );
  429. HRESULT GetGenericParameter(
  430. [in] PSTRING pstrParamName,
  431. [out] PSTRING pstrParamValue
  432. );
  433. }
  434. /////////////////////////////////////////////////////////////////
  435. // ISIPContactEnum
  436. /////////////////////////////////////////////////////////////////
  437. [
  438. local,
  439. object,
  440. uuid(7b219813-0e07-49d5-b029-289f3de2e12c),
  441. helpstring("ISIPContactEnum Interface"),
  442. pointer_default(unique)
  443. ]
  444. interface ISIPContactEnum : IUnknown
  445. {
  446. HRESULT Next(
  447. [out] ISIPContactEntry ** ppContactEntry
  448. );
  449. HRESULT Reset();
  450. HRESULT Clone(
  451. [out] ISIPContactEnum ** ppTwinContactEnum
  452. );
  453. }
  454. /////////////////////////////////////////////////////////////////
  455. // ISIPMessage
  456. /////////////////////////////////////////////////////////////////
  457. [
  458. local,
  459. object,
  460. uuid(48F2C19C-CB7A-4231-82EB-A6B5EC0A250A),
  461. helpstring("ISIPMessage Interface"),
  462. pointer_default(unique)
  463. ]
  464. interface ISIPMessage : IUnknown
  465. {
  466. HRESULT IsIncomingMessage(
  467. [out, retval] BOOL * pbIncomingMessage
  468. );
  469. HRESULT GetSipVersion(
  470. [out] PSTRING pstrSipVersion
  471. );
  472. // Generic header interface
  473. HRESULT GetHeader(
  474. [in] SIPHeaderID headerID,
  475. [out, retval] ISIPHeader ** ppSipHeader
  476. );
  477. // Get the next SIP header of the same header type
  478. HRESULT GetNextHeader(
  479. [in] ISIPHeader * pSipHeader,
  480. [out, retval] ISIPHeader ** ppNextSipHeader
  481. );
  482. //
  483. // They will be put ahead of the existing headers
  484. //
  485. HRESULT AddHeader(
  486. [in] SIPHeaderID headerID,
  487. [in] PSTRING pstrBuffer
  488. );
  489. HRESULT DeleteHeader(
  490. [in] ISIPHeader * pSipHeader
  491. );
  492. // Body interface
  493. HRESULT GetBody(
  494. [out] PSTRING pstrBody
  495. );
  496. HRESULT SetBody(
  497. [in] PSTRING pstrBody
  498. );
  499. HRESULT GetContactEnum(
  500. [out, retval] ISIPContactEnum ** ppContactEnum
  501. );
  502. HRESULT Discard();
  503. // Only used for locally generated message
  504. HRESULT Send();
  505. //
  506. // functions for manipulating message context
  507. //
  508. HRESULT SetMessageContext([in] IUnknown *pMessageContext);
  509. HRESULT GetMessageContext([out] IUnknown **ppMessageContext);
  510. }
  511. /////////////////////////////////////////////////////////////////
  512. // ISIPRequest
  513. /////////////////////////////////////////////////////////////////
  514. [
  515. local,
  516. object,
  517. uuid(BB3BCA24-CD24-401c-9B0F-1223C13AEF57),
  518. helpstring("ISIPRequest Interface"),
  519. pointer_default(unique)
  520. ]
  521. interface ISIPRequest : ISIPMessage
  522. {
  523. // Start line interface
  524. HRESULT GetMethod(
  525. [out] PSTRING pstrMethod
  526. );
  527. HRESULT GetRequestURI(
  528. [out] IUri ** ppSipRequestUri
  529. );
  530. //
  531. // Authentication
  532. //
  533. HRESULT GetAuthenticationInfo(
  534. [out] ISIPAuthRequest** ppAuthentication
  535. );
  536. //
  537. // Proxy Request Info will be used to reconstruct this
  538. // request to be forwarded
  539. //
  540. HRESULT GetProxyRequestInfo(
  541. [out] IUnknown ** ppProxyRequestInfo
  542. );
  543. // A routing method
  544. // only valid for routing-processing E.M.
  545. HRESULT SetRequestURI(
  546. [in] IUri * pSipRequestUri
  547. );
  548. // Reply with the default Reason Phrase
  549. HRESULT Reply(
  550. [in] DWORD dwStatusCode
  551. );
  552. // Create a request with those typical headers from the current request
  553. HRESULT CreateTypicalRequest(
  554. [in] PSTRING pstrMethod,
  555. [in] IUri * pSipRequestUri,
  556. [in] IUnknown * pProxyRequestInfo,
  557. [out] ISIPRequest ** ppNewRequest
  558. );
  559. HRESULT CreateTypicalResponse(
  560. [in] DWORD dwStatusCode,
  561. [in] PSTRING pstrReasonPhrase,
  562. [out] ISIPResponse ** ppSipResponse
  563. );
  564. // Instruct the proxy to add a record route header
  565. // for this request...
  566. HRESULT AddRecordRoute();
  567. }
  568. /////////////////////////////////////////////////////////////////
  569. // ISIPAuthRequest
  570. /////////////////////////////////////////////////////////////////
  571. [
  572. local,
  573. object,
  574. uuid(6D63F6AD-92B0-4cc0-B600-672773B81261),
  575. helpstring("ISIPAuthRequest Interface"),
  576. pointer_default(unique)
  577. ]
  578. interface ISIPAuthRequest : IUnknown
  579. {
  580. HRESULT GetProtocol(
  581. [out] SIP_AUTH_PACKAGEID* psaPackageID
  582. );
  583. HRESULT GetUser(
  584. [out] PSTRING pstrUser
  585. );
  586. HRESULT GetSecurityHandle(
  587. [out] HANDLE* pSecHandle
  588. );
  589. HRESULT GetDelegatable(
  590. [out] BOOL* pDelegatable
  591. );
  592. HRESULT Authenticate(
  593. [in] DWORD dwPackages
  594. );
  595. }
  596. /////////////////////////////////////////////////////////////////
  597. // ISIPResponse
  598. /////////////////////////////////////////////////////////////////
  599. [
  600. local,
  601. object,
  602. uuid(C2B69E61-52C1-4c9d-A86F-1AD115AF219B),
  603. helpstring("ISIPResponse Interface"),
  604. pointer_default(unique)
  605. ]
  606. interface ISIPResponse : ISIPMessage
  607. {
  608. // Start line interface
  609. HRESULT GetStatusCode(
  610. [out] DWORD * pdwStatusCode
  611. );
  612. HRESULT GetReasonPhrase(
  613. [out] PSTRING pstrReasonPhrase
  614. );
  615. }
  616. /////////////////////////////////////////////////////////////////
  617. // ISIPEvent
  618. /////////////////////////////////////////////////////////////////
  619. [
  620. local,
  621. object,
  622. uuid(9f35f2f6-2a3d-465a-94e8-452b049a88d7),
  623. helpstring("ISIPEvent Interface"),
  624. pointer_default(unique)
  625. ]
  626. interface ISIPEvent : IUnknown
  627. {
  628. HRESULT GetMessage(
  629. [out] ISIPMessage ** ppSipMessage
  630. );
  631. HRESULT GetStateEvents(
  632. [out] SIPTransactionEvent *pTransactionEvent,
  633. [out] SIPDialogEvent *pDialogEvent
  634. );
  635. HRESULT GetRegistrationContext(
  636. [in] SIPRegistrationType enRegistrationContext,
  637. [out] IUnknown ** ppRegistrationContext
  638. );
  639. //
  640. // The Extension module maintains its context
  641. // by these Set/Get methods
  642. //
  643. HRESULT SetStateContext(
  644. [in] SIPEventType enSessionType,
  645. [in] IUnknown * pEventContext
  646. );
  647. HRESULT GetStateContext(
  648. [in] SIPEventType enSessionType,
  649. [out] IUnknown ** ppEventContext
  650. );
  651. HRESULT CompleteProcessing();
  652. }
  653. /////////////////////////////////////////////////////////////////
  654. // ISIPController
  655. /////////////////////////////////////////////////////////////////
  656. [
  657. local,
  658. object,
  659. uuid(f2d8cbbb-aa79-4577-a4b6-d6e78d243c7d),
  660. helpstring("ISIPController Interface"),
  661. pointer_default(unique)
  662. ]
  663. interface ISIPController : IUnknown
  664. {
  665. //
  666. // event handler
  667. //
  668. HRESULT OnError(
  669. [in] SIP_HANDLE hModuleHandle,
  670. [in] HRESULT hrError,
  671. [in] DWORD Reserved,
  672. [in,unique,string]
  673. LPWSTR szErrorDescription);
  674. //
  675. // method used by extension modules to get private interfaces on other extension modules
  676. //
  677. HRESULT GetModule(
  678. [in] SIP_HANDLE hModuleHandle,
  679. [in] CLSID *pProvidingEMClassID,
  680. [in] SIP_MODULE_TYPE ProvidingEMType,
  681. [in] IID *pRequestedInterface,
  682. [out] IUnknown **ppIUnknown
  683. );
  684. }
  685. /////////////////////////////////////////////////////////////////
  686. // ISIPModuleControl
  687. /////////////////////////////////////////////////////////////////
  688. [
  689. local,
  690. object,
  691. uuid(A1ED44F2-39DE-4d51-B252-25CF6071FABF),
  692. helpstring("ISIPModuleControl Interface"),
  693. pointer_default(unique)
  694. ]
  695. interface ISIPModuleControl : IUnknown
  696. {
  697. //
  698. // Lifetime control
  699. //
  700. HRESULT Initialize(
  701. [in] ISIPController * pController,
  702. [in] ISIPProxy * pSIPProxy,
  703. [in] ISIPEventLogging * pEventLogging,
  704. [in] SIP_MODULE_TYPE ModuleType,
  705. [in] SIP_HANDLE hModuleHandle,
  706. [out] ISIPRegistrationDB ** ppISIPRegistrationDB
  707. );
  708. HRESULT Shutdown();
  709. //
  710. // service control
  711. //
  712. HRESULT Start();
  713. HRESULT Stop();
  714. //
  715. // Communication between extension modules
  716. //
  717. HRESULT GetPrivateInterface(
  718. [in] CLSID * pRequestingEM,
  719. [in] IID * pRequestedInterface,
  720. [out] IUnknown ** ppIUnknown
  721. );
  722. }
  723. /////////////////////////////////////////////////////////////////
  724. // ISIPModuleCallback
  725. /////////////////////////////////////////////////////////////////
  726. [
  727. local,
  728. object,
  729. uuid(4c14b478-67d6-4677-b456-4096c2edd36b),
  730. helpstring("ISIPModuleCallback Interface"),
  731. pointer_default(unique)
  732. ]
  733. interface ISIPModuleCallback : IUnknown
  734. {
  735. HRESULT OnEvent(
  736. [in] ISIPEvent * pSipEvent
  737. );
  738. }
  739. /////////////////////////////////////////////////////////////////
  740. // ISIPExtensionModulePropertyPages
  741. /////////////////////////////////////////////////////////////////
  742. [
  743. object,
  744. uuid(1184A566-9CD8-487e-8B27-6F1D687A8E1F),
  745. dual,
  746. helpstring("ISIPExtensionModulePropertyPages Interface"),
  747. pointer_default(unique)
  748. ]
  749. interface ISIPExtensionModulePropertyPages : ISpecifyPropertyPages
  750. {
  751. HRESULT SetInstance(
  752. [in] IWbemClassObject *pInstance
  753. );
  754. HRESULT GetTitle(
  755. [out] BSTR *pbstrTitle
  756. );
  757. };
  758. /////////////////////////////////////////////////////////////////
  759. // ISIPAdminCredentials
  760. /////////////////////////////////////////////////////////////////
  761. [
  762. object,
  763. uuid(1A9683B4-BA07-4d94-B384-E54E645121FA),
  764. dual,
  765. helpstring("ISIPAdminCredentials Interface"),
  766. pointer_default(unique)
  767. ]
  768. interface ISIPAdminCredentials : IUnknown
  769. {
  770. HRESULT putMachineName(
  771. [in] const LPCWSTR pwszMachineName
  772. );
  773. HRESULT putUserName(
  774. [in] const LPCWSTR pwszUserName
  775. );
  776. HRESULT putPassword(
  777. [in] const LPCWSTR pwszPassword
  778. );
  779. HRESULT getMachineName(
  780. [out] BSTR *pbstrMachineName
  781. );
  782. HRESULT getUserName(
  783. [out] BSTR *pbstrUserName
  784. );
  785. HRESULT getPassword(
  786. [out] BSTR *pbstrPassword
  787. );
  788. };
  789. /////////////////////////////////////////////////////////////////
  790. // ISIPCreateExtensionModule
  791. /////////////////////////////////////////////////////////////////
  792. [
  793. object,
  794. uuid(0F926CF4-C18A-47de-8F2A-532349D8C83B),
  795. dual,
  796. helpstring("ISIPCreateExtensionModule Interface"),
  797. pointer_default(unique)
  798. ]
  799. interface ISIPCreateExtensionModule : IUnknown
  800. {
  801. HRESULT CreateNewExtensionModuleInstance(
  802. [in] IWbemServices *pIService,
  803. [out] IWbemClassObject **ppIClassObject
  804. );
  805. };
  806. /////////////////////////////////////////////////////////////////
  807. // ISIPRegistrationDB
  808. /////////////////////////////////////////////////////////////////
  809. [
  810. local,
  811. object,
  812. uuid(97b805b8-812e-4eda-adbd-7a003f047cc3),
  813. helpstring("ISIPRegistrationDB Interface"),
  814. pointer_default(unique)
  815. ]
  816. interface ISIPRegistrationDB : IUnknown
  817. {
  818. HRESULT IsDomainSupported(
  819. [in] PSTRING pstrDomain,
  820. [out] BOOL * pbSupported
  821. );
  822. HRESULT GetAllContacts(
  823. [in] PSTRING pstrUserAtHost,
  824. [in] PSTRING pstrMethod,
  825. [in] BOOL bMethodsOnly,
  826. [out] SAFEARRAY(ISIPContactEntry*) * ppsaContacts
  827. );
  828. HRESULT GetPreferredContact(
  829. [in] PSTRING strUserAtHost,
  830. [in] PSTRING pstrMethod,
  831. [in] BOOL bMethodsOnly,
  832. [out] ISIPContactEntry ** ppContactEntry
  833. );
  834. }
  835. /////////////////////////////////////////////////////////////////
  836. // ISIPProxy
  837. /////////////////////////////////////////////////////////////////
  838. [
  839. local,
  840. object,
  841. uuid(FA9C6B4E-E338-4D14-B5D2-9EF95EA0A4C4),
  842. helpstring("ISIPProxy Interface"),
  843. pointer_default(unique)
  844. ]
  845. interface ISIPProxy : IUnknown
  846. {
  847. HRESULT CreateRequest(
  848. [in] SIP_HANDLE hModuleHandle,
  849. [in] PSTRING pstrMethod,
  850. [in] IUri * pUri,
  851. [in] PSTRING pstrFromHeaderContent,
  852. [in] PSTRING pstrToHeaderContent,
  853. [in] PSTRING pstrCallIDHeaderContent,
  854. [in] PSTRING pstrCSeqHeaderContent,
  855. [in] IUnknown * pProxyRequestInfo,
  856. [out] ISIPRequest ** ppRequest
  857. );
  858. HRESULT CreateRequestEx(
  859. [in] SIP_HANDLE hModuleHandle,
  860. [in] PSTRING pstrMethod,
  861. [in] ISIPContactEntry * pContact,
  862. [in] PSTRING pstrFromHeaderContent,
  863. [in] PSTRING pstrToHeaderContent,
  864. [in] PSTRING pstrCallIDHeaderContent,
  865. [in] PSTRING pstrCSeqHeaderContent,
  866. [in] IUnknown * pProxyRequestInfo,
  867. [out] ISIPRequest ** ppRequest
  868. );
  869. HRESULT CreateProxyRequestInfoObject(
  870. [out] IUnknown ** ppProxyRequestInfo
  871. );
  872. HRESULT CreateUri(
  873. [in] URI_SCHEME uriScheme,
  874. [in] PSTRING pstrDisplayName,
  875. [in] PSTRING pstrUriString,
  876. [out] IUri ** ppUri
  877. );
  878. HRESULT GetHeaderID(
  879. [in] PSTRING pstrHeaderName,
  880. [out] SIPHeaderID * pHeaderID
  881. );
  882. HRESULT GetHeaderName(
  883. [in] SIPHeaderID headerID,
  884. [out] PSTRING pstrHeaderName
  885. );
  886. HRESULT GetRegistrationDB(
  887. [out] ISIPRegistrationDB ** ppRegistrationDB
  888. );
  889. HRESULT RegisterURI(
  890. [in] SIP_HANDLE hModuleHandle,
  891. [in] IUri * pSipRequestURI,
  892. // this must be "INVITE" if session types includes SIP_REGISTRATION_DIALOG_EVENTS
  893. [in] PSTRING pstrMethod,
  894. [in] DWORD dwSessionTypes, // or'ed SIPRegistrationType values
  895. [in] IUnknown *punkRegistrationContext // the context that
  896. // the module wants
  897. // to associate with
  898. // the uri pattern
  899. // requested in IUri
  900. );
  901. HRESULT DeregisterURI(
  902. [in] SIP_HANDLE hModuleHandle,
  903. [in] IUri * pSipRequestUri
  904. );
  905. HRESULT FindRegistrationContext(
  906. [in] SIP_HANDLE hModuleHandle,
  907. [in] STRING *pstrMethod,
  908. [in] SIPRegistrationType enRegistrationType,
  909. [in] IUri *pURI,
  910. [out] IUnknown **ppUnkRegistrationContext
  911. );
  912. }
  913. /////////////////////////////////////////////////////////////////
  914. // ISIPEventLogging
  915. /////////////////////////////////////////////////////////////////
  916. [
  917. object,
  918. uuid(834673F0-3076-427a-9D1E-3E3768E6AF5C),
  919. helpstring("Event Logging"),
  920. pointer_default(unique)
  921. ]
  922. interface ISIPEventLogging : IUnknown
  923. {
  924. // ReportEvent methods should be called
  925. // only between RegisterEventSource and DeregisterEventSource
  926. HRESULT ReportEvent(
  927. [in] WORD wType,
  928. // Event type such as EVENTLOG_ERROR_TYPE
  929. [in] WORD wCategory,
  930. // Event category
  931. [in] DWORD dwEventID
  932. // The event ID
  933. );
  934. HRESULT ReportEventBLOB(
  935. [in] WORD wType,
  936. // Event type such as EVENTLOG_ERROR_TYPE
  937. [in] WORD wCategory,
  938. // Event category
  939. [in] DWORD dwEventID,
  940. // The event ID
  941. [in] WORD wNumStrings,
  942. // number of insertion strings
  943. [in,size_is(wNumStrings)] LPCWSTR *lpStrings,
  944. // Array of insertion strings (for %1 etc)
  945. [in] DWORD dwDataSize,
  946. // Size of binary data in bytes
  947. [in,size_is(dwDataSize)] const BYTE *lpRawData
  948. // Custom binary data buffer that will be attached to the event
  949. );
  950. };
  951. /////////////////////////////////////////////////////////////////
  952. // ISIPSerialize
  953. /////////////////////////////////////////////////////////////////
  954. [
  955. object,
  956. uuid(de680840-d7b3-427a-9d00-9d4a45ff9b8c),
  957. helpstring("Serializing"),
  958. pointer_default(unique)
  959. ]
  960. interface ISIPSerialize : IUnknown
  961. {
  962. HRESULT Store(
  963. [out] DWORD * pdwBufferSize,
  964. [out,size_is(, *pdwBufferSize)] BYTE ** ppbBuffer
  965. );
  966. HRESULT Restore(
  967. [in] const DWORD dwBufferSize,
  968. [in,size_is(dwBufferSize)] const BYTE * pbBuffer
  969. );
  970. };