Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions | Variables
msgMapiImp.cpp File Reference
#include <mapidefs.h>
#include <mapi.h>
#include "msgMapi.h"
#include "msgMapiImp.h"
#include "msgMapiFactory.h"
#include "msgMapiMain.h"
#include "nsMsgCompFields.h"
#include "msgMapiHook.h"
#include "nsString.h"
#include "nsCOMPtr.h"
#include "nsISupports.h"
#include "nsMsgCompCID.h"
#include "nsIMsgDatabase.h"
#include "nsMsgFolderFlags.h"
#include "nsIMsgHdr.h"
#include "nsMsgBaseCID.h"
#include "nsIMsgAccountManager.h"
#include "nsIMsgFolder.h"
#include "nsIMsgImapMailFolder.h"
#include <time.h>
#include "nsIInputStream.h"
#include "nsIMsgHeaderParser.h"
#include "nsILineInputStream.h"
#include "nsISeekableStream.h"
#include "nsIFileSpec.h"
#include "nsFileSpec.h"
#include "nsILocalFile.h"
#include "nsIFileStreams.h"
#include "nsNetCID.h"

Go to the source code of this file.

Classes

class  MsgMapiListContext

Defines

#define MAX_NAME_LEN   256
#define EMPTY_MESSAGE_LINE(buf)   (buf[0] == nsCRT::CR || buf[0] == nsCRT::LF || buf[0] == '\0')

Functions

 STDMETHODIMP_ (ULONG) CMapiImp
static void msg_FreeMAPIFile (lpMapiFileDesc f)
static void msg_FreeMAPIRecipient (lpMapiRecipDesc rd)
void MSG_FreeMapiMessage (lpMapiMessage msg)
PRBool MsgMarkMapiMessageRead (nsIMsgFolder *folder, nsMsgKey key, PRBool read)
PRBool MSG_DeleteMapiMessage (nsIMsgFolder *folder, nsMsgKey key)

Variables

PRLogModuleInfoMAPI

Define Documentation

#define EMPTY_MESSAGE_LINE (   buf)    (buf[0] == nsCRT::CR || buf[0] == nsCRT::LF || buf[0] == '\0')
#define MAX_NAME_LEN   256

Definition at line 524 of file msgMapiImp.cpp.


Function Documentation

Definition at line 932 of file msgMapiImp.cpp.

{
  PRBool success = FALSE;
  MsgMapiListContext *context = new MsgMapiListContext();
  if (context) 
  {
    if (NS_SUCCEEDED(context->OpenDatabase(folder)))
    {
      success = context->DeleteMessage(key);
    }
    
    delete context;
  }
  
  return success;
}

Here is the call graph for this function:

static void msg_FreeMAPIFile ( lpMapiFileDesc  f) [static]

Definition at line 831 of file msgMapiImp.cpp.

{
  if (f)
  {
    CoTaskMemFree(f->lpszPathName);
    CoTaskMemFree(f->lpszFileName);
  }
}

Here is the caller graph for this function:

void MSG_FreeMapiMessage ( lpMapiMessage  msg)

Definition at line 852 of file msgMapiImp.cpp.

{
  ULONG i;
  
  if (msg)
  {
    CoTaskMemFree(msg->lpszSubject);
    CoTaskMemFree(msg->lpszNoteText);
    CoTaskMemFree(msg->lpszMessageType);
    CoTaskMemFree(msg->lpszDateReceived);
    CoTaskMemFree(msg->lpszConversationID);
    
    if (msg->lpOriginator)
      msg_FreeMAPIRecipient(msg->lpOriginator);
    
    for (i=0; i<msg->nRecipCount; i++)
      if (&(msg->lpRecips[i]) != nsnull)
        msg_FreeMAPIRecipient(&(msg->lpRecips[i]));
      
      CoTaskMemFree(msg->lpRecips);
      
      for (i=0; i<msg->nFileCount; i++)
        if (&(msg->lpFiles[i]) != nsnull)
          msg_FreeMAPIFile(&(msg->lpFiles[i]));
        
      CoTaskMemFree(msg->lpFiles);
      
      CoTaskMemFree(msg);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void msg_FreeMAPIRecipient ( lpMapiRecipDesc  rd) [static]

Definition at line 840 of file msgMapiImp.cpp.

{
  if (rd)
  {
    if (rd->lpszName)
      CoTaskMemFree(rd->lpszName);
    if (rd->lpszAddress)
      CoTaskMemFree(rd->lpszAddress);
    // CoTaskMemFree(rd->lpEntryID);  
  }
}

Here is the caller graph for this function:

PRBool MsgMarkMapiMessageRead ( nsIMsgFolder folder,
nsMsgKey  key,
PRBool  read 
)

Definition at line 884 of file msgMapiImp.cpp.

{
  PRBool success = FALSE;
  MsgMapiListContext *context = new MsgMapiListContext();
  if (context)
  {
    if (NS_SUCCEEDED(context->OpenDatabase(folder)))
    {
      if (NS_SUCCEEDED(context->MarkRead (key, read)))
        success = TRUE;
    }
    delete context;
  }
  return success;
}

Here is the call graph for this function:

Definition at line 111 of file msgMapiImp.cpp.

{
    return PR_AtomicIncrement(&m_cRef);
}

Here is the call graph for this function:


Variable Documentation

Definition at line 75 of file msgMapiImp.cpp.