if (mime_subclass_p(obj->clazz, (MimeObjectClass*) &mimeMultipartAlternativeClass)) return 0;
MimeGetAttachmentList(MimeObject *tobj, const char *aMessageURL, nsMsgAttachmentData **data){  MimeObject            *obj;  MimeContainer         *cobj;  PRInt32               n;  PRBool                isAlternativeOrRelated = PR_FALSE;  PRBool                isAnInlineMessage;  if (!data)     return 0;  *data = nsnull;  obj = mime_get_main_object(tobj);  if (!obj)    return 0;  if (!mime_subclass_p(obj->clazz, (MimeObjectClass*) &mimeContainerClass))  {    if (!PL_strcasecmp(obj->content_type, MESSAGE_RFC822))      return 0;    else      return ProcessBodyAsAttachment(obj, data);  }  if (mime_subclass_p(obj->clazz, (MimeObjectClass*) &mimeMultipartAlternativeClass))    return 0;    isAnInlineMessage = mime_typep(obj, (MimeObjectClass *) &mimeMessageClass);  cobj = (MimeContainer*) obj;  n = CountTotalMimeAttachments(cobj);  if (n <= 0)     return n;  //in case of an inline message (as body), we need an extra slot for the message itself  //that we will fill later...  if (isAnInlineMessage)    n ++;  *data = (nsMsgAttachmentData *)PR_Malloc( (n + 1) * sizeof(nsMsgAttachmentData));  if (!*data)     return NS_ERROR_OUT_OF_MEMORY;  attIndex = 0;  memset(*data, 0, (n + 1) * sizeof(nsMsgAttachmentData));    // Now, build the list!  nsresult rv;  if (isAnInlineMessage)  {    rv = GenerateAttachmentData(obj, aMessageURL, obj->options, PR_FALSE, *data);    NS_ENSURE_SUCCESS(rv, rv);  }  return BuildAttachmentList((MimeObject *) cobj, *data, aMessageURL);}