DTASN1ParserDelegate Protocol Reference
| Conforms to | NSObject |
| Declared in | DTASN1Parser.h |
Overview
The DTASN1ParserDelegate protocol defines the optional methods implemented by delegates of DTASN1Parser objects.
Tasks
-
– parserDidStartDocument: -
– parserDidEndDocument: -
– parser:didStartContainerWithType: -
– parser:didEndContainerWithType: -
– parser:didStartContextWithTag: -
– parser:didEndContextWithTag: -
– parser:parseErrorOccurred: -
– parserFoundNull: -
– parser:foundDate: -
– parser:foundObjectIdentifier: -
– parser:foundString: -
– parser:foundData: -
– parser:foundBitString: -
– parser:foundNumber:
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)typeParameters
- parser
A parser object.
- type
A string that is the name of an element (in its end tag).
Declared In
DTASN1Parser.hparser:didEndContextWithTag:
Sent by a parser object to its delegate when it encounters the end of a constructed element.
- (void)parser:(DTASN1Parser *)parser didEndContextWithTag:(NSUInteger)tagParameters
- parser
A parser object.
- tag
The tag value for the context that contained the previous elements.
Declared In
DTASN1Parser.hparser:didStartContainerWithType:
Sent by a parser object to its delegate when it encounters the beginning of a constructed element.
- (void)parser:(DTASN1Parser *)parser didStartContainerWithType:(DTASN1Type)typeParameters
- parser
A parser object.
- type
The tag type that contains the subsequent elements.
Declared In
DTASN1Parser.hparser: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)tagParameters
- parser
A parser object.
- tag
The tag value for the context that contains the subsequent elements.
Declared In
DTASN1Parser.hparser: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 *)bitStringParameters
- parser
A parser object.
- bitString
A bit string object representing the contents of the current element.
Declared In
DTASN1Parser.hparser: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 *)dataParameters
- 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.hparser:foundDate:
Sent by a parser object to provide its delegate with the date encoded in the current element.
- (void)parser:(DTASN1Parser *)parser foundDate:(NSDate *)dateParameters
- 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.hparser:foundNumber:
Sent by a parser object to provide its delegate with number values encoded in the current element.
- (void)parser:(DTASN1Parser *)parser foundNumber:(NSNumber *)numberParameters
- 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.hparser: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 *)objIdentifierParameters
- parser
A parser object.
- objIdentifier
A string representing the object identifier encoded in the current element.
Declared In
DTASN1Parser.hparser:foundString:
Sent by a parser object to provide its delegate with the string encoded in the current element.
- (void)parser:(DTASN1Parser *)parser foundString:(NSString *)stringParameters
- 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.hparser:parseErrorOccurred:
Sent by a parser object to its delegate when it encounters a fatal error.
- (void)parser:(DTASN1Parser *)parser parseErrorOccurred:(NSError *)parseErrorParameters
- parser
A parser object.
- parseError
An
NSErrorobject 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.hparserDidEndDocument:
Sent by the parser object to the delegate when it has successfully completed parsing
- (void)parserDidEndDocument:(DTASN1Parser *)parserParameters
- parser
A parser object.
Declared In
DTASN1Parser.h