Conforms to NSObject
Declared in DTASN1Parser.h

Overview

The DTASN1ParserDelegate protocol defines the optional methods implemented by delegates of DTASN1Parser objects.

Instance Methods

parser:didEndContainerWithType:

Sent by a parser object to its delegate when it encounters the end of a constructed element.

- (void)parser:(DTASN1Parser *)parser didEndContainerWithType:(DTASN1Type)type

Parameters

parser

A parser object.

type

A string that is the name of an element (in its end tag).

Declared In

DTASN1Parser.h

parser:didEndContextWithTag:

Sent by a parser object to its delegate when it encounters the end of a constructed element.

- (void)parser:(DTASN1Parser *)parser didEndContextWithTag:(NSUInteger)tag

Parameters

parser

A parser object.

tag

The tag value for the context that contained the previous elements.

Declared In

DTASN1Parser.h

parser:didStartContainerWithType:

Sent by a parser object to its delegate when it encounters the beginning of a constructed element.

- (void)parser:(DTASN1Parser *)parser didStartContainerWithType:(DTASN1Type)type

Parameters

parser

A parser object.

type

The tag type that contains the subsequent elements.

Declared In

DTASN1Parser.h

parser:didStartContextWithTag:

Sent by a parser object to its delegate when it encounters the beginning of a context-specific tag.

- (void)parser:(DTASN1Parser *)parser didStartContextWithTag:(NSUInteger)tag

Parameters

parser

A parser object.

tag

The tag value for the context that contains the subsequent elements.

Declared In

DTASN1Parser.h

parser:foundBitString:

Sent by a parser object to provide its delegate with the bit string encoded in the current element.

- (void)parser:(DTASN1Parser *)parser foundBitString:(DTASN1BitString *)bitString

Parameters

parser

A parser object.

bitString

A bit string object representing the contents of the current element.

Declared In

DTASN1Parser.h

parser:foundData:

Sent by a parser object to provide its delegate with the octet string encoded in the current element.

- (void)parser:(DTASN1Parser *)parser foundData:(NSData *)data

Parameters

parser

A parser object.

data

A data object representing the contents of the current element.

Discussion

Integer data that is longer than 32 bits is also provided this way.

Declared In

DTASN1Parser.h

parser:foundDate:

Sent by a parser object to provide its delegate with the date encoded in the current element.

- (void)parser:(DTASN1Parser *)parser foundDate:(NSDate *)date

Parameters

parser

A parser object.

date

A date representing the date encoded in the current element.

Discussion

All the ASN1 date types are provided via this method.

Declared In

DTASN1Parser.h

parser:foundNumber:

Sent by a parser object to provide its delegate with number values encoded in the current element.

- (void)parser:(DTASN1Parser *)parser foundNumber:(NSNumber *)number

Parameters

parser

A parser object.

number

A number object representing the contents of the current element.

Discussion

Note that number values that are longer than supported by the system are provided as Data instead.

Declared In

DTASN1Parser.h

parser:foundObjectIdentifier:

Sent by a parser object to provide its delegate with the object identifier encoded in the current element.

- (void)parser:(DTASN1Parser *)parser foundObjectIdentifier:(NSString *)objIdentifier

Parameters

parser

A parser object.

objIdentifier

A string representing the object identifier encoded in the current element.

Declared In

DTASN1Parser.h

parser:foundString:

Sent by a parser object to provide its delegate with the string encoded in the current element.

- (void)parser:(DTASN1Parser *)parser foundString:(NSString *)string

Parameters

parser

A parser object.

string

A string contained in the current element.

Discussion

All the ASN1 string types are provided via this method.

Declared In

DTASN1Parser.h

parser:parseErrorOccurred:

Sent by a parser object to its delegate when it encounters a fatal error.

- (void)parser:(DTASN1Parser *)parser parseErrorOccurred:(NSError *)parseError

Parameters

parser

A parser object.

parseError

An NSError object describing the parsing error that occurred.

Discussion

When this method is invoked, parsing is stopped. For further information about the error, you can query parseError or you can send the parser a parserError message. You can also send the parser lineNumber and columnNumber messages to further isolate where the error occurred. Typically you implement this method to display information about the error to the user.

Declared In

DTASN1Parser.h

parserDidEndDocument:

Sent by the parser object to the delegate when it has successfully completed parsing

- (void)parserDidEndDocument:(DTASN1Parser *)parser

Parameters

parser

A parser object.

Declared In

DTASN1Parser.h

parserDidStartDocument:

Sent by the parser object to the delegate when it begins parsing a document.

- (void)parserDidStartDocument:(DTASN1Parser *)parser

Parameters

parser

A parser object.

Declared In

DTASN1Parser.h

parserFoundNull:

Sent by a parser object when a NULL element is encountered.

- (void)parserFoundNull:(DTASN1Parser *)parser

Parameters

parser

A parser object.

Declared In

DTASN1Parser.h