Back to index

lightning-sunbird  0.9+nobinonly
nsIMsgHdr.idl
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either of the GNU General Public License Version 2 or later (the "GPL"),
00026  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #include "nsISupports.idl"
00039 
00040 %{C++
00041 #include "MailNewsTypes.h"
00042 %}
00043 
00044 #include "MailNewsTypes2.idl"
00045 
00046 [ptr] native octetPtr(PRUint8);
00047 
00048 interface nsIMsgFolder;
00049 
00050 [scriptable, uuid(B5212A60-F93F-11d2-951C-006097222B83)]
00051 interface nsIMsgDBHdr : nsISupports
00052 {
00053     /* general property routines - I think this can retrieve any
00054        header in the db */
00055     AString getProperty(in string propertyName);
00056     void setProperty(in string propertyName, in AString propertyStr);
00057     void setStringProperty(in string propertyName, in string propertyValue);
00058     string getStringProperty(in string propertyName);
00059     unsigned long getUint32Property(in string propertyName);
00060     void setUint32Property(in string propertyName,
00061                            in unsigned long propertyVal);
00062  
00063     // accessors, to make our JS cleaner
00064     readonly attribute boolean isRead;
00065     readonly attribute boolean isFlagged;
00066 
00067     // Mark message routines
00068     void markRead(in boolean read);
00069     void markFlagged(in boolean flagged);
00070     void markHasAttachments(in boolean hasAttachments);
00071     
00072     attribute nsMsgPriorityValue priority;
00073     void setPriorityString(in string priority);
00074     
00075     /* flag handling routines */
00076     attribute unsigned long flags;
00077     unsigned long OrFlags(in unsigned long flags);
00078     unsigned long AndFlags(in unsigned long flags);
00079 
00080     /* various threading stuff */
00081     attribute nsMsgKey threadId;
00082     attribute nsMsgKey messageKey;
00083     attribute nsMsgKey threadParent;
00084 
00085     /* meta information about the message, learned from reading the message */
00086     attribute unsigned long messageSize;
00087     attribute unsigned long lineCount;
00088     attribute unsigned long statusOffset;
00089     attribute unsigned long messageOffset;
00090     attribute unsigned long offlineMessageSize;
00091     /* common headers */
00092     attribute PRTime date;
00093     readonly attribute unsigned long dateInSeconds;
00094     attribute string messageId;
00095     attribute string ccList;
00096     attribute string author;
00097     attribute string subject;
00098     attribute string recipients;
00099     
00100     /* anything below here still has to be fixed */
00101     void setReferences(in string references);
00102     readonly attribute unsigned short numReferences;
00103     ACString getStringReference(in long refNum);
00104 
00105     void setRecipientsArray(in string names, in string addresses,
00106                             in unsigned long numAddresses);
00107     void setCCListArray(in string names, in string addresses,
00108                         in unsigned long numAddresses);
00109 
00110     readonly attribute wstring mime2DecodedAuthor;
00111     readonly attribute wstring mime2DecodedSubject;
00112     readonly attribute wstring mime2DecodedRecipients;
00113 
00114     [noscript] void getAuthorCollationKey(out octetPtr key, out unsigned long len);
00115     [noscript] void getSubjectCollationKey(out octetPtr key, out unsigned long len);
00116     [noscript] void getRecipientsCollationKey(out octetPtr key, out unsigned long len);
00117     
00118     attribute string Charset;
00119     attribute nsMsgLabelValue label;
00120     attribute string accountKey;
00121     readonly attribute nsIMsgFolder folder;
00122 };
00123 /* *******************************************************************************/
00124