IOpcRelationshipSelector interface
Represents how to select, from a Relationships part, the relationships to be referenced for signing.
When to implement
Never. Custom implementations of this interface are not supported.
Members
The IOpcRelationshipSelector interface inherits from the IUnknown interface. IOpcRelationshipSelector also has these types of members:
Methods
The IOpcRelationshipSelector interface has these methods.
| Method | Description |
|---|---|
| GetSelectionCriterion |
Gets a string that is used to select relationships to be referenced for signing. |
| 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
|
Minimum supported client | Windows 7 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server | Windows Server 2008 R2 [desktop apps | Windows Store apps] |
|
Header |
|
|
IDL |
|
See also
- Packaging Digital Signature Interfaces
- Overviews
- Digital Signatures Overview
- Getting Started with the Packaging API
- Packaging API Programming Guide
- Reference
- IOpcRelationship
- IOpcRelationshipSelectorEnumerator
- IOpcRelationshipSelectorSet
- Core Packaging Interfaces
- Packaging Interfaces
- Packaging API Reference
- Packaging API Samples
- External Resources
- ECMA-376 OpenXML standard