Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

183 lines
4.3 KiB

  1. [
  2. uuid(4b112204-0e19-11d3-b42b-0000f81feb9f),
  3. version(1.0),
  4. pointer_default(unique)
  5. ]
  6. interface ssdpsrv
  7. {
  8. import "wtypes.idl";
  9. #define SSDP_SERVICE_PERSISTENT 0x00000001
  10. cpp_quote("#define SSDP_SERVICE_PERSISTENT 0x00000001")
  11. #define NUM_OF_HEADERS 19
  12. cpp_quote("#define NUM_OF_HEADERS 19")
  13. #define NUM_OF_METHODS 4
  14. cpp_quote("#define NUM_OF_METHODS 4")
  15. typedef enum _NOTIFY_TYPE {
  16. NOTIFY_ALIVE,
  17. NOTIFY_PROP_CHANGE
  18. } NOTIFY_TYPE;
  19. // make sure values matches array index to SsdpMethodStr in ssdp.idl
  20. typedef enum _SSDP_METHOD {
  21. SSDP_NOTIFY = 0,
  22. SSDP_M_SEARCH = 1,
  23. GENA_SUBSCRIBE = 2,
  24. GENA_UNSUBSCRIBE =3,
  25. SSDP_INVALID = 4 // Must be qual to NUM_OF_METHODS
  26. } SSDP_METHOD, *PSSDP_METHOD;
  27. // make sure values matches array index to SsdpHeaderStr in ssdp.idl
  28. typedef enum _SSDP_HEADER {
  29. SSDP_HOST = 0,
  30. SSDP_NT,
  31. SSDP_NTS,
  32. SSDP_ST,
  33. SSDP_MAN,
  34. SSDP_MX,
  35. SSDP_LOCATION,
  36. SSDP_AL,
  37. SSDP_USN,
  38. SSDP_CACHECONTROL,
  39. GENA_CALLBACK,
  40. GENA_TIMEOUT,
  41. GENA_SCOPE,
  42. GENA_SID,
  43. GENA_SEQ,
  44. CONTENT_LENGTH,
  45. CONTENT_TYPE,
  46. SSDP_SERVER,
  47. SSDP_EXT,
  48. } SSDP_HEADER, *PSSDP_HEADER;
  49. typedef [string] LPSTR MIDL_SZ;
  50. typedef struct _SSDP_REQUEST {
  51. SSDP_METHOD Method;
  52. [string] LPSTR RequestUri;
  53. MIDL_SZ Headers[NUM_OF_HEADERS];
  54. [string] LPSTR ContentType;
  55. [string] LPSTR Content;
  56. GUID guidInterface;
  57. } SSDP_REQUEST, *PSSDP_REQUEST;
  58. typedef struct _SSDP_MESSAGE{
  59. // Message type
  60. [string] LPSTR szType;
  61. // location header
  62. [string] LPSTR szLocHeader;
  63. // alt location headers
  64. [string] LPSTR szAltHeaders;
  65. // unique service name
  66. [string] LPSTR szUSN;
  67. // Subscription identifier
  68. [string] LPSTR szSid;
  69. // sequence # for event notifications
  70. DWORD iSeq;
  71. // cache interval
  72. UINT iLifeTime;
  73. // optional content body
  74. [string] LPSTR szContent;
  75. // network interface on which received
  76. GUID guidInterface;
  77. } SSDP_MESSAGE, *PSSDP_MESSAGE;
  78. typedef struct _SSDP_REGISTER_INFO
  79. {
  80. [string] LPSTR szSid;
  81. DWORD csecTimeout;
  82. } SSDP_REGISTER_INFO;
  83. typedef struct _MessageList {
  84. long size;
  85. [size_is(size)] SSDP_REQUEST *list;
  86. } MessageList;
  87. typedef enum _UPNP_PROPERTY_FLAG {
  88. UPF_NON_EVENTED = 0x00000001,
  89. } UPNP_PROPERTY_FLAG;
  90. typedef struct _UPNP_PROPERTY {
  91. // property name
  92. [string] LPSTR szName;
  93. DWORD dwFlags;
  94. // property value
  95. [string] LPSTR szValue;
  96. } UPNP_PROPERTY;
  97. typedef struct _SUBSCRIBER_INFO {
  98. [string] LPSTR szDestUrl;
  99. FILETIME ftTimeout;
  100. DWORD csecTimeout;
  101. DWORD iSeq;
  102. [string] LPSTR szSid;
  103. } SUBSCRIBER_INFO;
  104. typedef struct _EVTSRC_INFO {
  105. DWORD cSubs;
  106. [size_is(cSubs)] SUBSCRIBER_INFO *rgSubs;
  107. } EVTSRC_INFO;
  108. typedef [context_handle] void *PCONTEXT_HANDLE_TYPE;
  109. typedef [context_handle] void *PSYNC_HANDLE_TYPE;
  110. // Publication
  111. int RegisterServiceRpc([out] PCONTEXT_HANDLE_TYPE *pphContext, [in] SSDP_MESSAGE svc, [in] DWORD flags);
  112. int DeregisterServiceRpcByUSN([in, string] LPSTR szUSN, [in] BOOL fByebye);
  113. int DeregisterServiceRpc([in, out] PCONTEXT_HANDLE_TYPE *pphContext, [in] BOOL fByebye);
  114. // Cache
  115. void UpdateCacheRpc([in, unique] PSSDP_REQUEST SsdpRequest);
  116. int LookupCacheRpc([in, string] LPSTR szType, [out] MessageList **svcList);
  117. void CleanupCacheRpc();
  118. // Notification
  119. // Initialize the synchronization handle
  120. int InitializeSyncHandle([out] PSYNC_HANDLE_TYPE *pphContextSync);
  121. void RemoveSyncHandle( [in, out] PSYNC_HANDLE_TYPE *pphContextSync);
  122. int RegisterNotificationRpc(
  123. [out] PCONTEXT_HANDLE_TYPE *pphContext,
  124. [in] PSYNC_HANDLE_TYPE phContextSync,
  125. [in] NOTIFY_TYPE nt,
  126. [in, unique, string] LPSTR szType,
  127. [in, unique, string] LPSTR szEventUrl,
  128. [out] SSDP_REGISTER_INFO **ppinfo);
  129. int GetNotificationRpc([in] PSYNC_HANDLE_TYPE pphContextSync, [out] MessageList **svcList);
  130. int WakeupGetNotificationRpc([in] PSYNC_HANDLE_TYPE pphContextSync);
  131. int DeregisterNotificationRpc([in, out] PCONTEXT_HANDLE_TYPE *pphContext, [in] BOOL fLast);
  132. // Device Host ICS Support
  133. void EnableDeviceHost();
  134. void DisableDeviceHost();
  135. void SetICSInterfaces([in] long nCount, [in, size_is(nCount)] GUID * arInterfaces);
  136. void SetICSOff();
  137. }