else if (!nsCRT::strcasecmp(obj->encoding, ENCODING_YENCODE)) fn = &MimeYDecoderInit;
static int MimeEncrypted_parse_begin (MimeObject *);static int MimeEncrypted_parse_buffer (char *, PRInt32, MimeObject *);static int MimeEncrypted_parse_line (char *, PRInt32, MimeObject *);static int MimeEncrypted_parse_decoded_buffer (char *, PRInt32, MimeObject *);static int MimeEncrypted_parse_eof (MimeObject *, PRBool);static int MimeEncrypted_parse_end (MimeObject *, PRBool);static int MimeEncrypted_add_child (MimeObject *, MimeObject *);static int MimeHandleDecryptedOutput (const char *, PRInt32, void *);static int MimeHandleDecryptedOutputLine (char *, PRInt32, MimeObject *);static int MimeEncrypted_close_headers (MimeObject *);static int MimeEncrypted_emit_buffered_child(MimeObject *);static intMimeEncryptedClassInitialize(MimeEncryptedClass *clazz){  MimeObjectClass    *oclass = (MimeObjectClass *)    clazz;  MimeContainerClass *cclass = (MimeContainerClass *) clazz;  NS_ASSERTION(!oclass->class_initialized, "1.2 <mscott@netscape.com> 01 Nov 2001 17:59");  oclass->initialize   = MimeEncrypted_initialize;  oclass->finalize     = MimeEncrypted_finalize;  oclass->parse_begin  = MimeEncrypted_parse_begin;  oclass->parse_buffer = MimeEncrypted_parse_buffer;  oclass->parse_line   = MimeEncrypted_parse_line;  oclass->parse_eof    = MimeEncrypted_parse_eof;  oclass->parse_end    = MimeEncrypted_parse_end;  cclass->add_child    = MimeEncrypted_add_child;  clazz->parse_decoded_buffer = MimeEncrypted_parse_decoded_buffer;  return 0;}static intMimeEncrypted_initialize (MimeObject *obj){  return ((MimeObjectClass*)&MIME_SUPERCLASS)->initialize(obj);}static intMimeEncrypted_parse_begin (MimeObject *obj){  MimeEncrypted *enc = (MimeEncrypted *) obj;  MimeDecoderData *(*fn) (nsresult (*) (const char*, PRInt32, void*), void*) = 0;  if (enc->crypto_closure)	return -1;  enc->crypto_closure = (((MimeEncryptedClass *) obj->clazz)->crypto_init) (obj, MimeHandleDecryptedOutput, obj);  if (!enc->crypto_closure)	return -1;  /* (Mostly duplicated from MimeLeaf, see comments in mimecryp.h.)     Initialize a decoder if necessary.   */  if (!obj->encoding)	;  else if (!nsCRT::strcasecmp(obj->encoding, ENCODING_BASE64))	fn = &MimeB64DecoderInit;  else if (!nsCRT::strcasecmp(obj->encoding, ENCODING_QUOTED_PRINTABLE))	fn = &MimeQPDecoderInit;  else if (!nsCRT::strcasecmp(obj->encoding, ENCODING_UUENCODE) ||		   !nsCRT::strcasecmp(obj->encoding, ENCODING_UUENCODE2) ||		   !nsCRT::strcasecmp(obj->encoding, ENCODING_UUENCODE3) ||		   !nsCRT::strcasecmp(obj->encoding, ENCODING_UUENCODE4))	fn = &MimeUUDecoderInit;  if (fn)	{	  enc->decoder_data =		fn (/* The (int (*) ...) cast is to turn the `void' argument			   into `MimeObject'. */			((nsresult (*) (const char *, PRInt32, void *))			 ((MimeEncryptedClass *)obj->clazz)->parse_decoded_buffer),			obj);	  if (!enc->decoder_data)		return MIME_OUT_OF_MEMORY;	}  return ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_begin(obj);}