msopc.idl 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  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. import "urlmon.idl";
  8. import "wincrypt.idl";
  9. cpp_quote("#include <winapifamily.h>")
  10. cpp_quote("#if NTDDI_VERSION >= 0x06010000")
  11. interface IOpcUri;
  12. interface IOpcPartUri;
  13. [object, uuid (bc9c1b9b-d62c-49eb-aef0-3b4e0b28ebed), nonextensible, pointer_default (ref)]
  14. interface IOpcUri : IUri {
  15. HRESULT GetRelationshipsPartUri ([out, retval] IOpcPartUri **relationshipPartUri);
  16. HRESULT GetRelativeUri ([in] IOpcPartUri *targetPartUri,[out, retval] IUri **relativeUri);
  17. HRESULT CombinePartUri ([in] IUri *relativeUri,[out, retval] IOpcPartUri **combinedUri);
  18. };
  19. [object, uuid (7d3babe7-88b2-46ba-85cb-4203cb016c87), nonextensible, pointer_default (ref)]
  20. interface IOpcPartUri : IOpcUri {
  21. HRESULT ComparePartUri ([in] IOpcPartUri *partUri,[out, retval] INT32 *comparisonResult);
  22. HRESULT GetSourceUri ([out, retval] IOpcUri **sourceUri);
  23. HRESULT IsRelationshipsPartUri ([out, retval] BOOL *isRelationshipUri);
  24. };
  25. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  26. cpp_quote("#define IS_OPC_CONFORMANCE_ERROR(x) (((x) & 0x1ffff000) == (0x0000 + (FACILITY_OPC << 16)))")
  27. cpp_quote("#define IS_ZIP_CONFORMANCE_ERROR(x) (((x) & 0x1ffff000) == (0x1000 + (FACILITY_OPC << 16)))")
  28. cpp_quote("#define OPC_E_NONCONFORMING_URI MAKE_HRESULT(1, FACILITY_OPC, 0x1)")
  29. cpp_quote("#define OPC_E_RELATIVE_URI_REQUIRED MAKE_HRESULT(1, FACILITY_OPC, 0x2)")
  30. cpp_quote("#define OPC_E_RELATIONSHIP_URI_REQUIRED MAKE_HRESULT(1, FACILITY_OPC, 0x3)")
  31. cpp_quote("#define OPC_E_PART_CANNOT_BE_DIRECTORY MAKE_HRESULT(1, FACILITY_OPC, 0x4)")
  32. cpp_quote("#define OPC_E_UNEXPECTED_CONTENT_TYPE MAKE_HRESULT(1, FACILITY_OPC, 0x5)")
  33. cpp_quote("#define OPC_E_INVALID_CONTENT_TYPE_XML MAKE_HRESULT(1, FACILITY_OPC, 0x6)")
  34. cpp_quote("#define OPC_E_MISSING_CONTENT_TYPES MAKE_HRESULT(1, FACILITY_OPC, 0x7)")
  35. cpp_quote("#define OPC_E_NONCONFORMING_CONTENT_TYPES_XML MAKE_HRESULT(1, FACILITY_OPC, 0x8)")
  36. cpp_quote("#define OPC_E_NONCONFORMING_RELS_XML MAKE_HRESULT(1, FACILITY_OPC, 0x9)")
  37. cpp_quote("#define OPC_E_INVALID_RELS_XML MAKE_HRESULT(1, FACILITY_OPC, 0xa)")
  38. cpp_quote("#define OPC_E_DUPLICATE_PART MAKE_HRESULT(1, FACILITY_OPC, 0xb)")
  39. cpp_quote("#define OPC_E_INVALID_OVERRIDE_PART_NAME MAKE_HRESULT(1, FACILITY_OPC, 0xc)")
  40. cpp_quote("#define OPC_E_DUPLICATE_OVERRIDE_PART MAKE_HRESULT(1, FACILITY_OPC, 0xd)")
  41. cpp_quote("#define OPC_E_INVALID_DEFAULT_EXTENSION MAKE_HRESULT(1, FACILITY_OPC, 0xe)")
  42. cpp_quote("#define OPC_E_DUPLICATE_DEFAULT_EXTENSION MAKE_HRESULT(1, FACILITY_OPC, 0xf)")
  43. cpp_quote("#define OPC_E_INVALID_RELATIONSHIP_ID MAKE_HRESULT(1, FACILITY_OPC, 0x10)")
  44. cpp_quote("#define OPC_E_INVALID_RELATIONSHIP_TYPE MAKE_HRESULT(1, FACILITY_OPC, 0x11)")
  45. cpp_quote("#define OPC_E_INVALID_RELATIONSHIP_TARGET MAKE_HRESULT(1, FACILITY_OPC, 0x12)")
  46. cpp_quote("#define OPC_E_DUPLICATE_RELATIONSHIP MAKE_HRESULT(1, FACILITY_OPC, 0x13)")
  47. cpp_quote("#define OPC_E_CONFLICTING_SETTINGS MAKE_HRESULT(1, FACILITY_OPC, 0x14)")
  48. cpp_quote("#define OPC_E_DUPLICATE_PIECE MAKE_HRESULT(1, FACILITY_OPC, 0x15)")
  49. cpp_quote("#define OPC_E_INVALID_PIECE MAKE_HRESULT(1, FACILITY_OPC, 0x16)")
  50. cpp_quote("#define OPC_E_MISSING_PIECE MAKE_HRESULT(1, FACILITY_OPC, 0x17)")
  51. cpp_quote("#define OPC_E_NO_SUCH_PART MAKE_HRESULT(1, FACILITY_OPC, 0x18)")
  52. cpp_quote("#define OPC_E_DS_SIGNATURE_CORRUPT MAKE_HRESULT(1, FACILITY_OPC, 0x19)")
  53. cpp_quote("#define OPC_E_DS_DIGEST_VALUE_ERROR MAKE_HRESULT(1, FACILITY_OPC, 0x1a)")
  54. cpp_quote("#define OPC_E_DS_DUPLICATE_SIGNATURE_ORIGIN_RELATIONSHIP MAKE_HRESULT(1, FACILITY_OPC, 0x1b)")
  55. cpp_quote("#define OPC_E_DS_INVALID_SIGNATURE_ORIGIN_RELATIONSHIP MAKE_HRESULT(1, FACILITY_OPC, 0x1c)")
  56. cpp_quote("#define OPC_E_DS_INVALID_CERTIFICATE_RELATIONSHIP MAKE_HRESULT(1, FACILITY_OPC, 0x1d)")
  57. cpp_quote("#define OPC_E_DS_EXTERNAL_SIGNATURE MAKE_HRESULT(1, FACILITY_OPC, 0x1e)")
  58. cpp_quote("#define OPC_E_DS_MISSING_SIGNATURE_ORIGIN_PART MAKE_HRESULT(1, FACILITY_OPC, 0x1f)")
  59. cpp_quote("#define OPC_E_DS_MISSING_SIGNATURE_PART MAKE_HRESULT(1, FACILITY_OPC, 0x20)")
  60. cpp_quote("#define OPC_E_DS_INVALID_RELATIONSHIP_TRANSFORM_XML MAKE_HRESULT(1, FACILITY_OPC, 0x21)")
  61. cpp_quote("#define OPC_E_DS_INVALID_CANONICALIZATION_METHOD MAKE_HRESULT(1, FACILITY_OPC, 0x22)")
  62. cpp_quote("#define OPC_E_DS_INVALID_RELATIONSHIPS_SIGNING_OPTION MAKE_HRESULT(1, FACILITY_OPC, 0x23)")
  63. cpp_quote("#define OPC_E_DS_INVALID_OPC_SIGNATURE_TIME_FORMAT MAKE_HRESULT(1, FACILITY_OPC, 0x24)")
  64. cpp_quote("#define OPC_E_DS_PACKAGE_REFERENCE_URI_RESERVED MAKE_HRESULT(1, FACILITY_OPC, 0x25)")
  65. cpp_quote("#define OPC_E_DS_MISSING_SIGNATURE_PROPERTIES_ELEMENT MAKE_HRESULT(1, FACILITY_OPC, 0x26)")
  66. cpp_quote("#define OPC_E_DS_MISSING_SIGNATURE_PROPERTY_ELEMENT MAKE_HRESULT(1, FACILITY_OPC, 0x27)")
  67. cpp_quote("#define OPC_E_DS_DUPLICATE_SIGNATURE_PROPERTY_ELEMENT MAKE_HRESULT(1, FACILITY_OPC, 0x28)")
  68. cpp_quote("#define OPC_E_DS_MISSING_SIGNATURE_TIME_PROPERTY MAKE_HRESULT(1, FACILITY_OPC, 0x29)")
  69. cpp_quote("#define OPC_E_DS_INVALID_SIGNATURE_XML MAKE_HRESULT(1, FACILITY_OPC, 0x2a)")
  70. cpp_quote("#define OPC_E_DS_INVALID_SIGNATURE_COUNT MAKE_HRESULT(1, FACILITY_OPC, 0x2b)")
  71. cpp_quote("#define OPC_E_DS_MISSING_SIGNATURE_ALGORITHM MAKE_HRESULT(1, FACILITY_OPC, 0x2c)")
  72. cpp_quote("#define OPC_E_DS_DUPLICATE_PACKAGE_OBJECT_REFERENCES MAKE_HRESULT(1, FACILITY_OPC, 0x2d)")
  73. cpp_quote("#define OPC_E_DS_MISSING_PACKAGE_OBJECT_REFERENCE MAKE_HRESULT(1, FACILITY_OPC, 0x2e)")
  74. cpp_quote("#define OPC_E_DS_EXTERNAL_SIGNATURE_REFERENCE MAKE_HRESULT(1, FACILITY_OPC, 0x2f)")
  75. cpp_quote("#define OPC_E_DS_REFERENCE_MISSING_CONTENT_TYPE MAKE_HRESULT(1, FACILITY_OPC, 0x30)")
  76. cpp_quote("#define OPC_E_DS_MULTIPLE_RELATIONSHIP_TRANSFORMS MAKE_HRESULT(1, FACILITY_OPC, 0x31)")
  77. cpp_quote("#define OPC_E_DS_MISSING_CANONICALIZATION_TRANSFORM MAKE_HRESULT(1, FACILITY_OPC, 0x32)")
  78. cpp_quote("#define OPC_E_MC_UNEXPECTED_ELEMENT MAKE_HRESULT(1, FACILITY_OPC, 0x33)")
  79. cpp_quote("#define OPC_E_MC_UNEXPECTED_REQUIRES_ATTR MAKE_HRESULT(1, FACILITY_OPC, 0x34)")
  80. cpp_quote("#define OPC_E_MC_MISSING_REQUIRES_ATTR MAKE_HRESULT(1, FACILITY_OPC, 0x35)")
  81. cpp_quote("#define OPC_E_MC_UNEXPECTED_ATTR MAKE_HRESULT(1, FACILITY_OPC, 0x36)")
  82. cpp_quote("#define OPC_E_MC_INVALID_PREFIX_LIST MAKE_HRESULT(1, FACILITY_OPC, 0x37)")
  83. cpp_quote("#define OPC_E_MC_INVALID_QNAME_LIST MAKE_HRESULT(1, FACILITY_OPC, 0x38)")
  84. cpp_quote("#define OPC_E_MC_NESTED_ALTERNATE_CONTENT MAKE_HRESULT(1, FACILITY_OPC, 0x39)")
  85. cpp_quote("#define OPC_E_MC_UNEXPECTED_CHOICE MAKE_HRESULT(1, FACILITY_OPC, 0x3a)")
  86. cpp_quote("#define OPC_E_MC_MISSING_CHOICE MAKE_HRESULT(1, FACILITY_OPC, 0x3b)")
  87. cpp_quote("#define OPC_E_MC_INVALID_ENUM_TYPE MAKE_HRESULT(1, FACILITY_OPC, 0x3c)")
  88. cpp_quote("#define OPC_E_MC_UNKNOWN_NAMESPACE MAKE_HRESULT(1, FACILITY_OPC, 0x3e)")
  89. cpp_quote("#define OPC_E_MC_UNKNOWN_PREFIX MAKE_HRESULT(1, FACILITY_OPC, 0x3f)")
  90. cpp_quote("#define OPC_E_MC_INVALID_ATTRIBUTES_ON_IGNORABLE_ELEMENT MAKE_HRESULT(1, FACILITY_OPC, 0x40)")
  91. cpp_quote("#define OPC_E_MC_INVALID_XMLNS_ATTRIBUTE MAKE_HRESULT(1, FACILITY_OPC, 0x41)")
  92. cpp_quote("#define OPC_E_INVALID_XML_ENCODING MAKE_HRESULT(1, FACILITY_OPC, 0x42)")
  93. cpp_quote("#define OPC_E_DS_SIGNATURE_REFERENCE_MISSING_URI MAKE_HRESULT(1, FACILITY_OPC, 0x43)")
  94. cpp_quote("#define OPC_E_INVALID_CONTENT_TYPE MAKE_HRESULT(1, FACILITY_OPC, 0x44)")
  95. cpp_quote("#define OPC_E_DS_SIGNATURE_PROPERTY_MISSING_TARGET MAKE_HRESULT(1, FACILITY_OPC, 0x45)")
  96. cpp_quote("#define OPC_E_DS_SIGNATURE_METHOD_NOT_SET MAKE_HRESULT(1, FACILITY_OPC, 0x46)")
  97. cpp_quote("#define OPC_E_DS_DEFAULT_DIGEST_METHOD_NOT_SET MAKE_HRESULT(1, FACILITY_OPC, 0x47)")
  98. cpp_quote("#define OPC_E_NO_SUCH_RELATIONSHIP MAKE_HRESULT(1, FACILITY_OPC, 0x48)")
  99. cpp_quote("#define OPC_E_MC_MULTIPLE_FALLBACK_ELEMENTS MAKE_HRESULT(1, FACILITY_OPC, 0x49)")
  100. cpp_quote("#define OPC_E_MC_INCONSISTENT_PROCESS_CONTENT MAKE_HRESULT(1, FACILITY_OPC, 0x4a)")
  101. cpp_quote("#define OPC_E_MC_INCONSISTENT_PRESERVE_ATTRIBUTES MAKE_HRESULT(1, FACILITY_OPC, 0x4b)")
  102. cpp_quote("#define OPC_E_MC_INCONSISTENT_PRESERVE_ELEMENTS MAKE_HRESULT(1, FACILITY_OPC, 0x4c)")
  103. cpp_quote("#define OPC_E_INVALID_RELATIONSHIP_TARGET_MODE MAKE_HRESULT(1, FACILITY_OPC, 0x4d)")
  104. cpp_quote("#define OPC_E_COULD_NOT_RECOVER MAKE_HRESULT(1, FACILITY_OPC, 0x4e)")
  105. cpp_quote("#define OPC_E_UNSUPPORTED_PACKAGE MAKE_HRESULT(1, FACILITY_OPC, 0x4f)")
  106. cpp_quote("#define OPC_E_ENUM_COLLECTION_CHANGED MAKE_HRESULT(1, FACILITY_OPC, 0x50)")
  107. cpp_quote("#define OPC_E_ENUM_CANNOT_MOVE_NEXT MAKE_HRESULT(1, FACILITY_OPC, 0x51)")
  108. cpp_quote("#define OPC_E_ENUM_CANNOT_MOVE_PREVIOUS MAKE_HRESULT(1, FACILITY_OPC, 0x52)")
  109. cpp_quote("#define OPC_E_ENUM_INVALID_POSITION MAKE_HRESULT(1, FACILITY_OPC, 0x53)")
  110. cpp_quote("#define OPC_E_DS_SIGNATURE_ORIGIN_EXISTS MAKE_HRESULT(1, FACILITY_OPC, 0x54)")
  111. cpp_quote("#define OPC_E_DS_UNSIGNED_PACKAGE MAKE_HRESULT(1, FACILITY_OPC, 0x55)")
  112. cpp_quote("#define OPC_E_DS_MISSING_CERTIFICATE_PART MAKE_HRESULT(1, FACILITY_OPC, 0x56)")
  113. cpp_quote("#define OPC_E_NO_SUCH_SETTINGS MAKE_HRESULT(1, FACILITY_OPC, 0x57)")
  114. cpp_quote("#define OPC_E_ZIP_INCORRECT_DATA_SIZE MAKE_HRESULT(1, FACILITY_OPC, 0x1001)")
  115. cpp_quote("#define OPC_E_ZIP_CORRUPTED_ARCHIVE MAKE_HRESULT(1, FACILITY_OPC, 0x1002)")
  116. cpp_quote("#define OPC_E_ZIP_COMPRESSION_FAILED MAKE_HRESULT(1, FACILITY_OPC, 0x1003)")
  117. cpp_quote("#define OPC_E_ZIP_DECOMPRESSION_FAILED MAKE_HRESULT(1, FACILITY_OPC, 0x1004)")
  118. cpp_quote("#define OPC_E_ZIP_INCONSISTENT_FILEITEM MAKE_HRESULT(1, FACILITY_OPC, 0x1005)")
  119. cpp_quote("#define OPC_E_ZIP_INCONSISTENT_DIRECTORY MAKE_HRESULT(1, FACILITY_OPC, 0x1006)")
  120. cpp_quote("#define OPC_E_ZIP_MISSING_DATA_DESCRIPTOR MAKE_HRESULT(1, FACILITY_OPC, 0x1007)")
  121. cpp_quote("#define OPC_E_ZIP_UNSUPPORTEDARCHIVE MAKE_HRESULT(1, FACILITY_OPC, 0x1008)")
  122. cpp_quote("#define OPC_E_ZIP_CENTRAL_DIRECTORY_TOO_LARGE MAKE_HRESULT(1, FACILITY_OPC, 0x1009)")
  123. cpp_quote("#define OPC_E_ZIP_NAME_TOO_LARGE MAKE_HRESULT(1, FACILITY_OPC, 0x100a)")
  124. cpp_quote("#define OPC_E_ZIP_DUPLICATE_NAME MAKE_HRESULT(1, FACILITY_OPC, 0x100b)")
  125. cpp_quote("#define OPC_E_ZIP_COMMENT_TOO_LARGE MAKE_HRESULT(1, FACILITY_OPC, 0x100c)")
  126. cpp_quote("#define OPC_E_ZIP_EXTRA_FIELDS_TOO_LARGE MAKE_HRESULT(1, FACILITY_OPC, 0x100d)")
  127. cpp_quote("#define OPC_E_ZIP_FILE_HEADER_TOO_LARGE MAKE_HRESULT(1, FACILITY_OPC, 0x100e)")
  128. cpp_quote("#define OPC_E_ZIP_MISSING_END_OF_CENTRAL_DIRECTORY MAKE_HRESULT(1, FACILITY_OPC, 0x100f)")
  129. cpp_quote("#define OPC_E_ZIP_REQUIRES_64_BIT MAKE_HRESULT(1, FACILITY_OPC, 0x1010)")
  130. [uuid (3d8d6062-2749-442b-9e32-E40EF801A766), version (1.0), lcid (0x0)]
  131. library MSOPC {
  132. interface IOpcCertificateEnumerator;
  133. interface IOpcCertificateSet;
  134. interface IOpcDigitalSignature;
  135. interface IOpcDigitalSignatureEnumerator;
  136. interface IOpcDigitalSignatureManager;
  137. interface IOpcPackage;
  138. interface IOpcPart;
  139. interface IOpcPartEnumerator;
  140. interface IOpcPartSet;
  141. interface IOpcPartUri;
  142. interface IOpcRelationship;
  143. interface IOpcRelationshipEnumerator;
  144. interface IOpcRelationshipSelector;
  145. interface IOpcRelationshipSelectorSet;
  146. interface IOpcRelationshipSet;
  147. interface IOpcSigningOptions;
  148. interface IOpcSignatureCustomObject;
  149. interface IOpcSignatureCustomObjectSet;
  150. interface IOpcSignaturePartReference;
  151. interface IOpcSignaturePartReferenceEnumerator;
  152. interface IOpcSignaturePartReferenceSet;
  153. interface IOpcSignatureReference;
  154. interface IOpcSignatureReferenceSet;
  155. interface IOpcSignatureRelationshipReference;
  156. interface IOpcSignatureRelationshipReferenceEnumerator;
  157. interface IOpcSignatureRelationshipReferenceSet;
  158. interface IOpcRelationshipSelectorEnumerator;
  159. interface IOpcSignatureReferenceEnumerator;
  160. interface IOpcSignatureCustomObjectEnumerator;
  161. interface IOpcUri;
  162. typedef enum {
  163. OPC_CANONICALIZATION_NONE = 0,
  164. OPC_CANONICALIZATION_C14N = 1,
  165. OPC_CANONICALIZATION_C14N_WITH_COMMENTS = 2
  166. } OPC_CANONICALIZATION_METHOD;
  167. typedef enum {
  168. OPC_CERTIFICATE_IN_CERTIFICATE_PART = 0,
  169. OPC_CERTIFICATE_IN_SIGNATURE_PART = 1,
  170. OPC_CERTIFICATE_NOT_EMBEDDED = 2
  171. } OPC_CERTIFICATE_EMBEDDING_OPTION;
  172. typedef [v1_enum] enum {
  173. OPC_COMPRESSION_NONE = -1,
  174. OPC_COMPRESSION_NORMAL = 0,
  175. OPC_COMPRESSION_MAXIMUM = 1,
  176. OPC_COMPRESSION_FAST = 2,
  177. OPC_COMPRESSION_SUPERFAST = 3
  178. } OPC_COMPRESSION_OPTIONS;
  179. typedef [v1_enum] enum {
  180. OPC_READ_DEFAULT = 0x0,
  181. OPC_VALIDATE_ON_LOAD = 0x1,
  182. OPC_CACHE_ON_ACCESS = 0x2
  183. } OPC_READ_FLAGS;
  184. typedef enum {
  185. OPC_RELATIONSHIP_SELECT_BY_ID = 0,
  186. OPC_RELATIONSHIP_SELECT_BY_TYPE = 1,
  187. } OPC_RELATIONSHIP_SELECTOR;
  188. typedef enum {
  189. OPC_RELATIONSHIP_SIGN_USING_SELECTORS = 0,
  190. OPC_RELATIONSHIP_SIGN_PART = 1
  191. } OPC_RELATIONSHIPS_SIGNING_OPTION;
  192. typedef enum OPC_SIGNATURE_VALIDATION_RESULT {
  193. OPC_SIGNATURE_VALID = 0,
  194. OPC_SIGNATURE_INVALID = -1,
  195. } OPC_SIGNATURE_VALIDATION_RESULT;
  196. typedef enum {
  197. OPC_SIGNATURE_TIME_FORMAT_MILLISECONDS = 0,
  198. OPC_SIGNATURE_TIME_FORMAT_SECONDS = 1,
  199. OPC_SIGNATURE_TIME_FORMAT_MINUTES = 2,
  200. OPC_SIGNATURE_TIME_FORMAT_DAYS = 3,
  201. OPC_SIGNATURE_TIME_FORMAT_MONTHS = 4,
  202. OPC_SIGNATURE_TIME_FORMAT_YEARS = 5
  203. } OPC_SIGNATURE_TIME_FORMAT;
  204. typedef [v1_enum] enum {
  205. OPC_STREAM_IO_READ = 1,
  206. OPC_STREAM_IO_WRITE = 2
  207. } OPC_STREAM_IO_MODE;
  208. typedef [v1_enum] enum {
  209. OPC_URI_TARGET_MODE_INTERNAL = 0,
  210. OPC_URI_TARGET_MODE_EXTERNAL = 1
  211. } OPC_URI_TARGET_MODE;
  212. typedef [v1_enum] enum {
  213. OPC_WRITE_DEFAULT = 0x0,
  214. OPC_WRITE_FORCE_ZIP32 = 0x1
  215. } OPC_WRITE_FLAGS;
  216. cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(OPC_READ_FLAGS);")
  217. cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(OPC_WRITE_FLAGS);")
  218. [object, uuid (42195949-3b79-4fc8-89c6-FC7FB979EE71), pointer_default (ref)]
  219. interface IOpcPart : IUnknown {
  220. HRESULT GetRelationshipSet ([out, retval] IOpcRelationshipSet **relationshipSet);
  221. HRESULT GetContentStream ([out, retval] IStream **stream);
  222. HRESULT GetName ([out, retval] IOpcPartUri **name);
  223. HRESULT GetContentType ([out, string, retval] LPWSTR *contentType);
  224. HRESULT GetCompressionOptions ([out, retval] OPC_COMPRESSION_OPTIONS *compressionOptions);
  225. }
  226. [object, uuid (42195949-3b79-4fc8-89c6-FC7FB979EE75), pointer_default (ref)]
  227. interface IOpcPartEnumerator : IUnknown {
  228. HRESULT MoveNext ([out, retval] BOOL *hasNext);
  229. HRESULT MovePrevious ([out, retval] BOOL *hasPrevious);
  230. HRESULT GetCurrent ([out, retval] IOpcPart **part);
  231. HRESULT Clone ([out, retval] IOpcPartEnumerator **copy);
  232. }
  233. [object, uuid (42195949-3b79-4fc8-89c6-FC7FB979EE73), pointer_default (ref)]
  234. interface IOpcPartSet : IUnknown {
  235. HRESULT GetPart ([in] IOpcPartUri *name,[out, retval] IOpcPart **part);
  236. HRESULT CreatePart ([in] IOpcPartUri *name,[in, string] LPCWSTR contentType,[in] OPC_COMPRESSION_OPTIONS compressionOptions,[out, retval] IOpcPart **part);
  237. HRESULT DeletePart ([in] IOpcPartUri *name);
  238. HRESULT PartExists ([in] IOpcPartUri *name,[out, retval] BOOL *partExists);
  239. HRESULT GetEnumerator ([out, retval] IOpcPartEnumerator **partEnumerator);
  240. }
  241. [object, uuid (42195949-3b79-4fc8-89c6-FC7FB979EE70), pointer_default (ref)]
  242. interface IOpcPackage : IUnknown {
  243. HRESULT GetPartSet ([out, retval] IOpcPartSet **partSet);
  244. HRESULT GetRelationshipSet ([out, retval] IOpcRelationshipSet **relationshipSet);
  245. }
  246. [object, uuid (42195949-3b79-4fc8-89c6-FC7FB979EE72), pointer_default (ref)]
  247. interface IOpcRelationship : IUnknown {
  248. HRESULT GetId ([out, string, retval] LPWSTR *relationshipIdentifier);
  249. HRESULT GetRelationshipType ([out, string, retval] LPWSTR *relationshipType);
  250. HRESULT GetSourceUri ([out, retval] IOpcUri **sourceUri);
  251. HRESULT GetTargetUri ([out, retval] IUri **targetUri);
  252. HRESULT GetTargetMode ([out, retval] OPC_URI_TARGET_MODE *targetMode);
  253. }
  254. [object, uuid (42195949-3b79-4fc8-89c6-FC7FB979EE76), pointer_default (ref)]
  255. interface IOpcRelationshipEnumerator : IUnknown {
  256. HRESULT MoveNext ([out, retval] BOOL *hasNext);
  257. HRESULT MovePrevious ([out, retval] BOOL *hasPrevious);
  258. HRESULT GetCurrent ([out, retval] IOpcRelationship **relationship);
  259. HRESULT Clone ([out, retval] IOpcRelationshipEnumerator **copy);
  260. }
  261. [object, uuid (f8f26c7f-b28f-4899-84c8-5d5639ede75f), nonextensible, pointer_default (ref)]
  262. interface IOpcRelationshipSelector : IUnknown {
  263. HRESULT GetSelectorType ([out, retval] OPC_RELATIONSHIP_SELECTOR *selector);
  264. HRESULT GetSelectionCriterion ([out, string, retval] LPWSTR *selectionCriterion);
  265. }
  266. [object, uuid (42195949-3b79-4fc8-89c6-FC7FB979EE74), pointer_default (ref)]
  267. interface IOpcRelationshipSet : IUnknown {
  268. HRESULT GetRelationship ([in, string] LPCWSTR relationshipIdentifier,[out, retval] IOpcRelationship **relationship);
  269. HRESULT CreateRelationship ([in, string, unique] LPCWSTR relationshipIdentifier,[in, string] LPCWSTR relationshipType,[in] IUri *targetUri,[in] OPC_URI_TARGET_MODE targetMode,[out, retval] IOpcRelationship **relationship);
  270. HRESULT DeleteRelationship ([in, string] LPCWSTR relationshipIdentifier);
  271. HRESULT RelationshipExists ([in, string] LPCWSTR relationshipIdentifier,[out, retval] BOOL *relationshipExists);
  272. HRESULT GetEnumerator ([out, retval] IOpcRelationshipEnumerator **relationshipEnumerator);
  273. HRESULT GetEnumeratorForType ([in, string] LPCWSTR relationshipType,[out, retval] IOpcRelationshipEnumerator **relationshipEnumerator);
  274. HRESULT GetRelationshipsContentStream ([out, retval] IStream **contents);
  275. }
  276. [object, uuid (5d77a19e-62c1-44e7-becd-45da5ae51a56), nonextensible, pointer_default (unique)]
  277. interface IOpcSignatureCustomObject : IUnknown {
  278. HRESULT GetXml ([out, size_is (,*count)] UINT8 **xmlMarkup,[out] UINT32 *count);
  279. }
  280. [object, uuid (5ee4fe1d-e1b0-4683-8079-7ea0fcf80b4c), nonextensible, pointer_default (ref)]
  281. interface IOpcSignatureCustomObjectEnumerator : IUnknown {
  282. HRESULT MoveNext ([out, retval] BOOL *hasNext);
  283. HRESULT MovePrevious ([out, retval] BOOL *hasPrevious);
  284. HRESULT GetCurrent ([out, retval] IOpcSignatureCustomObject **customObject);
  285. HRESULT Clone ([out, retval] IOpcSignatureCustomObjectEnumerator **copy);
  286. };
  287. [object, uuid (e24231ca-59f4-484e-b64b-36eeda36072c), nonextensible, pointer_default (unique)]
  288. interface IOpcSignaturePartReference : IUnknown {
  289. HRESULT GetPartName ([out, retval] IOpcPartUri **partName);
  290. HRESULT GetContentType ([out, string, retval] LPWSTR *contentType);
  291. HRESULT GetDigestMethod ([out, string, retval] LPWSTR *digestMethod);
  292. HRESULT GetDigestValue ([out, size_is (,*count)] UINT8 **digestValue,[out] UINT32 *count);
  293. HRESULT GetTransformMethod ([out, retval] OPC_CANONICALIZATION_METHOD *transformMethod);
  294. }
  295. [object, uuid (80eb1561-8c77-49cf-8266-459b356ee99a), nonextensible, pointer_default (ref)]
  296. interface IOpcSignaturePartReferenceEnumerator : IUnknown {
  297. HRESULT MoveNext ([out, retval] BOOL *hasNext);
  298. HRESULT MovePrevious ([out, retval] BOOL *hasPrevious);
  299. HRESULT GetCurrent ([out, retval] IOpcSignaturePartReference **partReference);
  300. HRESULT Clone ([out, retval] IOpcSignaturePartReferenceEnumerator **copy);
  301. };
  302. [object, uuid (1b47005e-3011-4edc-be6f-0f65e5ab0342), nonextensible, pointer_default (unique)]
  303. interface IOpcSignatureReference : IUnknown {
  304. HRESULT GetId ([out, string, retval] LPWSTR *referenceId);
  305. HRESULT GetUri ([out, retval] IUri **referenceUri);
  306. HRESULT GetType ([out, string, retval] LPWSTR *type);
  307. HRESULT GetTransformMethod ([out, retval] OPC_CANONICALIZATION_METHOD *transformMethod);
  308. HRESULT GetDigestMethod ([out, string, retval] LPWSTR *digestMethod);
  309. HRESULT GetDigestValue ([out, size_is (,*count)] UINT8 **digestValue,[out] UINT32 *count);
  310. }
  311. [object, uuid (cfa59a45-28b1-4868-969e-fa8097fdc12a), nonextensible, pointer_default (ref)]
  312. interface IOpcSignatureReferenceEnumerator : IUnknown {
  313. HRESULT MoveNext ([out, retval] BOOL *hasNext);
  314. HRESULT MovePrevious ([out, retval] BOOL *hasPrevious);
  315. HRESULT GetCurrent ([out, retval] IOpcSignatureReference **reference);
  316. HRESULT Clone ([out, retval] IOpcSignatureReferenceEnumerator **copy);
  317. };
  318. [object, uuid (773ba3e4-f021-48e4-aa04-9816db5d3495), nonextensible, pointer_default (ref)]
  319. interface IOpcSignatureRelationshipReferenceEnumerator : IUnknown {
  320. HRESULT MoveNext ([out, retval] BOOL *hasNext);
  321. HRESULT MovePrevious ([out, retval] BOOL *hasPrevious);
  322. HRESULT GetCurrent ([out, retval] IOpcSignatureRelationshipReference **relationshipReference);
  323. HRESULT Clone ([out, retval] IOpcSignatureRelationshipReferenceEnumerator **copy);
  324. };
  325. [object, uuid (57babac6-9d4a-4e50-8b86-e5d4051eae7c), nonextensible, pointer_default (unique)]
  326. interface IOpcSignatureRelationshipReference : IUnknown {
  327. HRESULT GetSourceUri ([out, retval] IOpcUri **sourceUri);
  328. HRESULT GetDigestMethod ([out, string, retval] LPWSTR *digestMethod);
  329. HRESULT GetDigestValue ([out, size_is (,*count)] UINT8 **digestValue,[out] UINT32 *count);
  330. HRESULT GetTransformMethod ([out, retval] OPC_CANONICALIZATION_METHOD *transformMethod);
  331. HRESULT GetRelationshipSigningOption ([out, retval] OPC_RELATIONSHIPS_SIGNING_OPTION *relationshipSigningOption);
  332. HRESULT GetRelationshipSelectorEnumerator ([out, retval] IOpcRelationshipSelectorEnumerator **selectorEnumerator);
  333. }
  334. [object, uuid (5e50a181-a91b-48ac-88d2-bca3d8f8c0b1), nonextensible, pointer_default (ref)]
  335. interface IOpcRelationshipSelectorEnumerator : IUnknown {
  336. HRESULT MoveNext ([out, retval] BOOL *hasNext);
  337. HRESULT MovePrevious ([out, retval] BOOL *hasPrevious);
  338. HRESULT GetCurrent ([out, retval] IOpcRelationshipSelector **relationshipSelector);
  339. HRESULT Clone ([out, retval] IOpcRelationshipSelectorEnumerator **copy);
  340. };
  341. [object, local, uuid (85131937-8f24-421f-b439-59ab24d140b8), nonextensible, pointer_default (ref)]
  342. interface IOpcCertificateEnumerator : IUnknown {
  343. HRESULT MoveNext ([out, retval] BOOL *hasNext);
  344. HRESULT MovePrevious ([out, retval] BOOL *hasPrevious);
  345. HRESULT GetCurrent ([out, retval] const CERT_CONTEXT **certificate);
  346. HRESULT Clone ([out, retval] IOpcCertificateEnumerator **copy);
  347. };
  348. [object, local, uuid (56ea4325-8e2d-4167-b1a4-e486d24c8fa7), nonextensible, pointer_default (ref)]
  349. interface IOpcCertificateSet : IUnknown {
  350. HRESULT Add ([in] const CERT_CONTEXT *certificate);
  351. HRESULT Remove ([in] const CERT_CONTEXT *certificate);
  352. HRESULT GetEnumerator ([out, retval] IOpcCertificateEnumerator **certificateEnumerator);
  353. }
  354. [object, uuid (967b6882-0ba3-4358-b9e7-b64c75063c5e), nonextensible, pointer_default (ref)]
  355. interface IOpcDigitalSignatureEnumerator : IUnknown {
  356. HRESULT MoveNext ([out, retval] BOOL *hasNext);
  357. HRESULT MovePrevious ([out, retval] BOOL *hasPrevious);
  358. HRESULT GetCurrent ([out, retval] IOpcDigitalSignature **digitalSignature);
  359. HRESULT Clone ([out, retval] IOpcDigitalSignatureEnumerator **copy);
  360. };
  361. [object, local, uuid (d5e62a0b-696d-462f-94df-72e33cef2659), nonextensible, pointer_default (ref)]
  362. interface IOpcDigitalSignatureManager : IUnknown {
  363. HRESULT GetSignatureOriginPartName ([out, retval] IOpcPartUri **signatureOriginPartName);
  364. HRESULT SetSignatureOriginPartName ([in, unique] IOpcPartUri *signatureOriginPartName);
  365. HRESULT GetSignatureEnumerator ([out, retval] IOpcDigitalSignatureEnumerator **signatureEnumerator);
  366. HRESULT RemoveSignature ([in] IOpcPartUri *signaturePartName);
  367. HRESULT CreateSigningOptions ([out, retval] IOpcSigningOptions **signingOptions);
  368. HRESULT Validate ([in] IOpcDigitalSignature *signature,[in] const CERT_CONTEXT *certificate,[out, retval] OPC_SIGNATURE_VALIDATION_RESULT *validationResult);
  369. HRESULT Sign ([in] const CERT_CONTEXT *certificate,[in] IOpcSigningOptions *signingOptions,[out, retval] IOpcDigitalSignature **digitalSignature);
  370. HRESULT ReplaceSignatureXml ([in] IOpcPartUri *signaturePartName,[in, size_is (count)] const UINT8 *newSignatureXml,[in] UINT32 count,[out, retval] IOpcDigitalSignature **digitalSignature);
  371. };
  372. [object, uuid (6c9fe28c-ecd9-4b22-9d36-7fdde670fec0), nonextensible, pointer_default (ref)]
  373. interface IOpcSignaturePartReferenceSet : IUnknown {
  374. HRESULT Create ([in] IOpcPartUri *partUri,[in, unique] LPCWSTR digestMethod,[in] OPC_CANONICALIZATION_METHOD transformMethod,[out, retval] IOpcSignaturePartReference **partReference);
  375. HRESULT Delete ([in] IOpcSignaturePartReference *partReference);
  376. HRESULT GetEnumerator ([out, retval] IOpcSignaturePartReferenceEnumerator **partReferenceEnumerator);
  377. }
  378. [object, uuid (6e34c269-a4d3-47c0-b5c4-87ff2b3b6136), nonextensible, pointer_default (ref)]
  379. interface IOpcRelationshipSelectorSet : IUnknown {
  380. HRESULT Create ([in] OPC_RELATIONSHIP_SELECTOR selector,[in] LPCWSTR selectionCriterion,[out, retval] IOpcRelationshipSelector **relationshipSelector);
  381. HRESULT Delete ([in] IOpcRelationshipSelector *relationshipSelector);
  382. HRESULT GetEnumerator ([out, retval] IOpcRelationshipSelectorEnumerator **relationshipSelectorEnumerator);
  383. }
  384. [object, uuid (9f863ca5-3631-404c-828d-807e0715069b), nonextensible, pointer_default (ref)]
  385. interface IOpcSignatureRelationshipReferenceSet : IUnknown {
  386. HRESULT Create ([in] IOpcUri *sourceUri,[in, unique] LPCWSTR digestMethod,[in] OPC_RELATIONSHIPS_SIGNING_OPTION relationshipSigningOption,[in, unique] IOpcRelationshipSelectorSet *selectorSet,[in] OPC_CANONICALIZATION_METHOD transformMethod,[out, retval] IOpcSignatureRelationshipReference **relationshipReference);
  387. HRESULT CreateRelationshipSelectorSet ([out] IOpcRelationshipSelectorSet **selectorSet);
  388. HRESULT Delete ([in] IOpcSignatureRelationshipReference *relationshipReference);
  389. HRESULT GetEnumerator ([out, retval] IOpcSignatureRelationshipReferenceEnumerator **relationshipReferenceEnumerator);
  390. }
  391. [object, uuid (f3b02d31-ab12-42dd-9e2f-2b16761c3c1e), nonextensible, pointer_default (ref)]
  392. interface IOpcSignatureReferenceSet : IUnknown {
  393. HRESULT Create ([in] IUri *referenceUri,[in, unique] LPCWSTR referenceId,[in, unique] LPCWSTR type,[in, unique] LPCWSTR digestMethod,[in] OPC_CANONICALIZATION_METHOD transformMethod,[out, retval] IOpcSignatureReference **reference);
  394. HRESULT Delete ([in] IOpcSignatureReference *reference);
  395. HRESULT GetEnumerator ([out, retval] IOpcSignatureReferenceEnumerator **referenceEnumerator);
  396. }
  397. [object, uuid (8f792ac5-7947-4e11-bc3d-2659ff046ae1), nonextensible, pointer_default (ref)]
  398. interface IOpcSignatureCustomObjectSet : IUnknown {
  399. HRESULT Create ([in, size_is (count)] const UINT8 *xmlMarkup,[in] UINT32 count,[out, retval] IOpcSignatureCustomObject **customObject);
  400. HRESULT Delete ([in] IOpcSignatureCustomObject *customObject);
  401. HRESULT GetEnumerator ([out, retval] IOpcSignatureCustomObjectEnumerator **customObjectEnumerator);
  402. }
  403. [object, local, uuid (52ab21dd-1cd0-4949-bc80-0c1232d00cb4), nonextensible, pointer_default (unique)]
  404. interface IOpcDigitalSignature : IUnknown {
  405. HRESULT GetNamespaces ([out, size_is (,*count)] LPWSTR **prefixes,[out, size_is (,*count)] LPWSTR **namespaces,[out] UINT32 *count);
  406. HRESULT GetSignatureId ([out, string, retval] LPWSTR *signatureId);
  407. HRESULT GetSignaturePartName ([out, retval] IOpcPartUri **signaturePartName);
  408. HRESULT GetSignatureMethod ([out, string, retval] LPWSTR *signatureMethod);
  409. HRESULT GetCanonicalizationMethod ([out, retval] OPC_CANONICALIZATION_METHOD *canonicalizationMethod);
  410. HRESULT GetSignatureValue ([out, size_is (,*count)] UINT8 **signatureValue,[out] UINT32 *count);
  411. HRESULT GetSignaturePartReferenceEnumerator ([out, retval] IOpcSignaturePartReferenceEnumerator **partReferenceEnumerator);
  412. HRESULT GetSignatureRelationshipReferenceEnumerator ([out, retval] IOpcSignatureRelationshipReferenceEnumerator **relationshipReferenceEnumerator);
  413. HRESULT GetSigningTime ([out, string, retval] LPWSTR *signingTime);
  414. HRESULT GetTimeFormat ([out, retval] OPC_SIGNATURE_TIME_FORMAT *timeFormat);
  415. HRESULT GetPackageObjectReference ([out, retval] IOpcSignatureReference **packageObjectReference);
  416. HRESULT GetCertificateEnumerator ([out, retval] IOpcCertificateEnumerator **certificateEnumerator);
  417. HRESULT GetCustomReferenceEnumerator ([out, retval] IOpcSignatureReferenceEnumerator **customReferenceEnumerator);
  418. HRESULT GetCustomObjectEnumerator ([out, retval] IOpcSignatureCustomObjectEnumerator **customObjectEnumerator);
  419. HRESULT GetSignatureXml ([out, size_is (,*count)] UINT8 **signatureXml,[out] UINT32 *count);
  420. };
  421. [object, uuid (50d2d6a5-7aeb-46c0-b241-43ab0e9b407e), nonextensible, pointer_default (ref)]
  422. interface IOpcSigningOptions : IUnknown {
  423. HRESULT GetSignatureId ([out, string, retval] LPWSTR *signatureId);
  424. HRESULT SetSignatureId ([in] LPCWSTR signatureId);
  425. HRESULT GetSignatureMethod ([out, string, retval] LPWSTR *signatureMethod);
  426. HRESULT SetSignatureMethod ([in] LPCWSTR signatureMethod);
  427. HRESULT GetDefaultDigestMethod ([out, string, retval] LPWSTR *digestMethod);
  428. HRESULT SetDefaultDigestMethod ([in] LPCWSTR digestMethod);
  429. HRESULT GetCertificateEmbeddingOption ([out, retval] OPC_CERTIFICATE_EMBEDDING_OPTION *embeddingOption);
  430. HRESULT SetCertificateEmbeddingOption ([in] OPC_CERTIFICATE_EMBEDDING_OPTION embeddingOption);
  431. HRESULT GetTimeFormat ([out, retval] OPC_SIGNATURE_TIME_FORMAT *timeFormat);
  432. HRESULT SetTimeFormat ([in] OPC_SIGNATURE_TIME_FORMAT timeFormat);
  433. HRESULT GetSignaturePartReferenceSet ([out, retval] IOpcSignaturePartReferenceSet **partReferenceSet);
  434. HRESULT GetSignatureRelationshipReferenceSet ([out, retval] IOpcSignatureRelationshipReferenceSet **relationshipReferenceSet);
  435. HRESULT GetCustomObjectSet ([out, retval] IOpcSignatureCustomObjectSet **customObjectSet);
  436. HRESULT GetCustomReferenceSet ([out, retval] IOpcSignatureReferenceSet **customReferenceSet);
  437. HRESULT GetCertificateSet ([out, retval] IOpcCertificateSet **certificateSet);
  438. HRESULT GetSignaturePartName ([out, retval] IOpcPartUri **signaturePartName);
  439. HRESULT SetSignaturePartName ([in, unique] IOpcPartUri *signaturePartName);
  440. };
  441. [object, uuid (6d0b4446-cd73-4ab3-94f4-8ccdf6116154), pointer_default (ref)]
  442. interface IOpcFactory : IUnknown {
  443. HRESULT CreatePackageRootUri ([out, retval] IOpcUri **rootUri);
  444. HRESULT CreatePartUri ([in, string] LPCWSTR pwzUri,[out, retval] IOpcPartUri **partUri);
  445. [local] HRESULT CreateStreamOnFile ([in, string] LPCWSTR filename,[in] OPC_STREAM_IO_MODE ioMode,[in, unique] LPSECURITY_ATTRIBUTES securityAttributes,[in] DWORD dwFlagsAndAttributes,[out, retval] IStream **stream);
  446. HRESULT CreatePackage ([out, retval] IOpcPackage **package);
  447. HRESULT ReadPackageFromStream ([in] IStream *stream,[in] OPC_READ_FLAGS flags,[out, retval] IOpcPackage **package);
  448. HRESULT WritePackageToStream ([in] IOpcPackage *package,[in] OPC_WRITE_FLAGS flags,[in] IStream *stream);
  449. HRESULT CreateDigitalSignatureManager ([in] IOpcPackage *package,[out, retval] IOpcDigitalSignatureManager **signatureManager);
  450. }
  451. [uuid (6b2d6ba0-9f3e-4f27-920b-313cc426a39e)]
  452. coclass OpcFactory {
  453. interface IOpcFactory;
  454. };
  455. };
  456. cpp_quote("#endif")
  457. cpp_quote("#endif")