napprotocol.idl 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /**
  2. * This file is part of the mingw-w64 runtime package.
  3. * No warranty is given; refer to the file DISCLAIMER within this package.
  4. */
  5. import "naptypes.idl";
  6. import "unknwn.idl";
  7. cpp_quote("#include <winapifamily.h>")
  8. cpp_quote("")
  9. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  10. [pointer_default (unique)]
  11. interface INapSoHTypes {
  12. typedef enum tagSoHAttributeType {
  13. sohAttributeTypeSystemHealthId = 2,
  14. sohAttributeTypeIpv4FixupServers = 3,
  15. sohAttributeTypeComplianceResultCodes = 4,
  16. sohAttributeTypeTimeOfLastUpdate = 5,
  17. sohAttributeTypeClientId = 6,
  18. sohAttributeTypeVendorSpecific = 7,
  19. sohAttributeTypeHealthClass = 8,
  20. sohAttributeTypeSoftwareVersion = 9,
  21. sohAttributeTypeProductName = 10,
  22. sohAttributeTypeHealthClassStatus = 11,
  23. sohAttributeTypeSoHGenerationTime = 12,
  24. sohAttributeTypeErrorCodes = 13,
  25. sohAttributeTypeFailureCategory = 14,
  26. sohAttributeTypeIpv6FixupServers = 15,
  27. sohAttributeTypeExtendedIsolationState = 16
  28. } SoHAttributeType;
  29. typedef enum tagHealthClassValue {
  30. healthClassFirewall = 0,
  31. healthClassPatchLevel = 1,
  32. healthClassAntiVirus = 2,
  33. healthClassCriticalUpdate = 3,
  34. healthClassReserved = 128
  35. } HealthClassValue;
  36. typedef [switch_type (SoHAttributeType)] union tagSoHAttributeValue {
  37. [case (sohAttributeTypeSystemHealthId)] SystemHealthEntityId idVal;
  38. [case (sohAttributeTypeIpv4FixupServers)] struct tagIpv4Addresses {
  39. [range (1, maxIpv4CountPerSoHAttribute)] UINT16 count;
  40. [size_is (count)] Ipv4Address *addresses;
  41. } v4AddressesVal;
  42. [case (sohAttributeTypeIpv6FixupServers)] struct tagIpv6Addresses {
  43. [range (1, maxIpv6CountPerSoHAttribute)] UINT16 count;
  44. [size_is (count)] Ipv6Address *addresses;
  45. } v6AddressesVal;
  46. [case (sohAttributeTypeComplianceResultCodes, sohAttributeTypeErrorCodes)] ResultCodes codesVal;
  47. [case (sohAttributeTypeTimeOfLastUpdate, sohAttributeTypeSoHGenerationTime)] FILETIME dateTimeVal;
  48. [case (sohAttributeTypeVendorSpecific)] struct tagVendorSpecific {
  49. UINT32 vendorId;
  50. [range (0, maxSoHAttributeSize - 4)] UINT16 size;
  51. [size_is (size)] BYTE *vendorSpecificData;
  52. } vendorSpecificVal;
  53. [case (sohAttributeTypeHealthClass, sohAttributeTypeFailureCategory, sohAttributeTypeExtendedIsolationState)] UINT8 uint8Val;
  54. [default] struct tagOctetString {
  55. [range (0, maxSoHAttributeSize)] UINT16 size;
  56. [size_is (size)] BYTE *data;
  57. } octetStringVal;
  58. } SoHAttributeValue;
  59. };
  60. [object, uuid (35298344-96a6-45e7-9b6b-62ecc6e09920), pointer_default (unique)]
  61. interface INapSoHConstructor : IUnknown {
  62. HRESULT Initialize ([in] SystemHealthEntityId id,[in] BOOL isRequest);
  63. HRESULT AppendAttribute ([in] SoHAttributeType type,[in, switch_is (type)] const SoHAttributeValue *value);
  64. HRESULT GetSoH ([out] SoH **soh);
  65. HRESULT Validate ([in] const SoH *soh,[in] BOOL isRequest);
  66. };
  67. [object, uuid (FB2FA8B0-2cd5-457d-ABA8-4376f63ea1c0), pointer_default (unique)]
  68. interface INapSoHProcessor : IUnknown {
  69. HRESULT Initialize ([in] const SoH *soh,[in] BOOL isRequest,[out] SystemHealthEntityId *id);
  70. HRESULT FindNextAttribute ([in] UINT16 fromLocation,[in] SoHAttributeType type,[out] UINT16 *attributeLocation);
  71. HRESULT GetAttribute ([in] UINT16 attributeLocation,[out] SoHAttributeType *type,[out, switch_is (*type)] SoHAttributeValue **value);
  72. HRESULT GetNumberOfAttributes ([out] UINT16 *attributeCount);
  73. };
  74. cpp_quote("EXTERN_C const CLSID CLSID_NapSoHConstructor;")
  75. cpp_quote("EXTERN_C const CLSID CLSID_NapSoHProcessor;")
  76. cpp_quote("#endif")