The codec decoder function table
If the codec being implemented is to act as a decoder, it needs to implement the decoder functions listed previously and map them in a decoder function table. This structure is defined in EventCodec.h as an AP_EventDecoder_Functions structure with the following functions:
sendTransportEvent setSemanticMapper flushDownstream getLastError See the
AP_EventDecoder_Functions structure in the
API Reference for C++ (Doxygen) for detailed information.
In the implementation of a decoding codec, this function table could be implemented as follows:
static struct AP_EventDecoder_Functions EventDecoder_Functions = {
sendTransportEvent,
setSemanticMapper,
flushDownstream,
getLastErrorDecoder
};
As before, this definition defines a number of library functions as the implementations of the function definitions specified in the Codec Development Specification.