Manipulating MiniMIME codecs


Codec manipulation

int mm_codec_hasdecoder (const char *encoding)
int mm_codec_hasencoder (const char *encoding)
int mm_codec_isregistered (const char *encoding)
int mm_codec_register (const char *encoding, char *(*encoder)(char *data, u_int32_t i), char *(*decoder)(char *data))
int mm_codec_unregister (const char *encoding)
int mm_codec_unregisterall (void)
void mm_codec_registerdefaultcodecs (void)

Function Documentation

int mm_codec_hasdecoder ( const char *  encoding  ) 

Looks up whether a context has an decoder installed for a given encoding

Parameters:
encoding The encoding specifier to look up
Returns:
1 if a decoder is installed or 0 if not

int mm_codec_hasencoder ( const char *  encoding  ) 

Looks up whether a context has an encoder installed for a given encoding

Parameters:
ctx A valid MIME context
encoding The encoding specifier to look up
Returns:
1 if an encoder is installed or 0 if not

int mm_codec_isregistered ( const char *  encoding  ) 

Looks up whether a codec for a given encoding is installed to a context

Parameters:
encoding The encoding specifier to look up
Returns:
1 if a codec was found or 0 if not

int mm_codec_register ( const char *  encoding,
char *(*)(char *data, u_int32_t i)  encoder,
char *(*)(char *data)  decoder 
)

Registers a codec with the MiniMIME library

Parameters:
encoding The encoding specifier for which to register the codec
encoder The encoder function for this encoding
decoder The decoder function for this encoding
Returns:
1 if successfull or 0 if not
This function registers a codec for a given MiniMIME context. The codec may provide an decoder, an encoder or both (but not none). If there is a codec already installed for this encoding, the function will puke.

void mm_codec_registerdefaultcodecs ( void   ) 

Registers the default codecs to a MiniMIME context

This functions registers the codecs for the following encodings to a MiniMIME context:

int mm_codec_unregister ( const char *  encoding  ) 

Unregisters a MiniMIME codec

Parameters:
encoding The encoding specifier which to unregister
Returns:
0 if unregistered successfully, or -1 if there was no such codec

int mm_codec_unregisterall ( void   ) 

Unregisters all codecs within a context

Parameters:
ctx A valid MiniMIME context
Returns:
0 if all codecs were unregistered successfully or -1 if an error occured.
Note:
Foobar


Generated on Thu Mar 29 17:59:08 2007 for MiniMIME by  doxygen 1.5.1