Back to index

lightning-sunbird  0.9+nobinonly
nsIAbCard.idl
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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 // Constants used for default email.
00042 // "0": screen name, "1": other email #1, "2": other email #2
00043 #define AB_DEFAULT_EMAIL_IS_SCREEN_NAME "0"
00044 #define AB_DEFAULT_EMAIL_IS_EMAIL_1     "1"
00045 #define AB_DEFAULT_EMAIL_IS_EMAIL_2     "2"
00046 
00047 // Constants used for card types.
00048 // "" or "0": normal, "1": AOL groups, "2": AOL additional email address
00049 #define AB_CARD_IS_NORMAL_CARD            "0"
00050 #define AB_CARD_IS_AOL_GROUPS             "1"
00051 #define AB_CARD_IS_AOL_ADDITIONAL_EMAIL   "2"
00052 
00053 %}
00054 
00055 [scriptable, uuid(97448252-F189-11d4-A422-001083003D0C)]
00056 interface nsIAbPreferMailFormat { 
00057     const unsigned long unknown   = 0; 
00058     const unsigned long plaintext = 1; 
00059     const unsigned long html      = 2; 
00060 }; 
00061 
00062 [scriptable, uuid(6B46BDD5-10DB-44f4-99C9-C7FFE0D3D954)]
00063 interface nsIAbCard : nsISupports {
00064        // Card properties
00065        attribute wstring firstName;
00066        attribute wstring lastName;
00067        attribute wstring phoneticFirstName;
00068        attribute wstring phoneticLastName;
00069        attribute wstring displayName;
00070        attribute wstring nickName;
00071        attribute wstring primaryEmail;
00072        attribute wstring secondEmail;
00073   attribute wstring defaultEmail;
00074   attribute wstring cardType;
00075        attribute wstring workPhone;
00076        attribute wstring homePhone;
00077        attribute wstring faxNumber;
00078        attribute wstring pagerNumber;
00079        attribute wstring cellularNumber;
00080   attribute wstring workPhoneType;
00081   attribute wstring homePhoneType;
00082   attribute wstring faxNumberType;
00083   attribute wstring pagerNumberType;
00084   attribute wstring cellularNumberType;
00085        attribute wstring homeAddress;
00086        attribute wstring homeAddress2;
00087        attribute wstring homeCity;
00088        attribute wstring homeState;
00089        attribute wstring homeZipCode;
00090        attribute wstring homeCountry;
00091        attribute wstring workAddress;
00092        attribute wstring workAddress2;
00093        attribute wstring workCity;
00094        attribute wstring workState;
00095        attribute wstring workZipCode;
00096        attribute wstring workCountry;
00097        attribute wstring jobTitle;
00098        attribute wstring department;
00099        attribute wstring company;
00100   attribute wstring aimScreenName;
00101   attribute wstring anniversaryYear;
00102   attribute wstring anniversaryMonth;
00103   attribute wstring anniversaryDay;
00104   attribute wstring spouseName;
00105   attribute wstring familyName;
00106   attribute wstring defaultAddress;
00107   attribute wstring category;
00111        attribute wstring webPage1;
00115        attribute wstring webPage2;
00116        attribute wstring birthYear;
00117        attribute wstring birthMonth;
00118        attribute wstring birthDay;
00119        attribute wstring custom1;
00120        attribute wstring custom2;
00121        attribute wstring custom3;
00122        attribute wstring custom4;
00123        attribute wstring notes;
00124        attribute unsigned long lastModifiedDate;
00125        attribute unsigned long popularityIndex; /* bumped every time e-mail is sent to this recipient */
00126        attribute unsigned long preferMailFormat;
00127        attribute boolean isMailList;
00133        attribute string mailListURI;
00137   attribute boolean allowRemoteContent;
00138 
00142   readonly attribute boolean isANormalCard;
00143   readonly attribute boolean isASpecialGroup;
00144   readonly attribute boolean isAnEmailAddress;
00145 
00146        wstring getCardValue(in string name);
00147 
00148        void setCardValue(in string attrname, in wstring value);
00149 
00150        // Copies the card attributes from srcCard
00151        void copy(in nsIAbCard srcCard);
00152        
00153        // Edits an existing card in the directory defined by 'uri'
00154        // Rename to editCardInDirectory
00155        // Component will be an RDF card, since it has already
00156        // been created
00157        //
00158        // XXX FIX ME, this should not be a the card, it should be on the addressbook.
00159        void  editCardToDatabase(in string uri);
00160 
00161        boolean equals(in nsIAbCard card);
00162 
00163        string convertToBase64EncodedXML();
00164        wstring convertToXMLPrintData();
00165        string convertToEscapedVCard();
00166 };