AccurateRip Response Parser module

Parse an AccurateRip HTTP-response to an object representation.

An ARStreamParser push-parses the binary content of a HTTP-response from AccurateRip and emits a series of events. There is a minimal default implementations of ARStreamParser provided, ARParser, that accepts an opened stream throwing exceptions on at least failbit and badbit.

For handling the emitted events, an ARStreamParser can be registered two types of handlers to, a ContentHandler and an ErrorHandler. Both have default implementations as there are DefaultContentHandler and DefaultErrorHandler. DefaultContentHandler just populates an ARResponse object that represents the parsed information. DefaultErrorHandler just logs the error position along with an error message and throws a StreamReadException.

A StreamReadException is also thrown by an ARStreamParser when the input byte stream ends prematurely or is corrupted in a way the parser can recognize. It contains exact information about the stream-relative as well as the block-relative error position and a human-readable error message.

If no exceptional situation occurrs, the DefaultContentHandler populates an ARResponse with the parsed information. An ARResponse represents the entire content data from an AccurateRip HTTP-response. It is composed of a sequence of ARBlocks of which each is composed of a leading ARId followed by a sequence of ARTriplets, one for each track.

While an ARBlock represents thus a single checksum profile for a compact disc pressing an ARTriplet represents the AccurateRip information for a single track in this pressing. Each ARTriplet contains an ARCSv1 or ARCSv2 checksum value, a confidence value and a check value to identify the pressing.

Classes

class arcstk::v_1_0_0::ARBlock
An album-related block of triplets as it occurrs in an AccurateRip response.
class arcstk::v_1_0_0::ARParser
Generic parser for std::istream instances.
class arcstk::v_1_0_0::ARResponse
Response content from AccurateRip when responding to an request.
class arcstk::v_1_0_0::ARStreamParser
Abstract base for parsing the content of an AccurateRip HTTP-response.
class arcstk::v_1_0_0::ARTriplet
A triplet of values describing a particular track in an AccurateRip response.
class arcstk::v_1_0_0::ContentHandler
Interface for ARStreamParser content handlers.
class arcstk::v_1_0_0::DefaultContentHandler
Populates an existing ARResponse instance.
class arcstk::v_1_0_0::DefaultErrorHandler
Logs every error and throws StreamReadException afterwards.
class arcstk::v_1_0_0::ErrorHandler
Interface for ARStreamParser error handlers.
class arcstk::v_1_0_0::StreamReadException
Reports a read error during parsing a binary stream.