IOpcRelationshipSelector interface (msopc.h)
Represents how to select, from a Relationships part, the relationships to be referenced for signing.
Inheritance
The IOpcRelationshipSelector interface inherits from the IUnknown interface. IOpcRelationshipSelector also has these types of members:
Methods
The IOpcRelationshipSelector interface has these methods.
IOpcRelationshipSelector::GetSelectionCriterion Gets a string that is used to select relationships to be referenced for signing. |
IOpcRelationshipSelector::GetSelectorType Gets a value that describes how relationships are selected to be referenced for signing. |
Remarks
To create an IOpcRelationshipSelector interface pointer, call the IOpcRelationshipSelectorSet::Create method.
To access an IOpcRelationshipSelector, call the IOpcRelationshipSelectorEnumerator::GetCurrent method.
Use the IOpcRelationshipSelector interface methods to select relationships for signing. A relationship is selected if its type or identifier matches the string that is retrieved by calling the GetSelectionCriterion method. This string is either a relationship type or a relationship identifier. Call the GetSelectorType method to get an OPC_RELATIONSHIP_SELECTOR value to determine whether the string is a relationship type or an identifier. To access these relationship properties, call the IOpcRelationship::GetRelationshipType and IOpcRelationship::GetId methods.
The following table shows how OPC_RELATIONSHIP_SELECTOR values map to the relationship type and relationship identifier properties.
OPC_RELATIONSHIP_SELECTOR Value | Relationship Property | Description |
---|---|---|
OPC_RELATIONSHIP_SELECT_BY_TYPE | Relationship type | Selects relationships that have a relationship type that matches selectionCriterion string. |
OPC_RELATIONSHIP_SELECT_BY_ID | Relationship identifier | Selects relationships that have a relationship identifier that matches selectionCriterion string. |
When a signature is generated, the relationship selection information provided by the interface is serialized in the XML markup of the signature (signature markup). In signature markup, this information is represented by the RelationshipReference and RelationshipGroupReference elements, which are specified in section 12. Digital Signatures in the ECMA-376 OpenXML, 1st Edition, Part 2: Open Packaging Conventions (OPC). The following table shows how the elements map to relationship properties and to OPC_RELATIONSHIP_SELECTOR values.
Package signature element | Relationship Property | OPC_RELATIONSHIP_SELECTOR Value |
---|---|---|
RelationshipGroupReference | Relationship type | OPC_RELATIONSHIP_SELECT_BY_TYPE |
RelationshipReference | Relationship identifier | OPC_RELATIONSHIP_SELECT_BY_ID |
Thread Safety
Packaging objects are not thread-safe.
For more information, see the Getting Started with the Packaging API.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 R2 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | msopc.h |
See also
External Resources
Getting Started with the Packaging API
IOpcRelationshipSelectorEnumerator
Overviews
Packaging API Programming Guide
Packaging Digital Signature Interfaces
Reference