Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsMsgAttachmentHandler.cpp File Reference
#include "nsMsgAttachmentHandler.h"
#include "nsMsgCopy.h"
#include "nsIPrefService.h"
#include "nsIPrefBranch.h"
#include "nsMsgSend.h"
#include "nsMsgCompUtils.h"
#include "nsMsgEncoders.h"
#include "nsMsgI18N.h"
#include "nsURLFetcher.h"
#include "nsMimeTypes.h"
#include "nsIMsgStringService.h"
#include "nsMsgComposeStringBundle.h"
#include "nsMsgCompCID.h"
#include "nsXPIDLString.h"
#include "nsReadableUtils.h"
#include "nsIMsgMessageService.h"
#include "nsMsgUtils.h"
#include "nsMsgPrompts.h"
#include "nsTextFormatter.h"
#include "nsIPrompt.h"
#include "nsMsgSimulateError.h"
#include "nsITextToSubURI.h"
#include "nsEscape.h"
#include "nsIURL.h"
#include "nsNetCID.h"
#include "nsIMimeStreamConverter.h"
#include "nsMsgMimeCID.h"
#include "nsNetUtil.h"
#include "nsNativeCharsetUtils.h"

Go to the source code of this file.

Functions

static nsresult FetcherURLDoneCallback (nsresult aStatus, const char *aContentType, const char *aCharset, PRInt32 totalSize, const PRUnichar *aMsg, void *tagData)

Function Documentation

static nsresult FetcherURLDoneCallback ( nsresult  aStatus,
const char *  aContentType,
const char *  aCharset,
PRInt32  totalSize,
const PRUnichar aMsg,
void tagData 
) [static]

Definition at line 492 of file nsMsgAttachmentHandler.cpp.

{
  nsMsgAttachmentHandler *ma = (nsMsgAttachmentHandler *) tagData;
  NS_ASSERTION(ma != nsnull, "not-null mime attachment");

  if (ma != nsnull)
  {
    ma->m_size = totalSize;
    if (aContentType)
    {
#if defined(XP_MAC) || defined(XP_MACOSX)
      //Do not change the type if we are dealing with an apple double file
      if (!ma->mAppleFileSpec)
#else
        // can't send appledouble on non-macs
        if (strcmp(aContentType, "multipart/appledouble")) 
#endif
      {
        PR_FREEIF(ma->m_type);
        ma->m_type = PL_strdup(aContentType);
      }
    }

    if (aCharset)
    {
      PR_FREEIF(ma->m_charset);
      ma->m_charset = PL_strdup(aCharset);
    }

    return ma->UrlExit(aStatus, aMsg);
  }
  else
    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function: