Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
include/opcbase.idl | 15 ++++
include/opcobjectmodel.idl | 174 +++++++++++++++++++++++++++++++++++++
2 files changed, 189 insertions(+)
diff --git a/include/opcbase.idl b/include/opcbase.idl
index fc92675420..33f56ac077 100644
--- a/include/opcbase.idl
+++ b/include/opcbase.idl
@@ -25,3 +25,18 @@ typedef [v1_enum] enum
OPC_STREAM_IO_READ = 1,
OPC_STREAM_IO_WRITE = 2,
} OPC_STREAM_IO_MODE;
+
+typedef [v1_enum] enum
+{
+ OPC_COMPRESSION_NONE = -1,
+ OPC_COMPRESSION_NORMAL = 0,
+ OPC_COMPRESSION_MAXIMUM = 1,
+ OPC_COMPRESSION_FAST = 2,
+ OPC_COMPRESSION_SUPERFAST = 3,
+} OPC_COMPRESSION_OPTIONS;
+
+typedef [v1_enum] enum
+{
+ OPC_URI_TARGET_MODE_INTERNAL = 0,
+ OPC_URI_TARGET_MODE_EXTERNAL = 1,
+} OPC_URI_TARGET_MODE;
diff --git a/include/opcobjectmodel.idl b/include/opcobjectmodel.idl
index e5370d2e54..45bc8aa4a5 100644
--- a/include/opcobjectmodel.idl
+++ b/include/opcobjectmodel.idl
@@ -20,6 +20,11 @@
#pragma makedep install
#endif
+interface IOpcPart;
+interface IOpcPartUri;
+interface IOpcUri;
+interface IOpcRelationship;
+
typedef [v1_enum] enum
{
OPC_READ_DEFAULT = 0,
@@ -32,3 +37,172 @@ typedef [v1_enum] enum
OPC_WRITE_DEFAULT = 0,
OPC_WRITE_FORCE_ZIP32 = 1,
} OPC_WRITE_FLAGS;
+
+[
+ object,
+ uuid(42195949-3b79-4fc8-89c6-fc7fb979ee75),
+ pointer_default(ref)
+]
+interface IOpcPartEnumerator : IUnknown
+{
+ HRESULT MoveNext(
+ [out, retval] BOOL *has_next
+ );
+
+ HRESULT MovePrevious(
+ [out, retval] BOOL *has_previous
+ );
+
+ HRESULT GetCurrent(
+ [out, retval] IOpcPart **part
+ );
+
+ HRESULT Clone(
+ [out, retval] IOpcPartEnumerator **enumerator
+ );
+}
+
+[
+ object,
+ uuid(42195949-3b79-4fc8-89c6-fc7fb979ee76),
+ pointer_default(ref)
+]
+interface IOpcRelationshipEnumerator : IUnknown
+{
+ HRESULT MoveNext(
+ [out, retval] BOOL *has_next
+ );
+
+ HRESULT MovePrevious(
+ [out, retval] BOOL *has_previous
+ );
+
+ HRESULT GetCurrent(
+ [out, retval] IOpcRelationship **relationship
+ );
+
+ HRESULT Clone(
+ [out, retval] IOpcRelationshipEnumerator **enumerator
+ );
+}
+
+[
+ object,
+ uuid(42195949-3b79-4fc8-89c6-fc7fb979ee73),
+ pointer_default(ref)
+]
+interface IOpcPartSet : IUnknown
+{
+ HRESULT GetPart(
+ [in] IOpcPartUri *name,
+ [out, retval] IOpcPart **part
+ );
+
+ HRESULT CreatePart(
+ [in] IOpcPartUri *name,
+ [in, string] LPCWSTR content_type,
+ [in] OPC_COMPRESSION_OPTIONS compression_options,
+ [out, retval] IOpcPart **part
+ );
+
+ HRESULT DeletePart(
+ [in] IOpcPartUri *name
+ );
+
+ HRESULT PartExists(
+ [in] IOpcPartUri *name,
+ [out, retval] BOOL *exists
+ );
+
+ HRESULT GetEnumerator(
+ [out, retval] IOpcPartEnumerator **enumerator
+ );
+}
+
+[
+ object,
+ uuid(42195949-3b79-4fc8-89c6-fc7fb979ee72),
+ pointer_default(ref)
+]
+interface IOpcRelationship : IUnknown
+{
+ HRESULT GetId(
+ [out, string, retval] LPWSTR *id
+ );
+
+ HRESULT GetRelationshipType(
+ [out, string, retval] LPWSTR *type
+ );
+
+ HRESULT GetSourceUri(
+ [out, retval] IOpcUri **uri
+ );
+
+ HRESULT GetTargetUri(
+ [out, retval] IUri **target
+ );
+
+ HRESULT GetTargetMode(
+ [out, retval] OPC_URI_TARGET_MODE *target_mode
+ );
+}
+
+
+[
+ object,
+ uuid(42195949-3b79-4fc8-89c6-fc7fb979ee74),
+ pointer_default(ref)
+]
+interface IOpcRelationshipSet : IUnknown
+{
+ HRESULT GetRelationship(
+ [in, string] LPCWSTR id,
+ [out, retval] IOpcRelationship **relationship
+ );
+
+ HRESULT CreateRelationship(
+ [in, string, unique] LPCWSTR id,
+ [in, string] LPCWSTR type,
+ [in] IUri *target_uri,
+ [in] OPC_URI_TARGET_MODE target_mode,
+ [out, retval] IOpcRelationship **relationship
+ );
+
+ HRESULT DeleteRelationship(
+ [in, string] LPCWSTR id
+ );
+
+ HRESULT RelationshipExists(
+ [in, string] LPCWSTR id,
+ [out, retval] BOOL *exists
+ );
+
+ HRESULT GetEnumerator(
+ [out, retval] IOpcRelationshipEnumerator **enumerator
+ );
+
+ HRESULT GetEnumeratorForType(
+ [in, string] LPCWSTR type,
+ [out, retval] IOpcRelationshipEnumerator **enumerator
+ );
+
+ HRESULT GetRelationshipsContentStream(
+ [out, retval] IStream **stream
+ );
+}
+
+[
+ object,
+ uuid(42195949-3b79-4fc8-89c6-fc7fb979ee70),
+ pointer_default(ref)
+]
+interface IOpcPackage : IUnknown
+{
+ HRESULT GetPartSet(
+ [out, retval] IOpcPartSet **part_set
+ );
+
+ HRESULT GetRelationshipSet(
+ [out, retval] IOpcRelationshipSet **relationship_set
+ );
+}
--
2.18.0