Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
nsMsgAttachment Class Reference

#include <nsMsgAttachment.h>

Inheritance diagram for nsMsgAttachment:
Inheritance graph
[legend]
Collaboration diagram for nsMsgAttachment:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIMSGATTACHMENT 
nsMsgAttachment ()
virtual ~nsMsgAttachment ()
boolean equalsUrl (in nsIMsgAttachment attachment)
 equalsUrl

Public Attributes

attribute AString name
 name attribute
attribute string url
 url attribute
attribute ACString urlCharset
 urlCharset attribute
attribute boolean temporary
 temporary attribute
attribute string contentLocation
 contentLocation attribute
attribute string contentType
 contentType attribute
attribute string contentTypeParam
 contentTypeParam attribute
attribute string charset
 charset attribute
attribute string macType
 macType attribute
attribute string macCreator
 macCreator attribute

Private Member Functions

nsresult DeleteAttachment ()

Private Attributes

nsString mName
nsCString mUrl
nsCString mUrlCharset
PRBool mTemporary
nsCString mContentLocation
nsCString mContentType
nsCString mContentTypeParam
nsCString mCharset
nsCString mMacType
nsCString mMacCreator

Detailed Description

Definition at line 44 of file nsMsgAttachment.h.


Constructor & Destructor Documentation

Definition at line 45 of file nsMsgAttachment.cpp.

Definition at line 50 of file nsMsgAttachment.cpp.

Here is the call graph for this function:


Member Function Documentation

Definition at line 218 of file nsMsgAttachment.cpp.

{
  nsresult rv;
  PRBool isAFile = PR_FALSE;

  nsCOMPtr<nsIFile> urlFile;
  rv = NS_GetFileFromURLSpec(mUrl, getter_AddRefs(urlFile));
  NS_ASSERTION(NS_SUCCEEDED(rv), "Can't nsIFile from URL string");
  if (NS_SUCCEEDED(rv))
  {
    PRBool bExists = PR_FALSE;
    rv = urlFile->Exists(&bExists);
    NS_ASSERTION(NS_SUCCEEDED(rv), "Exists() call failed!");
    if (NS_SUCCEEDED(rv) && bExists)
    {
      rv = urlFile->IsFile(&isAFile);
      NS_ASSERTION(NS_SUCCEEDED(rv), "IsFile() call failed!");
    }
  }

  // remove it if it's a valid file
  if (isAFile)
         rv = urlFile->Remove(PR_FALSE); 

  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

equalsUrl

@ determines if both attachments have the same url.


Member Data Documentation

charset attribute

the charset of the attachment. It will be added to the content-type during the /save operation omitted, will be determined automatically (if possible).

Definition at line 106 of file nsIMsgAttachment.idl.

contentLocation attribute

the origin url of the attachment, used normaly when attaching a locally saved html document.

Definition at line 80 of file nsIMsgAttachment.idl.

contentType attribute

the content-type of the attachment, this does not include extra content-type parameters. If need to specify extra information, use contentTypeParam, charset, macType or macCreator. ommitted, it will be determined base on either the name, the url or the content of the file.

Definition at line 89 of file nsIMsgAttachment.idl.

contentTypeParam attribute

the any content-type parameter (other than the content-type itself, charset, macType or macCreator). will be added to the content-type during the send/save operation.

Definition at line 97 of file nsIMsgAttachment.idl.

macCreator attribute

the Mac file creator of the attachment. It will be added to the content-type during the /save operation omitted, will be determined automatically on Macintosh OS.

Definition at line 124 of file nsIMsgAttachment.idl.

macType attribute

the Mac file type of the attachment. It will be added to the content-type during the /save operation omitted, will be determined automatically on Macintosh OS.

Definition at line 115 of file nsIMsgAttachment.idl.

Definition at line 63 of file nsMsgAttachment.h.

Definition at line 60 of file nsMsgAttachment.h.

Definition at line 61 of file nsMsgAttachment.h.

Definition at line 62 of file nsMsgAttachment.h.

Definition at line 65 of file nsMsgAttachment.h.

Definition at line 64 of file nsMsgAttachment.h.

Definition at line 56 of file nsMsgAttachment.h.

Definition at line 59 of file nsMsgAttachment.h.

Definition at line 57 of file nsMsgAttachment.h.

Definition at line 58 of file nsMsgAttachment.h.

attribute AString nsIMsgAttachment::name [inherited]

name attribute

real name, will be sent with the attachment's header. no name has been provided, a name will be generated using the url.

Definition at line 49 of file nsIMsgAttachment.idl.

temporary attribute

set to true, the file pointed by the url will be destroyed when this object is destroyed. is only for local attachment.

Definition at line 73 of file nsIMsgAttachment.idl.

url attribute

where the attachment live (localy or remotely)

Definition at line 56 of file nsIMsgAttachment.idl.

urlCharset attribute

the Charset of url (used to convert url to Unicode after unescaping)

Definition at line 64 of file nsIMsgAttachment.idl.


The documentation for this class was generated from the following files: