Project

General

Profile

Actions

Task #4397

closed

Design developer API for typed name components

Added by Jeff Burke over 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
12/15/2017
Due date:
% Done:

0%

Estimated time:

Description

Placeholder for typed name component support.

Actions #1

Updated by Anonymous almost 6 years ago

Following the API for user-specified Data packet type in the MetaInfo, the Java API would be:

/**
 * Get the name component type.
 * @return The name component type enum value. If this is
 * ComponentType.OTHER_CODE, then call getOtherTypeCode() to
 * get the unrecognized component type code.
 */
public final ComponentType getType();

/**
 * Get the component type code from the packet which is other than a
 * recognized ComponentType enum value. This is only meaningful if 
 * getType() is ComponentType.OTHER_CODE.
 * @return The type code.
 */
public final int getOtherTypeCode();

/**
 * Create a Name.Component of the given type, using the existing the Blob
 * value.
 * (To create an ImplicitSha256Digest component, use fromImplicitSha256Digest.)
 * @param value The component value. value may not be null, but value.buf()
 * may be null.
 * @param type The component type enum value. If the name component type is
 * not a recognized ComponentType enum value, call
 * Name.Component(value, ComponentType.OTHER_CODE, otherTypeCode).
 */
public Component(Blob value, ComponentType type);

/**
 * Create a Name.Component of the given type, using the existing the Blob
 * value.
 * (To create an ImplicitSha256Digest component, use fromImplicitSha256Digest.)
 * @param value The component value. value may not be null, but value.buf()
 * may be null.
 * @param type The component type enum value. If name component type is not
 * a recognized ComponentType enum value, then set this to
 * ComponentType.OTHER_CODE and use the otherTypeCode parameter.
 * @param otherTypeCode If type is ComponentType.OTHER_CODE,
 * then this is the packet's unrecognized content type code, which must be
 * non-negative.
 */
public Component(Blob value, ComponentType type, int otherTypeCode);
Actions #2

Updated by Anonymous almost 6 years ago

  • Status changed from New to Closed

Changes merged to master for all libraries.

Actions

Also available in: Atom PDF