naptypes.idl 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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 "oaidl.idl";
  6. import "ocidl.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 INapTypes {
  12. const UINT8 freshSoHRequest = 0x1;
  13. const UINT8 shaFixup = 0x1;
  14. const UINT8 percentageNotSupported = 101;
  15. const UINT16 maxSoHAttributeCount = 100;
  16. const UINT16 maxSoHAttributeSize = 4000;
  17. const UINT16 minNetworkSoHSize = 12;
  18. const UINT16 maxNetworkSoHSize = 4000;
  19. const UINT16 maxDwordCountPerSoHAttribute = maxSoHAttributeSize / sizeof (DWORD);
  20. const UINT16 maxIpv4CountPerSoHAttribute = maxSoHAttributeSize / 4;
  21. const UINT16 maxIpv6CountPerSoHAttribute = maxSoHAttributeSize / 16;
  22. const UINT16 maxStringLength = 1024;
  23. const UINT16 maxStringLengthInBytes = (maxStringLength + 1) * sizeof (WCHAR);
  24. const UINT16 maxSystemHealthEntityCount = 20;
  25. const UINT16 maxEnforcerCount = 20;
  26. const UINT16 maxPrivateDataSize = 200;
  27. const UINT16 maxConnectionCountPerEnforcer = 20;
  28. const UINT16 maxCachedSoHCount = maxSystemHealthEntityCount * maxEnforcerCount * maxConnectionCountPerEnforcer;
  29. const UINT16 failureCategoryCount = 5;
  30. const UINT32 ComponentTypeEnforcementClientSoH = 0x1;
  31. const UINT32 ComponentTypeEnforcementClientRp = 0x2;
  32. typedef enum tagIsolationState {
  33. isolationStateNotRestricted = 1,
  34. isolationStateInProbation = 2,
  35. isolationStateRestrictedAccess = 3
  36. } IsolationState;
  37. typedef enum tagExtendedIsolationState {
  38. extendedIsolationStateNoData = 0x0,
  39. extendedIsolationStateTransition = 0x1,
  40. extendedIsolationStateInfected = 0x2,
  41. extendedIsolationStateUnknown = 0x3
  42. } ExtendedIsolationState;
  43. typedef enum tagNapTracingLevel {
  44. tracingLevelUndefined = 0,
  45. tracingLevelBasic = 1,
  46. tracingLevelAdvanced = 2,
  47. tracingLevelDebug = 3
  48. } NapTracingLevel;
  49. typedef enum tagFailureCategory {
  50. failureCategoryNone = 0,
  51. failureCategoryOther = 1,
  52. failureCategoryClientComponent = 2,
  53. failureCategoryClientCommunication = 3,
  54. failureCategoryServerComponent = 4,
  55. failureCategoryServerCommunication = 5
  56. } FailureCategory;
  57. typedef enum tagFixupState {
  58. fixupStateSuccess = 0,
  59. fixupStateInProgress = 1,
  60. fixupStateCouldNotUpdate = 2
  61. } FixupState;
  62. typedef enum tagNapNotifyType {
  63. napNotifyTypeUnknown = 0,
  64. napNotifyTypeServiceState = 1,
  65. napNotifyTypeQuarState = 2
  66. } NapNotifyType;
  67. typedef enum tagRemoteConfigurationType {
  68. remoteConfigTypeMachine = 1,
  69. remoteConfigTypeConfigBlob
  70. } RemoteConfigurationType;
  71. typedef FILETIME ProbationTime;
  72. typedef UINT32 MessageId;
  73. typedef UINT32 NapComponentId;
  74. typedef NapComponentId SystemHealthEntityId;
  75. typedef NapComponentId EnforcementEntityId;
  76. typedef struct tagCountedString {
  77. UINT16 length;
  78. [size_is (length + 1), string] WCHAR *string;
  79. } CountedString;
  80. typedef CountedString StringCorrelationId;
  81. typedef struct tagIsolationInfo {
  82. IsolationState isolationState;
  83. ProbationTime probEndTime;
  84. CountedString failureUrl;
  85. } IsolationInfo;
  86. typedef struct tagIsolationInfoEx {
  87. IsolationState isolationState;
  88. ExtendedIsolationState extendedIsolationState;
  89. ProbationTime probEndTime;
  90. CountedString failureUrl;
  91. } IsolationInfoEx;
  92. typedef struct tagFailureCategoryMapping {
  93. BOOL mappingCompliance[failureCategoryCount];
  94. } FailureCategoryMapping;
  95. typedef [range (0, maxSystemHealthEntityCount)] UINT16 SystemHealthEntityCount;
  96. typedef [range (0, maxEnforcerCount)] UINT16 EnforcementEntityCount;
  97. typedef struct tagCorrelationId {
  98. GUID connId;
  99. FILETIME timeStamp;
  100. } CorrelationId;
  101. typedef GUID ConnectionId;
  102. typedef [range (0, percentageNotSupported)] UINT8 Percentage;
  103. typedef struct tagResultCodes {
  104. [range (0, maxDwordCountPerSoHAttribute)] UINT16 count;
  105. [size_is (count)] HRESULT *results;
  106. } ResultCodes;
  107. typedef struct tagIpv4Address {
  108. BYTE addr[4];
  109. } Ipv4Address;
  110. typedef struct tagIpv6Address {
  111. BYTE addr[16];
  112. } Ipv6Address;
  113. typedef struct tagFixupInfo {
  114. FixupState state;
  115. Percentage percentage;
  116. ResultCodes resultCodes;
  117. MessageId fixupMsgId;
  118. } FixupInfo;
  119. typedef struct tagSystemHealthAgentState {
  120. SystemHealthEntityId id;
  121. ResultCodes shaResultCodes;
  122. FailureCategory failureCategory;
  123. FixupInfo fixupInfo;
  124. } SystemHealthAgentState;
  125. typedef struct tagSoHAttribute {
  126. UINT16 type;
  127. [range (0, maxSoHAttributeSize)] UINT16 size;
  128. [size_is (size)] BYTE *value;
  129. } SoHAttribute;
  130. typedef struct tagSoH {
  131. [range (0, maxSoHAttributeCount)] UINT16 count;
  132. [size_is (count)] SoHAttribute *attributes;
  133. } SoH, SoHRequest, SoHResponse;
  134. typedef struct tagNetworkSoH {
  135. [range (minNetworkSoHSize, maxNetworkSoHSize)] UINT16 size;
  136. [size_is (size)] BYTE *data;
  137. } NetworkSoH, NetworkSoHRequest, NetworkSoHResponse;
  138. typedef struct tagPrivateData {
  139. [range (0, maxPrivateDataSize)] UINT16 size;
  140. [size_is (size)] BYTE *data;
  141. } PrivateData;
  142. typedef struct tagNapComponentRegistrationInfo {
  143. NapComponentId id;
  144. CountedString friendlyName;
  145. CountedString description;
  146. CountedString version;
  147. CountedString vendorName;
  148. CLSID infoClsid;
  149. CLSID configClsid;
  150. FILETIME registrationDate;
  151. UINT32 componentType;
  152. } NapComponentRegistrationInfo;
  153. };
  154. cpp_quote("#endif")